1
This commit is contained in:
@@ -71,7 +71,7 @@ func TestOrderApplyPartRefund(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderLogisticsStatus(t *testing.T) {
|
||||
result, err := api.OrderLogisticsStatus(128752442052682640)
|
||||
result, err := api.OrderLogisticsStatus(140382472052682640)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package address_areaList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressAreaListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressAreaListParam
|
||||
}
|
||||
|
||||
func (c *AddressAreaListRequest) GetUrlPath() string {
|
||||
return "/address/areaList"
|
||||
}
|
||||
|
||||
func New() *AddressAreaListRequest {
|
||||
request := &AddressAreaListRequest{
|
||||
Param: &AddressAreaListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressAreaListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_areaList_response.AddressAreaListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_areaList_response.AddressAreaListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressAreaListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressAreaListRequest) GetParams() *AddressAreaListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AddressAreaListParam struct {
|
||||
CityId int64 `json:"city_id"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package address_areaList_response
|
||||
|
||||
type AddressAreaListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressAreaListData `json:"data"`
|
||||
}
|
||||
type DataItem struct {
|
||||
AreaId int64 `json:"area_id"`
|
||||
Area string `json:"area"`
|
||||
FatherId int64 `json:"father_id"`
|
||||
}
|
||||
type AddressAreaListData struct {
|
||||
Data []DataItem `json:"data"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package address_create_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressCreateRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressCreateParam
|
||||
}
|
||||
|
||||
func (c *AddressCreateRequest) GetUrlPath() string {
|
||||
return "/address/create"
|
||||
}
|
||||
|
||||
func New() *AddressCreateRequest {
|
||||
request := &AddressCreateRequest{
|
||||
Param: &AddressCreateParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressCreateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_create_response.AddressCreateResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_create_response.AddressCreateResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressCreateRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressCreateRequest) GetParams() *AddressCreateParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Address struct {
|
||||
// 联系人姓名
|
||||
UserName string `json:"user_name"`
|
||||
// 手机号码
|
||||
Mobile string `json:"mobile"`
|
||||
// 省份ID
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
// 城市ID
|
||||
CityId int64 `json:"city_id"`
|
||||
// 区ID
|
||||
TownId int64 `json:"town_id"`
|
||||
// 详细地址
|
||||
Detail string `json:"detail"`
|
||||
// 街道ID
|
||||
StreetId int64 `json:"street_id"`
|
||||
// 联系方式类型(0-手机,1-普通座机,2-企业座机)
|
||||
LinkType int32 `json:"link_type"`
|
||||
// 普通座机格式:区号-座机号-分机号(分机号选填)、区号3~4位、座机号7~8位、分机号不超过5位。企业座机:400/800开头不超过10位、95开头在5~8we
|
||||
FixedPhone string `json:"fixed_phone"`
|
||||
// 售后备注
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
type AddressCreateParam struct {
|
||||
// 地址信息
|
||||
Address *Address `json:"address"`
|
||||
// 门店ID(新建地址绑定在该门店下,非门店场景无需填写)
|
||||
StoreId int64 `json:"store_id"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package address_create_response
|
||||
|
||||
type AddressCreateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressCreateData `json:"data"`
|
||||
}
|
||||
type AddressCreateData struct {
|
||||
// 新建地址ID
|
||||
AddressId int64 `json:"address_id"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package address_getAreasByProvince_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressGetAreasByProvinceRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressGetAreasByProvinceParam
|
||||
}
|
||||
|
||||
func (c *AddressGetAreasByProvinceRequest) GetUrlPath() string {
|
||||
return "/address/getAreasByProvince"
|
||||
}
|
||||
|
||||
func New() *AddressGetAreasByProvinceRequest {
|
||||
request := &AddressGetAreasByProvinceRequest{
|
||||
Param: &AddressGetAreasByProvinceParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressGetAreasByProvinceRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_getAreasByProvince_response.AddressGetAreasByProvinceResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_getAreasByProvince_response.AddressGetAreasByProvinceResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressGetAreasByProvinceRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressGetAreasByProvinceRequest) GetParams() *AddressGetAreasByProvinceParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AddressGetAreasByProvinceParam struct {
|
||||
// 省ID
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package address_getAreasByProvince_response
|
||||
|
||||
type AddressGetAreasByProvinceResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressGetAreasByProvinceData `json:"data"`
|
||||
}
|
||||
type SubDistrictsItem struct {
|
||||
// 镇或者街道ID
|
||||
Code int64 `json:"code"`
|
||||
// 父ID
|
||||
FatherCode int64 `json:"father_code"`
|
||||
// 地址等级
|
||||
Level string `json:"level"`
|
||||
// 镇或者街道名称
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type SubDistrictsItem_4 struct {
|
||||
// 区县ID
|
||||
Code int64 `json:"code"`
|
||||
// 父ID
|
||||
FatherCode int64 `json:"father_code"`
|
||||
// 区县名称
|
||||
Name string `json:"name"`
|
||||
// 地址等级
|
||||
Level string `json:"level"`
|
||||
// 响应结果
|
||||
SubDistricts []SubDistrictsItem `json:"sub_districts"`
|
||||
}
|
||||
type SubDistrictsItem_3 struct {
|
||||
// 市ID
|
||||
Code int64 `json:"code"`
|
||||
// 父ID
|
||||
FatherCode int64 `json:"father_code"`
|
||||
// 市名
|
||||
Name string `json:"name"`
|
||||
// 地址等级
|
||||
Level string `json:"level"`
|
||||
// 响应结果
|
||||
SubDistricts []SubDistrictsItem_4 `json:"sub_districts"`
|
||||
}
|
||||
type DataItem struct {
|
||||
// 省ID
|
||||
Code int64 `json:"code"`
|
||||
// 父ID
|
||||
FatherCode int64 `json:"father_code"`
|
||||
// 省名称
|
||||
Name string `json:"name"`
|
||||
// 地址等级
|
||||
Level string `json:"level"`
|
||||
// 响应结果
|
||||
SubDistricts []SubDistrictsItem_3 `json:"sub_districts"`
|
||||
}
|
||||
type AddressGetAreasByProvinceData struct {
|
||||
// 响应结果
|
||||
Data []DataItem `json:"data"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package address_getProvince_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressGetProvinceRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressGetProvinceParam
|
||||
}
|
||||
|
||||
func (c *AddressGetProvinceRequest) GetUrlPath() string {
|
||||
return "/address/getProvince"
|
||||
}
|
||||
|
||||
func New() *AddressGetProvinceRequest {
|
||||
request := &AddressGetProvinceRequest{
|
||||
Param: &AddressGetProvinceParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressGetProvinceRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_getProvince_response.AddressGetProvinceResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_getProvince_response.AddressGetProvinceResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressGetProvinceRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressGetProvinceRequest) GetParams() *AddressGetProvinceParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AddressGetProvinceParam struct {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package address_getProvince_response
|
||||
|
||||
type AddressGetProvinceResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressGetProvinceData `json:"data"`
|
||||
}
|
||||
type DataItem struct {
|
||||
// 省份id
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
// 省份
|
||||
Province string `json:"province"`
|
||||
}
|
||||
type AddressGetProvinceData struct {
|
||||
// data
|
||||
Data []DataItem `json:"data"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package address_list_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressListParam
|
||||
}
|
||||
|
||||
func (c *AddressListRequest) GetUrlPath() string {
|
||||
return "/address/list"
|
||||
}
|
||||
|
||||
func New() *AddressListRequest {
|
||||
request := &AddressListRequest{
|
||||
Param: &AddressListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_list_response.AddressListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_list_response.AddressListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressListRequest) GetParams() *AddressListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AddressListParam struct {
|
||||
// 店铺id(字段废弃,不建议传入)
|
||||
ShopId int64 `json:"shop_id"`
|
||||
// 翻页每页数量,默认10
|
||||
PageSize int64 `json:"page_size"`
|
||||
// 翻页页数,从1开始
|
||||
PageNo int64 `json:"page_no"`
|
||||
// 排序方式支持asc/desc
|
||||
OrderBy string `json:"order_by"`
|
||||
// 排序字段
|
||||
OrderField string `json:"order_field"`
|
||||
// 门店ID(传入后只获取该门店下地址列表)
|
||||
StoreId int64 `json:"store_id"`
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package address_list_response
|
||||
|
||||
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
|
||||
type AddressListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressListData `json:"data"`
|
||||
}
|
||||
type AddressListItem struct {
|
||||
// 地址库id
|
||||
AddressId int64 `json:"address_id"`
|
||||
// 收/发件人
|
||||
RecieverName string `json:"reciever_name"`
|
||||
// 是否为退货默认
|
||||
IsDefault int64 `json:"is_default"`
|
||||
// 是否为发货默认
|
||||
IsSendDefault int64 `json:"is_send_default"`
|
||||
// 创建时间,时间戳,秒
|
||||
CreateTime string `json:"create_time"`
|
||||
// 更新时间,时间戳,秒
|
||||
UpdateTime string `json:"update_time"`
|
||||
// 收件人省份
|
||||
ReceiverProvinc string `json:"receiver_provinc"`
|
||||
// 收件人城市
|
||||
ReceiverCity string `json:"receiver_city"`
|
||||
// 收件人地区
|
||||
ReceiverDistrict string `json:"receiver_district"`
|
||||
// 收件人详情地址
|
||||
ReceiverDetail string `json:"receiver_detail"`
|
||||
// 收件人街道
|
||||
ReceiverStreet string `json:"receiver_street"`
|
||||
// 地址备注信息
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
type AddressListData struct {
|
||||
// 地址总数
|
||||
Total int64 `json:"total"`
|
||||
// 页码
|
||||
PageSize int64 `json:"page_size"`
|
||||
// 每页数量
|
||||
PageNo int64 `json:"page_no"`
|
||||
// 地址列表
|
||||
AddressList []AddressListItem `json:"address_list"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package address_provinceList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressProvinceListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressProvinceListParam
|
||||
}
|
||||
|
||||
func (c *AddressProvinceListRequest) GetUrlPath() string {
|
||||
return "/address/provinceList"
|
||||
}
|
||||
|
||||
func New() *AddressProvinceListRequest {
|
||||
request := &AddressProvinceListRequest{
|
||||
Param: &AddressProvinceListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressProvinceListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_provinceList_response.AddressProvinceListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_provinceList_response.AddressProvinceListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressProvinceListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressProvinceListRequest) GetParams() *AddressProvinceListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AddressProvinceListParam struct {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package address_provinceList_response
|
||||
|
||||
type AddressProvinceListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressProvinceListData `json:"data"`
|
||||
}
|
||||
type DataItem struct {
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
Province string `json:"province"`
|
||||
FatherId int64 `json:"father_id"`
|
||||
}
|
||||
type AddressProvinceListData struct {
|
||||
Data []DataItem `json:"data"`
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package address_update_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AddressUpdateRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AddressUpdateParam
|
||||
}
|
||||
|
||||
func (c *AddressUpdateRequest) GetUrlPath() string {
|
||||
return "/address/update"
|
||||
}
|
||||
|
||||
func New() *AddressUpdateRequest {
|
||||
request := &AddressUpdateRequest{
|
||||
Param: &AddressUpdateParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressUpdateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*address_update_response.AddressUpdateResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &address_update_response.AddressUpdateResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AddressUpdateRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AddressUpdateRequest) GetParams() *AddressUpdateParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Address struct {
|
||||
// 地址ID
|
||||
Id int64 `json:"id"`
|
||||
// 联系人姓名
|
||||
UserName string `json:"user_name"`
|
||||
// 手机号码
|
||||
Mobile string `json:"mobile"`
|
||||
// 省ID
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
// 城市ID
|
||||
CityId int64 `json:"city_id"`
|
||||
// 区ID
|
||||
TownId int64 `json:"town_id"`
|
||||
// 详细地址
|
||||
Detail string `json:"detail"`
|
||||
// 街道ID
|
||||
StreetId int64 `json:"street_id"`
|
||||
// 联系方式类型(0-手机,1-普通座机,2-企业座机)
|
||||
LinkType int32 `json:"link_type"`
|
||||
// 普通座机格式:区号-座机号-分机号(分机号选填)、区号3~4位、座机号7~8位、分机号不超过5位。企业座机:400/800开头不超过10位、95开头在5~8we
|
||||
FixedPhone string `json:"fixed_phone"`
|
||||
// 售后备注
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
type AddressUpdateParam struct {
|
||||
// 地址信息
|
||||
Address *Address `json:"address"`
|
||||
// 门店场景需要传门店ID,其他场景默认值0即可
|
||||
StoreId int64 `json:"store_id"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package address_update_response
|
||||
|
||||
type AddressUpdateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AddressUpdateData `json:"data"`
|
||||
}
|
||||
type AddressUpdateData struct {
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package afterSale_CancelSendGoodsSuccess_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleCancelSendGoodsSuccessRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleCancelSendGoodsSuccessParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleCancelSendGoodsSuccessRequest) GetUrlPath() string {
|
||||
return "/afterSale/CancelSendGoodsSuccess"
|
||||
}
|
||||
|
||||
func New() *AfterSaleCancelSendGoodsSuccessRequest {
|
||||
request := &AfterSaleCancelSendGoodsSuccessRequest{
|
||||
Param: &AfterSaleCancelSendGoodsSuccessParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleCancelSendGoodsSuccessRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_CancelSendGoodsSuccess_response.AfterSaleCancelSendGoodsSuccessResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_CancelSendGoodsSuccess_response.AfterSaleCancelSendGoodsSuccessResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleCancelSendGoodsSuccessRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleCancelSendGoodsSuccessRequest) GetParams() *AfterSaleCancelSendGoodsSuccessParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleCancelSendGoodsSuccessParam struct {
|
||||
// 售后单ID
|
||||
AftersaleId string `json:"aftersale_id"`
|
||||
// unix时间戳,单位为秒
|
||||
OpTime int64 `json:"op_time"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_CancelSendGoodsSuccess_response
|
||||
|
||||
type AfterSaleCancelSendGoodsSuccessResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleCancelSendGoodsSuccessData `json:"data"`
|
||||
}
|
||||
type AfterSaleCancelSendGoodsSuccessData struct {
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package afterSale_Detail_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleDetailRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleDetailParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleDetailRequest) GetUrlPath() string {
|
||||
return "/afterSale/Detail"
|
||||
}
|
||||
|
||||
func New() *AfterSaleDetailRequest {
|
||||
request := &AfterSaleDetailRequest{
|
||||
Param: &AfterSaleDetailParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleDetailRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_Detail_response.AfterSaleDetailResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_Detail_response.AfterSaleDetailResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleDetailRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleDetailRequest) GetParams() *AfterSaleDetailParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleDetailParam struct {
|
||||
// 售后单ID
|
||||
AfterSaleId string `json:"after_sale_id"`
|
||||
IsSearchable bool `json:"is_searchable"`
|
||||
}
|
||||
@@ -0,0 +1,493 @@
|
||||
package afterSale_Detail_response
|
||||
|
||||
type AfterSaleDetailResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleDetailData `json:"data"`
|
||||
}
|
||||
type ArbitrateEvidenceTmpl struct {
|
||||
// 仲裁图片示例
|
||||
Images []string `json:"images"`
|
||||
// 仲裁描述
|
||||
Describe string `json:"describe"`
|
||||
// 示例截止时间
|
||||
DeadLine int64 `json:"dead_line"`
|
||||
}
|
||||
type OrderItem struct {
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流状态到达时间
|
||||
LogisticsTime int64 `json:"logistics_time"`
|
||||
// 正向物流状态
|
||||
LogisticsState int64 `json:"logistics_state"`
|
||||
// 增值服务标签
|
||||
ValueAddedServices []ValueAddedServicesItem `json:"value_added_services"`
|
||||
}
|
||||
type DeductionPriceDetailItem struct {
|
||||
// 金额明细
|
||||
PriceText string `json:"price_text"`
|
||||
// 金额
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type ReturnAddress struct {
|
||||
// 省
|
||||
Province *Province `json:"province"`
|
||||
// 市
|
||||
City *City `json:"city"`
|
||||
// 县/区
|
||||
Town *Town `json:"town"`
|
||||
// 街道
|
||||
Street *Street `json:"street"`
|
||||
// 收件地址标志物
|
||||
Landmark string `json:"landmark"`
|
||||
// 详细地址
|
||||
Detail string `json:"detail"`
|
||||
}
|
||||
type AftersaleTagsItem struct {
|
||||
// 标签名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 标签关键字
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 标签悬浮文案的占位符定义
|
||||
TagDetailText string `json:"tag_detail_text"`
|
||||
// 标签跳转链接
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
// 标签悬浮文案的占位符定义
|
||||
Placeholder map[string]PlaceholderItem `json:"placeholder"`
|
||||
}
|
||||
type PlaceholderItem struct {
|
||||
// 占位符文案
|
||||
Text string `json:"text"`
|
||||
// 占位符跳转链接
|
||||
Url string `json:"url"`
|
||||
}
|
||||
type ArbitrateEvidence struct {
|
||||
// 仲裁图片
|
||||
Images []string `json:"images"`
|
||||
// 仲裁图片描述
|
||||
Describe string `json:"describe"`
|
||||
}
|
||||
type ArbitrateInfo struct {
|
||||
// 仲裁单id
|
||||
ArbitrateId string `json:"arbitrate_id"`
|
||||
// 仲裁状态
|
||||
ArbitrateStatus int64 `json:"arbitrate_status"`
|
||||
// 是否需要上传凭证
|
||||
IsRequiredEvidence bool `json:"is_required_evidence"`
|
||||
// 仲裁截止时间
|
||||
ArbitrateStatusDeadline string `json:"arbitrate_status_deadline"`
|
||||
// 仲裁原因
|
||||
ArbitrateOpinion string `json:"arbitrate_opinion"`
|
||||
// 仲裁结果
|
||||
ArbitrateConclusion int64 `json:"arbitrate_conclusion"`
|
||||
// 仲裁单创建时间
|
||||
ArbitrateCreateTime int64 `json:"arbitrate_create_time"`
|
||||
// 仲裁单更新时间
|
||||
ArbitrateUpdateTime int64 `json:"arbitrate_update_time"`
|
||||
// 凭证示例
|
||||
ArbitrateEvidenceTmpl *ArbitrateEvidenceTmpl `json:"arbitrate_evidence_tmpl"`
|
||||
// 仲裁证据
|
||||
ArbitrateEvidence *ArbitrateEvidence `json:"arbitrate_evidence"`
|
||||
// 仲裁责任方
|
||||
ArbitrateBlame int64 `json:"arbitrate_blame"`
|
||||
}
|
||||
type ActualAmount struct {
|
||||
// 金额明细
|
||||
PriceText string `json:"price_text"`
|
||||
// 金额
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type OriginAmount struct {
|
||||
// 金额明细
|
||||
PriceText string `json:"price_text"`
|
||||
// 金额
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type OrderInfo struct {
|
||||
// 店铺单ID
|
||||
ShopOrderId int64 `json:"shop_order_id"`
|
||||
// sku单信息
|
||||
SkuOrderInfos []SkuOrderInfosItem `json:"sku_order_infos"`
|
||||
}
|
||||
type PostAddress struct {
|
||||
// 省
|
||||
Province *Province `json:"province"`
|
||||
// 市
|
||||
City *City `json:"city"`
|
||||
// 县
|
||||
Town *Town `json:"town"`
|
||||
// 地址详情,此字段已加密,使用前需要解密
|
||||
Detail string `json:"detail"`
|
||||
encryptDetail string `json:"encrypt_detail"`
|
||||
// 收件地址标志物
|
||||
Landmark string `json:"landmark"`
|
||||
// 街道
|
||||
Street *Street `json:"street"`
|
||||
}
|
||||
type ExchangeSkuInfo struct {
|
||||
// 商品skuid
|
||||
SkuId string `json:"sku_id"`
|
||||
// 商品编码
|
||||
Code string `json:"code"`
|
||||
// 替换数量
|
||||
Num int64 `json:"num"`
|
||||
// 商家编号
|
||||
OutSkuId string `json:"out_sku_id"`
|
||||
// 区域库存仓ID
|
||||
OutWarehouseId string `json:"out_warehouse_id"`
|
||||
// sku外部供应商编码供应商ID
|
||||
SupplierId string `json:"supplier_id"`
|
||||
// 商品图片url
|
||||
Url string `json:"url"`
|
||||
// 商品名称
|
||||
Name string `json:"name"`
|
||||
// 换货商品的价格,单位分
|
||||
Price string `json:"price"`
|
||||
// sku规格信息
|
||||
SpecDesc string `json:"spec_desc"`
|
||||
}
|
||||
type TagsItem struct {
|
||||
// 服务标签名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 服务标签英文代号
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 服务跳转地址
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
}
|
||||
type AfterSaleDetailData struct {
|
||||
// 售后单及相关信息
|
||||
ProcessInfo *ProcessInfo `json:"process_info"`
|
||||
// 售后单关联订单信息
|
||||
OrderInfo *OrderInfo `json:"order_info"`
|
||||
}
|
||||
type AfterSaleServiceTagItem struct {
|
||||
// 服务标签名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 服务标签英文代号
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 服务跳转地址
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
}
|
||||
type ProcessInfo struct {
|
||||
// 售后单信息
|
||||
AfterSaleInfo *AfterSaleInfo `json:"after_sale_info"`
|
||||
// 仲裁信息
|
||||
ArbitrateInfo *ArbitrateInfo `json:"arbitrate_info"`
|
||||
// 售后标签
|
||||
AfterSaleServiceTag *AfterSaleServiceTag `json:"after_sale_service_tag"`
|
||||
// 物流信息
|
||||
LogisticsInfo *LogisticsInfo `json:"logistics_info"`
|
||||
// 售后备注
|
||||
AfterSaleShopRemarks []AfterSaleShopRemarksItem `json:"after_sale_shop_remarks"`
|
||||
// 价保详情
|
||||
PriceProtectionDetail *PriceProtectionDetail `json:"price_protection_detail"`
|
||||
}
|
||||
type Return struct {
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 买家填写退货物流时间
|
||||
LogisticsTime int64 `json:"logistics_time"`
|
||||
}
|
||||
type ValueAddedServicesItem struct {
|
||||
// 标签编码
|
||||
Code string `json:"code"`
|
||||
// 标签名称
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type RefundDetail struct {
|
||||
// 总价
|
||||
ActualAmount *ActualAmount `json:"actual_amount"`
|
||||
// 原价
|
||||
OriginAmount *OriginAmount `json:"origin_amount"`
|
||||
// 减数明细
|
||||
DeductionPriceDetail []DeductionPriceDetailItem `json:"deduction_price_detail"`
|
||||
}
|
||||
type Town struct {
|
||||
// 县ID
|
||||
Id string `json:"id"`
|
||||
// 县名字
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type AfterSaleServiceTag struct {
|
||||
// 售后服务标签
|
||||
AfterSaleServiceTag []AfterSaleServiceTagItem `json:"after_sale_service_tag"`
|
||||
}
|
||||
type StandardPrice struct {
|
||||
// 总价
|
||||
ActualAmount *ActualAmount `json:"actual_amount"`
|
||||
// 原价
|
||||
OriginAmount *OriginAmount `json:"origin_amount"`
|
||||
// 减数明细
|
||||
DeductionPriceDetail []DeductionPriceDetailItem `json:"deduction_price_detail"`
|
||||
}
|
||||
type CheckPrice struct {
|
||||
// 总价
|
||||
ActualAmount *ActualAmount `json:"actual_amount"`
|
||||
// 原价
|
||||
OriginAmount *OriginAmount `json:"origin_amount"`
|
||||
// 减数明细
|
||||
DeductionPriceDetail []DeductionPriceDetailItem `json:"deduction_price_detail"`
|
||||
}
|
||||
type PriceProtectionDetail struct {
|
||||
// 价保文案标题
|
||||
Title string `json:"title"`
|
||||
// 价保计算公式
|
||||
PriceProtectionFormulas string `json:"price_protection_formulas"`
|
||||
// 基准价
|
||||
StandardPrice *StandardPrice `json:"standard_price"`
|
||||
// 核准价
|
||||
CheckPrice *CheckPrice `json:"check_price"`
|
||||
// 退款明细
|
||||
RefundDetail *RefundDetail `json:"refund_detail"`
|
||||
// 钱款承担方
|
||||
RefundBearerList []RefundBearerListItem `json:"refund_bearer_list"`
|
||||
// 平台价保补贴商家金额进度状态,1表示成功
|
||||
PlatformToMerchantRefundStatus int64 `json:"platform_to_merchant_refund_status"`
|
||||
// 平台价保回收金额
|
||||
PlatformRecycleAmount int64 `json:"platform_recycle_amount"`
|
||||
}
|
||||
type GivenSkuDetailsItem struct {
|
||||
// 该订单对应的赠品订单
|
||||
SkuOrderId string `json:"sku_order_id"`
|
||||
// 赠品名称
|
||||
ProductName string `json:"product_name"`
|
||||
}
|
||||
type AfterSaleInfo struct {
|
||||
// 售后单ID
|
||||
AfterSaleId int64 `json:"after_sale_id"`
|
||||
// 售后状态:6-售后申请;27-拒绝售后申请;12-售后成功;7-售后退货中;11-售后已发货;29-售后退货拒绝;13-【换货返回:换货售后换货商家发货】,【补寄返回:补寄待用户收货】; 14-【换货返回:(换货)售后换货用户收货】,【补寄返回:(补寄)用户已收货】 ;28-售后失败;51-订单取消成功;53-逆向交易已完成;
|
||||
AfterSaleStatus int64 `json:"after_sale_status"`
|
||||
// 售后状态文案
|
||||
AfterSaleStatusDesc string `json:"after_sale_status_desc"`
|
||||
// 退款方式
|
||||
RefundType int64 `json:"refund_type"`
|
||||
// 退款方式文案
|
||||
RefundTypeText string `json:"refund_type_text"`
|
||||
// 退款状态;1-待退款;2-退款中;3-退款成功;4退款失败;5追缴成功;
|
||||
RefundStatus int64 `json:"refund_status"`
|
||||
// 售后总金额(含运费)
|
||||
RefundTotalAmount int64 `json:"refund_total_amount"`
|
||||
// 售后运费
|
||||
RefundPostAmount int64 `json:"refund_post_amount"`
|
||||
// 退款补贴总金额
|
||||
RefundPromotionAmount int64 `json:"refund_promotion_amount"`
|
||||
// 售后单申请时间
|
||||
ApplyTime int64 `json:"apply_time"`
|
||||
// 售后单更新时间
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
// 申请原因
|
||||
Reason string `json:"reason"`
|
||||
// 原因码;通过【afterSale/rejectReasonCodeList】接口获取
|
||||
ReasonCode int64 `json:"reason_code"`
|
||||
// 售后类型 ;0-退货退款;1-已发货仅退款;2-未发货仅退款;3-换货;4-系统取消;5-用户取消;6-价保;7-补寄;
|
||||
AfterSaleType int64 `json:"after_sale_type"`
|
||||
// 售后单类型文案
|
||||
AfterSaleTypeText string `json:"after_sale_type_text"`
|
||||
// 申请描述
|
||||
ReasonRemark string `json:"reason_remark"`
|
||||
// 买家申请退款图片凭证;仅支持图片,最大返回6张图片。
|
||||
Evidence []string `json:"evidence"`
|
||||
// 用户申请售后件数
|
||||
AfterSaleApplyCount int64 `json:"after_sale_apply_count"`
|
||||
// 用户需退回件数, 数值为用户申请售后件数 - 商家未发货件数
|
||||
NeedReturnCount int64 `json:"need_return_count"`
|
||||
// 平台需要回收的金额(分)
|
||||
DeductionAmount int64 `json:"deduction_amount"`
|
||||
// 作废的券ID
|
||||
DisableCouponId string `json:"disable_coupon_id"`
|
||||
// 平台优惠退回金额
|
||||
PlatformDiscountReturnAmount int64 `json:"platform_discount_return_amount"`
|
||||
// 平台优惠退回状态,枚举:0:待退补贴;1:退补贴成功;2:退补贴失败
|
||||
PlatformDiscountReturnStatus int64 `json:"platform_discount_return_status"`
|
||||
// 达人优惠退回金额
|
||||
KolDiscountReturnAmount int64 `json:"kol_discount_return_amount"`
|
||||
// 达人优惠退回状态,枚举:0:待退补贴;1:退补贴成功;2:退补贴失败
|
||||
KolDiscountReturnStatus int64 `json:"kol_discount_return_status"`
|
||||
// 换货、补寄时的收货人名字(只有换货、补寄时,这个字段才会有值),此字段已加密,使用前需要解密
|
||||
PostReceiver string `json:"post_receiver"`
|
||||
encryptPostReceiver string `json:"encrypt_post_receiver"`
|
||||
// 换货、补寄时的收货人的联系电话(只有换货、补寄时,这个字段才会有值),此字段已加密,使用前需要解密
|
||||
PostTelSec string `json:"post_tel_sec"`
|
||||
encryptPostTelSec string `json:"encrypt_post_tel_sec"`
|
||||
// 换货、补寄时的收货四级地址(只有换货、补寄时,这个字段才会有值)
|
||||
PostAddress *PostAddress `json:"post_address"`
|
||||
// 物流异常风控编码
|
||||
RiskDecsisonCode int64 `json:"risk_decsison_code"`
|
||||
// 物流异常风控理由
|
||||
RiskDecsisonReason string `json:"risk_decsison_reason"`
|
||||
// 物流异常风控描述
|
||||
RiskDecsisonDescription string `json:"risk_decsison_description"`
|
||||
// 退货地址
|
||||
ReturnAddress *ReturnAddress `json:"return_address"`
|
||||
// 实际退款金额;单位:分
|
||||
RealRefundAmount int64 `json:"real_refund_amount"`
|
||||
// 买家是否收到货,0-表示未收到货;1-表示收到货
|
||||
GotPkg int64 `json:"got_pkg"`
|
||||
// 逾期时间
|
||||
StatusDeadline int64 `json:"status_deadline"`
|
||||
// 退货地址ID
|
||||
ReturnAddressId int64 `json:"return_address_id"`
|
||||
// 换货SKU信息
|
||||
ExchangeSkuInfo *ExchangeSkuInfo `json:"exchange_sku_info"`
|
||||
// 运费优惠退回金额
|
||||
PostDiscountReturnAmount int64 `json:"post_discount_return_amount"`
|
||||
// 运费优惠退回状态,枚举:0:待退补贴;1:退补贴成功;2:退补贴失败
|
||||
PostDiscountReturnStatus int64 `json:"post_discount_return_status"`
|
||||
// 部分退状态,0为全额退款,1为部分退
|
||||
PartType int64 `json:"part_type"`
|
||||
// 用户申请售后选择的二级原因标签
|
||||
ReasonSecondLabels []ReasonSecondLabelsItem `json:"reason_second_labels"`
|
||||
// 卡券商品申请退款的张数
|
||||
RefundVoucherNum int64 `json:"refund_voucher_num"`
|
||||
// 多次券商品申请退款的次数,对于单次券,此字段值与refund_voucher_num相同
|
||||
RefundVoucherTimes int64 `json:"refund_voucher_times"`
|
||||
// 退金币金额
|
||||
GoldCoinReturnAmount int64 `json:"gold_coin_return_amount"`
|
||||
// 退款失败文案
|
||||
RefundFailReason string `json:"refund_fail_reason"`
|
||||
// 售后标签
|
||||
AftersaleTags []AftersaleTagsItem `json:"aftersale_tags"`
|
||||
// 门店id
|
||||
StoreId string `json:"store_id"`
|
||||
// 门店名称
|
||||
StoreName string `json:"store_name"`
|
||||
}
|
||||
type Exchange struct {
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 卖家填写换货物流时间
|
||||
LogisticsTime int64 `json:"logistics_time"`
|
||||
}
|
||||
type ReasonSecondLabelsItem struct {
|
||||
// 二级原因标签编码
|
||||
Code int64 `json:"code"`
|
||||
// 二级原因标签名称
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type Resend struct {
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 卖家填写补寄物流时间
|
||||
LogisticsTime int64 `json:"logistics_time"`
|
||||
}
|
||||
type RefundBearerListItem struct {
|
||||
// 文案
|
||||
PriceText string `json:"price_text"`
|
||||
// 金额
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type Province struct {
|
||||
// 省ID
|
||||
Id string `json:"id"`
|
||||
// 省名字
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type City struct {
|
||||
// 市ID
|
||||
Id string `json:"id"`
|
||||
// 市名字
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type InsuranceTagsItem struct {
|
||||
// 服务标签名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 服务标签英文代号
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 服务跳转地址
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
}
|
||||
type AfterSaleShopRemarksItem struct {
|
||||
// 备注关联的订单ID
|
||||
OrderId int64 `json:"order_id"`
|
||||
// 备注关联的售后ID
|
||||
AfterSaleId int64 `json:"after_sale_id"`
|
||||
// 备注内容
|
||||
Remark string `json:"remark"`
|
||||
// 创建时间
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 操作人
|
||||
Operator string `json:"operator"`
|
||||
}
|
||||
type SkuSpecItem struct {
|
||||
// 规格名称
|
||||
Name string `json:"name"`
|
||||
// 规格值
|
||||
Value string `json:"value"`
|
||||
}
|
||||
type SkuOrderInfosItem struct {
|
||||
// sku单ID
|
||||
SkuOrderId int64 `json:"sku_order_id"`
|
||||
// 订单状态
|
||||
OrderStatus int64 `json:"order_status"`
|
||||
// 买家实付金额(分)
|
||||
PayAmount int64 `json:"pay_amount"`
|
||||
// 买家购买运费(分)
|
||||
PostAmount int64 `json:"post_amount"`
|
||||
// 订单件数
|
||||
ItemQuantity int64 `json:"item_quantity"`
|
||||
// 订单创建时间
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 购买税费(分)
|
||||
TaxAmount int64 `json:"tax_amount"`
|
||||
// 是否为跨境业务
|
||||
IsOverseaOrder int64 `json:"is_oversea_order"`
|
||||
// 商品名称
|
||||
ProductName string `json:"product_name"`
|
||||
// 商品ID
|
||||
ProductId int64 `json:"product_id"`
|
||||
// 商品图片
|
||||
ProductImage string `json:"product_image"`
|
||||
// 商品标签
|
||||
Tags []TagsItem `json:"tags"`
|
||||
// 商品规格信息
|
||||
SkuSpec []SkuSpecItem `json:"sku_spec"`
|
||||
// 商家sku自定义编码
|
||||
ShopSkuCode string `json:"shop_sku_code"`
|
||||
// skuID
|
||||
SkuId int64 `json:"sku_id"`
|
||||
// sku商品总原价(不含优惠)
|
||||
ItemSumAmount int64 `json:"item_sum_amount"`
|
||||
// 商品实际支付金额
|
||||
SkuPayAmount int64 `json:"sku_pay_amount"`
|
||||
// 优惠总金额
|
||||
PromotionAmount int64 `json:"promotion_amount"`
|
||||
// 支付方式
|
||||
PayType int64 `json:"pay_type"`
|
||||
// 保险及其状态
|
||||
InsuranceTags []InsuranceTagsItem `json:"insurance_tags"`
|
||||
// 商品单对应的售后数量
|
||||
AfterSaleItemCount int64 `json:"after_sale_item_count"`
|
||||
// 赠品信息
|
||||
GivenSkuDetails []GivenSkuDetailsItem `json:"given_sku_details"`
|
||||
}
|
||||
type Street struct {
|
||||
// 街道ID
|
||||
Id string `json:"id"`
|
||||
// 街道名字
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type LogisticsInfo struct {
|
||||
// 买家退货物流信息
|
||||
Return *Return `json:"return"`
|
||||
// 卖家换货物流信息
|
||||
Exchange *Exchange `json:"exchange"`
|
||||
// 卖家发货正向物流信息
|
||||
Order []OrderItem `json:"order"`
|
||||
// 补寄物流
|
||||
Resend *Resend `json:"resend"`
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package afterSale_List_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleListParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleListRequest) GetUrlPath() string {
|
||||
return "/afterSale/List"
|
||||
}
|
||||
|
||||
func New() *AfterSaleListRequest {
|
||||
request := &AfterSaleListRequest{
|
||||
Param: &AfterSaleListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_List_response.AfterSaleListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_List_response.AfterSaleListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleListRequest) GetParams() *AfterSaleListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleListParam struct {
|
||||
// 父订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 售后类型;0-退货退款;1-已发货仅退款;2-未发货仅退款;3-换货;6-价保;7-补寄;
|
||||
AftersaleType int64 `json:"aftersale_type"`
|
||||
// 已废弃,推荐使用standard_aftersale_status字段。售后状态,枚举为6(待商家同意),7(待买家退货),8(待商家发货),11(待商家二次同意),12(售后成功),13(换货待买家收货),14(换货成功),27(商家一次拒绝),28(售后失败),29(商家二次拒绝)
|
||||
AftersaleStatus int64 `json:"aftersale_status"`
|
||||
// 售后理由;1-七天无理由退货;2-非七天无理由退货;
|
||||
Reason int64 `json:"reason"`
|
||||
// 退货物流状态,枚举为1(全部),2(已发货),3(未发货)
|
||||
LogisticsStatus int64 `json:"logistics_status"`
|
||||
// 付款方式,枚举为1(全部), 2(货到付款),3(线上付款)
|
||||
PayType int64 `json:"pay_type"`
|
||||
// 退款类型,枚举为0(原路退款),1(线下退款),2(备用金),3(保证金),4(无需退款)
|
||||
RefundType int64 `json:"refund_type"`
|
||||
// 仲裁状态,枚举为0(未介入),1(客服处理中),2(仲裁结束-支持买家),3(仲裁结束-支持卖家),4(待商家举证),5(待与买家协商),6(仲裁结束),255(取消)
|
||||
ArbitrateStatus []int64 `json:"arbitrate_status"`
|
||||
// 插旗信息:0:灰 1:紫 2: 青 3:绿 4: 橙 5: 红
|
||||
OrderFlag []int64 `json:"order_flag"`
|
||||
// 申请时间开始,单位为秒
|
||||
StartTime int64 `json:"start_time"`
|
||||
// 申请时间结束,单位为秒
|
||||
EndTime int64 `json:"end_time"`
|
||||
// 金额下限,单位为分
|
||||
AmountStart int64 `json:"amount_start"`
|
||||
// 金额上限,单位为分
|
||||
AmountEnd int64 `json:"amount_end"`
|
||||
// 风控标签,枚举为-1(退货正常),1(退货异常)
|
||||
RiskFlag int64 `json:"risk_flag"`
|
||||
// 排序方式,优先级按照列表顺序从前往后依次减小,写法为"<字段名称> <排序方式>",字段名称目前支持"status_deadline"(逾期时间)、"apply_time"(申请时间)和 "update_time"(更新时间),排序方式目前支持"asc"(升序)和"desc"(降序)。按照"逾期时间"升序排列,会优先返回临近逾期时间的数据。
|
||||
OrderBy []string `json:"order_by"`
|
||||
// 页数,从0开始
|
||||
Page int64 `json:"page"`
|
||||
// 每页数量,最多100个
|
||||
Size int64 `json:"size"`
|
||||
// 售后单号
|
||||
AftersaleId string `json:"aftersale_id"`
|
||||
// 售后状态;3-换货待买家收货;6-待商家同意;7-待买家退货;8-待商家发货;11-待商家二次同意;12-售后成功;14-换货成功;27-商家一次拒绝;28-售后失败;29-商家二次拒绝;支持传多种状态,使用英文“,”分隔
|
||||
StandardAftersaleStatus []int64 `json:"standard_aftersale_status"`
|
||||
// 是否展示特殊售后
|
||||
NeedSpecialType bool `json:"need_special_type"`
|
||||
// 更新时间开始,单位为秒
|
||||
UpdateStartTime int64 `json:"update_start_time"`
|
||||
// 更新时间结束,单位为秒
|
||||
UpdateEndTime int64 `json:"update_end_time"`
|
||||
// 正向物流单号
|
||||
OrderLogisticsTrackingNo []string `json:"order_logistics_tracking_no"`
|
||||
// 正向物流状态(仅支持拒签场景下的状态筛选,状态更新有一定时延。1:买家已拒签;2:买家已签收;3:快递退回中,运往商家,包含快递拦截成功;4:商家已签收)
|
||||
OrderLogisticsState []int64 `json:"order_logistics_state"`
|
||||
// 是否拒签后退款(1:已同意拒签, 2:未同意拒签)
|
||||
AgreeRefuseSign []int64 `json:"agree_refuse_sign"`
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
package afterSale_List_response
|
||||
|
||||
type AfterSaleListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleListData `json:"data"`
|
||||
}
|
||||
type TagsItem struct {
|
||||
// 标签中文名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 标签编号
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 标签链接
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
}
|
||||
type SkuSpecItem struct {
|
||||
// 规格类型名称
|
||||
Name string `json:"name"`
|
||||
// 规格值
|
||||
Value string `json:"value"`
|
||||
}
|
||||
type OrderInfo struct {
|
||||
// 店铺单订单ID
|
||||
ShopOrderId string `json:"shop_order_id"`
|
||||
// 售后关联的订单信息
|
||||
RelatedOrderInfo []RelatedOrderInfoItem `json:"related_order_info"`
|
||||
// 订单插旗
|
||||
OrderFlag int64 `json:"order_flag"`
|
||||
}
|
||||
type ExchangeSkuInfo struct {
|
||||
// 换货SkuID
|
||||
SkuId string `json:"sku_id"`
|
||||
// 换货SKU code
|
||||
Code string `json:"code"`
|
||||
// 换货数目
|
||||
Num int64 `json:"num"`
|
||||
// 商家编号
|
||||
OutSkuId string `json:"out_sku_id"`
|
||||
// 区域库存仓ID
|
||||
OutWarehouseId string `json:"out_warehouse_id"`
|
||||
// sku外部供应商编码供应商ID
|
||||
SupplierId string `json:"supplier_id"`
|
||||
// 商品图片url
|
||||
Url string `json:"url"`
|
||||
// 商品名称
|
||||
Name string `json:"name"`
|
||||
// 换货商品的价格,单位分
|
||||
Price string `json:"price"`
|
||||
// sku规格信息
|
||||
SpecDesc string `json:"spec_desc"`
|
||||
}
|
||||
type AftersaleTagsItem struct {
|
||||
// 标签名称
|
||||
TagDetail string `json:"tag_detail"`
|
||||
// 标签关键字
|
||||
TagDetailEn string `json:"tag_detail_en"`
|
||||
// 标签悬浮文案(其中${key}占位符对应placeholder中的key对应内容)
|
||||
TagDetailText string `json:"tag_detail_text"`
|
||||
// 标签跳转链接
|
||||
TagLinkUrl string `json:"tag_link_url"`
|
||||
// 标签悬浮文案的占位符定义
|
||||
Placeholder map[string]PlaceholderItem `json:"placeholder"`
|
||||
}
|
||||
type OrderLogisticsItem struct {
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流状态到达时间
|
||||
LogisticsTime int64 `json:"logistics_time"`
|
||||
// 正向物流状态
|
||||
LogisticsState int64 `json:"logistics_state"`
|
||||
}
|
||||
type TextPart struct {
|
||||
// 正向物流发货状态文案
|
||||
LogisticsText string `json:"logistics_text"`
|
||||
// 售后状态文案
|
||||
AftersaleStatusText string `json:"aftersale_status_text"`
|
||||
// 售后类型文案
|
||||
AftersaleTypeText string `json:"aftersale_type_text"`
|
||||
// 退货物流发货状态文案
|
||||
ReturnLogisticsText string `json:"return_logistics_text"`
|
||||
// 售后退款类型文案
|
||||
AftersaleRefundTypeText string `json:"aftersale_refund_type_text"`
|
||||
// 售后理由文案
|
||||
ReasonText string `json:"reason_text"`
|
||||
// 坏单比例文案
|
||||
BadItemText string `json:"bad_item_text"`
|
||||
// 仲裁状态文案
|
||||
ArbitrateStatusText string `json:"arbitrate_status_text"`
|
||||
}
|
||||
type RelatedOrderInfoItem struct {
|
||||
// 商品单信息
|
||||
SkuOrderId string `json:"sku_order_id"`
|
||||
// 订单状态,枚举为2(未发货),3(已发货),5(已收货或已完成),255(已完成)
|
||||
OrderStatus int64 `json:"order_status"`
|
||||
// 付款金额
|
||||
PayAmount int64 `json:"pay_amount"`
|
||||
// 付运费金额
|
||||
PostAmount int64 `json:"post_amount"`
|
||||
// 购买数量
|
||||
ItemNum int64 `json:"item_num"`
|
||||
// 下单时间
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 税费
|
||||
TaxAmount int64 `json:"tax_amount"`
|
||||
// 是否为海外订单
|
||||
IsOverseaOrder int64 `json:"is_oversea_order"`
|
||||
// 商品名称
|
||||
ProductName string `json:"product_name"`
|
||||
// 商品ID
|
||||
ProductId int64 `json:"product_id"`
|
||||
// 商品图片
|
||||
ProductImage string `json:"product_image"`
|
||||
// 订单标签
|
||||
Tags []TagsItem `json:"tags"`
|
||||
// 商品规格
|
||||
SkuSpec []SkuSpecItem `json:"sku_spec"`
|
||||
// 商家SKU编码
|
||||
ShopSkuCode string `json:"shop_sku_code"`
|
||||
// 发货物流编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 售后退款金额
|
||||
AftersalePayAmount int64 `json:"aftersale_pay_amount"`
|
||||
// 售后退运费金额
|
||||
AftersalePostAmount int64 `json:"aftersale_post_amount"`
|
||||
// 售后退税费金额
|
||||
AftersaleTaxAmount int64 `json:"aftersale_tax_amount"`
|
||||
// 售后商品数量
|
||||
AftersaleItemNum int64 `json:"aftersale_item_num"`
|
||||
// 优惠券金额
|
||||
PromotionPayAmount int64 `json:"promotion_pay_amount"`
|
||||
// 价格
|
||||
Price int64 `json:"price"`
|
||||
// 【已废弃】正向物流公司名称,替代字段:aftersale_info.order_logistics.company_name字段
|
||||
LogisticsCompanyName string `json:"logistics_company_name"`
|
||||
// 赠品订单id
|
||||
GivenSkuOrderIds []string `json:"given_sku_order_ids"`
|
||||
}
|
||||
type SellerLogsItem struct {
|
||||
// 插旗日志内容
|
||||
Content string `json:"content"`
|
||||
// 插旗操作人
|
||||
OpName string `json:"op_name"`
|
||||
// 插旗时间(字符串格式)
|
||||
CreateTime string `json:"create_time"`
|
||||
// 插旗信息;0:灰 1:紫 2: 青 3:绿 4: 橙 5: 红
|
||||
Star int64 `json:"star"`
|
||||
}
|
||||
type ItemsItem struct {
|
||||
// 售后信息
|
||||
AftersaleInfo *AftersaleInfo `json:"aftersale_info"`
|
||||
// 订单信息
|
||||
OrderInfo *OrderInfo `json:"order_info"`
|
||||
// 文案部分
|
||||
TextPart *TextPart `json:"text_part"`
|
||||
// 卖家插旗日志
|
||||
SellerLogs []SellerLogsItem `json:"seller_logs"`
|
||||
}
|
||||
type PlaceholderItem struct {
|
||||
// 占位符文案
|
||||
Text string `json:"text"`
|
||||
// 占位符跳转链接
|
||||
Url string `json:"url"`
|
||||
}
|
||||
type AftersaleInfo struct {
|
||||
// 售后单号
|
||||
AftersaleId string `json:"aftersale_id"`
|
||||
// 售后订单类型,枚举为-1(历史订单),1(商品单),2(店铺单)
|
||||
AftersaleOrderType int64 `json:"aftersale_order_type"`
|
||||
// 售后类型,枚举为0(退货退款),1(已发货仅退款),2(未发货仅退款),3(换货),6(价保),7(补寄)
|
||||
AftersaleType int64 `json:"aftersale_type"`
|
||||
// 售后状态和请求参数standard_aftersale_status字段对应;3-换货待买家收货;6-待商家同意;7-待买家退货;8-待商家发货;11-待商家二次同意;12-售后成功;14-换货成功;27-商家一次拒绝;28-售后失败;29-商家二次拒绝;
|
||||
AftersaleStatus int64 `json:"aftersale_status"`
|
||||
// 关联的订单ID
|
||||
RelatedId string `json:"related_id"`
|
||||
// 申请时间
|
||||
ApplyTime int64 `json:"apply_time"`
|
||||
// 最近更新时间
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
// 当前节点逾期时间
|
||||
StatusDeadline int64 `json:"status_deadline"`
|
||||
// 售后退款金额,单位为分
|
||||
RefundAmount int64 `json:"refund_amount"`
|
||||
// 售后退运费金额,单位为分
|
||||
RefundPostAmount int64 `json:"refund_post_amount"`
|
||||
// 售后数量
|
||||
AftersaleNum int64 `json:"aftersale_num"`
|
||||
// 部分退类型
|
||||
PartType int64 `json:"part_type"`
|
||||
// 售后退款类型,枚举为-1(历史数据默认值),0(订单货款/原路退款),1(货到付款线下退款),2(备用金),3(保证金),4(无需退款),5(平台垫付)
|
||||
AftersaleRefundType int64 `json:"aftersale_refund_type"`
|
||||
// 退款方式,枚举为1(极速退款助手)、2(售后小助手)、3(售后急速退)、4(闪电退货)
|
||||
RefundType int64 `json:"refund_type"`
|
||||
// 仲裁状态,枚举为0(无仲裁记录),1(仲裁中),2(客服同意),3(客服拒绝),4(待商家举证),5(协商期),255(仲裁结束)
|
||||
ArbitrateStatus int64 `json:"arbitrate_status"`
|
||||
// 售后单创建时间
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 退税费
|
||||
RefundTaxAmount int64 `json:"refund_tax_amount"`
|
||||
// 商家剩余发送短信(催用户寄回)次数
|
||||
LeftUrgeSmsCount int64 `json:"left_urge_sms_count"`
|
||||
// 退货物流单号
|
||||
ReturnLogisticsCode string `json:"return_logistics_code"`
|
||||
// 风控码
|
||||
RiskDecisionCode int64 `json:"risk_decision_code"`
|
||||
// 风控理由
|
||||
RiskDecisionReason string `json:"risk_decision_reason"`
|
||||
// 风控描述
|
||||
RiskDecisionDescription string `json:"risk_decision_description"`
|
||||
// 退优惠金额
|
||||
ReturnPromotionAmount int64 `json:"return_promotion_amount"`
|
||||
// 退款状态;1-待退款;2-退款中;3-退款成功;4-退款失败;5-追缴成功;
|
||||
RefundStatus int64 `json:"refund_status"`
|
||||
// 仲裁责任方
|
||||
ArbitrateBlame int64 `json:"arbitrate_blame"`
|
||||
// 换货SKU信息
|
||||
ExchangeSkuInfo *ExchangeSkuInfo `json:"exchange_sku_info"`
|
||||
// 退货物流公司名称
|
||||
ReturnLogisticsCompanyName string `json:"return_logistics_company_name"`
|
||||
// 换货物流公司名称
|
||||
ExchangeLogisticsCompanyName string `json:"exchange_logistics_company_name"`
|
||||
// 售后商家备注
|
||||
Remark string `json:"remark"`
|
||||
// 买家是否收到货物,0表示未收到,1表示收到
|
||||
GotPkg int64 `json:"got_pkg"`
|
||||
// 商家首次发货的正向物流信息
|
||||
OrderLogistics []OrderLogisticsItem `json:"order_logistics"`
|
||||
// 是否拒签后退款(1:已同意拒签, 2:未同意拒签)
|
||||
IsAgreeRefuseSign int64 `json:"is_agree_refuse_sign"`
|
||||
// 用户申请售后时选择的二级原因标签
|
||||
ReasonSecondLabels []ReasonSecondLabelsItem `json:"reason_second_labels"`
|
||||
// 售后标签(含时效延长、风险预警、豁免体验分等标签)
|
||||
AftersaleTags []AftersaleTagsItem `json:"aftersale_tags"`
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 门店名称
|
||||
StoreName string `json:"store_name"`
|
||||
}
|
||||
type ReasonSecondLabelsItem struct {
|
||||
// 二级原因标签编号
|
||||
Code int64 `json:"code"`
|
||||
// 二级原因标签名称
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type AfterSaleListData struct {
|
||||
// 售后列表元素
|
||||
Items []ItemsItem `json:"items"`
|
||||
// 是否还有更多
|
||||
HasMore bool `json:"has_more"`
|
||||
// 当前搜索条件下,匹配到的总数量
|
||||
Total int64 `json:"total"`
|
||||
// 页码,从0开始
|
||||
Page int64 `json:"page"`
|
||||
// 当前返回售后数量
|
||||
Size int64 `json:"size"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package afterSale_OpenAfterSaleChannel_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleOpenAfterSaleChannelRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleOpenAfterSaleChannelParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenAfterSaleChannelRequest) GetUrlPath() string {
|
||||
return "/afterSale/OpenAfterSaleChannel"
|
||||
}
|
||||
|
||||
func New() *AfterSaleOpenAfterSaleChannelRequest {
|
||||
request := &AfterSaleOpenAfterSaleChannelRequest{
|
||||
Param: &AfterSaleOpenAfterSaleChannelParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenAfterSaleChannelRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_OpenAfterSaleChannel_response.AfterSaleOpenAfterSaleChannelResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_OpenAfterSaleChannel_response.AfterSaleOpenAfterSaleChannelResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenAfterSaleChannelRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenAfterSaleChannelRequest) GetParams() *AfterSaleOpenAfterSaleChannelParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleOpenAfterSaleChannelParam struct {
|
||||
// 订单ID
|
||||
OrderId int64 `json:"order_id"`
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package afterSale_OpenAfterSaleChannel_response
|
||||
|
||||
type AfterSaleOpenAfterSaleChannelResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleOpenAfterSaleChannelData `json:"data"`
|
||||
}
|
||||
type AfterSaleOpenAfterSaleChannelData struct {
|
||||
// 打开售后通道结论
|
||||
Conclusion *Conclusion `json:"conclusion"`
|
||||
}
|
||||
type Conclusion struct {
|
||||
// 匹配到超级售后的类型,1是超售后期售后,2是EP订单超级售后,3是虚拟订单超级售后,4是超售后次数售后
|
||||
MatchConclusion int32 `json:"match_conclusion"`
|
||||
// 匹配结果的解释,成功时为空
|
||||
MatchMessage string `json:"match_message"`
|
||||
// 当前超级售后可以发起的售后类型,0是退货退款,1是已发货仅退款,2是未发货仅退款,3是换货
|
||||
CanApplyTypeList []int64 `json:"can_apply_type_list"`
|
||||
// 匹配是否成功,当match_conclusion不为0且can_apply_type_list不是空的时候,此值为true
|
||||
MatchSuccess bool `json:"match_success"`
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package afterSale_addOrderRemark_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleAddOrderRemarkRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleAddOrderRemarkParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleAddOrderRemarkRequest) GetUrlPath() string {
|
||||
return "/afterSale/addOrderRemark"
|
||||
}
|
||||
|
||||
func New() *AfterSaleAddOrderRemarkRequest {
|
||||
request := &AfterSaleAddOrderRemarkRequest{
|
||||
Param: &AfterSaleAddOrderRemarkParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleAddOrderRemarkRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_addOrderRemark_response.AfterSaleAddOrderRemarkResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_addOrderRemark_response.AfterSaleAddOrderRemarkResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleAddOrderRemarkRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleAddOrderRemarkRequest) GetParams() *AfterSaleAddOrderRemarkParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleAddOrderRemarkParam struct {
|
||||
// 订单ID,与售后单ID二选一传入
|
||||
OrderId string `json:"order_id"`
|
||||
// 售后单ID,与订单ID二选一传入,二者均传入时售后单ID的优先级更高
|
||||
AfterSaleId string `json:"after_sale_id"`
|
||||
// 商家添加的备注信息
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_addOrderRemark_response
|
||||
|
||||
type AfterSaleAddOrderRemarkResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleAddOrderRemarkData `json:"data"`
|
||||
}
|
||||
type AfterSaleAddOrderRemarkData struct {
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package afterSale_applyLogisticsIntercept_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleApplyLogisticsInterceptRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleApplyLogisticsInterceptParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleApplyLogisticsInterceptRequest) GetUrlPath() string {
|
||||
return "/afterSale/applyLogisticsIntercept"
|
||||
}
|
||||
|
||||
func New() *AfterSaleApplyLogisticsInterceptRequest {
|
||||
request := &AfterSaleApplyLogisticsInterceptRequest{
|
||||
Param: &AfterSaleApplyLogisticsInterceptParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleApplyLogisticsInterceptRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_applyLogisticsIntercept_response.AfterSaleApplyLogisticsInterceptResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_applyLogisticsIntercept_response.AfterSaleApplyLogisticsInterceptResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleApplyLogisticsInterceptRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleApplyLogisticsInterceptRequest) GetParams() *AfterSaleApplyLogisticsInterceptParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type InterceptTargetsItem struct {
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
}
|
||||
type AfterSaleApplyLogisticsInterceptParam struct {
|
||||
// 售后单ID
|
||||
AfterSaleId int64 `json:"after_sale_id"`
|
||||
// 操作来源(1:商家 3:客服)
|
||||
OpFrom int32 `json:"op_from"`
|
||||
// 要拦截的包裹
|
||||
InterceptTargets []InterceptTargetsItem `json:"intercept_targets"`
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package afterSale_applyLogisticsIntercept_response
|
||||
|
||||
type AfterSaleApplyLogisticsInterceptResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleApplyLogisticsInterceptData `json:"data"`
|
||||
}
|
||||
type CurProduct struct {
|
||||
// 商品单订单号
|
||||
OrderId int64 `json:"order_id"`
|
||||
// 商品图片
|
||||
ProductImage string `json:"product_image"`
|
||||
// 商品名称
|
||||
ProductName string `json:"product_name"`
|
||||
// 商品规格
|
||||
ProductSpec string `json:"product_spec"`
|
||||
// 商品标签
|
||||
Tags []string `json:"tags"`
|
||||
// 单价
|
||||
Price int64 `json:"price"`
|
||||
// 数量
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type OtherProductsItem struct {
|
||||
// 商品单订单号
|
||||
OrderId int64 `json:"order_id"`
|
||||
// 商品图片
|
||||
ProductImage string `json:"product_image"`
|
||||
// 商品名称
|
||||
ProductName string `json:"product_name"`
|
||||
// 商品规格
|
||||
ProductSpec string `json:"product_spec"`
|
||||
// 商品标签
|
||||
Tags []string `json:"tags"`
|
||||
// 单价
|
||||
Price int64 `json:"price"`
|
||||
// 数量
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type InterceptResultsItem struct {
|
||||
// 物流公司编码
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流公司名称
|
||||
CompanyName string `json:"company_name"`
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 包裹价值(分)
|
||||
ValueAmount int64 `json:"value_amount"`
|
||||
// 是否可拦截(拦截详情时返回)
|
||||
CanIntercept bool `json:"can_intercept"`
|
||||
// 是否拦截成功(发起拦截时返回)
|
||||
IsSuccess bool `json:"is_success"`
|
||||
// 不可拦截原因编码
|
||||
UnavailableReasonCode int64 `json:"unavailable_reason_code"`
|
||||
// 不可拦截原因文案
|
||||
UnavailableReason string `json:"unavailable_reason"`
|
||||
// 拦截费用(分),(拦截详情时返回,不可拦截时无意义)
|
||||
InterceptCost int64 `json:"intercept_cost"`
|
||||
// 当前售后商品信息
|
||||
CurProduct *CurProduct `json:"cur_product"`
|
||||
// 其它商品列表
|
||||
OtherProducts []OtherProductsItem `json:"other_products"`
|
||||
// 其他商品件数
|
||||
OtherProductAmount int64 `json:"other_product_amount"`
|
||||
}
|
||||
type AfterSaleApplyLogisticsInterceptData struct {
|
||||
// 物流拦截结果
|
||||
InterceptResults []InterceptResultsItem `json:"intercept_results"`
|
||||
// 拦截成功次数
|
||||
SuccessCount int64 `json:"success_count"`
|
||||
// 拦截失败次数
|
||||
FailedCount int64 `json:"failed_count"`
|
||||
// 不可拦截编码(failed_count=1时有意义)
|
||||
UnavailableReasonCode int64 `json:"unavailable_reason_code"`
|
||||
// 不可拦截原因(failed_count=1时有意义)
|
||||
UnavailableReason string `json:"unavailable_reason"`
|
||||
// 售后单退款总金额
|
||||
RefundAmount int64 `json:"refund_amount"`
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package afterSale_fillLogistics_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleFillLogisticsRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleFillLogisticsParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleFillLogisticsRequest) GetUrlPath() string {
|
||||
return "/afterSale/fillLogistics"
|
||||
}
|
||||
|
||||
func New() *AfterSaleFillLogisticsRequest {
|
||||
request := &AfterSaleFillLogisticsRequest{
|
||||
Param: &AfterSaleFillLogisticsParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleFillLogisticsRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_fillLogistics_response.AfterSaleFillLogisticsResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_fillLogistics_response.AfterSaleFillLogisticsResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleFillLogisticsRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleFillLogisticsRequest) GetParams() *AfterSaleFillLogisticsParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleFillLogisticsParam struct {
|
||||
// 售后单ID
|
||||
AftersaleId int64 `json:"aftersale_id"`
|
||||
// 发货类型,目前仅支持补寄(1)
|
||||
SendType int32 `json:"send_type"`
|
||||
// 物流公司编号
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 预约上门取货时间戳-目前只超市用
|
||||
BookTimeBegin int64 `json:"book_time_begin"`
|
||||
// 预约上门取货时间戳-目前只超市用
|
||||
BookTimeEnd int64 `json:"book_time_end"`
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_fillLogistics_response
|
||||
|
||||
type AfterSaleFillLogisticsResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleFillLogisticsData `json:"data"`
|
||||
}
|
||||
type AfterSaleFillLogisticsData struct {
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package afterSale_openOutAfterSale_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleOpenOutAfterSaleRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleOpenOutAfterSaleParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenOutAfterSaleRequest) GetUrlPath() string {
|
||||
return "/afterSale/openOutAfterSale"
|
||||
}
|
||||
|
||||
func New() *AfterSaleOpenOutAfterSaleRequest {
|
||||
request := &AfterSaleOpenOutAfterSaleRequest{
|
||||
Param: &AfterSaleOpenOutAfterSaleParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenOutAfterSaleRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_openOutAfterSale_response.AfterSaleOpenOutAfterSaleResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_openOutAfterSale_response.AfterSaleOpenOutAfterSaleResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenOutAfterSaleRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleOpenOutAfterSaleRequest) GetParams() *AfterSaleOpenOutAfterSaleParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleOpenOutAfterSaleParam struct {
|
||||
// 要打开超售后入口的商品单ID
|
||||
OrderId int64 `json:"order_id"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_openOutAfterSale_response
|
||||
|
||||
type AfterSaleOpenOutAfterSaleResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleOpenOutAfterSaleData `json:"data"`
|
||||
}
|
||||
type AfterSaleOpenOutAfterSaleData struct {
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package afterSale_operate_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleOperateRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleOperateParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleOperateRequest) GetUrlPath() string {
|
||||
return "/afterSale/operate"
|
||||
}
|
||||
|
||||
func New() *AfterSaleOperateRequest {
|
||||
request := &AfterSaleOperateRequest{
|
||||
Param: &AfterSaleOperateParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOperateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_operate_response.AfterSaleOperateResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_operate_response.AfterSaleOperateResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleOperateRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleOperateRequest) GetParams() *AfterSaleOperateParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type EvidenceItem struct {
|
||||
// 凭证类型,1:图片,2:视频,3:音频(暂不支持展示),4:文字(暂不支持展示)。“用户可见备注”为remark字段
|
||||
Type int32 `json:"type"`
|
||||
// 凭证url
|
||||
Url string `json:"url"`
|
||||
// 凭证描述
|
||||
Desc string `json:"desc"`
|
||||
}
|
||||
type AfterSaleAddressDetail struct {
|
||||
// 省;使用【/address/getProvince】接口获取
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市;需要使用【/address/getAreasByProvince】接口响应参数获取
|
||||
CityName string `json:"city_name"`
|
||||
// 区;需要使用【/address/getAreasByProvince】接口响应参数获取
|
||||
TownName string `json:"town_name"`
|
||||
// 地址详情
|
||||
Detail string `json:"detail"`
|
||||
// 收件人
|
||||
UserName string `json:"user_name"`
|
||||
// 联系电话,支持手机号和固定电话;固定电话需要传入区号。注意:区号和号码之间一定要传入“-”传值示例:0571-1234567;否则会报错电话号码不合法。
|
||||
Mobile string `json:"mobile"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 省id;使用【/address/getProvince】接口获取
|
||||
ProvinceId int64 `json:"province_id"`
|
||||
// 市id;需要使用【/address/getAreasByProvince】接口响应参数获取
|
||||
CityId int64 `json:"city_id"`
|
||||
// 区id;需要使用【/address/getAreasByProvince】接口响应参数获取
|
||||
TownId int64 `json:"town_id"`
|
||||
// 街道id;需要使用【/address/getAreasByProvince】接口响应参数获取
|
||||
StreetId int64 `json:"street_id"`
|
||||
}
|
||||
type Logistics struct {
|
||||
// 物流公司code,使用【/order/logisticsCompanyList】接口获取;type=311仅换货时需要填入
|
||||
CompanyCode string `json:"company_code"`
|
||||
// 物流单号(快递单号),仅type=311仅换货时需要填入
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 收件地址id(推荐使用),必须通过【/address/list】获取【address_id】填入。和after_sale_address_detail字段集合二选一;
|
||||
ReceiverAddressId int64 `json:"receiver_address_id"`
|
||||
// 已废弃字段,(隐藏时间20220610)发件地址id
|
||||
SenderAddressId int64 `json:"sender_address_id"`
|
||||
// 商家同意退货/同意换货收件地址详情(不推荐使用);和receiver_address_id字段二选一(推荐使用);商家可以自定义退货地址。
|
||||
AfterSaleAddressDetail *AfterSaleAddressDetail `json:"after_sale_address_detail"`
|
||||
}
|
||||
type ItemsItem struct {
|
||||
// 售后单号
|
||||
AftersaleId string `json:"aftersale_id"`
|
||||
// 操作原因,拒绝操作必填
|
||||
Reason string `json:"reason"`
|
||||
// 操作评论,拒绝操作必填
|
||||
Remark string `json:"remark"`
|
||||
// 操作凭证编码,当【afterSale/rejectReasonCodeList】接口响应参数evidence_need=Y时,该参数必填;使用【afterSale/rejectReasonCodeList】接口获取响应参数中的reject_reason_code字段。
|
||||
Evidence []EvidenceItem `json:"evidence"`
|
||||
// 同意退货/同意换货物流信息,当前type=101,301,311是该集合需要传值。
|
||||
Logistics *Logistics `json:"logistics"`
|
||||
// 售后拒绝原因码,拒绝时必填填。通过/afterSale/rejectReasonCodeList获取
|
||||
RejectReasonCode int64 `json:"reject_reason_code"`
|
||||
// 用于校验售后单版本是不是最新的版本,防止售后单变更且open侧审核通过导致资损。不传就不校验,传入后就会校验isv传入的售后单版本是不是最新的版本。 需要使用【/afterSale/Detail】接口返回的update_time字段或使用售后消息推送中的update_time字段
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
}
|
||||
type AfterSaleOperateParam struct {
|
||||
// 操作类型;请查看API描述枚举值说明
|
||||
Type int32 `json:"type"`
|
||||
// 操作售后详情
|
||||
Items []ItemsItem `json:"items"`
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package afterSale_operate_response
|
||||
|
||||
type AfterSaleOperateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleOperateData `json:"data"`
|
||||
}
|
||||
type AfterSaleOperateData struct {
|
||||
// 审核结果
|
||||
Items []ItemsItem `json:"items"`
|
||||
}
|
||||
type ItemsItem struct {
|
||||
// 售后单号
|
||||
AftersaleId int64 `json:"aftersale_id"`
|
||||
// 操作结果码
|
||||
StatusCode int64 `json:"status_code"`
|
||||
// 操作结果描述
|
||||
StatusMsg string `json:"status_msg"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package afterSale_rejectReasonCodeList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleRejectReasonCodeListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleRejectReasonCodeListParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleRejectReasonCodeListRequest) GetUrlPath() string {
|
||||
return "/afterSale/rejectReasonCodeList"
|
||||
}
|
||||
|
||||
func New() *AfterSaleRejectReasonCodeListRequest {
|
||||
request := &AfterSaleRejectReasonCodeListRequest{
|
||||
Param: &AfterSaleRejectReasonCodeListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleRejectReasonCodeListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_rejectReasonCodeList_response.AfterSaleRejectReasonCodeListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_rejectReasonCodeList_response.AfterSaleRejectReasonCodeListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleRejectReasonCodeListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleRejectReasonCodeListRequest) GetParams() *AfterSaleRejectReasonCodeListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleRejectReasonCodeListParam struct {
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package afterSale_rejectReasonCodeList_response
|
||||
|
||||
type AfterSaleRejectReasonCodeListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleRejectReasonCodeListData `json:"data"`
|
||||
}
|
||||
type ItemsItem struct {
|
||||
// 售后审核拒绝原因枚举编码
|
||||
RejectReasonCode int64 `json:"reject_reason_code"`
|
||||
// 售后审核拒绝原因文案
|
||||
Reason string `json:"reason"`
|
||||
// 凭证描述文案
|
||||
EvidenceDescription string `json:"evidence_description"`
|
||||
// 是否需要上传凭证,Y必填,N非必填
|
||||
EvidenceNeed string `json:"evidence_need"`
|
||||
// 凭证示例图片链接
|
||||
Image string `json:"image"`
|
||||
// 订单类型,即订单信息中order_type 枚举:0-普通实物订单 1-全款预售订单 2-虚拟商品订单 3-快闪店订单 4-电子券 5-三方核销 6-服务市场
|
||||
OrderType int64 `json:"order_type"`
|
||||
// 是否收到货,0未收到 1收到
|
||||
Pkg int64 `json:"pkg"`
|
||||
}
|
||||
type AfterSaleRejectReasonCodeListData struct {
|
||||
// 售后商家拒绝原因详情列表
|
||||
Items []ItemsItem `json:"items"`
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package afterSale_returnGoodsToWareHouseSuccess_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleReturnGoodsToWareHouseSuccessRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleReturnGoodsToWareHouseSuccessParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleReturnGoodsToWareHouseSuccessRequest) GetUrlPath() string {
|
||||
return "/afterSale/returnGoodsToWareHouseSuccess"
|
||||
}
|
||||
|
||||
func New() *AfterSaleReturnGoodsToWareHouseSuccessRequest {
|
||||
request := &AfterSaleReturnGoodsToWareHouseSuccessRequest{
|
||||
Param: &AfterSaleReturnGoodsToWareHouseSuccessParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleReturnGoodsToWareHouseSuccessRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_returnGoodsToWareHouseSuccess_response.AfterSaleReturnGoodsToWareHouseSuccessResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_returnGoodsToWareHouseSuccess_response.AfterSaleReturnGoodsToWareHouseSuccessResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleReturnGoodsToWareHouseSuccessRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleReturnGoodsToWareHouseSuccessRequest) GetParams() *AfterSaleReturnGoodsToWareHouseSuccessParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleReturnGoodsToWareHouseSuccessParam struct {
|
||||
// 售后单Id
|
||||
AftersaleId string `json:"aftersale_id"`
|
||||
// 商家确认退货入仓时间,Unix时间戳,时间为秒
|
||||
OpTime int64 `json:"op_time"`
|
||||
// 用户退货物流单号
|
||||
TrackingNo string `json:"tracking_no"`
|
||||
// 物流公司代号
|
||||
LogisticsCompanyCode string `json:"logistics_company_code"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_returnGoodsToWareHouseSuccess_response
|
||||
|
||||
type AfterSaleReturnGoodsToWareHouseSuccessResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleReturnGoodsToWareHouseSuccessData `json:"data"`
|
||||
}
|
||||
type AfterSaleReturnGoodsToWareHouseSuccessData struct {
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package afterSale_submitEvidence_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AfterSaleSubmitEvidenceRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleSubmitEvidenceParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleSubmitEvidenceRequest) GetUrlPath() string {
|
||||
return "/afterSale/submitEvidence"
|
||||
}
|
||||
|
||||
func New() *AfterSaleSubmitEvidenceRequest {
|
||||
request := &AfterSaleSubmitEvidenceRequest{
|
||||
Param: &AfterSaleSubmitEvidenceParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleSubmitEvidenceRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_submitEvidence_response.AfterSaleSubmitEvidenceResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_submitEvidence_response.AfterSaleSubmitEvidenceResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleSubmitEvidenceRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleSubmitEvidenceRequest) GetParams() *AfterSaleSubmitEvidenceParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleSubmitEvidenceParam struct {
|
||||
// 售后单ID ,通过[/trade/refundListSearch](https://op.jinritemai.com/docs/api-docs/17/254) 或者 [/afterSale/refundProcessDetail](https://op.jinritemai.com/docs/api-docs/17/96) 获取
|
||||
AftersaleId int64 `json:"aftersale_id"`
|
||||
// 备注
|
||||
Comment string `json:"comment"`
|
||||
// [https://xxxx.jpg](https://xxxx.jpg/) | 凭证,最多四张
|
||||
Evidence []string `json:"evidence"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package afterSale_submitEvidence_response
|
||||
|
||||
type AfterSaleSubmitEvidenceResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleSubmitEvidenceData `json:"data"`
|
||||
}
|
||||
type AfterSaleSubmitEvidenceData struct {
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package afterSale_timeExtend_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
afterSale_timeExtend_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/afterSale_timeExtend/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type AfterSaleTimeExtendRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AfterSaleTimeExtendParam
|
||||
}
|
||||
|
||||
func (c *AfterSaleTimeExtendRequest) GetUrlPath() string {
|
||||
return "/afterSale/timeExtend"
|
||||
}
|
||||
|
||||
func New() *AfterSaleTimeExtendRequest {
|
||||
request := &AfterSaleTimeExtendRequest{
|
||||
Param: &AfterSaleTimeExtendParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleTimeExtendRequest) Execute(accessToken *doudian_sdk.AccessToken) (*afterSale_timeExtend_response.AfterSaleTimeExtendResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &afterSale_timeExtend_response.AfterSaleTimeExtendResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AfterSaleTimeExtendRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AfterSaleTimeExtendRequest) GetParams() *AfterSaleTimeExtendParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type AfterSaleTimeExtendParam struct {
|
||||
// 售后单号
|
||||
AftersaleId int64 `json:"aftersale_id"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package afterSale_timeExtend_response
|
||||
|
||||
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
|
||||
type AfterSaleTimeExtendResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AfterSaleTimeExtendData `json:"data"`
|
||||
}
|
||||
type AfterSaleTimeExtendData struct {
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package antispam_orderQuery_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AntispamOrderQueryRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AntispamOrderQueryParam
|
||||
}
|
||||
|
||||
func (c *AntispamOrderQueryRequest) GetUrlPath() string {
|
||||
return "/antispam/orderQuery"
|
||||
}
|
||||
|
||||
func New() *AntispamOrderQueryRequest {
|
||||
request := &AntispamOrderQueryRequest{
|
||||
Param: &AntispamOrderQueryParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamOrderQueryRequest) Execute(accessToken *doudian_sdk.AccessToken) (*antispam_orderQuery_response.AntispamOrderQueryResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &antispam_orderQuery_response.AntispamOrderQueryResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamOrderQueryRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AntispamOrderQueryRequest) GetParams() *AntispamOrderQueryParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type User struct {
|
||||
// 用户类型
|
||||
UidType int32 `json:"uid_type"`
|
||||
// 用户 ID
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
type AntispamOrderQueryParam struct {
|
||||
// 事件时间
|
||||
EventTime int64 `json:"event_time"`
|
||||
// 用户
|
||||
User *User `json:"user"`
|
||||
// 上报参数
|
||||
Params string `json:"params"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package antispam_orderQuery_response
|
||||
|
||||
type AntispamOrderQueryResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AntispamOrderQueryData `json:"data"`
|
||||
}
|
||||
type Decision struct {
|
||||
// 决策
|
||||
Decision string `json:"decision"`
|
||||
// 决策详情
|
||||
DecisionDetail string `json:"decision_detail"`
|
||||
// 提示信息
|
||||
HitStatus string `json:"hit_status"`
|
||||
}
|
||||
type AntispamOrderQueryData struct {
|
||||
// 决策
|
||||
Decision *Decision `json:"decision"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package antispam_orderSend_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AntispamOrderSendRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AntispamOrderSendParam
|
||||
}
|
||||
|
||||
func (c *AntispamOrderSendRequest) GetUrlPath() string {
|
||||
return "/antispam/orderSend"
|
||||
}
|
||||
|
||||
func New() *AntispamOrderSendRequest {
|
||||
request := &AntispamOrderSendRequest{
|
||||
Param: &AntispamOrderSendParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamOrderSendRequest) Execute(accessToken *doudian_sdk.AccessToken) (*antispam_orderSend_response.AntispamOrderSendResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &antispam_orderSend_response.AntispamOrderSendResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamOrderSendRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AntispamOrderSendRequest) GetParams() *AntispamOrderSendParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type User struct {
|
||||
// 用户类型
|
||||
UidType int32 `json:"uid_type"`
|
||||
// 用户 ID
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
type AntispamOrderSendParam struct {
|
||||
// 事件时间
|
||||
EventTime int64 `json:"event_time"`
|
||||
// 用户
|
||||
User *User `json:"user"`
|
||||
// 可变参数
|
||||
Params string `json:"params"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package antispam_orderSend_response
|
||||
|
||||
type AntispamOrderSendResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AntispamOrderSendData `json:"data"`
|
||||
}
|
||||
type Decision struct {
|
||||
// 决策
|
||||
Decision string `json:"decision"`
|
||||
// 决策详情
|
||||
DecisionDetail string `json:"decision_detail"`
|
||||
// 提示信息
|
||||
HitStatus string `json:"hit_status"`
|
||||
}
|
||||
type AntispamOrderSendData struct {
|
||||
// 决策
|
||||
Decision *Decision `json:"decision"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package antispam_userLogin_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type AntispamUserLoginRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *AntispamUserLoginParam
|
||||
}
|
||||
|
||||
func (c *AntispamUserLoginRequest) GetUrlPath() string {
|
||||
return "/antispam/userLogin"
|
||||
}
|
||||
|
||||
func New() *AntispamUserLoginRequest {
|
||||
request := &AntispamUserLoginRequest{
|
||||
Param: &AntispamUserLoginParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamUserLoginRequest) Execute(accessToken *doudian_sdk.AccessToken) (*antispam_userLogin_response.AntispamUserLoginResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &antispam_userLogin_response.AntispamUserLoginResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *AntispamUserLoginRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *AntispamUserLoginRequest) GetParams() *AntispamUserLoginParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type User struct {
|
||||
// 用户类型
|
||||
UidType int32 `json:"uid_type"`
|
||||
// 用户 ID
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
type AntispamUserLoginParam struct {
|
||||
// json 字符串
|
||||
Params string `json:"params"`
|
||||
// 事件发生的时间
|
||||
EventTime int64 `json:"event_time"`
|
||||
// 用户
|
||||
User *User `json:"user"`
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package antispam_userLogin_response
|
||||
|
||||
type AntispamUserLoginResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *AntispamUserLoginData `json:"data"`
|
||||
}
|
||||
type Decision struct {
|
||||
// 动作
|
||||
Decision string `json:"decision"`
|
||||
// 详情
|
||||
DecisionDetail string `json:"decision_detail"`
|
||||
// 状态
|
||||
HitStatus string `json:"hit_status"`
|
||||
}
|
||||
type AntispamUserLoginData struct {
|
||||
// 决议
|
||||
Decision *Decision `json:"decision"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package brand_convert_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type BrandConvertRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *BrandConvertParam
|
||||
}
|
||||
|
||||
func (c *BrandConvertRequest) GetUrlPath() string {
|
||||
return "/brand/convert"
|
||||
}
|
||||
|
||||
func New() *BrandConvertRequest {
|
||||
request := &BrandConvertRequest{
|
||||
Param: &BrandConvertParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandConvertRequest) Execute(accessToken *doudian_sdk.AccessToken) (*brand_convert_response.BrandConvertResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &brand_convert_response.BrandConvertResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandConvertRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *BrandConvertRequest) GetParams() *BrandConvertParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type BrandConvertParam struct {
|
||||
// 品牌关系id,即/shop/brandList返回的id
|
||||
RelatedId int64 `json:"related_id"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package brand_convert_response
|
||||
|
||||
type BrandConvertResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *BrandConvertData `json:"data"`
|
||||
}
|
||||
type BrandConvertData struct {
|
||||
// 品牌id,对应商品发布接口standard_brand_id字段
|
||||
BrandId int64 `json:"brand_id"`
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package brand_getSug_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type BrandGetSugRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *BrandGetSugParam
|
||||
}
|
||||
|
||||
func (c *BrandGetSugRequest) GetUrlPath() string {
|
||||
return "/brand/getSug"
|
||||
}
|
||||
|
||||
func New() *BrandGetSugRequest {
|
||||
request := &BrandGetSugRequest{
|
||||
Param: &BrandGetSugParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandGetSugRequest) Execute(accessToken *doudian_sdk.AccessToken) (*brand_getSug_response.BrandGetSugResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &brand_getSug_response.BrandGetSugResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandGetSugRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *BrandGetSugRequest) GetParams() *BrandGetSugParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type FilterInfo struct {
|
||||
// 品牌ids
|
||||
BrandIds []int64 `json:"brand_ids"`
|
||||
// 品牌类别
|
||||
BrandCategory []int64 `json:"brand_category"`
|
||||
// 品牌状态: 1.在线 2.离线
|
||||
Status int64 `json:"status"`
|
||||
// 品牌商标关联Id
|
||||
RelatedIds []int64 `json:"related_ids"`
|
||||
// 商标IDs
|
||||
TradeMarkIds []string `json:"trade_mark_ids"`
|
||||
// 废弃字段,请勿填写: 1. 审核中 2. 审核通过 3. 审核拒绝 4. 送审失败
|
||||
AuditStatus []int32 `json:"audit_status"`
|
||||
}
|
||||
type ExtraConfig struct {
|
||||
// 是否忽略去重 使用原始品牌信息,默认取false
|
||||
UseOriginBrandInfo bool `json:"use_origin_brand_info"`
|
||||
// 是否忽略新旧映射 使用老品牌信息,默认取false
|
||||
UseBrandInfo bool `json:"use_brand_info"`
|
||||
// 使用品牌名去重,需要和抖店一致请取true
|
||||
UseBrandNameDeduplicate bool `json:"use_brand_name_deduplicate"`
|
||||
}
|
||||
type BrandGetSugParam struct {
|
||||
// 前缀匹配的品牌名
|
||||
Query string `json:"query"`
|
||||
// 用户ID,可用默认值0
|
||||
UserId int64 `json:"user_id"`
|
||||
// 过滤用参数,不填则是全量召回
|
||||
FilterInfo *FilterInfo `json:"filter_info"`
|
||||
// 是否读取老数据 默认为false
|
||||
ReadOld bool `json:"read_old"`
|
||||
// 业务线类型: 0. 国内品牌 1. 跨境品牌 3. 广告
|
||||
BizTypes []int32 `json:"biz_types"`
|
||||
// 是否去重,一般选择true
|
||||
EnableDeduplicate bool `json:"enable_deduplicate"`
|
||||
// 额外配置,无特殊需求请按描述填写
|
||||
ExtraConfig *ExtraConfig `json:"extra_config"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package brand_getSug_response
|
||||
|
||||
type BrandGetSugResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *BrandGetSugData `json:"data"`
|
||||
}
|
||||
type SugListItem struct {
|
||||
// 品牌ID
|
||||
BrandId int64 `json:"brand_id"`
|
||||
// 品牌中文名
|
||||
BrandNameCN string `json:"brand_name_c_n"`
|
||||
// 品牌英文名
|
||||
BrandNameEN string `json:"brand_name_e_n"`
|
||||
// 品牌等级
|
||||
Level int32 `json:"level"`
|
||||
// 品牌状态:在线
|
||||
Status int32 `json:"status"`
|
||||
// 品牌别名
|
||||
BrandAlias []string `json:"brand_alias"`
|
||||
// 创建时间
|
||||
CreateTimestamp int64 `json:"create_timestamp"`
|
||||
// 修改时间
|
||||
UpdateTimestamp int64 `json:"update_timestamp"`
|
||||
// 审核情况 1. 审核中 2. 审核通过 3. 审核拒绝 4. 送审失败
|
||||
AuditStatus int32 `json:"audit_status"`
|
||||
// 业务线类型: 0. 国内品牌 1. 跨境品牌 3. 广告
|
||||
BizType int32 `json:"biz_type"`
|
||||
// 品牌logo
|
||||
Logo string `json:"logo"`
|
||||
// 额外信息
|
||||
Extra map[string]string `json:"extra"`
|
||||
}
|
||||
type BrandGetSugData struct {
|
||||
// 品牌信息列表
|
||||
SugList []SugListItem `json:"sug_list"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package brand_list_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type BrandListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *BrandListParam
|
||||
}
|
||||
|
||||
func (c *BrandListRequest) GetUrlPath() string {
|
||||
return "/brand/list"
|
||||
}
|
||||
|
||||
func New() *BrandListRequest {
|
||||
request := &BrandListRequest{
|
||||
Param: &BrandListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*brand_list_response.BrandListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &brand_list_response.BrandListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *BrandListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *BrandListRequest) GetParams() *BrandListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type BrandListParam struct {
|
||||
// (已停止使用)类目列表
|
||||
Categories []int64 `json:"categories"`
|
||||
// (已停止使用)起始位
|
||||
Offset int64 `json:"offset"`
|
||||
// (已停止使用)单次最大条数
|
||||
Size int64 `json:"size"`
|
||||
// (已停止使用)排序顺序,默认为倒排 0:降序, 1:升序
|
||||
Sort int32 `json:"sort"`
|
||||
// (已停止使用)品牌状态 1:审核中, 2:审核通过, 3:审核拒绝
|
||||
Status int32 `json:"status"`
|
||||
// (已停止使用)是否返回完全的品牌信息
|
||||
FullBrandInfo bool `json:"full_brand_info"`
|
||||
// (推荐使用,必填)类目id
|
||||
CategoryId int64 `json:"category_id"`
|
||||
// 品牌前缀(中文或者英文),适用于不需要品牌资质的场景,根据前缀搜索品牌
|
||||
Query string `json:"query"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package brand_list_response
|
||||
|
||||
type BrandListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *BrandListData `json:"data"`
|
||||
}
|
||||
type BrandListData struct {
|
||||
// (已停止使用)品牌id列表
|
||||
BrandIds []int64 `json:"brand_ids"`
|
||||
// (已停止使用)品牌信息
|
||||
BrandInfos map[int64]BrandInfosItem `json:"brand_infos"`
|
||||
// (已停止使用)总数
|
||||
Total int64 `json:"total"`
|
||||
// (已停止使用)还有更多
|
||||
HasMore bool `json:"has_more"`
|
||||
// 类目是否要求品牌有授权
|
||||
AuthRequired bool `json:"auth_required"`
|
||||
// 授权的品牌列表
|
||||
AuthBrandList []AuthBrandListItem `json:"auth_brand_list"`
|
||||
// 未授权的品牌列表
|
||||
BrandList []BrandListItem `json:"brand_list"`
|
||||
}
|
||||
type BrandInfosItem struct {
|
||||
// 品牌id
|
||||
BrandId int64 `json:"brand_id"`
|
||||
// 品牌中文名
|
||||
BrandNameCN string `json:"brand_name_c_n"`
|
||||
// 品牌英文名
|
||||
BrandNameEN string `json:"brand_name_e_n"`
|
||||
// 品牌评级 0-4
|
||||
Level int32 `json:"level"`
|
||||
// 品牌状态 1:上线, 2:下线
|
||||
Status int32 `json:"status"`
|
||||
// 品牌别名
|
||||
BrandAlias []string `json:"brand_alias"`
|
||||
// 创建时间
|
||||
CreateTimestamp int64 `json:"create_timestamp"`
|
||||
// 更新时间
|
||||
UpdateTimestamp int64 `json:"update_timestamp"`
|
||||
// 品牌审核状态 1:审核中, 2:审核通过, 3:审核拒绝, 4:送审失败
|
||||
AuditStatus int32 `json:"audit_status"`
|
||||
// 业务类型 0:国内, 1:跨境电商, 2:广告
|
||||
BizType int32 `json:"biz_type"`
|
||||
// 品牌logo地址
|
||||
Logo string `json:"logo"`
|
||||
}
|
||||
type AuthBrandListItem struct {
|
||||
// 品牌id
|
||||
BrandId int64 `json:"brand_id"`
|
||||
// 中文名
|
||||
NameCn string `json:"name_cn"`
|
||||
// 英文名
|
||||
NameEn string `json:"name_en"`
|
||||
}
|
||||
type BrandListItem struct {
|
||||
// 品牌id
|
||||
BrandId int64 `json:"brand_id"`
|
||||
// 中文名
|
||||
NameCn string `json:"name_cn"`
|
||||
// 英文名
|
||||
NameEn string `json:"name_en"`
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package freightTemplate_create_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type FreightTemplateCreateRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *FreightTemplateCreateParam
|
||||
}
|
||||
|
||||
func (c *FreightTemplateCreateRequest) GetUrlPath() string {
|
||||
return "/freightTemplate/create"
|
||||
}
|
||||
|
||||
func New() *FreightTemplateCreateRequest {
|
||||
request := &FreightTemplateCreateRequest{
|
||||
Param: &FreightTemplateCreateParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateCreateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*freightTemplate_create_response.FreightTemplateCreateResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &freightTemplate_create_response.FreightTemplateCreateResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateCreateRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *FreightTemplateCreateRequest) GetParams() *FreightTemplateCreateParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ChildrenItem_5 struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id int64 `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem `json:"children"`
|
||||
}
|
||||
type ChildrenItem_4 struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id int64 `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem_5 `json:"children"`
|
||||
}
|
||||
type ProvinceInfosItem struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id int64 `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem_4 `json:"children"`
|
||||
}
|
||||
type ColumnsItem struct {
|
||||
// 首重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
FirstWeight float64 `json:"first_weight"`
|
||||
// 首重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstWeightPrice float64 `json:"first_weight_price"`
|
||||
// 首件数量(单位:个) 按数量计价必填 1-999的整数
|
||||
FirstNum int64 `json:"first_num"`
|
||||
// 首件价格(单位:元)按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstNumPrice float64 `json:"first_num_price"`
|
||||
// 续重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
AddWeight float64 `json:"add_weight"`
|
||||
// 续重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddWeightPrice float64 `json:"add_weight_price"`
|
||||
// 续件(单位:个) 按数量计价必填 1-999的整数
|
||||
AddNum int64 `json:"add_num"`
|
||||
// 续件价格(单位:元) 按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddNumPrice float64 `json:"add_num_price"`
|
||||
// 是否默认计价方式(1:是;0:不是)
|
||||
IsDefault int64 `json:"is_default"`
|
||||
// 是否限运规则
|
||||
IsLimited bool `json:"is_limited"`
|
||||
// 当前规则生效的地址,非默认规则必填。map<i64, map<i64, map<i64, list<i64>>>>的json格式,省->市->区->街道,填至选择到的层级即可,仅限售规则支持四级街道
|
||||
RuleAddress string `json:"rule_address"`
|
||||
// 是否包邮规则
|
||||
IsOverFree bool `json:"is_over_free"`
|
||||
// 满xx重量包邮(单位:kg)0.1-10.0之间的小数,小数点后一位
|
||||
OverWeight float64 `json:"over_weight"`
|
||||
// 满xx金额包邮(单位:分)10-99900的整数
|
||||
OverAmount int64 `json:"over_amount"`
|
||||
// 满xx件包邮 1-10之间的整数
|
||||
OverNum int64 `json:"over_num"`
|
||||
// 最小金额限制,单位分,不限制填-1
|
||||
MinSkuAmount int64 `json:"min_sku_amount"`
|
||||
// 最大金额限制,单位分,不限制填-1
|
||||
MaxSkuAmount int64 `json:"max_sku_amount"`
|
||||
// 当前规则生效的地址,统一以List<Struct>结构返回,该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回)
|
||||
ProvinceInfos []ProvinceInfosItem `json:"province_infos"`
|
||||
}
|
||||
type FreightTemplateCreateParam struct {
|
||||
// 运费模板信息
|
||||
Template *Template `json:"template"`
|
||||
// 运费模板规则信息;每种类型模板可创建的规则类型: 阶梯计价模板-默认规则,普通计价规则,包邮规则,限运规则;固定运费模板-包邮规则,限运规则;固定运费模板-包邮规则,限运规则;包邮模板-限运规则;货到付款模板-限运规则
|
||||
Columns []ColumnsItem `json:"columns"`
|
||||
}
|
||||
type Template struct {
|
||||
// 模板名称
|
||||
TemplateName string `json:"template_name"`
|
||||
// 发货省份id
|
||||
ProductProvince int64 `json:"product_province"`
|
||||
// 发货城市id
|
||||
ProductCity int64 `json:"product_city"`
|
||||
// 计价方式-1.按重量 2.按数量;模板类型为1、2、3时,计价类型传2
|
||||
CalculateType int64 `json:"calculate_type"`
|
||||
// 快递方式-1.快递 目前仅支持1
|
||||
TransferType int64 `json:"transfer_type"`
|
||||
// 模板类型-0:阶梯计价 1:固定运费 2:卖家包邮 3:货到付款
|
||||
RuleType int64 `json:"rule_type"`
|
||||
// 固定运费金额(单位:分) 固定运费模板必填 1-9900之间的整数
|
||||
FixedAmount int64 `json:"fixed_amount"`
|
||||
}
|
||||
type ChildrenItem struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id int64 `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package freightTemplate_create_response
|
||||
|
||||
type FreightTemplateCreateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateCreateData `json:"data"`
|
||||
}
|
||||
type FreightTemplateCreateData struct {
|
||||
// 创建的模板的id
|
||||
TemplateId int64 `json:"template_id"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package freightTemplate_detail_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type FreightTemplateDetailRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *FreightTemplateDetailParam
|
||||
}
|
||||
|
||||
func (c *FreightTemplateDetailRequest) GetUrlPath() string {
|
||||
return "/freightTemplate/detail"
|
||||
}
|
||||
|
||||
func New() *FreightTemplateDetailRequest {
|
||||
request := &FreightTemplateDetailRequest{
|
||||
Param: &FreightTemplateDetailParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateDetailRequest) Execute(accessToken *doudian_sdk.AccessToken) (*freightTemplate_detail_response.FreightTemplateDetailResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &freightTemplate_detail_response.FreightTemplateDetailResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateDetailRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *FreightTemplateDetailRequest) GetParams() *FreightTemplateDetailParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type FreightTemplateDetailParam struct {
|
||||
// 模板id
|
||||
FreightId int64 `json:"freight_id"`
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package freightTemplate_detail_response
|
||||
|
||||
type FreightTemplateDetailResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateDetailData `json:"data"`
|
||||
}
|
||||
type ColumnsItem struct {
|
||||
// 首重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
FirstWeight float64 `json:"first_weight"`
|
||||
// 首重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstWeightPrice float64 `json:"first_weight_price"`
|
||||
// 首件数量(单位:个) 按数量计价必填 1-999的整数
|
||||
FirstNum int64 `json:"first_num"`
|
||||
// 首件价格(单位:元)按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstNumPrice float64 `json:"first_num_price"`
|
||||
// 续重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
AddWeight float64 `json:"add_weight"`
|
||||
// 续重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddWeightPrice float64 `json:"add_weight_price"`
|
||||
// 续件(单位:个) 按数量计价必填 1-999的整数
|
||||
AddNum int64 `json:"add_num"`
|
||||
// 续件价格(单位:元) 按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddNumPrice float64 `json:"add_num_price"`
|
||||
// 是否默认计价方式(1:是;0:不是)
|
||||
IsDefault int64 `json:"is_default"`
|
||||
// 是否限运规则
|
||||
IsLimited bool `json:"is_limited"`
|
||||
// 是否包邮规则
|
||||
IsOverFree bool `json:"is_over_free"`
|
||||
// 满xx重量包邮(单位:kg)0.1-10.0之间的小数,小数点后一位
|
||||
OverWeight float64 `json:"over_weight"`
|
||||
// 满xx金额包邮(单位:分)10-99900的整数
|
||||
OverAmount int64 `json:"over_amount"`
|
||||
// 满xx件包邮 1-10之间的整数
|
||||
OverNum int64 `json:"over_num"`
|
||||
// 当前规则生效的地址,统一以List<Struct>结构返回,该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回)
|
||||
ProvinceInfos []ProvinceInfosItem `json:"province_infos"`
|
||||
}
|
||||
type Data struct {
|
||||
// 模板信息
|
||||
Template *Template `json:"template"`
|
||||
// 规则
|
||||
Columns []ColumnsItem `json:"columns"`
|
||||
}
|
||||
type FreightTemplateDetailData struct {
|
||||
// 模板详情
|
||||
Data *Data `json:"data"`
|
||||
}
|
||||
type Template struct {
|
||||
// 模板id
|
||||
Id int64 `json:"id"`
|
||||
// 模板名称
|
||||
TemplateName string `json:"template_name"`
|
||||
// 发货省份id
|
||||
ProductProvince string `json:"product_province"`
|
||||
// 发货城市id
|
||||
ProductCity string `json:"product_city"`
|
||||
// 计价方式-1.按重量计价 2.按数量计价
|
||||
CalculateType int64 `json:"calculate_type"`
|
||||
// 快递方式-1.快递 目前仅支持1
|
||||
TransferType int64 `json:"transfer_type"`
|
||||
// 模板类型-0:阶梯计价 1:固定运费 2:卖家包邮 3:货到付款
|
||||
RuleType int64 `json:"rule_type"`
|
||||
// 固定运费金额(单位:分) 固定运费模板必填 1-9900之间的整数
|
||||
FixedAmount int64 `json:"fixed_amount"`
|
||||
}
|
||||
type ChildrenItem struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id string `json:"id"`
|
||||
}
|
||||
type ChildrenItem_6 struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id string `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem `json:"children"`
|
||||
}
|
||||
type ChildrenItem_5 struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id string `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem_6 `json:"children"`
|
||||
}
|
||||
type ProvinceInfosItem struct {
|
||||
// 地址id,第一级是省份、第二级是城市、第三级是区、第四级是街道
|
||||
Id string `json:"id"`
|
||||
// 下一级地址信息
|
||||
Children []ChildrenItem_5 `json:"children"`
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package freightTemplate_list_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type FreightTemplateListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *FreightTemplateListParam
|
||||
}
|
||||
|
||||
func (c *FreightTemplateListRequest) GetUrlPath() string {
|
||||
return "/freightTemplate/list"
|
||||
}
|
||||
|
||||
func New() *FreightTemplateListRequest {
|
||||
request := &FreightTemplateListRequest{
|
||||
Param: &FreightTemplateListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*freightTemplate_list_response.FreightTemplateListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &freightTemplate_list_response.FreightTemplateListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *FreightTemplateListRequest) GetParams() *FreightTemplateListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type FreightTemplateListParam struct {
|
||||
// 运费模板名称,支持模糊搜索
|
||||
Name string `json:"name"`
|
||||
// 页数(默认为0,第一页从0开始)
|
||||
Page string `json:"page"`
|
||||
// 每页模板数(默认为10)
|
||||
Size string `json:"size"`
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package freightTemplate_list_response
|
||||
|
||||
type FreightTemplateListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateListData `json:"data"`
|
||||
}
|
||||
type ListItem struct {
|
||||
// 运费模版
|
||||
Template *Template `json:"template"`
|
||||
}
|
||||
type FreightTemplateListData struct {
|
||||
// 运费模版列表
|
||||
List []ListItem `json:"List"`
|
||||
// 总数
|
||||
Count int64 `json:"Count"`
|
||||
}
|
||||
type Template struct {
|
||||
// 运费模板id,可用于商品发布接口使用
|
||||
Id int64 `json:"id"`
|
||||
// 运费模板名称
|
||||
TemplateName string `json:"template_name"`
|
||||
// 发货省份id
|
||||
ProductProvince string `json:"product_province"`
|
||||
// 发货城市id
|
||||
ProductCity string `json:"product_city"`
|
||||
// 计价方式-1.按重量计价 2.按数量计价
|
||||
CalculateType int64 `json:"calculate_type"`
|
||||
// 快递方式-1.快递 目前仅支持1
|
||||
TransferType int64 `json:"transfer_type"`
|
||||
// 模板类型-0:阶梯计价 1:固定运费 2:卖家包邮 3:货到付款
|
||||
RuleType int64 `json:"rule_type"`
|
||||
// 固定运费金额(单位:分) 固定运费模板必填 1-9900之间的整数
|
||||
FixedAmount int64 `json:"fixed_amount"`
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package freightTemplate_update_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type FreightTemplateUpdateRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *FreightTemplateUpdateParam
|
||||
}
|
||||
|
||||
func (c *FreightTemplateUpdateRequest) GetUrlPath() string {
|
||||
return "/freightTemplate/update"
|
||||
}
|
||||
|
||||
func New() *FreightTemplateUpdateRequest {
|
||||
request := &FreightTemplateUpdateRequest{
|
||||
Param: &FreightTemplateUpdateParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateUpdateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*freightTemplate_update_response.FreightTemplateUpdateResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &freightTemplate_update_response.FreightTemplateUpdateResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *FreightTemplateUpdateRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *FreightTemplateUpdateRequest) GetParams() *FreightTemplateUpdateParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Template struct {
|
||||
// 要更新的运费模板id
|
||||
Id int64 `json:"id"`
|
||||
// 模板名称
|
||||
TemplateName string `json:"template_name"`
|
||||
// 发货省份
|
||||
ProductProvince int64 `json:"product_province"`
|
||||
// 发货城市
|
||||
ProductCity int64 `json:"product_city"`
|
||||
// 计价方式-1.按重量 2.按数量
|
||||
CalculateType int64 `json:"calculate_type"`
|
||||
// 快递方式-1.快递
|
||||
TransferType int64 `json:"transfer_type"`
|
||||
// 模板类型-0:阶梯计价 1:固定运费 2:卖家包邮 3:货到付款
|
||||
RuleType int64 `json:"rule_type"`
|
||||
// 固定运费金额(单位:分) 固定运费模板必填 1-9900之间的整数
|
||||
FixedAmount int64 `json:"fixed_amount"`
|
||||
}
|
||||
type ColumnsItem struct {
|
||||
// 首重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
FirstWeight float64 `json:"first_weight"`
|
||||
// 首重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstWeightPrice float64 `json:"first_weight_price"`
|
||||
// 首件数量(单位:个) 按数量计价必填 1-999的整数
|
||||
FirstNum int64 `json:"first_num"`
|
||||
// 首件价格(单位:元)按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
FirstNumPrice float64 `json:"first_num_price"`
|
||||
// 续重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
AddWeight float64 `json:"add_weight"`
|
||||
// 续重价格(单位:元) 按重量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddWeightPrice float64 `json:"add_weight_price"`
|
||||
// 续件(单位:个)calculate_type=2必填 1-999的整数
|
||||
AddNum int64 `json:"add_num"`
|
||||
// 续件价格(单位:元) 按数量计价必填 0.00-30.00之间的小数,小数点后两位
|
||||
AddNumPrice float64 `json:"add_num_price"`
|
||||
// 是否默认计价方式(1:是;0:不是)
|
||||
IsDefault int64 `json:"is_default"`
|
||||
// 是否限运规则
|
||||
IsLimited bool `json:"is_limited"`
|
||||
// 当前规则生效的地址,非默认规则必填。map<i64, map<i64, map<i64, list<i64>>>>的json格式,省->市->区->街道,仅限售规则支持四级街道
|
||||
RuleAddress string `json:"rule_address"`
|
||||
// 是否包邮规则
|
||||
IsOverFree bool `json:"is_over_free"`
|
||||
// 满xx重量包邮(单位:kg)0.1-10.0之间的小数,小数点后一位
|
||||
OverWeight float64 `json:"over_weight"`
|
||||
// 满xx金额包邮(单位:分)10-99900的整数
|
||||
OverAmount int64 `json:"over_amount"`
|
||||
// 满xx件包邮 1-10之间的整数
|
||||
OverNum int64 `json:"over_num"`
|
||||
}
|
||||
type FreightTemplateUpdateParam struct {
|
||||
// 运费模板相关
|
||||
Template *Template `json:"template"`
|
||||
// 运费模板规则信息;每种类型模板可创建的规则类型: 阶梯计价模板-默认规则,普通计价规则,包邮规则,限运规则;固定运费模板-包邮规则,限运规则;固定运费模板-包邮规则,限运规则;包邮模板-限运规则;货到付款模板-限运规则
|
||||
Columns []ColumnsItem `json:"columns"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package freightTemplate_update_response
|
||||
|
||||
type FreightTemplateUpdateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateUpdateData `json:"data"`
|
||||
}
|
||||
type FreightTemplateUpdateData struct {
|
||||
// 运费模板id
|
||||
TemplateId int64 `json:"template_id"`
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package logistics_appendSubOrder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsAppendSubOrderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsAppendSubOrderParam
|
||||
}
|
||||
|
||||
func (c *LogisticsAppendSubOrderRequest) GetUrlPath() string {
|
||||
return "/logistics/appendSubOrder"
|
||||
}
|
||||
|
||||
func New() *LogisticsAppendSubOrderRequest {
|
||||
request := &LogisticsAppendSubOrderRequest{
|
||||
Param: &LogisticsAppendSubOrderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsAppendSubOrderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_appendSubOrder_response.LogisticsAppendSubOrderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_appendSubOrder_response.LogisticsAppendSubOrderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsAppendSubOrderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsAppendSubOrderRequest) GetParams() *LogisticsAppendSubOrderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsAppendSubOrderParam struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 物流商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 追加个数
|
||||
PackAddQuantity int32 `json:"pack_add_quantity"`
|
||||
// 是否返回全量的子单号
|
||||
IsReturnFullSubCodes bool `json:"is_return_full_sub_codes"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package logistics_appendSubOrder_response
|
||||
|
||||
type LogisticsAppendSubOrderResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsAppendSubOrderData `json:"data"`
|
||||
}
|
||||
type LogisticsAppendSubOrderData struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 子母单数量
|
||||
PackQuantity int64 `json:"pack_quantity"`
|
||||
// 新追加的子单号
|
||||
SubWaybillCodes string `json:"sub_waybill_codes"`
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package logistics_cancelOrder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsCancelOrderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsCancelOrderParam
|
||||
}
|
||||
|
||||
func (c *LogisticsCancelOrderRequest) GetUrlPath() string {
|
||||
return "/logistics/cancelOrder"
|
||||
}
|
||||
|
||||
func New() *LogisticsCancelOrderRequest {
|
||||
request := &LogisticsCancelOrderRequest{
|
||||
Param: &LogisticsCancelOrderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCancelOrderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_cancelOrder_response.LogisticsCancelOrderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_cancelOrder_response.LogisticsCancelOrderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCancelOrderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsCancelOrderRequest) GetParams() *LogisticsCancelOrderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsCancelOrderParam struct {
|
||||
// 物流公司
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 实际使用取号服务店铺user_id
|
||||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package logistics_cancelOrder_response
|
||||
|
||||
type LogisticsCancelOrderResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsCancelOrderData `json:"data"`
|
||||
}
|
||||
type LogisticsCancelOrderData struct {
|
||||
// 取消状态
|
||||
CancelResult *CancelResult `json:"cancel_result"`
|
||||
}
|
||||
type CancelResult struct {
|
||||
// true:取消成功 false 取消失败
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package logistics_createSFOrder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsCreateSFOrderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsCreateSFOrderParam
|
||||
}
|
||||
|
||||
func (c *LogisticsCreateSFOrderRequest) GetUrlPath() string {
|
||||
return "/logistics/createSFOrder"
|
||||
}
|
||||
|
||||
func New() *LogisticsCreateSFOrderRequest {
|
||||
request := &LogisticsCreateSFOrderRequest{
|
||||
Param: &LogisticsCreateSFOrderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCreateSFOrderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_createSFOrder_response.LogisticsCreateSFOrderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_createSFOrder_response.LogisticsCreateSFOrderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCreateSFOrderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsCreateSFOrderRequest) GetParams() *LogisticsCreateSFOrderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type CargoDetailsItem struct {
|
||||
// 货物名称,如果需要生成电子运单,则为必填
|
||||
Name string `json:"name"`
|
||||
// 货物单价的币别:参照附录币别代码附件
|
||||
Currency string `json:"currency"`
|
||||
// 货物数量, 跨境件报关需要填写
|
||||
Count int64 `json:"count"`
|
||||
// 货物单位,如:个、台、本,跨境件报关需要填写。
|
||||
Unit string `json:"unit"`
|
||||
// 货物单价,精确到小数点后10位,跨境件报关需要填写
|
||||
Amount string `json:"amount"`
|
||||
// 订单货物单位重量,包含子母件,单位千克,精确到小数点后6位跨境件报关需要填写
|
||||
Weight string `json:"weight"`
|
||||
// 原产地国别,跨境件报关需要填写
|
||||
SourceArea string `json:"source_area"`
|
||||
}
|
||||
type ServiceListItem struct {
|
||||
// 增值服务名,如COD等
|
||||
Name string `json:"name"`
|
||||
// 增值服务扩展属性,参考增值
|
||||
Value string `json:"value"`
|
||||
// 增值服务扩展属性
|
||||
Value1 string `json:"value1"`
|
||||
// 增值服务扩展属性2
|
||||
Value2 string `json:"value2"`
|
||||
// 增值服务扩展属性3
|
||||
Value3 string `json:"value3"`
|
||||
// 增值服务扩展属性4
|
||||
Value4 string `json:"value4"`
|
||||
}
|
||||
type ContactInfoListItem struct {
|
||||
// 地址类型: 1,寄件方信息 2,到件方信息
|
||||
ContactType int16 `json:"contact_type"`
|
||||
// 公司名称
|
||||
BizCompany string `json:"biz_company"`
|
||||
// 联系人
|
||||
Contact string `json:"contact"`
|
||||
// 联系电话(二选一)
|
||||
Tel string `json:"tel"`
|
||||
// 手机
|
||||
Mobile string `json:"mobile"`
|
||||
// 国家或地区 2位代码(默认是CN)
|
||||
Country string `json:"country"`
|
||||
// 所在省级行政区名称,必须是 标准的省级行政区名称如:北 京、广东省、广西壮族自治区 等;此字段影响原寄地代码识 别
|
||||
Province string `json:"province"`
|
||||
// 所在地级行政区名称,必须是 标准的城市称谓 如:北京市、 深圳市、大理白族自治州等; 此字段影响原寄地代码识别
|
||||
City string `json:"city"`
|
||||
// 所在县/区级行政区名称,必须 是标准的县/区称谓,如:福田 区,南涧彝族自治县、准格尔旗等
|
||||
County string `json:"county"`
|
||||
// 剩余详细地址
|
||||
Address string `json:"address"`
|
||||
}
|
||||
type LogisticsCreateSFOrderParam struct {
|
||||
// 订单号;非抖音订单长度仅支持32个字符,格式:数字、大小写字母及“-”、“/”2种分隔符的组合字符串,例如:Doudian-123456
|
||||
OrderId string `json:"order_id"`
|
||||
// 用于拆包场景:包裹id(只能传入数字、字母和下划线;大小写敏感,即123A,123a 不可当做相同ID,否则存在一定可能取号失败)一单一包裹是不需要传,有2个以上时,从第二个开始都需要传不同id 和parcelQty(子母件)最多二选一填,两者可以都不填
|
||||
PackId string `json:"pack_id"`
|
||||
// 托寄物信息
|
||||
CargoDetails []CargoDetailsItem `json:"cargo_details"`
|
||||
// 增值服务信息
|
||||
ServiceList []ServiceListItem `json:"service_list"`
|
||||
// 收寄双方信息(数组长度必须为2)
|
||||
ContactInfoList []ContactInfoListItem `json:"contact_info_list"`
|
||||
// 付款方式,支持以下值: 1:寄方付 2:收方付
|
||||
PayMethod int16 `json:"pay_method"`
|
||||
// 快件产品类别,仅 可使用与顺丰销售约定的快件产品
|
||||
ExpressTypeId int16 `json:"express_type_id"`
|
||||
// 子母件场景使用,包裹数,一个包裹对应一个运单号;若包裹数大于1,则返回一个母运单号和N-1个子运单号 和packid(拆包场景)二选一填
|
||||
ParcelQty int16 `json:"parcel_qty"`
|
||||
// 订单货物总重量, 若为子母件必填, 单位千克, 精确到小数点后3 位,如果提供此值, 必须>0 (子母件需>6)
|
||||
TotalWeight string `json:"total_weight"`
|
||||
// 是否返回签回单 (签单返还)的运单号, 支持以下值: 1:要求 0:不要求
|
||||
IsSignBack int16 `json:"is_sign_back"`
|
||||
// 备注
|
||||
Remark string `json:"remark"`
|
||||
// 客户订单货物总长,单位厘米, 精确到小数点后3位, 包含子母件
|
||||
TotalLength string `json:"total_length"`
|
||||
// 客户订单货物总宽,单位厘米, 精确到小数点后3位, 包含子母件
|
||||
TotalWidth string `json:"total_width"`
|
||||
// 客户订单货物总高,单位厘米, 精确到小数点后3位, 包含子母件
|
||||
TotalHeight string `json:"total_height"`
|
||||
// 订单货物总体积,单位立方厘米, 精确到小数点后3位,会用于计抛
|
||||
Volume string `json:"volume"`
|
||||
// 共享账号场景下需传,代表实际使用取号服务的shop_id(需与order_id匹配);若无法获取到该shop_id,value传值 -1
|
||||
UserId int64 `json:"user_id"`
|
||||
// 订单渠道来源编码,具体请参考[下单渠道来源编码表](https://bytedance.feishu.cn/sheets/shtcngIVwcJlgXLzWhEtKrmv7Af),当order_id订单号为非抖音订单时必传
|
||||
OrderChannel string `json:"order_channel"`
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package logistics_createSFOrder_response
|
||||
|
||||
type LogisticsCreateSFOrderResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsCreateSFOrderData `json:"data"`
|
||||
}
|
||||
type RouteLabelData struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 原寄地中转场
|
||||
SourceTransferCode string `json:"source_transfer_code"`
|
||||
// 原寄地城市代码
|
||||
SourceCityCode string `json:"source_city_code"`
|
||||
// 原寄地网点代码
|
||||
SourceDeptCode string `json:"source_dept_code"`
|
||||
// 原寄地单元区域
|
||||
SourceTeamCode string `json:"sourceTeamCode"`
|
||||
// 目的地城市代码, eg:755
|
||||
DestCityCode string `json:"destCityCode"`
|
||||
// 目的地网点代码, eg:755AQ
|
||||
DestDeptCode string `json:"destDeptCode"`
|
||||
// 目的地网点代码映射码
|
||||
DestDeptCodeMapping string `json:"dest_dept_code_mapping"`
|
||||
// 目的地单元区域, eg:001
|
||||
DestTeamCode string `json:"dest_team_code"`
|
||||
// 目的地单元区域映射码
|
||||
DestTeamCodeMapping string `json:"dest_team_code_mapping"`
|
||||
// 目的地中转场
|
||||
DestTransferCode string `json:"dest_transfer_code"`
|
||||
// 打单时的路由标签信息如果 是大网的路由标签,这里的 值是目的地网点代码,如果 是同城配的路由标签,这里 的值是根据同城配的设置映 射出来的值,不同的配置结 果会不一样,不能根据-符 号切分(如:上海同城配,可能 是:集散点-目的地网点-接 驳点,也有可能是目的地网 点代码-集散点-接驳点)
|
||||
DestRouteLabel string `json:"dest_route_label"`
|
||||
// 产品名称 对应RLS:pro_name
|
||||
ProName string `json:"pro_name"`
|
||||
// 快件内容: 如:C816、SP601
|
||||
CargoTypeCode string `json:"cargo_type_code"`
|
||||
// 时效代码, 如:T4
|
||||
LimitTypeCode string `json:"limit_type_code"`
|
||||
// 产品类型,如:B1
|
||||
ExpressTypeCode string `json:"express_type_code"`
|
||||
// 入港映射码 eg:S10
|
||||
CodingMapping string `json:"coding_mapping"`
|
||||
// 出港映射码
|
||||
CodingMappingOut string `json:"coding_mapping_out"`
|
||||
// XB标志 0:不需要打印XB 1:需要打印XB
|
||||
XbFlag string `json:"xb_flag"`
|
||||
// 打印标志 返回值总共有9位,每位只 有0和1两种,0表示按丰密 面单默认的规则,1是显示, 顺序如下,如111110000 表示打印寄方姓名、寄方 电话、寄方公司名、寄方 地址和重量,收方姓名、收 方电话、收方公司和收方 地址按丰密面单默认规则 1:寄方姓名 2:寄方电话 3:寄方公司名 4:寄方地址 5:重量 6:收方姓名 7:收方电话 8:收方公司名 9:收方地址
|
||||
PrintFlag string `json:"print_flag"`
|
||||
// 二维码 根据规则生成字符串信息, 格式为MMM={"k1":"(目的 地中转场代码)","k2":"(目的 地原始网点代码)","k3":"(目 的地单元区域)","k4":"(附件 通过三维码(express_type_code、 limit_type_code、 cargo_type_code)映射时效类型)","k5":"(运单 号)","k6":"(AB标识)","k7":"( 校验码)"} (ISV自身做逻辑展示)
|
||||
TwoDimensionCode string `json:"two_dimension_code"`
|
||||
// 时效类型: 值为二维码中的K4
|
||||
ProCode string `json:"pro_code"`
|
||||
// 打印图标,根据托寄物判断需 要打印的图标(重货,蟹类,生鲜,易碎,Z标) 返回值有8位,每一位只有0和1两种, 0表示按运单默认的规则, 1表示显示。后面两位默认0备用。 顺序如下:重货,蟹类,生鲜,易碎,医药类,Z标,0,0 如:00000000表示不需要打印重货,蟹类,生鲜,易碎 ,医药,Z标,备用,备用
|
||||
PrintIcon string `json:"print_icon"`
|
||||
// AB标
|
||||
AbFlag string `json:"ab_flag"`
|
||||
// 查询出现异常时返回信息。 返回代码: 0 系统异常 1 未找到面单
|
||||
ErrMsg string `json:"err_msg"`
|
||||
}
|
||||
type RouteLabelInfo struct {
|
||||
// 返回调用结果,1000:调用成功;其他调用失败
|
||||
Code string `json:"code"`
|
||||
// 路由标签数据详细数据
|
||||
RouteLabelData *RouteLabelData `json:"route_label_data"`
|
||||
// 失败异常描述
|
||||
Message string `json:"message"`
|
||||
}
|
||||
type LogisticsCreateSFOrderData struct {
|
||||
// 订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 包裹id
|
||||
PackId string `json:"pack_id"`
|
||||
// 原寄地区域代码,可用于顺丰 电子运单标签打印
|
||||
OriginCode string `json:"origin_code"`
|
||||
// 目的地区域代码,可用于顺丰 电子运单标签打印
|
||||
DestCode string `json:"dest_code"`
|
||||
// 筛单结果: 1:人工确认 2:可收派 3:不可以收派
|
||||
FilterResult int16 `json:"filter_result"`
|
||||
// 如果filter_result=3时为必填, 不可以收派的原因代码: 1:收方超范围 2:派方超范围 3:其它原因 高峰管控提示信息 【数字】:【高峰管控提示信息】
|
||||
Remark string `json:"remark"`
|
||||
// 顺丰运单号
|
||||
WaybillNoInfoList []WaybillNoInfoListItem `json:"waybill_no_info_list"`
|
||||
// 路由标签
|
||||
RouteLabelInfo *RouteLabelInfo `json:"route_label_info"`
|
||||
// 2;具体请看文档映射表
|
||||
OrderChannel string `json:"order_channel"`
|
||||
}
|
||||
type WaybillNoInfoListItem struct {
|
||||
// 运单号类型: 1:母单 2 :子单 3 : 签回单
|
||||
WaybillType int16 `json:"waybill_type"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package logistics_customTemplateList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsCustomTemplateListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsCustomTemplateListParam
|
||||
}
|
||||
|
||||
func (c *LogisticsCustomTemplateListRequest) GetUrlPath() string {
|
||||
return "/logistics/customTemplateList"
|
||||
}
|
||||
|
||||
func New() *LogisticsCustomTemplateListRequest {
|
||||
request := &LogisticsCustomTemplateListRequest{
|
||||
Param: &LogisticsCustomTemplateListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCustomTemplateListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_customTemplateList_response.LogisticsCustomTemplateListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_customTemplateList_response.LogisticsCustomTemplateListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsCustomTemplateListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsCustomTemplateListRequest) GetParams() *LogisticsCustomTemplateListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsCustomTemplateListParam struct {
|
||||
// 物流商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package logistics_customTemplateList_response
|
||||
|
||||
type LogisticsCustomTemplateListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsCustomTemplateListData `json:"data"`
|
||||
}
|
||||
type CustomTemplateInfosItem struct {
|
||||
// 自定义模板code
|
||||
CustomTemplateCode string `json:"custom_template_code"`
|
||||
// 自定义区模板url(URL资源的内容为xml格式的报文)
|
||||
CustomTemplateUrl string `json:"custom_template_url"`
|
||||
// 自定义区模板名称
|
||||
CustomTemplateName string `json:"custom_template_name"`
|
||||
// 父模板code(查询标准模板API中返回的template_code)
|
||||
ParentTemplateCode string `json:"parent_template_code"`
|
||||
}
|
||||
type CustomTemplateDataItem struct {
|
||||
// 物流商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 用户使用的模板数据
|
||||
CustomTemplateInfos []CustomTemplateInfosItem `json:"custom_template_infos"`
|
||||
}
|
||||
type LogisticsCustomTemplateListData struct {
|
||||
// 自定义模板的数据列表
|
||||
CustomTemplateData []CustomTemplateDataItem `json:"custom_template_data"`
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package logistics_deliveryNotice_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsDeliveryNoticeRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsDeliveryNoticeParam
|
||||
}
|
||||
|
||||
func (c *LogisticsDeliveryNoticeRequest) GetUrlPath() string {
|
||||
return "/logistics/deliveryNotice"
|
||||
}
|
||||
|
||||
func New() *LogisticsDeliveryNoticeRequest {
|
||||
request := &LogisticsDeliveryNoticeRequest{
|
||||
Param: &LogisticsDeliveryNoticeParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsDeliveryNoticeRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_deliveryNotice_response.LogisticsDeliveryNoticeResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_deliveryNotice_response.LogisticsDeliveryNoticeResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsDeliveryNoticeRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsDeliveryNoticeRequest) GetParams() *LogisticsDeliveryNoticeParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsDeliveryNoticeParam struct {
|
||||
// 运单号
|
||||
WaybillNo string `json:"waybill_no"`
|
||||
// 放行/回退
|
||||
NoticeType string `json:"notice_type"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package logistics_deliveryNotice_response
|
||||
|
||||
type LogisticsDeliveryNoticeResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsDeliveryNoticeData `json:"data"`
|
||||
}
|
||||
type LogisticsDeliveryNoticeData struct {
|
||||
// 是否成功
|
||||
Result bool `json:"result"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package logistics_getCustomTemplateList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsGetCustomTemplateListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsGetCustomTemplateListParam
|
||||
}
|
||||
|
||||
func (c *LogisticsGetCustomTemplateListRequest) GetUrlPath() string {
|
||||
return "/logistics/getCustomTemplateList"
|
||||
}
|
||||
|
||||
func New() *LogisticsGetCustomTemplateListRequest {
|
||||
request := &LogisticsGetCustomTemplateListRequest{
|
||||
Param: &LogisticsGetCustomTemplateListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetCustomTemplateListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_getCustomTemplateList_response.LogisticsGetCustomTemplateListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_getCustomTemplateList_response.LogisticsGetCustomTemplateListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetCustomTemplateListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsGetCustomTemplateListRequest) GetParams() *LogisticsGetCustomTemplateListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsGetCustomTemplateListParam struct {
|
||||
// 物流服务商编码(若为空代表查询全部)
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package logistics_getCustomTemplateList_response
|
||||
|
||||
type LogisticsGetCustomTemplateListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsGetCustomTemplateListData `json:"data"`
|
||||
}
|
||||
type CustomTemplateInfosItem struct {
|
||||
// 自定义区模板code
|
||||
CustomTemplateCode string `json:"custom_template_code"`
|
||||
// 自定义区模板名称
|
||||
CustomTemplateName string `json:"custom_template_name"`
|
||||
// 父模板code(查询标准模板API中返回的template_code)
|
||||
ParentTemplateCode string `json:"parent_template_code"`
|
||||
// 自定义区模板url(URL资源的内容为xml格式的报文)
|
||||
CustomTemplateUrl string `json:"custom_template_url"`
|
||||
// customTemplateKeyList(打印项中字段列表)
|
||||
CustomTemplateKeyList []string `json:"custom_template_key_list"`
|
||||
// 自定义区模板id
|
||||
CustomTemplateId int64 `json:"custom_template_id"`
|
||||
// 父模板id
|
||||
ParentTemplateId int64 `json:"parent_template_id"`
|
||||
}
|
||||
type CustomTemplateDataItem struct {
|
||||
// 物流服务商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 用户使用的模板数据
|
||||
CustomTemplateInfos []CustomTemplateInfosItem `json:"custom_template_infos"`
|
||||
}
|
||||
type LogisticsGetCustomTemplateListData struct {
|
||||
// 商家所有快递自定义模板的数据列表
|
||||
CustomTemplateData []CustomTemplateDataItem `json:"custom_template_data"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package logistics_getDesignTemplateList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsGetDesignTemplateListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsGetDesignTemplateListParam
|
||||
}
|
||||
|
||||
func (c *LogisticsGetDesignTemplateListRequest) GetUrlPath() string {
|
||||
return "/logistics/getDesignTemplateList"
|
||||
}
|
||||
|
||||
func New() *LogisticsGetDesignTemplateListRequest {
|
||||
request := &LogisticsGetDesignTemplateListRequest{
|
||||
Param: &LogisticsGetDesignTemplateListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetDesignTemplateListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_getDesignTemplateList_response.LogisticsGetDesignTemplateListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_getDesignTemplateList_response.LogisticsGetDesignTemplateListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetDesignTemplateListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsGetDesignTemplateListRequest) GetParams() *LogisticsGetDesignTemplateListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsGetDesignTemplateListParam struct {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package logistics_getDesignTemplateList_response
|
||||
|
||||
type LogisticsGetDesignTemplateListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsGetDesignTemplateListData `json:"data"`
|
||||
}
|
||||
type DesignTemplateDataItem struct {
|
||||
// 自定义模板code
|
||||
DesignTemplateCode string `json:"design_template_code"`
|
||||
// 自定义模板名称
|
||||
DesignTemplateName string `json:"design_template_name"`
|
||||
// 自定义模板url
|
||||
DesignTemplateUrl string `json:"design_template_url"`
|
||||
// 打印项中字段列表
|
||||
DesignTemplateKeyList []string `json:"design_template_key_list"`
|
||||
}
|
||||
type LogisticsGetDesignTemplateListData struct {
|
||||
// 已发布的自定义模板列表
|
||||
DesignTemplateData []DesignTemplateDataItem `json:"design_template_data"`
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package logistics_getOutRange_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsGetOutRangeRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsGetOutRangeParam
|
||||
}
|
||||
|
||||
func (c *LogisticsGetOutRangeRequest) GetUrlPath() string {
|
||||
return "/logistics/getOutRange"
|
||||
}
|
||||
|
||||
func New() *LogisticsGetOutRangeRequest {
|
||||
request := &LogisticsGetOutRangeRequest{
|
||||
Param: &LogisticsGetOutRangeParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetOutRangeRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_getOutRange_response.LogisticsGetOutRangeResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_getOutRange_response.LogisticsGetOutRangeResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetOutRangeRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsGetOutRangeRequest) GetParams() *LogisticsGetOutRangeParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ServiceListItem struct {
|
||||
// code
|
||||
ServiceCode string `json:"service_code"`
|
||||
// value
|
||||
ServiceValue string `json:"service_value"`
|
||||
}
|
||||
type DeliveryReq struct {
|
||||
// 是否接受仅镇中心派送 目前仅支持德邦
|
||||
IsCenterDelivery bool `json:"is_center_delivery"`
|
||||
// 是否接受合伙人自提,目前仅支持德邦
|
||||
IsPickupSelf bool `json:"is_pickup_self"`
|
||||
}
|
||||
type LogisticsGetOutRangeParam struct {
|
||||
// 快递公司编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 发货地址
|
||||
SenderAddress *SenderAddress `json:"sender_address"`
|
||||
// 收件地址
|
||||
ReceiverAddress *ReceiverAddress `json:"receiver_address"`
|
||||
// 类型(0-揽派合一;1-揽收区域;2-派送区域) 0:取senderAddress, receiverAddress值 1:取senderAddress值 2:取receiverAddress值
|
||||
Type int16 `json:"type"`
|
||||
// 增值服务 目前只支持德邦
|
||||
ServiceList []ServiceListItem `json:"service_list"`
|
||||
// 产品类型 目前只支持德邦
|
||||
ProductType string `json:"product_type"`
|
||||
// 投递要求 目前只支持德邦
|
||||
DeliveryReq *DeliveryReq `json:"delivery_req"`
|
||||
}
|
||||
type SenderAddress struct {
|
||||
// CHN
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省份名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 城市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 详细地址
|
||||
DetailAddress string `json:"detail_address"`
|
||||
}
|
||||
type ReceiverAddress struct {
|
||||
// CHN
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省份名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 城市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 详细地址,支持密文
|
||||
DetailAddress string `json:"detail_address"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package logistics_getOutRange_response
|
||||
|
||||
type LogisticsGetOutRangeResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsGetOutRangeData `json:"data"`
|
||||
}
|
||||
type LogisticsGetOutRangeData struct {
|
||||
// 是否超区响应结果(超区-true;未超区-fasle)
|
||||
IsOutRange bool `json:"is_out_range"`
|
||||
// 超区原因
|
||||
OutRangeReason string `json:"out_range_reason"`
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package logistics_getShopKey_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsGetShopKeyRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsGetShopKeyParam
|
||||
}
|
||||
|
||||
func (c *LogisticsGetShopKeyRequest) GetUrlPath() string {
|
||||
return "/logistics/getShopKey"
|
||||
}
|
||||
|
||||
func New() *LogisticsGetShopKeyRequest {
|
||||
request := &LogisticsGetShopKeyRequest{
|
||||
Param: &LogisticsGetShopKeyParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetShopKeyRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_getShopKey_response.LogisticsGetShopKeyResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_getShopKey_response.LogisticsGetShopKeyResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsGetShopKeyRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsGetShopKeyRequest) GetParams() *LogisticsGetShopKeyParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsGetShopKeyParam struct {
|
||||
// 打印密文
|
||||
CipherText string `json:"cipher_text"`
|
||||
// 设备信息
|
||||
DeviceInfo string `json:"deviceInfo"`
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package logistics_getShopKey_response
|
||||
|
||||
type LogisticsGetShopKeyResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsGetShopKeyData `json:"data"`
|
||||
}
|
||||
type LogisticsGetShopKeyData struct {
|
||||
// 公钥加密后的对称密钥,用于解密电子面单密文
|
||||
Key string `json:"key"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package logistics_listShopNetsite_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsListShopNetsiteRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsListShopNetsiteParam
|
||||
}
|
||||
|
||||
func (c *LogisticsListShopNetsiteRequest) GetUrlPath() string {
|
||||
return "/logistics/listShopNetsite"
|
||||
}
|
||||
|
||||
func New() *LogisticsListShopNetsiteRequest {
|
||||
request := &LogisticsListShopNetsiteRequest{
|
||||
Param: &LogisticsListShopNetsiteParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsListShopNetsiteRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_listShopNetsite_response.LogisticsListShopNetsiteResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_listShopNetsite_response.LogisticsListShopNetsiteResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsListShopNetsiteRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsListShopNetsiteRequest) GetParams() *LogisticsListShopNetsiteParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsListShopNetsiteParam struct {
|
||||
// 物流服务商编码(想获取全量物流,则传空字符串)
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package logistics_listShopNetsite_response
|
||||
|
||||
type LogisticsListShopNetsiteResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsListShopNetsiteData `json:"data"`
|
||||
}
|
||||
type SenderAddressItem struct {
|
||||
// 省名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区/县名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 剩余详细地址
|
||||
DetailAddress string `json:"detail_address"`
|
||||
}
|
||||
type NetsitesItem struct {
|
||||
// 网点Code
|
||||
NetsiteCode string `json:"netsite_code"`
|
||||
// 网点名称
|
||||
NetsiteName string `json:"netsite_name"`
|
||||
// 电子面单余额数量
|
||||
Amount string `json:"amount"`
|
||||
// 寄件人地址
|
||||
SenderAddress []SenderAddressItem `json:"sender_address"`
|
||||
// 已取单号数量,若业务本身无值,则传-1,前端可展示为“-”
|
||||
AllocatedQuantity int64 `json:"allocated_quantity"`
|
||||
// 已取消单号数量,若业务本身无值,则传-1,前端可展示为“-”
|
||||
CancelledQuantity int64 `json:"cancelled_quantity"`
|
||||
// 已回收单号数量,若业务本身无值,则传-1,前端可展示为“-”
|
||||
RecycledQuantity int64 `json:"recycled_quantity"`
|
||||
// 快递公司编码
|
||||
Company string `json:"company"`
|
||||
// 物流服务商业务类型 1:直营 2:加盟 3:落地配 4:直营带网点
|
||||
CompanyType int16 `json:"company_type"`
|
||||
}
|
||||
type LogisticsListShopNetsiteData struct {
|
||||
// 商家已开通的网点列表信息
|
||||
Netsites []NetsitesItem `json:"netsites"`
|
||||
// 快递公司编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 物流服务商业务类型 1:直营 2:加盟 3:落地配 4:直营带网点
|
||||
CompanyType int16 `json:"company_type"`
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package logistics_newCreateOrder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsNewCreateOrderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsNewCreateOrderParam
|
||||
}
|
||||
|
||||
func (c *LogisticsNewCreateOrderRequest) GetUrlPath() string {
|
||||
return "/logistics/newCreateOrder"
|
||||
}
|
||||
|
||||
func New() *LogisticsNewCreateOrderRequest {
|
||||
request := &LogisticsNewCreateOrderRequest{
|
||||
Param: &LogisticsNewCreateOrderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsNewCreateOrderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_newCreateOrder_response.LogisticsNewCreateOrderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_newCreateOrder_response.LogisticsNewCreateOrderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsNewCreateOrderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsNewCreateOrderRequest) GetParams() *LogisticsNewCreateOrderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Warehouse struct {
|
||||
// true 总对总门店发货
|
||||
IsSumUp bool `json:"is_sum_up"`
|
||||
// 仓库id编码
|
||||
WhCode string `json:"wh_code"`
|
||||
// 仓库订单号(丹鸟等仓发链路使用)
|
||||
WhOrderNo string `json:"wh_order_no"`
|
||||
// 发货方式,2-门店发货 3-仓库发货(不传默认为3)
|
||||
DeliveryType string `json:"delivery_type"`
|
||||
}
|
||||
type OrderInfosItem struct {
|
||||
// 订单号(合单情况下,isv只需传其中一个订单号,传入的订单号需去掉末尾后缀字母A);非抖音订单长度仅支持32个字符,格式:数字、大小写字母及“-”、“/”2种分隔符的组合字符串,例如:Doudian-123456
|
||||
OrderId string `json:"order_id"`
|
||||
// 包裹id(只能传入数字、字母和下划线;大小写敏感,即123A,123a 不可当做相同ID,否则存在一定可能取号失败)一单一包裹是不需要传,有2个以上时,从第二个开始都需要传不同id
|
||||
PackId string `json:"pack_id"`
|
||||
// 增值服务列表,更多增值服务参考[抖音电商电子面单对接文档](https://op.jinritemai.com/docs/guide-docs/78/338)
|
||||
ServiceList []ServiceListItem `json:"service_list"`
|
||||
// 快递产品类型
|
||||
ProductType string `json:"product_type"`
|
||||
// 支付方式:1-寄付月结,2-寄付现结)若不传,默认为商家与物流商网点约定的支付方式
|
||||
PayMethod int16 `json:"pay_method"`
|
||||
// 运费金额,单位为分
|
||||
PayAmount int64 `json:"pay_amount"`
|
||||
// 回单寄回地址
|
||||
PodModelAddress *PodModelAddress `json:"pod_model_address"`
|
||||
// 收件人信息
|
||||
ReceiverInfo *ReceiverInfo `json:"receiver_info"`
|
||||
// 商品明细列表
|
||||
Items []ItemsItem `json:"items"`
|
||||
// 要求上门取件时间段
|
||||
SenderFetchTime string `json:"sender_fetch_time"`
|
||||
// 是否返回签回单(签单返还)的运单号,支持以下值:1:要求 0:不要求\"
|
||||
IsSignBack int16 `json:"is_sign_back"`
|
||||
// 订单备注
|
||||
Remark string `json:"remark"`
|
||||
// 备用扩展字段(非必传字段,如果传值不可为"null",按照示例来传。)
|
||||
Extra string `json:"extra"`
|
||||
// 包裹数量包含了母单号和子单号数量,所以如果商家发母子件,包裹数量必须≥2才可以 不传默认就是一单一包裹
|
||||
TotalPackCount int32 `json:"total_pack_count"`
|
||||
// 商品总重量,单位:克(仅支持顺丰物流使用)
|
||||
TotalWeight string `json:"total_weight"`
|
||||
// 商品总长,单位:cm(仅支持顺丰物流使用)
|
||||
TotalLength string `json:"total_length"`
|
||||
// 商品总宽,单位:cm(仅支持顺丰物流使用)
|
||||
TotalWidth string `json:"total_width"`
|
||||
// 商品总高,单位:cm(仅支持顺丰物流使用)
|
||||
TotalHeight string `json:"total_height"`
|
||||
// 商品总体积,单位:cm3(仅支持顺丰物流使用)
|
||||
Volume string `json:"volume"`
|
||||
// 仓、门店、总对总发货
|
||||
Warehouse *Warehouse `json:"warehouse"`
|
||||
// 总对总信息门店信息
|
||||
NetInfo *NetInfo `json:"net_info"`
|
||||
// 物料码
|
||||
ShippingCode string `json:"shipping_code"`
|
||||
// 顺丰极效前置场景(必填)使用 2:极效前置单
|
||||
SpecialDeliveryTypeCode string `json:"special_delivery_type_code"`
|
||||
// 顺丰极效前置场景(必填)使用 Y:若不支持则返回普通运单 N:若不支持则返回错误码
|
||||
SpecialDeliveryTypeValue string `json:"special_delivery_type_value"`
|
||||
// 包裹总重量(g)
|
||||
PackageWeight int32 `json:"package_weight"`
|
||||
}
|
||||
type Address struct {
|
||||
// 国家编码(默认CHN,目前只有国内业务)
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区/县名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 剩余详细地址
|
||||
DetailAddress string `json:"detail_address"`
|
||||
}
|
||||
type Contact struct {
|
||||
// 寄件人姓名
|
||||
Name string `json:"name"`
|
||||
// 寄件人固话(和mobile二选一)
|
||||
Phone string `json:"phone"`
|
||||
// 寄件人移动电话(和phone二选一)
|
||||
Mobile string `json:"mobile"`
|
||||
}
|
||||
type ServiceListItem struct {
|
||||
// 增值服务类型
|
||||
ServiceCode string `json:"service_code"`
|
||||
// 增值服务对应的value值,如果增值类型涉及金额会校验,单位:分
|
||||
ServiceValue string `json:"service_value"`
|
||||
}
|
||||
type PodModelAddress struct {
|
||||
// 国家编码(默认CHN,目前只有国内业务)
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区/县名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称
|
||||
StreetName string `json:"street_name"`
|
||||
// 剩余详细地址
|
||||
DetailAddress string `json:"detail_address"`
|
||||
}
|
||||
type ReceiverInfo struct {
|
||||
// 收件人地址信息
|
||||
Address *Address_4_4 `json:"address"`
|
||||
// 收件人联系信息
|
||||
Contact *Contact `json:"contact"`
|
||||
}
|
||||
type ItemsItem struct {
|
||||
// 商品名称
|
||||
ItemName string `json:"item_name"`
|
||||
// 商品规格
|
||||
ItemSpecs string `json:"item_specs"`
|
||||
// 商品数量
|
||||
ItemCount int32 `json:"item_count"`
|
||||
// 单件商品体积(cm3
|
||||
ItemVolume int32 `json:"item_volume"`
|
||||
// 单件商品重量(g)
|
||||
ItemWeight int32 `json:"item_weight"`
|
||||
// 单件总净重量(g)
|
||||
ItemNetWeight int32 `json:"item_net_weight"`
|
||||
}
|
||||
type DeliveryReq struct {
|
||||
// true
|
||||
IsCenterDelivery bool `json:"is_center_delivery"`
|
||||
// true
|
||||
IsPickupSelf bool `json:"is_pickup_self"`
|
||||
}
|
||||
type SenderInfo struct {
|
||||
// 寄件人地址信息
|
||||
Address *Address `json:"address"`
|
||||
// 寄件人联系信息
|
||||
Contact *Contact `json:"contact"`
|
||||
}
|
||||
type Address_4_4 struct {
|
||||
// 国家编码(默认中国CHN)
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区/县名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称。街道名称(street_name)和街道code(street_code),若传入时,需要一起传入。
|
||||
StreetName string `json:"street_name"`
|
||||
// 剩余详细地址,支持密文
|
||||
DetailAddress string `json:"detail_address"`
|
||||
// 省编码code
|
||||
ProvinceCode string `json:"province_code"`
|
||||
// 市编码code
|
||||
CityCode string `json:"city_code"`
|
||||
// 区编码code
|
||||
DistrictCode string `json:"district_code"`
|
||||
// 街道编码code
|
||||
StreetCode string `json:"street_code"`
|
||||
}
|
||||
type NetInfo struct {
|
||||
// 物流服务商类型,直营/加盟
|
||||
Category string `json:"category"`
|
||||
// 网点编码,当category为加盟类型时,该字段必填;为直营类型时可不传;对总模式该字段均为非必填
|
||||
NetCode string `json:"net_code"`
|
||||
// 总对总账号 月结账号
|
||||
MonthlyAccount string `json:"monthly_account"`
|
||||
// 总对总密码
|
||||
SecretKey string `json:"secret_key"`
|
||||
}
|
||||
type LogisticsNewCreateOrderParam struct {
|
||||
// 寄件人信息
|
||||
SenderInfo *SenderInfo `json:"sender_info"`
|
||||
// 物流服务商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 详细订单列表
|
||||
OrderInfos []OrderInfosItem `json:"order_infos"`
|
||||
// 共享账号场景下需传,代表实际使用取号服务的shop_id(需与order_id匹配);若无法获取到该shop_id,value传值 -1
|
||||
UserId int64 `json:"user_id"`
|
||||
// 派送要求(目前仅德邦支持)
|
||||
DeliveryReq *DeliveryReq `json:"delivery_req"`
|
||||
// 订单渠道来源编码,具体请参考[下单渠道来源编码表](https://bytedance.feishu.cn/sheets/shtcngIVwcJlgXLzWhEtKrmv7Af),当order_id订单号为非抖音订单时必传
|
||||
OrderChannel string `json:"order_channel"`
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package logistics_newCreateOrder_response
|
||||
|
||||
type LogisticsNewCreateOrderResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsNewCreateOrderData `json:"data"`
|
||||
}
|
||||
type EbillInfosItem struct {
|
||||
// 订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 包裹id
|
||||
PackId string `json:"pack_id"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 分拣码(三段码)
|
||||
SortCode string `json:"sort_code"`
|
||||
// 集包地代码
|
||||
PackageCenterCode string `json:"package_center_code"`
|
||||
// 集包名称
|
||||
PackageCenterName string `json:"package_center_name"`
|
||||
// 大头笔编码
|
||||
ShortAddressCode string `json:"short_address_code"`
|
||||
// 大头笔名称
|
||||
ShortAddressName string `json:"short_address_name"`
|
||||
// 额外打印信息(众邮、京东、丰网使用),具体请参考[抖音电商电子面单对接文档](https://op.jinritemai.com/docs/guide-docs/33/338)附录4
|
||||
ExtraResp string `json:"extra_resp"`
|
||||
// 子母件列表英文逗号分隔
|
||||
SubWaybillCodes string `json:"sub_waybill_codes"`
|
||||
// 2;详情请看文档映射表
|
||||
OrderChannel string `json:"order_channel"`
|
||||
// 快递商侧系统生成的寄件码
|
||||
ShippingCode string `json:"shipping_code"`
|
||||
}
|
||||
type ErrInfosItem struct {
|
||||
// 订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 包裹id
|
||||
PackId string `json:"pack_id"`
|
||||
// 错误码
|
||||
ErrCode string `json:"err_code"`
|
||||
// 错误信息
|
||||
ErrMsg string `json:"err_msg"`
|
||||
// 2;详情请看文档映射表
|
||||
OrderChannel string `json:"order_channel"`
|
||||
}
|
||||
type LogisticsNewCreateOrderData struct {
|
||||
// 电子面单信息列表
|
||||
EbillInfos []EbillInfosItem `json:"ebill_infos"`
|
||||
// 错误信息列表
|
||||
ErrInfos []ErrInfosItem `json:"err_infos"`
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package logistics_queryPackageRoute_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsQueryPackageRouteRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsQueryPackageRouteParam
|
||||
}
|
||||
|
||||
func (c *LogisticsQueryPackageRouteRequest) GetUrlPath() string {
|
||||
return "/logistics/queryPackageRoute"
|
||||
}
|
||||
|
||||
func New() *LogisticsQueryPackageRouteRequest {
|
||||
request := &LogisticsQueryPackageRouteRequest{
|
||||
Param: &LogisticsQueryPackageRouteParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsQueryPackageRouteRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_queryPackageRoute_response.LogisticsQueryPackageRouteResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_queryPackageRoute_response.LogisticsQueryPackageRouteResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsQueryPackageRouteRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsQueryPackageRouteRequest) GetParams() *LogisticsQueryPackageRouteParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Sender struct {
|
||||
// 寄件人姓名
|
||||
Name string `json:"name"`
|
||||
// 手机号
|
||||
Phone string `json:"phone"`
|
||||
// 手机号
|
||||
Mobile string `json:"mobile"`
|
||||
// 邮箱
|
||||
Email string `json:"email"`
|
||||
// 虚拟手机号
|
||||
VirtualMobile string `json:"virtual_mobile"`
|
||||
}
|
||||
type LogisticsQueryPackageRouteParam struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 物流公司
|
||||
Express string `json:"express"`
|
||||
// 收件人
|
||||
Receiver *Receiver `json:"receiver"`
|
||||
// 寄件人
|
||||
Sender *Sender `json:"sender"`
|
||||
}
|
||||
type Receiver struct {
|
||||
// 收件人姓名
|
||||
Name string `json:"name"`
|
||||
// 手机号
|
||||
Phone string `json:"phone"`
|
||||
// 手机号
|
||||
Mobile string `json:"mobile"`
|
||||
// 邮箱
|
||||
Email string `json:"email"`
|
||||
// 虚拟手机号
|
||||
VirtualMobile string `json:"virtual_mobile"`
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package logistics_queryPackageRoute_response
|
||||
|
||||
type LogisticsQueryPackageRouteResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsQueryPackageRouteData `json:"data"`
|
||||
}
|
||||
type LogisticsQueryPackageRouteData struct {
|
||||
// 数据
|
||||
Data *Data `json:"data"`
|
||||
}
|
||||
type TrackRoutesItem struct {
|
||||
// 内容
|
||||
Content string `json:"content"`
|
||||
// 状态
|
||||
State string `json:"state"`
|
||||
// 时间
|
||||
StateTime int64 `json:"state_time"`
|
||||
// code
|
||||
Opcode string `json:"opcode"`
|
||||
}
|
||||
type Data struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 快递商
|
||||
Express string `json:"express"`
|
||||
// 轨迹
|
||||
TrackRoutes []TrackRoutesItem `json:"track_routes"`
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package logistics_registerPackageRoute_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsRegisterPackageRouteRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsRegisterPackageRouteParam
|
||||
}
|
||||
|
||||
func (c *LogisticsRegisterPackageRouteRequest) GetUrlPath() string {
|
||||
return "/logistics/registerPackageRoute"
|
||||
}
|
||||
|
||||
func New() *LogisticsRegisterPackageRouteRequest {
|
||||
request := &LogisticsRegisterPackageRouteRequest{
|
||||
Param: &LogisticsRegisterPackageRouteParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsRegisterPackageRouteRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_registerPackageRoute_response.LogisticsRegisterPackageRouteResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_registerPackageRoute_response.LogisticsRegisterPackageRouteResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsRegisterPackageRouteRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsRegisterPackageRouteRequest) GetParams() *LogisticsRegisterPackageRouteParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type Sender struct {
|
||||
// 联系人
|
||||
Contact *Contact `json:"contact"`
|
||||
// 地址
|
||||
Address *Address `json:"address"`
|
||||
}
|
||||
type CargoListItem struct {
|
||||
// 名称
|
||||
Name string `json:"name"`
|
||||
// 质量
|
||||
Quantity int32 `json:"quantity"`
|
||||
// 体积
|
||||
Volume int32 `json:"volume"`
|
||||
// 总重
|
||||
TotalWeight int32 `json:"total_weight"`
|
||||
// 净重
|
||||
TotalNetWeight int32 `json:"total_net_weight"`
|
||||
// 单位
|
||||
Unit string `json:"unit"`
|
||||
}
|
||||
type LogisticsRegisterPackageRouteParam struct {
|
||||
// 物流商
|
||||
Express string `json:"express"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 外部单据id
|
||||
OuterOrderId string `json:"outer_order_id"`
|
||||
// 外部子单据id
|
||||
OuterSubOrderId string `json:"outer_sub_order_id"`
|
||||
// 回调url
|
||||
CallbackUrl string `json:"callback_url"`
|
||||
// 收件人
|
||||
Receiver *Receiver `json:"receiver"`
|
||||
// 寄件人
|
||||
Sender *Sender `json:"sender"`
|
||||
// 货品列表
|
||||
CargoList []CargoListItem `json:"cargo_list"`
|
||||
// 拓展
|
||||
Extend map[string]string `json:"extend"`
|
||||
}
|
||||
type Province struct {
|
||||
// 省
|
||||
Name string `json:"name"`
|
||||
// code
|
||||
Code string `json:"code"`
|
||||
}
|
||||
type City struct {
|
||||
// 市
|
||||
Name string `json:"name"`
|
||||
// code
|
||||
Code string `json:"code"`
|
||||
}
|
||||
type Address struct {
|
||||
// 省
|
||||
Province *Province `json:"province"`
|
||||
// 市
|
||||
City *City `json:"city"`
|
||||
// 区
|
||||
Town *Town `json:"town"`
|
||||
// 街道
|
||||
Street *Street `json:"street"`
|
||||
// 详细地址
|
||||
Detail string `json:"detail"`
|
||||
}
|
||||
type Receiver struct {
|
||||
// 联系人
|
||||
Contact *Contact `json:"contact"`
|
||||
// 地址
|
||||
Address *Address `json:"address"`
|
||||
}
|
||||
type Contact struct {
|
||||
// 姓名
|
||||
Name string `json:"name"`
|
||||
// 手机号
|
||||
Phone string `json:"phone"`
|
||||
// 邮箱
|
||||
Email string `json:"email"`
|
||||
}
|
||||
type Town struct {
|
||||
// 区
|
||||
Name string `json:"name"`
|
||||
// code
|
||||
Code string `json:"code"`
|
||||
}
|
||||
type Street struct {
|
||||
// 街道
|
||||
Name string `json:"name"`
|
||||
// code
|
||||
Code string `json:"code"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package logistics_registerPackageRoute_response
|
||||
|
||||
type LogisticsRegisterPackageRouteResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsRegisterPackageRouteData `json:"data"`
|
||||
}
|
||||
type LogisticsRegisterPackageRouteData struct {
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package logistics_templateList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsTemplateListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsTemplateListParam
|
||||
}
|
||||
|
||||
func (c *LogisticsTemplateListRequest) GetUrlPath() string {
|
||||
return "/logistics/templateList"
|
||||
}
|
||||
|
||||
func New() *LogisticsTemplateListRequest {
|
||||
request := &LogisticsTemplateListRequest{
|
||||
Param: &LogisticsTemplateListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsTemplateListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_templateList_response.LogisticsTemplateListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_templateList_response.LogisticsTemplateListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsTemplateListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsTemplateListRequest) GetParams() *LogisticsTemplateListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsTemplateListParam struct {
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package logistics_templateList_response
|
||||
|
||||
type LogisticsTemplateListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsTemplateListData `json:"data"`
|
||||
}
|
||||
type TemplateInfosItem struct {
|
||||
// 模版id
|
||||
TemplateId int64 `json:"template_id"`
|
||||
// 模版编码
|
||||
TemplateCode string `json:"template_code"`
|
||||
// 模版名称
|
||||
TemplateName string `json:"template_name"`
|
||||
// 模版URL
|
||||
TemplateUrl string `json:"template_url"`
|
||||
// 版本
|
||||
Version int16 `json:"version"`
|
||||
// 模版类型; 1-一联单 2-二联单
|
||||
TemplateType int16 `json:"template_type"`
|
||||
// 预览URL
|
||||
PerviewUrl string `json:"perview_url"`
|
||||
}
|
||||
type TemplateDataItem struct {
|
||||
// 模版信息
|
||||
TemplateInfos []TemplateInfosItem `json:"template_infos"`
|
||||
// 物流公司
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
}
|
||||
type LogisticsTemplateListData struct {
|
||||
// 模版数据
|
||||
TemplateData []TemplateDataItem `json:"template_data"`
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package logistics_trackNoRouteDetail_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsTrackNoRouteDetailRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsTrackNoRouteDetailParam
|
||||
}
|
||||
|
||||
func (c *LogisticsTrackNoRouteDetailRequest) GetUrlPath() string {
|
||||
return "/logistics/trackNoRouteDetail"
|
||||
}
|
||||
|
||||
func New() *LogisticsTrackNoRouteDetailRequest {
|
||||
request := &LogisticsTrackNoRouteDetailRequest{
|
||||
Param: &LogisticsTrackNoRouteDetailParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsTrackNoRouteDetailRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_trackNoRouteDetail_response.LogisticsTrackNoRouteDetailResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_trackNoRouteDetail_response.LogisticsTrackNoRouteDetailResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsTrackNoRouteDetailRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsTrackNoRouteDetailRequest) GetParams() *LogisticsTrackNoRouteDetailParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsTrackNoRouteDetailParam struct {
|
||||
// 物流商编码;需使用【/order/logisticsCompanyList】接口响应参数中的code;
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 运单号;可使用电子面单接口获取返回的单号查询【/logistics/newCreateOrder】或商家店铺后台查看
|
||||
TrackNo string `json:"track_no"`
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package logistics_trackNoRouteDetail_response
|
||||
|
||||
type LogisticsTrackNoRouteDetailResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsTrackNoRouteDetailData `json:"data"`
|
||||
}
|
||||
type RouteNodeListItem struct {
|
||||
// 轨迹内容
|
||||
Content string `json:"content"`
|
||||
// 时间戳;单位:秒
|
||||
Timestamp string `json:"timestamp"`
|
||||
// 轨迹状态code;枚举值详见:https://op.jinritemai.com/docs/question-docs/94/1642
|
||||
State string `json:"state"`
|
||||
// 轨迹状态描述
|
||||
StateDescription string `json:"state_description"`
|
||||
// 站点名称
|
||||
SiteName string `json:"site_name"`
|
||||
}
|
||||
type TrackInfo struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 物流商编码
|
||||
Express string `json:"express"`
|
||||
}
|
||||
type LogisticsTrackNoRouteDetailData struct {
|
||||
// 轨迹信息
|
||||
RouteNodeList []RouteNodeListItem `json:"route__node_list"`
|
||||
// 运单信息
|
||||
TrackInfo *TrackInfo `json:"track_info"`
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package logistics_updateOrder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsUpdateOrderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsUpdateOrderParam
|
||||
}
|
||||
|
||||
func (c *LogisticsUpdateOrderRequest) GetUrlPath() string {
|
||||
return "/logistics/updateOrder"
|
||||
}
|
||||
|
||||
func New() *LogisticsUpdateOrderRequest {
|
||||
request := &LogisticsUpdateOrderRequest{
|
||||
Param: &LogisticsUpdateOrderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsUpdateOrderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_updateOrder_response.LogisticsUpdateOrderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_updateOrder_response.LogisticsUpdateOrderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsUpdateOrderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsUpdateOrderRequest) GetParams() *LogisticsUpdateOrderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ItemsItem struct {
|
||||
// 商品名称
|
||||
ItemName string `json:"item_name"`
|
||||
// 商品规格
|
||||
ItemSpecs string `json:"item_specs"`
|
||||
// 商品数量
|
||||
ItemCount int32 `json:"item_count"`
|
||||
// 单件商品体积(cm3)
|
||||
ItemVolume int32 `json:"item_volume"`
|
||||
// 单件商品重量(g)
|
||||
ItemWeight int32 `json:"item_weight"`
|
||||
// 单件总净重量(g)
|
||||
ItemNetWeight int32 `json:"item_net_weight"`
|
||||
}
|
||||
type Warehouse struct {
|
||||
// 目前该字段无效,统一传false
|
||||
IsSumUp bool `json:"is_sum_up"`
|
||||
// 仓库订单号(丹鸟等仓发链路使用)
|
||||
WhOrderNo string `json:"wh_order_no"`
|
||||
}
|
||||
type LogisticsUpdateOrderParam struct {
|
||||
// 寄件人信息
|
||||
SenderInfo *SenderInfo `json:"sender_info"`
|
||||
// 收件人信息
|
||||
ReceiverInfo *ReceiverInfo `json:"receiver_info"`
|
||||
// 物流服务商编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 商品明细列表
|
||||
Items []ItemsItem `json:"items"`
|
||||
// 备注
|
||||
Remark string `json:"remark"`
|
||||
// 备用扩展字段
|
||||
Extra string `json:"extra"`
|
||||
// 实际使用取号服务店铺user_id
|
||||
UserId int64 `json:"user_id"`
|
||||
// 总体积 货物的总体积或长,宽,高 ;整数 单位cm
|
||||
Volume string `json:"volume"`
|
||||
// /总重量 ;整数 用于与快递商有计抛信任协议的商家)单位克
|
||||
Weight int64 `json:"weight"`
|
||||
// 仓、门店、总对总发货
|
||||
Warehouse *Warehouse `json:"warehouse"`
|
||||
}
|
||||
type Contact struct {
|
||||
// 寄件人姓名
|
||||
Name string `json:"name"`
|
||||
// 寄件人固话(和mobile二选一)
|
||||
Phone string `json:"phone"`
|
||||
// 寄件人移动电话(和phone二选一)
|
||||
Mobile string `json:"mobile"`
|
||||
}
|
||||
type SenderInfo struct {
|
||||
// 寄件人联系信息
|
||||
Contact *Contact `json:"contact"`
|
||||
}
|
||||
type Address struct {
|
||||
// 国家编码(默认CHN,目前只有国内业务)
|
||||
CountryCode string `json:"country_code"`
|
||||
// 省名称
|
||||
ProvinceName string `json:"province_name"`
|
||||
// 市名称
|
||||
CityName string `json:"city_name"`
|
||||
// 区/县名称
|
||||
DistrictName string `json:"district_name"`
|
||||
// 街道名称。街道名称(street_name)和街道code(street_code),若传入时,需要一起传入。
|
||||
StreetName string `json:"street_name"`
|
||||
// 剩余详细地址,支持密文
|
||||
DetailAddress string `json:"detail_address"`
|
||||
// 省code编码
|
||||
ProvinceCode string `json:"province_code"`
|
||||
// 市code编码
|
||||
CityCode string `json:"city_code"`
|
||||
// 区code编码
|
||||
DistrictCode string `json:"district_code"`
|
||||
// 街道code编码
|
||||
StreetCode string `json:"street_code"`
|
||||
}
|
||||
type ReceiverInfo struct {
|
||||
// 收件人地址信息
|
||||
Address *Address `json:"address"`
|
||||
// 收件人联系信息
|
||||
Contact *Contact `json:"contact"`
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package logistics_updateOrder_response
|
||||
|
||||
type LogisticsUpdateOrderResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsUpdateOrderData `json:"data"`
|
||||
}
|
||||
type LogisticsUpdateOrderData struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 分拣码(三段码)
|
||||
SortCode string `json:"sort_code"`
|
||||
// 集包地代码
|
||||
PackageCenterCode string `json:"package_center_code"`
|
||||
// 集包名称
|
||||
PackageCenterName string `json:"package_center_name"`
|
||||
// 大头笔编码
|
||||
ShortAddressCode string `json:"short_address_code"`
|
||||
// 大头笔名称
|
||||
ShortAddressName string `json:"short_address_name"`
|
||||
// 扩展字段
|
||||
ExtraResp string `json:"extra_resp"`
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package logistics_waybillApply_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type LogisticsWaybillApplyRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsWaybillApplyParam
|
||||
}
|
||||
|
||||
func (c *LogisticsWaybillApplyRequest) GetUrlPath() string {
|
||||
return "/logistics/waybillApply"
|
||||
}
|
||||
|
||||
func New() *LogisticsWaybillApplyRequest {
|
||||
request := &LogisticsWaybillApplyRequest{
|
||||
Param: &LogisticsWaybillApplyParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsWaybillApplyRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_waybillApply_response.LogisticsWaybillApplyResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_waybillApply_response.LogisticsWaybillApplyResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsWaybillApplyRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsWaybillApplyRequest) GetParams() *LogisticsWaybillApplyParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type WaybillAppliesItem struct {
|
||||
// 物流公司编码
|
||||
LogisticsCode string `json:"logistics_code"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
}
|
||||
type LogisticsWaybillApplyParam struct {
|
||||
// 请求结构体
|
||||
WaybillApplies []WaybillAppliesItem `json:"waybill_applies"`
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package logistics_waybillApply_response
|
||||
|
||||
type LogisticsWaybillApplyResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsWaybillApplyData `json:"data"`
|
||||
}
|
||||
type WaybillInfosItem struct {
|
||||
// 订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 加密的面单数据
|
||||
PrintData string `json:"print_data"`
|
||||
// 签名信息
|
||||
Sign string `json:"sign"`
|
||||
}
|
||||
type ErrInfosItem struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 订单号
|
||||
OrderId string `json:"order_id"`
|
||||
// 错误码
|
||||
ErrCode int32 `json:"err_code"`
|
||||
// 错误信息
|
||||
ErrMsg string `json:"err_msg"`
|
||||
}
|
||||
type LogisticsWaybillApplyData struct {
|
||||
// 正常返回结构体
|
||||
WaybillInfos []WaybillInfosItem `json:"waybill_infos"`
|
||||
// 错误返回结构体
|
||||
ErrInfos []ErrInfosItem `json:"err_infos"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package material_batchUploadImageSync_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type MaterialBatchUploadImageSyncRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *MaterialBatchUploadImageSyncParam
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadImageSyncRequest) GetUrlPath() string {
|
||||
return "/material/batchUploadImageSync"
|
||||
}
|
||||
|
||||
func New() *MaterialBatchUploadImageSyncRequest {
|
||||
request := &MaterialBatchUploadImageSyncRequest{
|
||||
Param: &MaterialBatchUploadImageSyncParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadImageSyncRequest) Execute(accessToken *doudian_sdk.AccessToken) (*material_batchUploadImageSync_response.MaterialBatchUploadImageSyncResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &material_batchUploadImageSync_response.MaterialBatchUploadImageSyncResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadImageSyncRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadImageSyncRequest) GetParams() *MaterialBatchUploadImageSyncParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type MaterialsItem struct {
|
||||
// 素材的唯一id,用于接口幂等(限时1个小时)
|
||||
RequestId string `json:"request_id"`
|
||||
// 文件夹id,“0”表示将素材上传到素材中心根目录
|
||||
FolderId string `json:"folder_id"`
|
||||
// 固定值photo
|
||||
MaterialType string `json:"material_type"`
|
||||
// 素材名称,长度限制为50个字符
|
||||
Name string `json:"name"`
|
||||
// 素材url,素材中心会将改url转换成素材中心的url
|
||||
Url string `json:"url"`
|
||||
}
|
||||
type MaterialBatchUploadImageSyncParam struct {
|
||||
// 素材信息
|
||||
Materials []MaterialsItem `json:"materials"`
|
||||
// 是否唯一存储,如果为true,同一张图片素材中心只会存储一份
|
||||
NeedDistinct bool `json:"need_distinct"`
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package material_batchUploadImageSync_response
|
||||
|
||||
type MaterialBatchUploadImageSyncResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *MaterialBatchUploadImageSyncData `json:"data"`
|
||||
}
|
||||
type SuccessMapItem struct {
|
||||
// 素材id,素材中心对素材的唯一编号
|
||||
MaterialId string `json:"MaterialId"`
|
||||
// 素材名称,长度限制为50个字符
|
||||
Name string `json:"Name"`
|
||||
// 文件夹id,“0”表示将素材上传到了素材中心根目录
|
||||
FolderId string `json:"FolderId"`
|
||||
// 上传素材时,传入参数url的取值
|
||||
OriginUrl string `json:"OriginUrl"`
|
||||
// 素材中心返回的url
|
||||
ByteUrl string `json:"ByteUrl"`
|
||||
// 审核状态 1-待审核 2-审核中 3-审核通过 4-审核拒绝
|
||||
AuditStatus int32 `json:"AuditStatus"`
|
||||
// 是否为新建的素材,false-表示素材已经存在或者request_id重复使用,true-表示新建
|
||||
IsNew bool `json:"IsNew"`
|
||||
}
|
||||
type FailedMapItem struct {
|
||||
// 失败的code
|
||||
ErrCode int32 `json:"err_code"`
|
||||
// 失败的原因
|
||||
ErrMsg string `json:"err_msg"`
|
||||
}
|
||||
type MaterialBatchUploadImageSyncData struct {
|
||||
// 成功上传的素材,key为参数中的request_id
|
||||
SuccessMap map[string]SuccessMapItem `json:"success_map"`
|
||||
// 失败的素材,key为参数中的request_id
|
||||
FailedMap map[string]FailedMapItem `json:"failed_map"`
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package material_batchUploadVideoAsync_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type MaterialBatchUploadVideoAsyncRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *MaterialBatchUploadVideoAsyncParam
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadVideoAsyncRequest) GetUrlPath() string {
|
||||
return "/material/batchUploadVideoAsync"
|
||||
}
|
||||
|
||||
func New() *MaterialBatchUploadVideoAsyncRequest {
|
||||
request := &MaterialBatchUploadVideoAsyncRequest{
|
||||
Param: &MaterialBatchUploadVideoAsyncParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadVideoAsyncRequest) Execute(accessToken *doudian_sdk.AccessToken) (*material_batchUploadVideoAsync_response.MaterialBatchUploadVideoAsyncResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &material_batchUploadVideoAsync_response.MaterialBatchUploadVideoAsyncResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadVideoAsyncRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *MaterialBatchUploadVideoAsyncRequest) GetParams() *MaterialBatchUploadVideoAsyncParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type MaterialsItem struct {
|
||||
// 素材的唯一id,用于接口幂等(限时1个小时)
|
||||
RequestId string `json:"request_id"`
|
||||
// 文件夹id,“0”表示将素材上传到素材中心根目录
|
||||
FolderId string `json:"folder_id"`
|
||||
// 固定值video
|
||||
MaterialType string `json:"material_type"`
|
||||
// 素材名称,长度限制为50个字符
|
||||
Name string `json:"name"`
|
||||
// 素材url,素材中心会将改url转换成素材中心的url
|
||||
Url string `json:"url"`
|
||||
}
|
||||
type MaterialBatchUploadVideoAsyncParam struct {
|
||||
// 素材信息
|
||||
Materials []MaterialsItem `json:"materials"`
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package material_batchUploadVideoAsync_response
|
||||
|
||||
type MaterialBatchUploadVideoAsyncResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *MaterialBatchUploadVideoAsyncData `json:"data"`
|
||||
}
|
||||
type FailedMapItem struct {
|
||||
// 错误码
|
||||
ErrCode int32 `json:"err_code"`
|
||||
// 错误描述
|
||||
ErrMsg string `json:"err_msg"`
|
||||
}
|
||||
type MaterialBatchUploadVideoAsyncData struct {
|
||||
// 成功上传的素材,key为参数中的request_id
|
||||
SuccessMap map[string]SuccessMapItem `json:"success_map"`
|
||||
// 失败的素材,key为参数中的request_id
|
||||
FailedMap map[string]FailedMapItem `json:"failed_map"`
|
||||
}
|
||||
type SuccessMapItem struct {
|
||||
// 素材id,素材中心对素材的唯一编号
|
||||
MaterialId string `json:"material_id"`
|
||||
// 素材名称,长度限制为50个字符
|
||||
Name string `json:"name"`
|
||||
// 文件夹id,“0”表示将素材上传到了素材中心根目录
|
||||
FolderId string `json:"folder_id"`
|
||||
// 上传素材时,传入参数url的取值
|
||||
OriginUrl string `json:"origin_url"`
|
||||
// 审核状态 1-待审核 2-审核中 3-审核通过 4-审核拒绝
|
||||
AuditStatus int32 `json:"audit_status"`
|
||||
// 是否为新建的素材,false-表示request_id重复使用,true-表示新建
|
||||
IsNew bool `json:"is_new"`
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package material_createFolder_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type MaterialCreateFolderRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *MaterialCreateFolderParam
|
||||
}
|
||||
|
||||
func (c *MaterialCreateFolderRequest) GetUrlPath() string {
|
||||
return "/material/createFolder"
|
||||
}
|
||||
|
||||
func New() *MaterialCreateFolderRequest {
|
||||
request := &MaterialCreateFolderRequest{
|
||||
Param: &MaterialCreateFolderParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialCreateFolderRequest) Execute(accessToken *doudian_sdk.AccessToken) (*material_createFolder_response.MaterialCreateFolderResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &material_createFolder_response.MaterialCreateFolderResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *MaterialCreateFolderRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *MaterialCreateFolderRequest) GetParams() *MaterialCreateFolderParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type MaterialCreateFolderParam struct {
|
||||
// 文件夹名称。最多20字符
|
||||
Name string `json:"name"`
|
||||
// 父文件夹id,根目录为0。不传该参数默认在根目录下创建文件夹
|
||||
ParentFolderId string `json:"parent_folder_id"`
|
||||
// 文件夹类型。0-用户自建
|
||||
Type int32 `json:"type"`
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user