rest-full / correios
An easy way to interact with the main features of Correios.
1.0.0
2023-08-30 02:13 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: 7.*
- rest-full/error: 1.*
This package is auto-updated.
Last update: 2024-04-30 00:43:17 UTC
README
About Correios
An easy way to interact with the main features of Correios.
Installation
- Download Composer or update
composer self-update
. - Run
php composer.phar require rest-full/correios
or composer installed globallycompser require rest-full/correios
or composer.json"rest-full/correios": "1.0.0"
and install or update.
Usage
Search for zip code the Correios.
<?php require_once __DIR__ . '../vendor/autoload.php'; use Restfull\Correios\Client; $correios = new Client(); echo $correios->zipcode('20520-054');
calculate the shipping of the order
<?php require_once __DIR__ . '../vendor/autoload.php'; use Restfull\Correios\Client; $correios = new Client; $correios->multiZipCode(['21050-560', '21520-001'])->freight(['PAC'], [ 'width' => 16.4, 'height' => 15.9, 'length' => 17.8, 'weight' => 53.1, 'quantity' => 1 ]);
Licença
The Correios is open-sourced software licensed under theMIT license .