Documentation
¶
Index ¶
- type BSendExpressCallbackPush
- type CSendExpressCallbackPush
- type CancelExpressParams
- type CancelExpressResponse
- type Consign
- type CustomParams
- type Express
- type FeeDetail
- type Query
- type QueryBSendExpressResponse
- type QueryMapResponse
- type QueryMapResponseData
- type QueryParams
- type QueryPostageParams
- type QueryPostageResponse
- type QueryResponse
- type SendExpressParams
- type SendExpressResponse
- type SubscribeCallbackMapPush
- type SubscribeCallbackPush
- type SubscribeParams
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BSendExpressCallbackPush ¶
type BSendExpressCallbackPush struct {
CompCode string // 快递公司编码
ExpNo string // 快递单号
OrderId string // 订单号
Status int // 状态
PickupAgentName string // 取件员姓名
PickupAgentPhone string // 取件员电话
Weight float64 // 物品重量
Freight float64 // 运费
Volume float64 // 体积
ActualWeight float64 // 实际重量
Fees []*FeeDetail // 费用明细
}
type CSendExpressCallbackPush ¶
type CSendExpressCallbackPush struct {
CompCode string // 快递公司编码
ExpNo string // 快递单号
OrderId string // 订单号
Status int // 状态
PickupAgentName string // 取件员姓名
PickupAgentPhone string // 取件员电话
Weight float64 // 物品重量
Freight float64 // 运费
}
CSendExpressCallbackPush C端寄件回调推送
type CancelExpressParams ¶
type CancelExpressParams struct {
TaskId string // 任务ID
OrderId string // 订单号
Reason string // 取消原因
}
CancelExpressParams 取消寄件参数
type CancelExpressResponse ¶
type CancelExpressResponse struct {
Success bool // 是否提交成功
Code string // 提交结果编码
Msg string // 提交结果描述
}
CancelExpressResponse 取消寄件响应
type Consign ¶
type Consign interface {
BSendExpress(params *SendExpressParams) (*SendExpressResponse, error) // B端寄件
CSendExpress(params *SendExpressParams) (*SendExpressResponse, error) // C端寄件
BSendExpressVerify(sign, params string) (*BSendExpressCallbackPush, error) // B端寄件验证解析
CSendExpressVerify(sign, params string) (*CSendExpressCallbackPush, error) // C端寄件验证解析
BCancelExpress(params *CancelExpressParams) (*CancelExpressResponse, error) // B端取消寄件
CCancelExpress(params *CancelExpressParams) (*CancelExpressResponse, error) // C端取消寄件
BExpressPushVerify(sign, params string) (*SubscribeCallbackPush, error) // B端寄件快递轨迹信息推送数据验证解析
CExpressPushVerify(sign, params string) (*SubscribeCallbackPush, error) // C端寄件快递轨迹信息推送数据验证解析
QueryBSendExpress(taskId string) (*QueryBSendExpressResponse, error) // 查询B端寄件信息
QueryPostage(params *QueryPostageParams) (*QueryPostageResponse, error) // 查询运费
}
type CustomParams ¶
type CustomParams map[string]interface{}
type Query ¶
type Query interface {
Query(params *QueryParams) (*QueryResponse, error) // 实时查询
QueryMapTrack(params *QueryParams) (*QueryMapResponse, error) // 实时查询地图轨迹
Subscribe(params *SubscribeParams) error // 订阅轨迹
VerifyCallbackPush(data, sign string) (*SubscribeCallbackPush, error) // 验证回调推送数据
SubscribeMapTrack(params *SubscribeParams) error // 订阅地图轨迹
VerifyCallbackMapPush(data, sign string) (*SubscribeCallbackMapPush, error) // 验证地图轨迹回调推送数据
}
type QueryBSendExpressResponse ¶
type QueryBSendExpressResponse struct {
TaskId string // 任务ID
CreatedAt time.Time // 下单时间
OrderId string // 订单号
CompCode string // 快递公司编码
ExpNo string // 快递单号
SenderName string // 寄件人姓名
SenderPhone string // 寄件人手机号
SenderProvince string // 寄件人省份
SenderCity string // 寄件人城市
SenderDistrict string // 寄件人区县
SenderAddress string // 寄件人详细地址
ReceiverName string // 收件人姓名
ReceiverPhone string // 收件人手机号
ReceiverProvince string // 收件人省份
ReceiverCity string // 收件人城市
ReceiverDistrict string // 收件人区县
ReceiverAddress string // 收件人详细地址
Valins string // 保价金额
ItemName string // 物品名称
ExpressType uint8 // 快递类型
Weight float64 // 物品重量
ActualWeight float64 // 实际重量
Remark string // 备注
ReservationData string // 预约日期
ReservationStartTime string // 预约起始时间
ReservationEndTime string // 预约截止时间
PayType uint8 // 付款方式
Freight float64 // 运费
PickupAgentName string // 取件员姓名
PickupAgentPhone string // 取件员电话
Status int // 状态
PayStatus uint8 // 支付状态
FeeDetails []*FeeDetail // 费用明细
}
type QueryMapResponse ¶
type QueryMapResponse struct {
State uint8 `json:"state"` // 快递单当前状态
IsSigned bool `json:"is_signed"` // 是否签收
CompCode string `json:"comp_code"` // 快递公司编码
ExpNo string `json:"exp_no"` // 快递单号
TrailUrl string `json:"trail_url"` // 轨迹地图链接
ArrivalTime time.Time `json:"arrival_time"` // 预计到达时间
TotalTime string `json:"total_time"` // 平均耗时
RemainTime string `json:"remain_time"` // 剩余时间
Data *QueryMapResponseData `json:"data"` // 轨迹数据
}
type QueryMapResponseData ¶
type QueryMapResponseData struct {
Describe string `json:"describe"` // 物流事件的描述
Time time.Time `json:"time"` // 物流事件发生的时间
Status string `json:"status"` // 物流事件的状态
Area string `json:"area"` // 物流事件发生的区域
StatusCode string `json:"status_code"` // 物流事件的状态码
Coordinate string `json:"coordinate"` // 物流事件的城市经纬度坐标
Location string `json:"location"` // 物流事件的城市
}
type QueryParams ¶
type QueryParams struct {
CompCode string // 快递公司编码
ExpNo string // 快递单号
Phone string // 快递对应收件/寄件人手机号
From string // 出发地城市
To string // 目的地城市
Sort string // 排序 desc asc
CustomParams CustomParams // 自定义参数
}
QueryParams 查询参数
type QueryPostageParams ¶
type QueryPostageParams struct {
CompCode string // 快递公司编码
SenderAddr string // 寄件人地址
ReceiverAddr string // 收件人地址
Weight float64 // 物品重量
ExpType uint8 // 快递类型
}
QueryPostageParams 查询运费参数
type QueryPostageResponse ¶
type QueryPostageResponse struct {
FirstWeight float64 // 首重价格
ContinuedWeight float64 // 续重价格
TotalPrice float64 // 总价格
ExpType uint8 // 快递类型
}
QueryPostageResponse 查询运费响应
type QueryResponse ¶
type QueryResponse struct {
State uint8 `json:"state"` // 快递单当前状态
IsSigned bool `json:"is_signed"` // 是否签收
CompCode string `json:"comp_code"` // 快递公司编码
ExpNo string `json:"exp_no"` // 快递单号
Tracks []*Track `json:"tracks"` // 轨迹数据
}
QueryResponse 查询响应
type SendExpressParams ¶
type SendExpressParams struct {
CompCode string // 快递公司编码
Recipient string // 收件人姓名
RecipientPhone string // 收件人手机号
RecipientAddr string // 收件人地址
SenderName string // 寄件人姓名
SenderPhone string // 寄件人手机号
SenderAddr string // 寄件人地址
ItemName string // 物品名称
PayType uint8 // 付款方式 1-寄付 2-到付 3-第三方付
ServiceType string // 服务类型 1-标准快递 2-同城快递 3-当日快递 4-次晨快递 5-即时快递 6-国际快递
Weight float64 // 物品重量
Remark string // 备注
DayType string // 预约时间
StartTime string // 预约开始时间
EndTime string // 预约结束时间
ValinsPay float64 // 保价金额
RealName string // 实名认证姓名
SenderIdCardType uint8 // 寄件人证件类型
SenderIdCard string // 寄件人证件号
PwdSigning string // 密码签收
TradeNo string // 平台交易号
}
SendExpressParams 寄件参数
type SendExpressResponse ¶
type SendExpressResponse struct {
TaskID string // 任务ID
OrderNo string // 订单号
ExpNo string // 快递单号
}
SendExpressResponse 寄件响应
type SubscribeCallbackMapPush ¶
type SubscribeCallbackMapPush struct {
// 监控状态
Status uint8 `json:"status"` // 物流事件的状态
Message string `json:"message"` // 物流事件的描述
ShouldResubscribe bool `json:"should_resubscribe"` // 是否需要重新订阅
// 快递信息
State uint8 `json:"state"` // 快递单当前状态
IsSigned bool `json:"is_signed"` // 是否检查
CompCode string `json:"comp_code"` // 快递公司编码
ExpNo string `json:"exp_no"` // 快递单号
TrailUrl string `json:"trail_url"` // 轨迹地图链接
ArrivalTime time.Time `json:"arrival_time"` // 预计到达时间
TotalTime string `json:"total_time"` // 平均耗时
RemainTime string `json:"remain_time"` // 剩余时间
Data *QueryMapResponseData `json:"data"` // 轨迹数据
}
type SubscribeCallbackPush ¶
type SubscribeCallbackPush struct {
// 监控状态
Status string `json:"status"` // 物流事件的状态
Message string `json:"message"` // 物流事件的描述
ShouldResubscribe bool `json:"should_resubscribe"` // 是否需要重新订阅
// 快递信息
State int8 `json:"state"` // 快递单当前状态
IsSigned bool `json:"is_signed"` // 是否检查
CompCode string `json:"comp_code"` // 快递公司编码
ExpNo string `json:"exp_no"` // 快递单号
Tracks []*Track `json:"tracks"` // 轨迹数据
}
SubscribeCallbackPush 订阅回调推送
type SubscribeParams ¶
type SubscribeParams struct {
CompCode int8 // 快递公司编码
ExpNo string // 快递单号
Phone string // 快递对应收件/寄件人手机号
From string // 出发地城市
CallbackUrl string // 回调地址
To string // 目的地城市
Sort string // 排序 desc asc
CustomParams CustomParams // 自定义参数
}
SubscribeParams 订阅参数
type Track ¶
type Track struct {
Description string `json:"description"` // 物流事件的描述
Time time.Time `json:"time"` // 物流事件发生的时间, 原始格式
Area string `json:"area"` // 物流事件发生的区域
Status uint8 `json:"status"` // 物流事件的状态
Location string `json:"location"` // 物流事件的城市
Coordinates string `json:"coordinates"` // 物流事件的城市经纬度坐标
}
Track 物流轨迹
Click to show internal directories.
Click to hide internal directories.