Files
amb_wechatapp/extend/TuzhiEasyWeChat/Channels/Order/DeliveryClient.php
T

60 lines
1.7 KiB
PHP

<?php
/*
* This file is part of the overtrue/wechat.
*
* (c) overtrue <i@overtrue.me>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace TuzhiEasyWeChat\Channels\Order;
use TuzhiEasyWeChat\Kernel\BaseClient;
use TuzhiEasyWeChat\Kernel\Exceptions\InvalidArgumentException;
/**
* Class Client.
*
* @author mingyoung <mingyoungcheung@gmail.com>
*/
class DeliveryClient extends BaseClient
{
/**
* 获取快递公司列表
* 可通过该接口获取快递公司列表
* @return \Psr\Http\Message\ResponseInterface|\TuzhiEasyWeChat\Kernel\Support\Collection|array|object|string
* @throws \TuzhiEasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getDeliveryCompanyList()
{
$params = [];
return $this->httpPostJson('channels/ec/order/deliverycompanylist/get', $params);
}
/**
* 订单发货
* 可通过该接口对订单发货
* @return \Psr\Http\Message\ResponseInterface|\TuzhiEasyWeChat\Kernel\Support\Collection|array|object|string
* @param $order_id string 是 订单id
* @param $delivery_list array DeliveryInfo 是 物流信息,结构体详情请参考DeliveryInfo
*
* @throws \TuzhiEasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function send($order_id,$delivery_list)
{
$params = [
'order_id'=>$order_id,
'delivery_list'=>$delivery_list
];
return $this->httpPostJson('channels/ec/order/delivery/send', $params);
}
}