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

3 years ago
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
3 years ago
const (
CannotApply CanApplyType = iota
3 years ago
CanApply
)
var canApplyTypeMap = map[CanApplyType]string{
3 years ago
CannotApply: "不可申请",
CanApply: "可申请",
}
func (o CanApplyType) String() string {
3 years ago
if value, ok := canApplyTypeMap[o]; !ok {
return rest.UnKnow
} else {
return value
}
}
type ReturnType uint
3 years ago
const (
Return ReturnType = 10
Exchange ReturnType = 20
3 years ago
)
var returnTypeMap = map[ReturnType]string{
3 years ago
Return: "退货",
Exchange: "换货",
}
func (o ReturnType) String() string {
3 years ago
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"`
3 years ago
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"`
3 years ago
}