mero / correios
Integration with Correios Webservices
0.1.3
2017-06-04 04:27 UTC
Requires
- php: >=5.4.9
- ext-soap: *
Requires (Dev)
- phpunit/phpunit: ~4.4
- satooshi/php-coveralls: ~0.6.1
This package is auto-updated.
Last update: 2024-12-17 06:33:21 UTC
README
Integration with Correios Webservices.
Requirements
- PHP 5.4 or above
- SOAP extension
Instalation with composer
- Open your project directory;
- Run
composer require mero/correios
to addMero Correios
in your project vendor.
Client methods
Usage
Declare an instance of object Mero\Correios\Client
and use the methods
available in the client.
Example:
<?php $correios = new \Mero\Correios\Client(); $address = $correios->findAddressByZipCode('22640102'); // Return Address object related to '22640-102' zip-code. echo $address->getAddress(); // Return the address 'Avenida das Américas' echo $address->getNeighborhood(); // Return the neighborhood 'Barra da Tijuca' echo $address->getCity(); // Return the city 'Rio de Janeiro' echo $address->getState(); // Return the state 'RJ' echo $address->getZipCode(); // Return the address '22640102'