You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jcook-sdk/api/rest/afs/afsCanQuery.go

92 lines
2.1 KiB

package afs
import "git.oa00.com/go/jcook-sdk/api/rest"
// QueryCanAfterSaleRequest 是否可以有售后.
type QueryCanAfterSaleRequest struct {
CtpProtocol rest.CtpProtocol `json:"ctpProtocol"`
CanApplyInfoParam CanApplyInfoParam `json:"canApplyInfoParam"`
}
type CanApplyInfoParam struct {
Pin string `json:"pin"`
SkuID uint `json:"skuId"`
OrderID uint `json:"orderId"`
}
type canApplyType uint
const (
CannotApply canApplyType = iota
CanApply
)
var canApplyTypeMap = map[canApplyType]string{
CannotApply: "不可申请",
CanApply: "可申请",
}
func (o canApplyType) String() string {
if value, ok := canApplyTypeMap[o]; !ok {
return rest.UnKnow
} else {
return value
}
}
type returnType uint
const (
Return returnType = 10
Exchange returnType = 20
)
var returnTypeMap = map[returnType]string{
Return: "退货",
Exchange: "换货",
}
func (o returnType) String() string {
if value, ok := returnTypeMap[o]; !ok {
return rest.UnKnow
} else {
return value
}
}
func (o QueryCanAfterSaleRequest) GetApiName() string {
return "jingdong.ctp.afs.operate.apply.getIsCanApplyInfo"
}
func (o QueryCanAfterSaleRequest) GetRespName() string {
return "jingdong_ctp_afs_operate_apply_getIsCanApplyInfo_responce"
}
func (o QueryCanAfterSaleRequest) GetRespObj() interface{} {
return CanAfterSaleResponse{}
}
//CanAfterSaleResponse 返回参数.
type CanAfterSaleResponse struct {
Result struct {
Data CanAfterSaleParams `json:"data"`
ErrCode uint `json:"errCode"`
ErrMsg string `json:"errMsg"`
Success bool `json:"success"`
} `json:"result"`
}
type CanAfterSaleParams struct {
CanApply canApplyType `json:"canApply"`
SkuID uint `json:"skuId"`
AppliedNum uint `json:"appliedNum"`
CannotApplyTip string `json:"cannotApplyTip"`
OrderID uint `json:"orderId"`
AfsSupportedTypes []SupportParams `json:"afsSupportedTypes"`
}
type SupportParams struct {
AfsTypeName string `json:"afsTypeName"`
AfsType returnType `json:"afsType"`
}