bliskapaczkapl / bliskapaczka-api-client
BliczkaPaczka API Client
Installs: 618
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 1
Open Issues: 2
Type:api-client
Requires
- globalcitizen/php-iban: ^2.6
- psr/log: ~1.1.0
Requires (Dev)
- block8/php-docblock-checker: ^1.1
- monolog/monolog: ^1.24
- phploc/phploc: ^3.0
- phpmd/phpmd: ^2.4
- phpunit/phpunit: ^5.7
- sebastian/phpcpd: ^2.0
- sensiolabs/security-checker: 4.*
- squizlabs/php_codesniffer: 2.*
- dev-master
- 3.7.0
- 3.6.8
- 3.6.7
- 3.6.6
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.18.0
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.1
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- dev-feature/available_services
- dev-feature/WIW_276_source_header
- dev-feature/WiW-127
- dev-Change-Exception-Classes
- dev-Added-oop-style
- dev-feature/WTYC-245-add-config-request-class
- dev-feature/WTYC-241-added-fields-to-request
- dev-feature/WTYC-209_klient_api_po_dodaniu_nowego_tag_trzeb_zmusic_packagist_org_do_aktualizacji
- dev-feature/WTYC-212_klient_api_plik_z_licencja
- dev-feature/WTYC-108_klient_api_klasa_do_konfiguracji
This package is auto-updated.
Last update: 2025-03-25 20:53:06 UTC
README
BliskaPaczka API Client
This package is PHP API client for Bliskapaczka.pl API.
Features
Client has support for API actions:
- order
- save
- get waybill
- pricing
- get
For more information pleas see Bliskapaczka API documentation
Usage
Initialize client
$apiKey = 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx';
$apiClient = new Bliskapaczka\ApiClient\Bliskapaczka\Order($apiKey, 'test');
Create new order
$orderData = [
"senderFirstName" => "string",
"senderLastName" => "string",
"senderPhoneNumber" => "606555433",
"senderEmail" => "bob@example.com",
"senderStreet" => "string",
"senderBuildingNumber" => "string",
"senderFlatNumber" => "string",
"senderPostCode" => "54-130",
"senderCity" => "string",
"receiverFirstName" => "string",
"receiverLastName" => "string",
"receiverPhoneNumber" => "600555432",
"receiverEmail" => "eva@example.com",
"operatorName" => "INPOST",
"destinationCode" => "KRA010",
"postingCode" => "KOS01L",
"codValue" => 0,
"insuranceValue" => 0,
"additionalInformation" => "string",
"parcel" => [
"dimensions" => [
"height" => 20,
"length" => 20,
"width" => 20,
"weight" => 2
]
]
];
var_dump($apiClient->create($orderData));
Developing
How to run unit tests?
php vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/unit
How to run SCA?
php vendor/bin/phpcs --standard=PSR2 src/ tests/
php vendor/bin/phpmd src/ text codesize
php vendor/bin/phpcpd src/
php vendor/bin/phpdoccheck --directory=src/
php vendor/bin/phploc src/
How to run API tests as a Client?
php vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/pact/
Setup Pact Mock
Via gem
gem install pact-mock_service
pact-mock-service --port 1234
or use docker
docker run -p 1234:1234 -v /tmp/log:/var/log/pacto -v /tmp/contracts:/opt/contracts madkom/pact-mock-service
How to run unit tests on docker
docker build -t bliskapaczka_docker_php5 .
docker run -v $(pwd):/app --rm bliskapaczka_docker_php5 --bootstrap tests/bootstrap.php tests/unit