taobao

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

	W1ExpiresIn int    `json:"w1_expires_in"`
	W2ExpiresIn int    `json:"w2_expires_in"`
	ReExpiresIn int    `json:"re_expires_in"`
	R1ExpiresIn int    `json:"r1_expires_in"`
	R2ExpiresIn int    `json:"r2_expires_in"`
	ExpiresIn   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`

	TaobaoUserId   string   `json:"taobao_user_id"`
	TaobaoUserNick string   `json:"taobao_user_nick"`
	RefreshToken   string   `json:"refresh_token"`
	Scope          []string `json:"scope"`
}

type Client

type Client struct {
	Params *common.ClientParams
}

func InitClient

func InitClient(appKey, appSecret, session 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

Jump to

Keyboard shortcuts

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