* * 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 */ 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); } }