承接 baywa-re-lusy/packaging-types-api-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

baywa-re-lusy/packaging-types-api-sdk

最新稳定版本:1.0.2

Composer 安装命令:

composer require baywa-re-lusy/packaging-types-api-sdk

包简介

BayWa r.e. LUSY Packaging Types API SDK

README 文档

README

This SDK can be used to retrieve Packaging Types, optionally filtered by subsidiaries or Transporeon ID.

All dependencies injected into the constructor are PSR-compatible:

Installation

composer require baywa-re-lusy/packaging-types-api-sdk

Usage

use Laminas\Cache\Storage\Adapter\Apcu;

$tokenCache  = new \Laminas\Cache\Psr\CacheItemPool\CacheItemPoolDecorator(new Apcu());
$resultCache = new \Laminas\Cache\Psr\CacheItemPool\CacheItemPoolDecorator(new Apcu());
$httpFactory = new \Nyholm\Psr7\Factory\Psr17Factory();
$httpClient  = new \GuzzleHttp\Client();

$packagingTypesApiClient = new \BayWaReLusy\PackagingTypesAPI\SDK\PackagingTypesApiClient(
    "<URL to Packaging Types API>",
    "<URL to Token API Endpoint>",
    "<Client ID>",
    "<Client Secret>",
    $tokenCache,
    $resultCache,
    $httpFactory,
    $httpFactory,
    $httpClient    
);

$packagingTypes = $packagingTypesApiClient->getPackagingTypes();
$packagingType  = $packagingTypesApiClient->getPackagingType('<id>');
$packagingType  = $packagingTypesApiClient->findOneByTransporeonId('<Transporeon ID>');

Cache Refresh via Console commands

This SDK contains a Symfony Console command to refresh the Packaging Type cache. You can include the Console command into your application:

$cliApp = new \Symfony\Component\Console\Application();
$cliApp->add(new \BayWaReLusy\PackagingTypesAPI\SDK\Console\RefreshPackagingTypesCache($packagingTypesApiClient));

And then run the Console commands with:

./console packaging-types-api-sdk:refresh-packaging-types-cache

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-05-12