setono/post-nord-php-sdk

PostNord API 的 PHP SDK

v2.0.0-alpha.3 2024-06-10 12:47 UTC

This package is auto-updated.

Last update: 2024-09-10 13:24:56 UTC


README

Latest Version Software License Build Status Code Coverage Mutation testing

一个用于 PostNord API 的 PHP SDK。

安装

打开命令行,进入你的项目目录,并执行以下命令以下载此库的最新稳定版本

composer require setono/post-nord-php-sdk

用法

以下是一个示例,展示如何获取最近的服务点。

use Setono\PostNord\Client\Client;
use Setono\PostNord\Request\Query\ServicePoints\NearestByAddressQuery;

require_once __DIR__ . '/../vendor/autoload.php';

$client = new Client('b09ff56c6a0344768d5afaaec595b2fb');

$servicePoints = $client->servicePoints()->getNearestByAddress(NearestByAddressQuery::create(
    'Street name',
    'Street number',
    'Postal code',
    'City',
    'Country code',
    numberOfServicePoints: 10,
));

框架集成