From f381895afb5d332b00d0aa23e93252241342ad41 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 22 Nov 2019 14:05:28 +0800 Subject: [PATCH] +mtwmapi.OrderPickComplete --- platformapi/ebaiapi/order.go | 9 +++++++++ platformapi/ebaiapi/order_test.go | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/platformapi/ebaiapi/order.go b/platformapi/ebaiapi/order.go index b11ffa2c..c7a144cb 100644 --- a/platformapi/ebaiapi/order.go +++ b/platformapi/ebaiapi/order.go @@ -313,6 +313,15 @@ func (a *API) OrderConfirm(orderID string) (err error) { return err } +// 仅择时达和新零售标品服务包的订单,商家可调用此接口将订单置为已拣货完成状态。订单超过预计拣货完成时间未调用此接口,系统会自动更新为已拣货完成状态。 +// https://open-be.ele.me/dev/api/doc/v3/#api-Order_Up-order_pickcomplete +func (a *API) OrderPickComplete(orderID string) (err error) { + _, err = a.AccessAPI("order.pickcomplete", map[string]interface{}{ + "order_id": orderID, + }) + return err +} + // 提供给合作方取消订单所用。 注:1、百度物流配送且已经确认的订单无法取消。 func (a *API) OrderCancel(orderID, cancelType, cancelReason string) (err error) { _, err = a.AccessAPI("order.cancel", map[string]interface{}{ diff --git a/platformapi/ebaiapi/order_test.go b/platformapi/ebaiapi/order_test.go index 6bd2c3b6..23aa6924 100644 --- a/platformapi/ebaiapi/order_test.go +++ b/platformapi/ebaiapi/order_test.go @@ -7,7 +7,7 @@ import ( ) func TestOrderGet(t *testing.T) { - result, err := api.OrderGet("1560213937227424971") + result, err := api.OrderGet("1572950448227442318") if err != nil { t.Fatal(err) } else { @@ -16,7 +16,7 @@ func TestOrderGet(t *testing.T) { } func TestOrderGet2(t *testing.T) { - result, err := api.OrderGet2("1560213937227424971") + result, err := api.OrderGet2("1572950448227442318") if err != nil { t.Fatal(err) } else { @@ -60,6 +60,20 @@ func TestOrderPartRefundGet(t *testing.T) { // } // } +func TestOrderConfirm(t *testing.T) { + err := api.OrderConfirm("1556617836226053651") + if err != nil { + t.Fatal(err) + } +} + +func TestOrderPickComplete(t *testing.T) { + err := api.OrderPickComplete("1574402460228210814") + if err != nil { + t.Fatal(err) + } +} + func TestOrderCallDelivery(t *testing.T) { err := api.OrderCallDelivery("1556617836226053651") if err != nil {