定制 answear/meest-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

answear/meest-bundle

最新稳定版本:4.1.0

Composer 安装命令:

composer require answear/meest-bundle

包简介

Meest B2B API integration for Symfony.

README 文档

README

Meest B2B API integration for Symfony.
Documentation of the Meest B2B API can be found here: http://dev.meestb2b.com:8090/confluence/.

Installation

  • install with Composer
composer require answear/meest-bundle

Answear\MeestBundle\AnswearMeestBundle::class => ['all' => true],
should be added automatically to your config/bundles.php file by Symfony Flex.

Usage

  1. Fetch array of Nova Poshta Pickup Points (or any other supported division type found in DivisionTypeEnum)
use Answear\MeestBundle\Enum\DivisionTypeEnum;
use Answear\MeestBundle\Request\SearchDivisions;
use Answear\MeestBundle\Response\DTO\DivisionDTO;
use Answear\MeestBundle\Response\SearchDivisions as SearchDivisionsResponse;
use Answear\MeestBundle\Service\MeestClient;

// ...

/**
 * @var MeestClient
 */
private $meestClient;

public function __construct(
    ...
    MeestClient $meestClient
) {
    ...
    $this->meestClient = $meestClient;
}

...

public function pickupPoints(): void
{
    /** @var SearchDivisionsResponse $response */
    $response = $this->meestClient->request(new SearchDivisions(DivisionTypeEnum::NovaPoshtaPoint));
    
    /** @var DivisionDTO $division */
    foreach ($response->return as $division) {
        if ($division->active) {
            ...
        }
    }
    ...
}

Final notes

Feel free to open pull requests with new features, improvements or bug fixes. The Answear team will be grateful for any comments.

统计信息

  • 总下载量: 12.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-10