order

package
v3.0.0-...-b8a8e68 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	ConsignorContact string `json:"consignor_contact,omitempty"` //寄件人联系方式,寄件人联系方式,采用掩码传输,最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 ≤ value ≤ 1024
	ReceiverContact  string `json:"receiver_contact,omitempty"`  //收件人联系方式,收件人联系方式为,采用掩码传输,最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 ≤ value ≤ 1024
}

type GetOrderListPayTimeRange

type GetOrderListPayTimeRange struct {
	BeginTime int `json:"begin_time"` //起始时间,时间戳形式,不填则视为从0开始。
	EndTime   int `json:"end_time"`   //结束时间(含),时间戳形式,不填则视为32位无符号整型的最大值。
}

type GetOrderListRequest

type GetOrderListRequest struct {
	PayTimeRange *GetOrderListPayTimeRange `json:"pay_time_range,omitempty"` //支付时间所属范围。
	PageSize     int                       `json:"page_size,omitempty"`      //翻页时使用,返回列表的长度,默认为100。
	OrderState   int                       `json:"order_state,omitempty"`    //订单状态枚举:(1) 待发货;(2) 已发货;(3) 确认收货;(4) 交易完成;(5) 已退款。
	Openid       int                       `json:"openid,omitempty"`         //支付者openid。
	LastIndex    int                       `json:"last_index,omitempty"`     //翻页时使用,获取第一页时不用传入,如果查询结果中 has_more 字段为 true,则传入该次查询结果中返回的 last_index 字段可获取下一页。
}

type GetOrderListResponse

type GetOrderListResponse struct {
	request.CommonError
	LastIndex string         `json:"last_index"` //翻页时使用。
	HasMore   bool           `json:"has_more"`   //是否还有更多支付单。
	OrderList []*OrderStruct `json:"order_list"`
}

type GetOrderRequest

type GetOrderRequest struct {
	TransactionId   string `json:"transaction_id"`    //原支付交易对应的微信订单号。
	MerchantId      string `json:"merchant_id"`       //支付下单商户的商户号,由微信支付生成并下发。
	SubMerchantId   string `json:"sub_merchant_id"`   //二级商户号。
	MerchantTradeNo string `json:"merchant_trade_no"` //商户系统内部订单号,只能是数字、大小写字母`_-*`且在同一个商户号下唯一。
}

type GetOrderResponse

type GetOrderResponse struct {
	request.CommonError
	Order *OrderStruct `json:"order"`
}

type IsTradeManagedRequest

type IsTradeManagedRequest struct {
	Appid string `json:"appid"` //待查询小程序的 appid,非服务商调用时仅能查询本账号
}

type IsTradeManagedResponse

type IsTradeManagedResponse struct {
	request.CommonError
	IsTradeManaged bool `json:"is_trade_managed"`
}

type NotifyConfirmReceiveRequest

type NotifyConfirmReceiveRequest struct {
	TransactionId   string `json:"transaction_id,omitempty"`    //原支付交易对应的微信订单号
	MerchantId      string `json:"merchant_id,omitempty"`       //支付下单商户的商户号,由微信支付生成并下发
	SubMerchantId   string `json:"sub_merchant_id,omitempty"`   //二级商户号
	MerchantTradeNo string `json:"merchant_trade_no,omitempty"` //商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
	ReceivedTime    int    `json:"received_time"`               //快递签收时间,时间戳形式。

}

type Order

type Order struct {
	// contains filtered or unexported fields
}

func NewOrder

func NewOrder(request *request.Request, combineURI func(url string, req interface{}, withToken bool) (string, error)) *Order

func (*Order) GetOrder

func (cli *Order) GetOrder(req *GetOrderRequest) (*GetOrderResponse, error)

GetOrder 查询订单发货状态

func (*Order) GetOrderList

func (cli *Order) GetOrderList(req *GetOrderListRequest) (*GetOrderListResponse, error)

GetOrderList 查询订单列表

func (*Order) IsTradeManaged

func (cli *Order) IsTradeManaged(req *IsTradeManagedRequest) (*IsTradeManagedResponse, error)

IsTradeManaged 查询小程序是否已开通发货信息管理服务

func (*Order) NotifyConfirmReceive

func (cli *Order) NotifyConfirmReceive(req *IsTradeManagedRequest) (*request.CommonError, error)

NotifyConfirmReceive 确认收货提醒接口

func (*Order) SetMsgJumpPath

func (cli *Order) SetMsgJumpPath(req *SetMsgJumpPathRequest) (*request.CommonError, error)

SetMsgJumpPath 消息跳转路径设置接口

func (*Order) UploadShippingInfo

func (cli *Order) UploadShippingInfo(req *UploadShippingInfoRequest) (*request.CommonError, error)

UploadShippingInfo 发货信息录入接口

type OrderKey

type OrderKey struct {
	OrderNumberType int    `json:"order_number_type"`        //订单单号类型,用于确认需要上传详情的订单。枚举值1,使用下单商户号和商户侧单号;枚举值2,使用微信支付单号。
	TransactionId   string `json:"transaction_id,omitempty"` //原支付交易对应的微信订单号
	Mchid           string `json:"mchid,omitempty"`          //支付下单商户的商户号,由微信支付生成并下发。
	OutTradeNo      string `json:"out_trade_no,omitempty"`   //商户系统内部订单号,只能是数字、大小写字母`_-*`且在同一个商户号下唯一
}

type OrderStruct

type OrderStruct struct {
	TransactionId   string   `json:"transaction_id"`    //原支付交易对应的微信订单号。
	MerchantId      string   `json:"merchant_id"`       //支付下单商户的商户号,由微信支付生成并下发。
	SubMerchantId   string   `json:"sub_merchant_id"`   //二级商户号。
	MerchantTradeNo string   `json:"merchant_trade_no"` //商户系统内部订单号,只能是数字、大小写字母`_-*`且在同一个商户号下唯一。
	Description     string   `json:"description"`       //以分号连接的该支付单的所有商品描述,当超过120字时自动截断并以 “...” 结尾。
	PaidAmount      int      `json:"paid_amount"`       //支付单实际支付金额,整型,单位:分钱。
	Openid          string   `json:"openid"`            //支付者openid。
	TradeCreateTime int      `json:"trade_create_time"` //交易创建时间,时间戳形式。
	PayTime         int      `json:"pay_time"`          //支付时间,时间戳形式。
	InComplaint     bool     `json:"in_complaint"`      //是否处在交易纠纷中。
	OrderState      int      `json:"order_state"`       //订单状态枚举:(1) 待发货;(2) 已发货;(3) 确认收货;(4) 交易完成;(5) 已退款。
	Shipping        Shipping `json:"shipping"`          //发货信息。
}

type Payer

type Payer struct {
	Openid string `json:"openid"`
}

type SetMsgJumpPathRequest

type SetMsgJumpPathRequest struct {
	Path string `json:"path"` //商户自定义跳转路径。
}

type Shipping

type Shipping struct {
	DeliveryMode        int    `json:"delivery_mode"`         //发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货) 示例值: UNIFIED_DELIVERY
	LogisticsType       int    `json:"logistics_type"`        //物流模式,发货方式枚举值:1、实体物流配送采用快递公司进行实体物流配送形式 2、同城配送 3、虚拟商品,虚拟商品,例如话费充值,点卡等,无实体配送形式 4、用户自提
	FinishShipping      bool   `json:"finish_shipping"`       //是否已完成全部发货。
	FinishShippingCount int    `json:"finish_shipping_count"` //已完成全部发货的次数,未完成时为 0,完成时为 1,重新发货并完成后为 2。
	GoodsDesc           string `json:"goods_desc"`            //在小程序后台发货信息录入页录入的商品描述。
	ShippingList        []struct {
		TrackingNo     string `json:"tracking_no"`     //物流单号,示例值: "323244567777"。
		ExpressCompany string `json:"express_company"` //同城配送公司名或物流公司编码,快递公司ID,参见「查询物流公司编码列表」 示例值: "DHL"。
		GoodsDesc      string `json:"goods_desc"`      //使用上传物流信息 API 录入的该物流信息的商品描述。
		UploadTime     int    `json:"upload_time"`     //该物流信息的上传时间,时间戳形式。
		Contact        struct {
			ConsignorContact string `json:"consignor_contact"` //寄件人联系方式。
			ReceiverContact  string `json:"receiver_contact"`  //收件人联系方式。
		}
	} `json:"shipping_list"` //物流信息列表,发货物流单列表,支持统一发货(单个物流单)和分拆发货(多个物流单)两种模式。
}

type ShippingList

type ShippingList struct {
	TrackingNo     string   `json:"tracking_no,omitempty"`     //物流单号,物流快递发货时必填,示例值: 323244567777 字符字节限制: [1, 128]
	ExpressCompany string   `json:"express_company,omitempty"` //物流公司编码,快递公司ID,参见「查询物流公司编码列表」,物流快递发货时必填, 示例值: DHL 字符字节限制: [1, 128]
	ItemDesc       string   `json:"item_desc"`                 //商品信息,例如:微信红包抱枕*1个,限120个字以内
	Contact        *Contact `json:"contact,omitempty"`         //联系方式,当发货的物流公司为顺丰时,联系方式为必填,收件人或寄件人联系方式二选一
}

type UploadShippingInfoRequest

type UploadShippingInfoRequest struct {
	OrderKey       OrderKey       `json:"order_key"`                  //合单订单,需要上传物流详情的合单订单,根据订单类型二选一
	DeliveryMode   string         `json:"delivery_mode"`              //发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货) 示例值: UNIFIED_DELIVERY
	LogisticsType  int            `json:"logistics_type"`             //物流模式,发货方式枚举值:1、实体物流配送采用快递公司进行实体物流配送形式 2、同城配送 3、虚拟商品,虚拟商品,例如话费充值,点卡等,无实体配送形式 4、用户自提
	IsAllDelivered bool           `json:"is_all_delivered,omitempty"` //分拆发货模式时必填,用于标识分拆发货模式下是否已全部发货完成,只有全部发货完成的情况下才会向用户推送发货完成通知。示例值: true/false
	ShippingList   []ShippingList `json:"shipping_list"`              //物流信息列表,发货物流单列表,支持统一发货(单个物流单)和分拆发货(多个物流单)两种模式,多重性: [1, 10]
	UploadTime     string         `json:"upload_time"`                //上传时间,用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00` RFC 3339 格式
	Payer          Payer          `json:"payer"`                      //支付者,支付者信息
}

Jump to

Keyboard shortcuts

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