pdd

package
v0.0.0-...-e16bbcd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// router = "http://gw.api.tbsandbox.com/router/rest"
	// router = "https://baidu.com"
	// Timeout ...
	Timeout time.Duration
	// CacheExpiration 缓存过期时间
	CacheExpiration = time.Hour
	// GetCache 获取缓存
	GetCache cache.GetCacheFunc
	// SetCache 设置缓存
	SetCache cache.SetCacheFunc
)

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	AccessToken  string   `json:"access_token"`
	ExpiresIn    int      `json:"expires_in"`
	OwnerId      string   `json:"owner_id"`
	OwnerName    string   `json:"owner_name"`
	RefreshToken string   `json:"refresh_token"`
	Scope        []string `json:"scope"`
}

type Address

type Address struct {
	Country string `json:"country"`
	// 必填,省
	Province string `json:"province"`
	City     string `json:"city"`
	District string `json:"district"`
	Town     string `json:"town"`
	// 必填.详细地址
	Detail string `json:"detail"`
}

type Client

type Client struct {
	Params *common.ClientParams
}

func InitClient

func InitClient(clientId, clientSecret, access_token string) *Client

func (*Client) BatchCheckRefundStatus

func (client *Client) BatchCheckRefundStatus(platorderno []string, extData ...string) (res []*common.BatchCheckRefundStatusRes, body []byte, err error)

批量检测退货

func (*Client) BatchPrintOrder

获取打印信息接口(批量)

func (*Client) CancelWaybill

func (client *Client) CancelWaybill(request []common.WaybillCancel, extData ...string) (*common.WaybillCancelReturn, error)

func (*Client) CheckRefundV2

func (client *Client) CheckRefundV2(request common.BatchCheckRefundStatusBizcontent, extData ...string) (common.CheckRefundReturn, error)

func (*Client) DownloadOrderList

func (client *Client) DownloadOrderList(pageIndex, pageSize int, startTime, endTime, timeType, orderStatus string, orderToken string, extData ...string) (res []*common.OrderInfo, hasNextPage bool, nextToken string, body []byte, err error)

func (*Client) DownloadOrderListByQimen

func (client *Client) DownloadOrderListByQimen(pageIndex, pageSize int, startTime, endTime, timeType, orderStatus string, extData ...string) (hasNextPage bool, body []byte, err error)

func (*Client) DownloadOrderListV2

func (client *Client) DownloadOrderListV2(request common.DownLoadOrderListPostBizcontent, extData ...string) (common.DownloadOrderListReturn, error)

func (*Client) DownloadProductList

func (client *Client) DownloadProductList(pageIndex, pageSize int, status, productToken string, extData ...string) (res []*common.Product, hasNextPage bool, nextToken string, body []byte, err error)

func (*Client) DownloadRefundList

func (client *Client) DownloadRefundList(pageIndex, pageSize int, startTime, endTime, timeType, status string, orderToken string, extData ...string) (res []*common.OrderInfo, hasNextPage bool, nextToken string, body []byte, err error)

退货退款单下载

func (*Client) Execute

func (client *Client) Execute(method string, param common.Parameter) (res *simplejson.Json, err error)

Execute 执行API接口

func (*Client) ExecuteCache

func (client *Client) ExecuteCache(method string, param common.Parameter) (res *simplejson.Json, err error)

ExecuteCache 执行API接口,缓存

func (*Client) GetAccessToken

func (client *Client) GetAccessToken(code, redirectUri, state string, extData ...string) (res *common.AccessToken, body []byte, err error)

func (*Client) GetAuthorizeUrl

func (client *Client) GetAuthorizeUrl(redirectUri, state string, extData ...string) (string, error)

func (*Client) GetDyPlatApiReuestInfo

func (client *Client) GetDyPlatApiReuestInfo(postData string) (*common.WmsPlatApiReturnInfo, error)

func (*Client) GetTemplates

func (client *Client) GetTemplates(postData *common.GetTemplates) (*common.TemplatesReturn, error)

func (*Client) GetWayBillCondition

func (client *Client) GetWayBillCondition(postData *polyapi.WayBillConditionPost) (*polyapi.WayBillConditionReturn, error)

func (*Client) GetWaybill

func (client *Client) GetWaybill(request *common.WaybillApplyNewRequest, extData ...string) (*common.WaybillApplyNewCols, []byte, error)

func (*Client) GetWaybillTemplates

func (client *Client) GetWaybillTemplates(request *common.WaybillTemplateRequest, extData ...string) (res *common.WaybillTemplateDto, body []byte, err error)

func (*Client) GetWaybillV2

func (client *Client) GetWaybillV2(request []*common.WmsLogisticsPostOrder) (*common.WmsLogisticsReturn, error)

func (*Client) GoodsSkuSync

func (client *Client) GoodsSkuSync(request *common.WmsGoodsSkuSync, extData ...string) (common.WmsGoodsSkuSyncReturn, error)

func (*Client) LogisticsPrintOrderList

func (client *Client) LogisticsPrintOrderList(request []*common.WmsLogisticsPrintOrderBizcontent, extData ...string) (common.WmsLogisticsPrintOrderReturn, error)

菠萝派批量物流打印接口

func (*Client) LogisticsSend

func (client *Client) LogisticsSend(dto *common.LogisticsSendReqDto, extData ...string) ([]byte, error)

订单发货

func (*Client) OrderSendV2

func (client *Client) OrderSendV2(request *common.WmsBusinessSendBizcontent) (*common.WmsBusinessSendReturn, error)

func (*Client) OrderSendV3

func (client *Client) OrderSendV3(request *common.WmsOrderBatchSend, extData ...string) (common.WmsOrderBatchSendReturn, error)

func (*Client) PrintOrder

func (client *Client) PrintOrder(postData *polyapi.BatchPrintOrder_Order, extData ...string) (*polyapi.PrintOrderReturn, error)

获得打印信息接口

func (*Client) TBDecrypt

type Item

type Item struct {
	// 必填 数量
	Count int `json:"count"`
	// 必填 名称
	Name string `json:"name"`
}

type Module

type Module struct {
	// 请求id
	ObjectId string `json:"object_id"`
	//快运母单号
	ParentWaybillCode string `json:"parent_waybill_code"`
	// 面单信息
	PrintData string `json:"print_data"`
	// 面单号
	WaybillCode string `json:"waybill_code"`
}

type OrderInfo

type OrderInfo struct {
	// 必填 订单渠道平台编码
	OrderChannelsType string `json:"order_channels_type"`
	// 必填 订单号,数量限制100
	TradeOrderList []string `json:"trade_order_list"`
}

type PackageInfo

type PackageInfo struct {
	// 快运货品描述
	GoodsDescription string `json:"goods_description"`
	// 包裹id,拆合单使用
	Id string `json:"id"`
	// 必填 商品信息,数量限制为100
	Items []*Item `json:"items"`
	// 非必填 快运包装方式描述
	PackagingDescription string `json:"packaging_description"`
	// 非必填 子母件总包裹数
	TotalPackagesCount int `json:"total_packages_count"`
	// 非必填 体积, 单位 ml
	Volume int64 `json:"volume"`
	// 非必填 重量,单位 g
	Weight int `json:"weight"`
}

type ParamWaybillCloudPrintApplyNewRequest

type ParamWaybillCloudPrintApplyNewRequest struct {
	//设定取号返回的云打印报文是否加密
	NeedEncrypt bool `json:"need_encrypt"`
	// 物流公司Code
	WpCode string `json:"wp_code"`
	// 发货人信息
	Sender *Sender `json:"sender"`
	// 请求面单信息,数量限制为10
	TradeOrderInfoDtos []*TradeOrderInfoDto `json:"trade_order_info_dtos"`
}

type PddWaybillGetResponse

type PddWaybillGetResponse struct {
	Modules []*Module `json:"modules"`
}

拼多多面单响应内容

type Recipient

type Recipient struct {
	Address *Address `json:"address"`
	Mobile  string   `json:"mobile"`
	Name    string   `json:"name"`
	Phone   string   `json:"phone"`
}

type Sender

type Sender struct {
	Address *Address `json:"address"`
	Mobile  string   `json:"mobile"`
	// 姓名
	Name  string `json:"name"`
	Phone string `json:"phone"`
}

type TradeOrderInfoDto

type TradeOrderInfoDto struct {
	LogisticsServices string `json:"logistics_services"`
	// 必填	请求id
	ObjectId string `json:"object_id"`
	// 必填 订单信息
	OrderInfo *OrderInfo `json:"order_info"`
	// 必填 包裹信息
	PackageInfo *PackageInfo `json:"package_info"`
	// 非必填 收件人信息
	Recipient *Recipient `json:"recipient"`
	// 必填 标准模板模板URL
	TemplateUrl string `json:"template_url"`
	// 必填 使用者ID
	UserId int64 `json:"user_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL