answear/inpost-pickup-point-bundle

Inpost API 客户端。

安装次数: 10,877

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

类型:symfony-bundle

3.0.2 2024-09-12 08:13 UTC

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 (整数)