mero/correios
Composer 安装命令:
composer require mero/correios
包简介
Integration with Correios Webservices
README 文档
README
Integration with Correios Webservices.
Requirements
- PHP 5.4 or above
- SOAP extension
Instalation with composer
- Open your project directory;
- Run
composer require mero/correiosto addMero Correiosin your project vendor.
Client methods
| Method | Description | Parameters | Return | Exceptions |
|---|---|---|---|---|
| findAddressByZipCode | Find address informations using the zip code. | $zipCode | Mero\Correios\Model\Address | AddressNotFoundException and InvalidZipCodeException |
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'
统计信息
- 总下载量: 385
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-02