package afs

import "git.oa00.com/go/jcook-sdk/api/rest"

// PostBackLogisticsBillRequest 上传物流.
type PostBackLogisticsBillRequest struct {
	CtpProtocol        rest.CtpProtocol   `json:"ctpProtocol"`
	LogisticsBillParam LogisticsBillParam `json:"logisticsBillParam"`
}

type LogisticsBillParam struct {
	Pin              string `json:"pin"`
	AfsServiceID     uint   `json:"afsServiceId"`
	LogisticsCompany string `json:"logisticsCompany"`
	WaybillCode      string `json:"waybillCode"`
	SendGoodsDate    string `json:"sendGoodsDate"`
}

func (o PostBackLogisticsBillRequest) GetApiName() string {
	return "jingdong.ctp.afs.logistics.postBackLogisticsBillParam"
}

func (o PostBackLogisticsBillRequest) GetRespName() string {
	return "jingdong_ctp_afs_logistics_postBackLogisticsBillParam_responce"
}

func (o PostBackLogisticsBillRequest) GetRespObj() interface{} {
	return PostBackLogisticsBillResponse{}
}

// PostBackLogisticsBillResponse 售后单创建返回.
type PostBackLogisticsBillResponse struct {
	Result struct {
		Data    PostBackLogisticsBillParams `json:"data"`
		ErrCode uint                        `json:"errCode"`
		ErrMsg  string                      `json:"errMsg"`
		Success bool                        `json:"success"`
	} `json:"result"`
}

type PostBackLogisticsBillParams struct {
	PostBackResult bool   `json:"postBackResult"`
	Message        string `json:"message"`
}