setono / post-nord-php-sdk
A PHP SDK for the PostNord API
Installs: 28 125
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: >=8.1
- cuyz/valinor: ^1.10
- php-http/discovery: ^1.14
- psr/http-client: ^1.0
- psr/http-client-implementation: ^1
- psr/http-factory: ^1.0
- psr/http-factory-implementation: ^1
- psr/http-message: ^1.0
- psr/log: ^1.1 || ^2.0 || ^3.0
Requires (Dev)
- infection/infection: ^0.27.11
- kriswallsmith/buzz: ^1.2
- nyholm/psr7: ^1.8
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.6
- psalm/plugin-phpunit: ^0.18
- setono/code-quality-pack: ^2.7
This package is auto-updated.
Last update: 2024-11-10 13:41:02 UTC
README
A PHP SDK for the PostNord API.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:
composer require setono/post-nord-php-sdk
Usage
Here is an example showing you can get the nearest service points.
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, ));
Framework integration
- There is a Symfony bundle integrating this library: Symfony Post Nord Bundle