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"`
}