1
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package instantShopping_cancelDelivery_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
instantShopping_cancelDelivery_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingCancelDeliveryRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *InstantShoppingCancelDeliveryParam
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCancelDeliveryRequest) GetUrlPath() string {
|
||||
return "/instantShopping/cancelDelivery"
|
||||
}
|
||||
|
||||
func New() *InstantShoppingCancelDeliveryRequest {
|
||||
request := &InstantShoppingCancelDeliveryRequest{
|
||||
Param: &InstantShoppingCancelDeliveryParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCancelDeliveryRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_cancelDelivery_response.InstantShoppingCancelDeliveryResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &instantShopping_cancelDelivery_response.InstantShoppingCancelDeliveryResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCancelDeliveryRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCancelDeliveryRequest) GetParams() *InstantShoppingCancelDeliveryParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InstantShoppingCancelDeliveryParam struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 门店id
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 取消原因,详见附录F01
|
||||
CancelCode int64 `json:"cancel_code"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package instantShopping_cancelDelivery_response
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingCancelDeliveryResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *InstantShoppingCancelDeliveryData `json:"data"`
|
||||
}
|
||||
type InstantShoppingCancelDeliveryData struct {
|
||||
// 取消价格,单位分
|
||||
CancelFee int64 `json:"cancel_fee"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package instantShopping_createDelivery_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
instantShopping_createDelivery_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingCreateDeliveryRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *InstantShoppingCreateDeliveryParam
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCreateDeliveryRequest) GetUrlPath() string {
|
||||
return "/instantShopping/createDelivery"
|
||||
}
|
||||
|
||||
func New() *InstantShoppingCreateDeliveryRequest {
|
||||
request := &InstantShoppingCreateDeliveryRequest{
|
||||
Param: &InstantShoppingCreateDeliveryParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCreateDeliveryRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_createDelivery_response.InstantShoppingCreateDeliveryResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &instantShopping_createDelivery_response.InstantShoppingCreateDeliveryResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCreateDeliveryRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *InstantShoppingCreateDeliveryRequest) GetParams() *InstantShoppingCreateDeliveryParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InstantShoppingCreateDeliveryParam struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 是否需要取件码(0=不需要,1=需要)
|
||||
VerifyCodeType int32 `json:"verify_code_type"`
|
||||
// 序列码列表,如果包含有多个序列码,请用"_"英文下划线分割(属于数码手机类目的商品订单才需要传序列码。)
|
||||
SerialNumberList string `json:"serial_number_list"`
|
||||
// 是否需要收件码;true:需要;false:不需要
|
||||
NeedReceiverCode bool `json:"need_receiver_code"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package instantShopping_createDelivery_response
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingCreateDeliveryResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *InstantShoppingCreateDeliveryData `json:"data"`
|
||||
}
|
||||
type InstantShoppingCreateDeliveryData struct {
|
||||
// 订单配送距离,单位米
|
||||
DeliveryDistance int64 `json:"delivery_distance"`
|
||||
// 订单配送价格,单位分
|
||||
DeliveryFee int64 `json:"delivery_fee"`
|
||||
// 四到六位验证码
|
||||
PickupGoodsCode string `json:"pickup_goods_code"`
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package instantShopping_getDeliveryListByOrderId_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingGetDeliveryListByOrderIdRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *InstantShoppingGetDeliveryListByOrderIdParam
|
||||
}
|
||||
|
||||
func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetUrlPath() string {
|
||||
return "/instantShopping/getDeliveryListByOrderId"
|
||||
}
|
||||
|
||||
func New() *InstantShoppingGetDeliveryListByOrderIdRequest {
|
||||
request := &InstantShoppingGetDeliveryListByOrderIdRequest{
|
||||
Param: &InstantShoppingGetDeliveryListByOrderIdParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingGetDeliveryListByOrderIdRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_getDeliveryListByOrderId_response.InstantShoppingGetDeliveryListByOrderIdResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &instantShopping_getDeliveryListByOrderId_response.InstantShoppingGetDeliveryListByOrderIdResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetParams() *InstantShoppingGetDeliveryListByOrderIdParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InstantShoppingGetDeliveryListByOrderIdParam struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package instantShopping_getDeliveryListByOrderId_response
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingGetDeliveryListByOrderIdResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *InstantShoppingGetDeliveryListByOrderIdData `json:"data"`
|
||||
}
|
||||
type DeliveryStatusHistoryItem struct {
|
||||
// 骑手纬度
|
||||
RiderLat string `json:"rider_lat"`
|
||||
// 骑手经度
|
||||
RiderLng string `json:"rider_lng"`
|
||||
// 骑手姓名
|
||||
RiderName string `json:"rider_name"`
|
||||
// 状态发送时间,时间戳s
|
||||
OperateTime int64 `json:"operate_time"`
|
||||
// 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消
|
||||
Status int64 `json:"status"`
|
||||
}
|
||||
type InstantShoppingGetDeliveryListByOrderIdData struct {
|
||||
// 抖音订单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消
|
||||
Status int64 `json:"status"`
|
||||
// 抖音配送的该单预计送达开始时间,为时间戳格式,单位为秒
|
||||
PredictDeliveryTimeStart int64 `json:"predict_delivery_time_start"`
|
||||
// 抖音配送的该单预计送达结束时间,为时间戳格式,单位为秒
|
||||
PredictDeliveryTimeEnd int64 `json:"predict_delivery_time_end"`
|
||||
// 骑手名称
|
||||
RiderName string `json:"rider_name"`
|
||||
// 骑手手机号
|
||||
RiderPhone string `json:"rider_phone"`
|
||||
// 骑手经度,高德坐标系
|
||||
RiderLng string `json:"rider_lng"`
|
||||
// 骑手纬度,高德坐标系
|
||||
RiderLat string `json:"rider_lat"`
|
||||
// 取消code
|
||||
CancelCode int64 `json:"cancel_code"`
|
||||
// 取消原因
|
||||
CancelReason string `json:"cancel_reason"`
|
||||
// 订单配送距离,单位为米
|
||||
DeliveryDistance int64 `json:"delivery_distance"`
|
||||
// 订单配送价格,单位为分
|
||||
DeliveryFee int64 `json:"delivery_fee"`
|
||||
// 取件码
|
||||
PickupGoodsCode string `json:"pickup_goods_code"`
|
||||
// 收件码
|
||||
DeliveryGoodsCode string `json:"delivery_goods_code"`
|
||||
// 配送状态历史列表
|
||||
DeliveryStatusHistory []DeliveryStatusHistoryItem `json:"delivery_status_history"`
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package instantShopping_notifyDeliveryStatus_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingNotifyDeliveryStatusRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *InstantShoppingNotifyDeliveryStatusParam
|
||||
}
|
||||
|
||||
func (c *InstantShoppingNotifyDeliveryStatusRequest) GetUrlPath() string {
|
||||
return "/instantShopping/notifyDeliveryStatus"
|
||||
}
|
||||
|
||||
func New() *InstantShoppingNotifyDeliveryStatusRequest {
|
||||
request := &InstantShoppingNotifyDeliveryStatusRequest{
|
||||
Param: &InstantShoppingNotifyDeliveryStatusParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingNotifyDeliveryStatusRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_notifyDeliveryStatus_response.InstantShoppingNotifyDeliveryStatusResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &instantShopping_notifyDeliveryStatus_response.InstantShoppingNotifyDeliveryStatusResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingNotifyDeliveryStatusRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *InstantShoppingNotifyDeliveryStatusRequest) GetParams() *InstantShoppingNotifyDeliveryStatusParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InstantShoppingNotifyDeliveryStatusParam struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 三方运力服务商
|
||||
DistributionCode string `json:"distribution_code"`
|
||||
// 三方运单号,自配送时传空字符串
|
||||
DistributionDeliveryId string `json:"distribution_delivery_id"`
|
||||
// 骑手姓名;骑手已接单/到店/取货/送达状态时必传;
|
||||
RiderName *string `json:"rider_name"`
|
||||
// 骑手电话;骑手已接单/到店/取货/送达状态时必传;
|
||||
RiderPhone *string `json:"rider_phone"`
|
||||
// 骑手手机号类型,0是真实号,1是隐私号
|
||||
RiderPhoneType int32 `json:"rider_phone_type"`
|
||||
// 骑手经度;骑手已接单/到店/取货/送达状态时必传;高德坐标系
|
||||
RiderLongitude *string `json:"rider_longitude"`
|
||||
// 骑手维度;骑手已接单/到店/取货/送达状态时必传;高德坐标系
|
||||
RiderLatitude *string `json:"rider_latitude"`
|
||||
// 骑手位置上报时间戳,传入骑手坐标时必填
|
||||
ReportTime int64 `json:"report_time"`
|
||||
// 状态更新时间戳
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
// 取消原因
|
||||
CancelReason *string `json:"cancel_reason"`
|
||||
// 取消编码,参考附件F01,取消状态时必传
|
||||
CancelCode *int64 `json:"cancel_code"`
|
||||
// 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消
|
||||
Status int64 `json:"status"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package instantShopping_notifyDeliveryStatus_response
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingNotifyDeliveryStatusResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *InstantShoppingNotifyDeliveryStatusData `json:"data"`
|
||||
}
|
||||
type InstantShoppingNotifyDeliveryStatusData struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package instantShopping_reportRiderLocation_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingReportRiderLocationRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *InstantShoppingReportRiderLocationParam
|
||||
}
|
||||
|
||||
func (c *InstantShoppingReportRiderLocationRequest) GetUrlPath() string {
|
||||
return "/instantShopping/reportRiderLocation"
|
||||
}
|
||||
|
||||
func New() *InstantShoppingReportRiderLocationRequest {
|
||||
request := &InstantShoppingReportRiderLocationRequest{
|
||||
Param: &InstantShoppingReportRiderLocationParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingReportRiderLocationRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_reportRiderLocation_response.InstantShoppingReportRiderLocationResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &instantShopping_reportRiderLocation_response.InstantShoppingReportRiderLocationResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *InstantShoppingReportRiderLocationRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *InstantShoppingReportRiderLocationRequest) GetParams() *InstantShoppingReportRiderLocationParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InstantShoppingReportRiderLocationParam struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 三方运力服务商
|
||||
DistributionCode string `json:"distribution_code"`
|
||||
// 三方运单号
|
||||
DistributionDeliveryId string `json:"distribution_delivery_id"`
|
||||
// 骑手姓名;
|
||||
RiderName string `json:"rider_name"`
|
||||
// 骑手手机号类型,0是真实号,1是隐私号
|
||||
RiderPhoneType int32 `json:"rider_phone_type"`
|
||||
// 骑手电话;
|
||||
RiderPhone string `json:"rider_phone"`
|
||||
// 骑手经度,高德坐标系
|
||||
RiderLongitude string `json:"rider_longitude"`
|
||||
// 骑手维度,高德坐标系
|
||||
RiderLatitude string `json:"rider_latitude"`
|
||||
// 骑手上报时间戳
|
||||
ReportTime int64 `json:"report_time"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package instantShopping_reportRiderLocation_response
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type InstantShoppingReportRiderLocationResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *InstantShoppingReportRiderLocationData `json:"data"`
|
||||
}
|
||||
type InstantShoppingReportRiderLocationData struct {
|
||||
// 抖音电商shop order单id
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user