jtl-scx/channel-api-client
最新稳定版本:0.51.0
Composer 安装命令:
composer require jtl-scx/channel-api-client
包简介
API Client for SCX Channel API
README 文档
README
SCX PHP-Channel-API-Client
SCX Channel-API Client repository for JTL-Sales-Channel-Extension based on PHP.
Usage
use JTL\SCX\Client\Api\AuthAwareApiClient; use JTL\SCX\Client\Api\Configuration; use JTL\SCX\Client\Channel\Api\Attribute\AttributesApi; use JTL\SCX\Client\Channel\Api\Category\CategoryApi; use JTL\SCX\Client\Channel\Api\Event\EventApi; use JTL\SCX\Client\Channel\Api\Notification\NotificationApi; use JTL\SCX\Client\Channel\Api\Offer\OfferApi; use JTL\SCX\Client\Channel\Api\Order\OrderApi; use JTL\SCX\Client\Channel\Api\Price\PriceApi; use JTL\SCX\Client\Channel\Api\Report\ReportApi; use JTL\SCX\Client\Channel\Api\Seller\SellerApi; $configuration = new Configuration( Configuration::HOST_PRODUCTION, $_ENV['refreshToken'] ); // create a AuthAwareApiClient to handle authentication $client = new AuthAwareApiClient($configuration); // read and acknowledge seller events $eventApi = new EventApi($client); // manage sellers (create) $sellerApi = new SellerApi($client); // manage meta data such as Categories, Attributes or Price $attributesApi = new AttributesApi($client); $categoryApi = new CategoryApi($client); $priceApi = new PriceApi($client); // manage orders (send new orders, update order status or address information) $orderApi = new OrderApi($client); // manage offers (mark in progress, mark as listed, mark as listing failed) $offerApi = new OfferApi($client); // Send a notification message back to SCX Channel API. $notificationApi = new NotificationApi($client); // Send requested Report back to SCX $reportingApi = new ReportApi($client); // Send SELLER_INVENTORY Report // see tests/Api/Report/Request/SendReportRequestTest.php
Working with Events
Seller events are one of the most important features in SCX-Channel-Api. A Seller Event is created by a Seller API Implementation, such as JTL-Wawi to request a action by the existing channel integration.
See JTL\SCX\Client\Channel\Event\EventType for a list of existing Events.
use JTL\SCX\Client\Channel\Api\Event\EventApi; use JTL\SCX\Client\Channel\Api\Event\Request\GetEventListRequest; $eventApi = new EventApi($authAwareApiClient); // read a bulk of unacknowledged events from SCX Channel Api $sellerEventList = $eventApi->get(); foreach ($sellerEventList->getEventList() as $eventContainer) { // The Id of the event use this id to acknowledge event after processing $id = $eventContainer->getId(); // Datetime when the event was created $createdAt = $eventContainer->getCreatedAt(); // The Event Type $type = $eventContainer->getType(); // The Event itself $eventModel = $eventContainer->getEvent(); // processEvent($eventContainer) // finally acknowledge event after processing $eventApi->ack(new AcknowledgeEventIdListRequest([$id])); }
jtl-scx/channel-api-client 适用场景与选型建议
jtl-scx/channel-api-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.65k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jtl-scx/channel-api-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jtl-scx/channel-api-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-24