answear / inpost-pickup-point-bundle
Inpost API 客户端。
3.0.2
2024-09-12 08:13 UTC
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^6.0
- phpstan/phpstan-deprecation-rules: ^1.1
- symfony/http-kernel: ^6.1
- symfony/property-info: ^6.1
- symfony/serializer: ^6.1
- symfony/serializer-pack: ^1.3
- webmozart/assert: ^1.11
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.48
- phpro/grumphp: ^2.4
- phpstan/phpstan: ^1.10.57
- phpstan/phpstan-webmozart-assert: ^1.2.4
- phpunit/phpunit: ^10.5
- roave/security-advisories: dev-master
- symfony/phpunit-bridge: 6.2.*
This package is auto-updated.
Last update: 2024-09-12 08:18:44 UTC
README
Inpost 对 Symfony 的集成。API 文档可在此处找到:https://docs.inpost24.com/display/PL/Dokumentacja+API+SHIPX
安装
- 使用 Composer 安装
composer require answear/inpost-pickup-point-bundle
Answear\InpostBundle\AnswearInpostBundle::class => ['all' => true],
应该由 Symfony Flex 自动添加到您的 config/bundles.php
文件中。
使用方法
查找包裹机
use Answear\InpostBundle\Command\FindPoints; use Answear\InpostBundle\Request\FindPointsRequestBuilder; $findPointsRequest = (new FindPointsRequestBuilder())->build(); /** @var FindPoints $findPointsCommand */ $findOfficeResponse = $findPointsCommand->findPoints($findPointsRequest);
FindPointsRequestBuilder
此类允许您快速搜索特定包裹机
- 示例:搜索具有给定名称的包裹机
use Answear\InpostBundle\Request\FindPointsRequestBuilder; $findPointsRequest = (new FindPointsRequestBuilder()) ->setName('AK1001') ->build();
可用方法
- setName (字符串)
- setNames (数组)
- setType (PointType)
- setTypes (PointType[])
- setFunction (PointFunctionsType)
- setFunctions (PointFunctionsType[])
- setPartnerId (整数)
- setPartnersId (数组)
- setIsNext (布尔值)
- setPaymentAvailable (布尔值)
- setPostCode (字符串)
- setPostCodes (数组)
- setCity (字符串)
- setCities (数组)
- setProvince (字符串)
- setVirtual (整数)
- setVirtuals (数组)
- setUpdatedFrom (DateTimeInterface)
- setUpdatedTo (DateTimeInterface)
- setPage (整数)
- setPerPage (整数)