作者 lackoxygen

add:def part api

... ... @@ -11,7 +11,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function simplePlan(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/simplePlan')->service('buyin.simplePlan');
$this->builder
->method('POST')
->params($params)
->path('buyin/simplePlan')
->service('buyin.simplePlan');
}
/**
... ... @@ -19,7 +23,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function exclusivePlan(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/exclusivePlan')->service('buyin.exclusivePlan');
$this->builder
->method('POST')
->params($params)
->path('buyin/exclusivePlan')
->service('buyin.exclusivePlan');
}
/**
... ... @@ -27,7 +35,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function activitySearch(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/activitySearch')->service('buyin.activitySearch');
$this->builder
->method('POST')
->params($params)
->path('buyin/activitySearch')
->service('buyin.activitySearch');
}
/**
... ... @@ -35,7 +47,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function applyActivities(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/applyActivities')
->service('buyin.applyActivities');
... ... @@ -46,7 +59,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function createOrUpdateOrienPlan(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/createOrUpdateOrienPlan')
->service('buyin.createOrUpdateOrienPlan');
... ... @@ -57,7 +71,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function orienPlanList(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/orienPlanList')->service('buyin.orienPlanList');
$this->builder
->method('POST')
->params($params)
->path('buyin/orienPlanList')
->service('buyin.orienPlanList');
}
/**
... ... @@ -65,7 +83,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function orienPlanAuthors(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/orienPlanAuthors')
->service('buyin.orienPlanAuthors');
... ... @@ -76,7 +95,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function orienPlanCtrl(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/orienPlanCtrl')->service('buyin.orienPlanCtrl');
$this->builder
->method('POST')
->params($params)
->path('buyin/orienPlanCtrl')
->service('buyin.orienPlanCtrl');
}
/**
... ... @@ -84,7 +107,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function orienPlanAuthorsAdd(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/orienPlanAuthorsAdd')
->service('buyin.orienPlanAuthorsAdd');
... ... @@ -95,7 +119,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function orienPlanAudit(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/orienPlanAudit')->service('buyin.orienPlanAudit');
$this->builder
->method('POST')
->params($params)
->path('buyin/orienPlanAudit')
->service('buyin.orienPlanAudit');
}
/**
... ... @@ -103,7 +131,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function colonelActivityCreateOrUpdate(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/colonelActivityCreateOrUpdate')
->service('alliance.colonelActivityCreateOrUpdate');
... ... @@ -114,7 +143,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function activityProductCategoryList(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/activityProductCategoryList')
->service('alliance.activityProductCategoryList');
... ... @@ -125,7 +155,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function instituteColonelActivityList(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/instituteColonelActivityList')
->service('alliance.instituteColonelActivityList');
... ... @@ -136,7 +167,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function instituteColonelActivityOperate(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/instituteColonelActivityOperate')
->service('alliance.instituteColonelActivityOperate');
... ... @@ -147,7 +179,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function colonelActivityProduct(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/colonelActivityProduct')
->service('alliance.colonelActivityProduct');
... ... @@ -158,7 +191,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function colonelActivityProductAudit(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/colonelActivityProductAudit')
->service('alliance.colonelActivityProductAudit');
... ... @@ -169,7 +203,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function colonelActivityProductExtension(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/colonelActivityProductExtension')
->service('alliance.colonelActivityProductExtension');
... ... @@ -180,7 +215,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function specialApplyList(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin.colonel/specialApplyList')
->service('buyin.colonel.specialApplyList');
... ... @@ -191,7 +227,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function specialApplyDeal(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin.colonel/specialApplyDeal')
->service('buyin.colonel.specialApplyDeal');
... ... @@ -202,7 +239,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function materialsProductsSearch(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/materialsProductsSearch')
->service('alliance.materialsProductsSearch');
... ... @@ -213,7 +251,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function materialsProductsDetails(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/materialsProductsDetails')
->service('alliance.materialsProductsDetails');
... ... @@ -224,7 +263,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function materialsProductCategory(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('alliance/materialsProductCategory')
->service('alliance.materialsProductCategory');
... ... @@ -235,7 +275,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function materialsProductStatus(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/materialsProductStatus')
->service('buyin.materialsProductStatus');
... ... @@ -246,7 +287,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function queryInstituteOrders(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/queryInstituteOrders')
->service('buyin.queryInstituteOrders');
... ... @@ -257,7 +299,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolPidCreate(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/kolPidCreate')->service('buyin.kolPidCreate');
$this->builder
->method('POST')
->params($params)
->path('buyin/kolPidCreate')
->service('buyin.kolPidCreate');
}
/**
... ... @@ -265,7 +311,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolPidList(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/kolPidList')->service('buyin.kolPidList');
$this->builder
->method('POST')
->params($params)
->path('buyin/kolPidList')
->service('buyin.kolPidList');
}
/**
... ... @@ -273,7 +323,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolPidEdit(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/kolPidEdit')->service('buyin.kolPidEdit');
$this->builder
->method('POST')
->params($params)
->path('buyin/kolPidEdit')
->service('buyin.kolPidEdit');
}
/**
... ... @@ -281,7 +335,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolPidDel(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/kolPidDel')->service('buyin.kolPidDel');
$this->builder
->method('POST')
->params($params)
->path('buyin/kolPidDel')
->service('buyin.kolPidDel');
}
/**
... ... @@ -289,7 +347,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolProductShare(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/kolProductShare')
->service('buyin.kolProductShare');
... ... @@ -300,7 +359,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function institutePidCreate(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/institutePidCreate')
->service('buyin.institutePidCreate');
... ... @@ -311,7 +371,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function institutePidList(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/institutePidList')
->service('buyin.institutePidList');
... ... @@ -322,7 +383,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function institutePidEdit(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/institutePidEdit')
->service('buyin.institutePidEdit');
... ... @@ -333,7 +395,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function institutePidDel(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/institutePidDel')
->service('buyin.institutePidDel');
... ... @@ -344,7 +407,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function liveShareMaterial(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/liveShareMaterial')
->service('buyin.liveShareMaterial');
... ... @@ -355,7 +419,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function instituteLiveShare(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/instituteLiveShare')
->service('buyin.instituteLiveShare');
... ... @@ -366,7 +431,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function instituteOrderAds(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/instituteOrderAds')
->service('buyin.instituteOrderAds');
... ... @@ -377,7 +443,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolOrderAds(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/kolOrderAds')->service('buyin.kolOrderAds');
$this->builder
->method('POST')
->params($params)
->path('buyin/kolOrderAds')
->service('buyin.kolOrderAds');
}
/**
... ... @@ -385,7 +455,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function shopPidMemberCreate(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/shopPidMemberCreate')
->service('buyin.shopPidMemberCreate');
... ... @@ -396,7 +467,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function kolMaterialsProductsDetails(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/kolMaterialsProductsDetails')
->service('buyin.kolMaterialsProductsDetails');
... ... @@ -407,7 +479,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function getProductShareMaterial(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/getProductShareMaterial')
->service('buyin.getProductShareMaterial');
... ... @@ -418,7 +491,11 @@ class Alliance extends Passage implements AllianceInterface
*/
public function getProductSkus(array $params)
{
$this->builder->method('POST')->params($params)->path('buyin/productSkus')->service('buyin.productSkus');
$this->builder
->method('POST')
->params($params)
->path('buyin/productSkus')
->service('buyin.productSkus');
}
/**
... ... @@ -426,7 +503,8 @@ class Alliance extends Passage implements AllianceInterface
*/
public function shareCommandParse(array $params)
{
$this->builder->method('POST')
$this->builder
->method('POST')
->params($params)
->path('buyin/shareCommandParse')
->service('buyin.shareCommandParse');
... ...
<?php
namespace Lackoxygen\TiktokShop\Passage\Logistics;
use Lackoxygen\TiktokShop\Passage\Passage;
class Logistics extends Passage implements LogisticsInterface
{
/**
* @inheritDoc
*/
public function appendSubOrder(array $params)
{
$this->builder->method('POST')
->service('logistics.appendSubOrder')
->path('logistics/appendSubOrder')
->params($params);
}
/**
* @inheritDoc
*/
public function logisticsCompanyList(array $params)
{
$this->builder->method('POST')
->service('order.logisticsCompanyList')
->path('order/logisticsCompanyList')
->params($params);
}
/**
* @inheritDoc
*/
public function add(array $params)
{
$this->builder->method('POST')
->service('order.logisticsAdd')
->path('order/logisticsAdd')
->params($params);
}
/**
* @inheritDoc
*/
public function edit(array $params)
{
$this->builder->method('POST')
->service('order.logisticsEdit')
->path('order/logisticsEdit')
->params($params);
}
/**
* @inheritDoc
*/
public function logisticsEditByPack(array $params)
{
$this->builder->method('POST')
->service('order.logisticsEditByPack')
->path('order/logisticsEditByPack')
->params($params);
}
/**
* @inheritDoc
*/
public function logisticsAddMultiPack(array $params)
{
$this->builder->method('POST')
->service('order.logisticsAddMultiPack')
->path('order/logisticsAddMultiPack')
->params($params);
}
/**
* @inheritDoc
*/
public function freightTemplateList(array $params)
{
$this->builder->method('POST')
->service('freightTemplate.list')
->path('freightTemplate/list')
->params($params);
}
/**
* @inheritDoc
*/
public function logisticsAddSinglePack(array $params)
{
$this->builder->method('POST')
->service('order.logisticsAddSinglePack')
->path('order/logisticsAddSinglePack')
->params($params);
}
/**
* @inheritDoc
*/
public function updateOrder(array $params)
{
$this->builder->method('POST')
->service('logistics.updateOrder')
->path('logistics/updateOrder')
->params($params);
}
/**
* @inheritDoc
*/
public function cancelOrder(array $params)
{
$this->builder->method('POST')
->service('logistics.cancelOrder')
->path('logistics/cancelOrder')
->params($params);
}
/**
* @inheritDoc
*/
public function orderOperate(array $params)
{
$this->builder->method('POST')
->service('crossBorder.orderOperate')
->path('crossBorder/orderOperate')
->params($params);
}
/**
* @inheritDoc
*/
public function orderCustomClearance(array $params)
{
$this->builder->method('POST')
->service('crossborder.orderCustomClearance')
->path('crossborder/orderCustomClearance')
->params($params);
}
/**
* @inheritDoc
*/
public function orderLogisticsTrace(array $params)
{
$this->builder->method('POST')
->service('crossborder.orderLogisticsTrace')
->path('crossborder/orderLogisticsTrace')
->params($params);
}
/**
* @inheritDoc
*/
public function customTemplateList(array $params)
{
$this->builder->method('POST')
->service('logistics.customTemplateList')
->path('logistics/customTemplateList')
->params($params);
}
/**
* @inheritDoc
*/
public function getOutRange(array $params)
{
$this->builder->method('POST')
->service('logistics.getOutRange')
->path('logistics/getOutRange')
->params($params);
}
/**
* @inheritDoc
*/
public function templateList(array $params)
{
$this->builder->method('POST')
->service('logistics.templateList')
->path('logistics/templateList')
->params($params);
}
/**
* @inheritDoc
*/
public function waybillApply(array $params)
{
$this->builder->method('POST')
->service('logistics.waybillApply')
->path('logistics/waybillApply')
->params($params);
}
/**
* @inheritDoc
*/
public function deliveryNotice(array $params)
{
$this->builder->method('POST')
->service('logistics.deliveryNotice')
->path('logistics/deliveryNotice')
->params($params);
}
/**
* @inheritDoc
*/
public function isByteDancePackage(array $params)
{
$this->builder->method('POST')
->service('power.isByteDancePackage')
->path('power/isByteDancePackage')
->params($params);
}
}
... ...
<?php
namespace Lackoxygen\TiktokShop\Passage\Logistics;
use Lackoxygen\TiktokShop\Passage\ResultSet;
interface LogisticsInterface
{
/**
* @link https://op.jinritemai.com/docs/api-docs/16/1075
* @return mixed
*/
public function appendSubOrder(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/541
* @return mixed
*/
public function logisticsCompanyList(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/718
* @return mixed
*/
public function add(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/390
* @return mixed
*/
public function edit(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/539
* @return mixed
*/
public function logisticsEditByPack(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/562
* @return mixed
*/
public function logisticsAddMultiPack(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/565
* @return mixed
*/
public function freightTemplateList(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/563
* @return mixed
*/
public function logisticsAddSinglePack(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/494
* @return mixed
*/
public function updateOrder(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/397
* @return mixed
*/
public function cancelOrder(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/526
* @return mixed
*/
public function orderOperate(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/527
* @return mixed
*/
public function orderCustomClearance(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/528
* @return mixed
*/
public function orderLogisticsTrace(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/549
* @return mixed
*/
public function customTemplateList(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/582
* @return mixed
*/
public function getOutRange(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/476
* @return mixed
*/
public function templateList(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/490
* @return mixed
*/
public function waybillApply(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/1578
* @return mixed
*/
public function deliveryNotice(array $params);
/**
* @link https://op.jinritemai.com/docs/api-docs/16/1558
* @return mixed
*/
public function isByteDancePackage(array $params);
}
... ...
... ... @@ -11,7 +11,10 @@ class Order extends Passage implements OrderInterface
*/
public function searchList(array $params)
{
$this->builder->method('POST')->service('order.searchList')->path('/order/searchList')->params($params);
$this->builder->method('POST')
->service('order.searchList')
->path('/order/searchList')
->params($params);
}
/**
... ... @@ -19,7 +22,10 @@ class Order extends Passage implements OrderInterface
*/
public function orderDetail(array $params)
{
$this->builder->method('POST')->service('order.orderDetail')->path('/order/orderDetail')->params($params);
$this->builder->method('POST')
->service('order.orderDetail')
->path('/order/orderDetail')
->params($params);
}
/**
... ... @@ -27,7 +33,10 @@ class Order extends Passage implements OrderInterface
*/
public function batchDecrypt(array $params)
{
$this->builder->method('POST')->service('order.batchDecrypt')->path('/order/batchDecrypt')->params($params);
$this->builder->method('POST')
->service('order.batchDecrypt')
->path('/order/batchDecrypt')
->params($params);
}
/**
... ... @@ -35,7 +44,10 @@ class Order extends Passage implements OrderInterface
*/
public function addOrderRemark(array $params)
{
$this->builder->method('POST')->service('order.addOrderRemark')->path('/order/addOrderRemark')->params($params);
$this->builder->method('POST')
->service('order.addOrderRemark')
->path('/order/addOrderRemark')
->params($params);
}
/**
... ... @@ -65,12 +77,19 @@ class Order extends Passage implements OrderInterface
*/
public function updateOrderAmount(array $params)
{
$this->builder->method('POST')->service('order.updateOrderAmount')->path('')->params($params);
$this->builder
->method('POST')
->service('order.updateOrderAmount')
->path('')
->params($params);
}
public function addressConfirm(array $params)
{
$this->builder->method('POST')->service('order.addressConfirm')->params($params);
$this->builder
->method('POST')
->service('order.addressConfirm')
->params($params);
}
/**
... ... @@ -78,7 +97,10 @@ class Order extends Passage implements OrderInterface
*/
public function addressModify(array $params)
{
$this->builder->method('POST')->service('order.addressModify')->params($params);
$this->builder
->method('POST')
->service('order.addressModify')
->params($params);
}
/**
... ... @@ -86,7 +108,10 @@ class Order extends Passage implements OrderInterface
*/
public function addressSwitchConfig(array $params)
{
$this->builder->method('POST')->service('order.addresSwitchConfig')->params($params);
$this->builder
->method('POST')
->service('order.addresSwitchConfig')
->params($params);
}
/**
... ... @@ -94,7 +119,9 @@ class Order extends Passage implements OrderInterface
*/
public function invoiceList(array $params)
{
$this->builder->method('POST')->service('order.invoiceList')->params($params);
$this->builder->method('POST')
->service('order.invoiceList')
->params($params);
}
/**
... ... @@ -102,7 +129,10 @@ class Order extends Passage implements OrderInterface
*/
public function batchEncrypt(array $params)
{
$this->builder->method('POST')->service('order.batchEncrypt')->params($params);
$this->builder
->method('POST')
->service('order.batchEncrypt')
->params($params);
}
/**
... ... @@ -110,12 +140,18 @@ class Order extends Passage implements OrderInterface
*/
public function batchSensitive(array $params)
{
$this->builder->method('POST')->service('order.batchSensitive')->params($params);
$this->builder
->method('POST')
->service('order.batchSensitive')
->params($params);
}
public function invoiceUpload(array $params)
{
$this->builder->method('POST')->service('order.stockUp')->params($params);
$this->builder
->method('POST')
->service('order.stockUp')
->params($params);
}
/**
... ... @@ -123,7 +159,10 @@ class Order extends Passage implements OrderInterface
*/
public function batchSearchIndex(array $params)
{
$this->builder->method('POST')->service('order.BatchSearchIndex')->params($params);
$this->builder
->method('POST')
->service('order.BatchSearchIndex')
->params($params);
}
/**
... ... @@ -131,7 +170,10 @@ class Order extends Passage implements OrderInterface
*/
public function antispamOrderSend(array $params)
{
$this->builder->method('POST')->service('antispam.orderSend')->params($params);
$this->builder
->method('POST')
->service('antispam.orderSend')
->params($params);
}
/**
... ... @@ -139,7 +181,10 @@ class Order extends Passage implements OrderInterface
*/
public function antispamOrderQuery(array $params)
{
$this->builder->method('POST')->service('antispam.orderQuery')->params($params);
$this->builder
->method('POST')
->service('antispam.orderQuery')
->params($params);
}
/**
... ... @@ -147,7 +192,10 @@ class Order extends Passage implements OrderInterface
*/
public function getCrossBorderFulfillInfo(array $params)
{
$this->builder->method('POST')->service('order.getCrossBorderFulfillInfo')->params($params);
$this->builder
->method('POST')
->service('order.getCrossBorderFulfillInfo')
->params($params);
}
/**
... ... @@ -155,7 +203,10 @@ class Order extends Passage implements OrderInterface
*/
public function getServiceList(array $params)
{
$this->builder->method('POST')->service('order.getServiceList')->params($params);
$this->builder
->method('POST')
->service('order.getServiceList')
->params($params);
}
/**
... ... @@ -163,7 +214,10 @@ class Order extends Passage implements OrderInterface
*/
public function addSerialNumber(array $params)
{
$this->builder->method('POST')->service('order.addSerialNumber')->params($params);
$this->builder
->method('POST')
->service('order.addSerialNumber')
->params($params);
}
/**
... ... @@ -171,7 +225,10 @@ class Order extends Passage implements OrderInterface
*/
public function replyService(array $params)
{
$this->builder->method('POST')->service('order.replyService')->params($params);
$this->builder
->method('POST')
->service('order.replyService')
->params($params);
}
/**
... ... @@ -179,6 +236,9 @@ class Order extends Passage implements OrderInterface
*/
public function serviceDetail(array $params)
{
$this->builder->method('POST')->service('order.serviceDetail')->params($params);
$this->builder
->method('POST')
->service('order.serviceDetail')
->params($params);
}
}
... ...
... ... @@ -5,6 +5,7 @@ namespace Lackoxygen\TiktokShop\Passage;
use Lackoxygen\TiktokShop\Attribute\Config;
use Lackoxygen\TiktokShop\Exception\ClientException;
use Lackoxygen\TiktokShop\Transmit\Builder;
use Psr\Http\Message\ResponseInterface;
abstract class Passage
{
... ... @@ -23,10 +24,10 @@ abstract class Passage
}
/**
* @return \Psr\Http\Message\ResponseInterface
* @return ResponseInterface
* @throws ClientException
*/
public function __invoke(): \Psr\Http\Message\ResponseInterface
public function __invoke(): ResponseInterface
{
return $this->builder->request();
}
... ...
... ... @@ -11,7 +11,10 @@ class Product extends Passage implements ProductInterface
*/
public function listV2(array $params)
{
$this->builder->method('POST')->service('product.listV2')->params($params);
$this->builder
->method('POST')
->service('product.listV2')
->params($params);
}
/**
... ... @@ -19,7 +22,10 @@ class Product extends Passage implements ProductInterface
*/
public function getCateProperty(array $params)
{
$this->builder->method('POST')->service('product.getCateProperty')->params($params);
$this->builder
->method('POST')
->service('product.getCateProperty')
->params($params);
}
/**
... ... @@ -27,7 +33,10 @@ class Product extends Passage implements ProductInterface
*/
public function addV2(array $params)
{
$this->builder->method('POST')->service('product.addV2')->params($params);
$this->builder
->method('POST')
->service('product.addV2')
->params($params);
}
/**
... ... @@ -35,7 +44,10 @@ class Product extends Passage implements ProductInterface
*/
public function editV2(array $params)
{
$this->builder->method('POST')->service('product.editV2')->params($params);
$this->builder
->method('POST')
->service('product.editV2')
->params($params);
}
/**
... ... @@ -43,7 +55,10 @@ class Product extends Passage implements ProductInterface
*/
public function detail(array $params)
{
$this->builder->method('POST')->service('product.detail')->params($params);
$this->builder
->method('POST')
->service('product.detail')
->params($params);
}
/**
... ... @@ -51,7 +66,10 @@ class Product extends Passage implements ProductInterface
*/
public function del(array $params)
{
$this->builder->method('POST')->service('product.del')->params($params);
$this->builder
->method('POST')
->service('product.del')
->params($params);
}
/**
... ... @@ -59,7 +77,10 @@ class Product extends Passage implements ProductInterface
*/
public function skuDetail(array $params)
{
$this->builder->method('POST')->service('sku.detail')->params($params);
$this->builder
->method('POST')
->service('sku.detail')
->params($params);
}
/**
... ... @@ -67,7 +88,10 @@ class Product extends Passage implements ProductInterface
*/
public function freightTemplateList(array $params)
{
$this->builder->method('POST')->service('freightTemplate.list')->params($params);
$this->builder
->method('POST')
->service('freightTemplate.list')
->params($params);
}
/**
... ... @@ -75,7 +99,10 @@ class Product extends Passage implements ProductInterface
*/
public function brandList(array $params)
{
$this->builder->method('POST')->service('brand.list')->params($params);
$this->builder
->method('POST')
->service('brand.list')
->params($params);
}
/**
... ... @@ -83,7 +110,10 @@ class Product extends Passage implements ProductInterface
*/
public function getCatePropertyV2(array $params)
{
$this->builder->method('POST')->service('product.getCatePropertyV2')->params($params);
$this->builder
->method('POST')
->service('product.getCatePropertyV2')
->params($params);
}
/**
... ... @@ -91,7 +121,10 @@ class Product extends Passage implements ProductInterface
*/
public function setOnline(array $params)
{
$this->builder->method('POST')->service('product.setOnline')->params($params);
$this->builder
->method('POST')
->service('product.setOnline')
->params($params);
}
/**
... ... @@ -99,7 +132,10 @@ class Product extends Passage implements ProductInterface
*/
public function skuList(array $params)
{
$this->builder->method('POST')->service('sku.list')->params($params);
$this->builder
->method('POST')
->service('sku.list')
->params($params);
}
/**
... ... @@ -107,7 +143,10 @@ class Product extends Passage implements ProductInterface
*/
public function skuSyncStockBatch(array $params)
{
$this->builder->method('POST')->service('sku.syncStockBatch')->params($params);
$this->builder
->method('POST')
->service('sku.syncStockBatch')
->params($params);
}
/**
... ... @@ -115,7 +154,10 @@ class Product extends Passage implements ProductInterface
*/
public function setOffline(array $params)
{
$this->builder->method('POST')->service('product.setOffline')->params($params);
$this->builder
->method('POST')
->service('product.setOffline')
->params($params);
}
/**
... ... @@ -123,7 +165,10 @@ class Product extends Passage implements ProductInterface
*/
public function qualityList(array $params)
{
$this->builder->method('POST')->service('product.qualityList')->params($params);
$this->builder
->method('POST')
->service('product.qualityList')
->params($params);
}
/**
... ... @@ -131,7 +176,10 @@ class Product extends Passage implements ProductInterface
*/
public function editSkuPrice(array $params)
{
$this->builder->method('POST')->service('sku.editPrice')->params($params);
$this->builder
->method('POST')
->service('sku.editPrice')
->params($params);
}
/**
... ... @@ -139,7 +187,10 @@ class Product extends Passage implements ProductInterface
*/
public function qualityDetail(array $params)
{
$this->builder->method('POST')->service('product.qualityDetail')->params($params);
$this->builder
->method('POST')
->service('product.qualityDetail')
->params($params);
}
/**
... ... @@ -147,7 +198,10 @@ class Product extends Passage implements ProductInterface
*/
public function editBuyerLimit(array $params)
{
$this->builder->method('POST')->service('product.editBuyerLimit')->params($params);
$this->builder
->method('POST')
->service('product.editBuyerLimit')
->params($params);
}
/**
... ... @@ -155,7 +209,10 @@ class Product extends Passage implements ProductInterface
*/
public function qualityTask(array $params)
{
$this->builder->method('POST')->service('product.qualityTask')->params($params);
$this->builder
->method('POST')
->service('product.qualityTask')
->params($params);
}
/**
... ... @@ -163,7 +220,10 @@ class Product extends Passage implements ProductInterface
*/
public function getSpuKeyPropertyByCid(array $params)
{
$this->builder->method('POST')->service('spu.getKeyPropertyByCid')->params($params);
$this->builder
->method('POST')
->service('spu.getKeyPropertyByCid')
->params($params);
}
/**
... ... @@ -171,7 +231,10 @@ class Product extends Passage implements ProductInterface
*/
public function editSkuCode(array $params)
{
$this->builder->method('POST')->service('sku.editCode')->params($params);
$this->builder
->method('POST')
->service('sku.editCode')
->params($params);
}
/**
... ... @@ -179,7 +242,10 @@ class Product extends Passage implements ProductInterface
*/
public function getSpuInfoBySpuId(array $params)
{
$this->builder->method('POST')->service('spu.getSpuInfoBySpuId')->params($params);
$this->builder
->method('POST')
->service('spu.getSpuInfoBySpuId')
->params($params);
}
/**
... ... @@ -187,7 +253,10 @@ class Product extends Passage implements ProductInterface
*/
public function getSpuTpl(array $params)
{
$this->builder->method('POST')->service('spu.getSpuTpl')->params($params);
$this->builder
->method('POST')
->service('spu.getSpuTpl')
->params($params);
}
/**
... ... @@ -195,7 +264,10 @@ class Product extends Passage implements ProductInterface
*/
public function addShopSpu(array $params)
{
$this->builder->method('POST')->service('spu.addShopSpu')->params($params);
$this->builder
->method('POST')
->service('spu.addShopSpu')
->params($params);
}
/**
... ... @@ -203,7 +275,10 @@ class Product extends Passage implements ProductInterface
*/
public function opptyProductApply(array $params)
{
$this->builder->method('POST')->service('opptyProduct.apply')->params($params);
$this->builder
->method('POST')
->service('opptyProduct.apply')
->params($params);
}
/**
... ... @@ -211,7 +286,10 @@ class Product extends Passage implements ProductInterface
*/
public function opptyProductClue(array $params)
{
$this->builder->method('POST')->service('opptyProduct.clue')->params($params);
$this->builder
->method('POST')
->service('opptyProduct.clue')
->params($params);
}
/**
... ... @@ -219,7 +297,10 @@ class Product extends Passage implements ProductInterface
*/
public function getOpptyProductApplyProgress(array $params)
{
$this->builder->method('POST')->service('opptyProduct.getApplyProgress')->params($params);
$this->builder
->method('POST')
->service('opptyProduct.getApplyProgress')
->params($params);
}
/**
... ... @@ -227,7 +308,10 @@ class Product extends Passage implements ProductInterface
*/
public function allianceMaterialsProductCategory(array $params)
{
$this->builder->method('POST')->service('alliance.materialsProductCategory')->params($params);
$this->builder
->method('POST')
->service('alliance.materialsProductCategory')
->params($params);
}
/**
... ... @@ -235,7 +319,10 @@ class Product extends Passage implements ProductInterface
*/
public function qualificationConfig(array $params)
{
$this->builder->method('POST')->service('product.qualificationConfig')->params($params);
$this->builder
->method('POST')
->service('product.qualificationConfig')
->params($params);
}
/**
... ... @@ -243,7 +330,10 @@ class Product extends Passage implements ProductInterface
*/
public function getBrandSug(array $params)
{
$this->builder->method('POST')->service('brand.getSug')->params($params);
$this->builder
->method('POST')
->service('brand.getSug')
->params($params);
}
/**
... ... @@ -251,7 +341,10 @@ class Product extends Passage implements ProductInterface
*/
public function promiseDeliveryList(array $params)
{
$this->builder->method('POST')->service('promise.deliveryList')->params($params);
$this->builder
->method('POST')
->service('promise.deliveryList')
->params($params);
}
/**
... ... @@ -259,7 +352,10 @@ class Product extends Passage implements ProductInterface
*/
public function brandConvert(array $params)
{
$this->builder->method('POST')->service('brand.convert')->params($params);
$this->builder
->method('POST')
->service('brand.convert')
->params($params);
}
/**
... ... @@ -267,6 +363,9 @@ class Product extends Passage implements ProductInterface
*/
public function distributionLiveProductList(array $params)
{
$this->builder->method('POST')->service('buyin.distributionLiveProductList')->params($params);
$this->builder
->method('POST')
->service('buyin.distributionLiveProductList')
->params($params);
}
}
... ...
... ... @@ -11,7 +11,10 @@ class Shop extends Passage implements ShopInterface
*/
public function brandList(array $params)
{
$this->builder->service('POST')->params($params)->service('shop.brandList');
$this->builder
->method('POST')
->params($params)
->service('shop.brandList');
}
/**
... ... @@ -19,7 +22,10 @@ class Shop extends Passage implements ShopInterface
*/
public function searchMemberList(array $params)
{
$this->builder->service('POST')->params($params)->service('member.searchList');
$this->builder
->method('POST')
->params($params)
->service('member.searchList');
}
/**
... ... @@ -27,7 +33,10 @@ class Shop extends Passage implements ShopInterface
*/
public function userLogin(array $params)
{
$this->builder->service('POST')->params($params)->service('antispam.userLogin');
$this->builder
->method('POST')
->params($params)
->service('antispam.userLogin');
}
/**
... ... @@ -35,7 +44,10 @@ class Shop extends Passage implements ShopInterface
*/
public function getShopCategory(array $params)
{
$this->builder->service('POST')->params($params)->service('shop.getShopCategory');
$this->builder
->method('POST')
->params($params)
->service('shop.getShopCategory');
}
/**
... ... @@ -43,7 +55,10 @@ class Shop extends Passage implements ShopInterface
*/
public function addressUpdate(array $params)
{
$this->builder->service('POST')->params($params)->service('address.update');
$this->builder
->method('POST')
->params($params)
->service('address.update');
}
/**
... ... @@ -51,7 +66,10 @@ class Shop extends Passage implements ShopInterface
*/
public function addressCreate(array $params)
{
$this->builder->service('POST')->params($params)->service('address.create');
$this->builder
->method('POST')
->params($params)
->service('address.create');
}
/**
... ... @@ -59,7 +77,10 @@ class Shop extends Passage implements ShopInterface
*/
public function getShopShortLink(array $params)
{
$this->builder->service('POST')->params($params)->service('member.getShopShortLink');
$this->builder
->method('POST')
->params($params)
->service('member.getShopShortLink');
}
/**
... ... @@ -67,6 +88,9 @@ class Shop extends Passage implements ShopInterface
*/
public function addressList(array $params)
{
$this->builder->service('POST')->params($params)->service('address.list');
$this->builder
->method('POST')
->params($params)
->service('address.list');
}
}
... ...
... ... @@ -11,9 +11,4 @@ class Verify extends Passage
$this->config->getAppSecret());
return $md5 === $sign;
}
public function sha256($sign, string $body): bool
{
return true;
}
}
... ...
... ... @@ -16,6 +16,7 @@ class Builder
protected Config $config;
protected string $passage;
protected string $method;
public function __construct(Config $config, string $passage, string $method)
... ...
... ... @@ -13,6 +13,7 @@ use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\ServerException;
use GuzzleHttp\RequestOptions;
use Illuminate\Support\Str;
use Psr\Http\Message\ResponseInterface;
class Client
{
... ... @@ -62,9 +63,13 @@ class Client
Sort::ksort($params);
return [
'method' => $request->getService(), 'app_key' => $request->getConfig()->getAppKey(),
'access_token' => $request->getConfig()->getAccessToken(), 'param_json' => Json::marshal($params),
'timestamp' => $request->getTimestamp(), 'v' => $request->getV(), 'sign' => $this->signature($request),
'method' => $request->getService(),
'app_key' => $request->getConfig()->getAppKey(),
'access_token' => $request->getConfig()->getAccessToken(),
'param_json' => Json::marshal($params),
'timestamp' => $request->getTimestamp(),
'v' => $request->getV(),
'sign' => $this->signature($request),
'sign_method' => 'hmac-sha256',
];
}
... ... @@ -72,14 +77,17 @@ class Client
protected function withQuery(Request $request): array
{
return [
'app_id' => $request->getConfig()->getAppKey(), 'app_secret' => $request->getConfig()->getAppSecret(),
'app_id' => $request->getConfig()->getAppKey(),
'app_secret' => $request->getConfig()->getAppSecret(),
];
}
public function guzzleHttp(Config $config): \GuzzleHttp\Client
{
return new \GuzzleHttp\Client([
'base_uri' => $config->getBaseUri(), 'timeout' => $config->getTimeout(), 'verify' => false
'base_uri' => $config->getBaseUri(),
'timeout' => $config->getTimeout(),
'verify' => false
]);
}
... ... @@ -87,11 +95,11 @@ class Client
/**
* @param Request $request
*
* @return \Psr\Http\Message\ResponseInterface
* @return ResponseInterface
* @throws ClientException
* @throws RetryException
*/
public function request(Request $request): \Psr\Http\Message\ResponseInterface
public function request(Request $request): ResponseInterface
{
if ($request->isSignature()) {
$query = $this->withSignatureQuery($request);
... ...