alscmerchant

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package alscmerchant 包含本地生活商户基础API相关结构体

https://open.taobao.com/API.htm?docType=2&docId=64157

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlibabaAlscDaodianTicketConsultAPIRequest added in v1.2.8

type AlibabaAlscDaodianTicketConsultAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlibabaAlscDaodianTicketConsultAPIRequest 券码预览 API请求 alibaba.alsc.daodian.ticket.consult

券码预览

func NewAlibabaAlscDaodianTicketConsultRequest added in v1.2.8

func NewAlibabaAlscDaodianTicketConsultRequest() *AlibabaAlscDaodianTicketConsultAPIRequest

NewAlibabaAlscDaodianTicketConsultRequest 初始化AlibabaAlscDaodianTicketConsultAPIRequest对象

func (AlibabaAlscDaodianTicketConsultAPIRequest) GetApiMethodName added in v1.2.8

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlibabaAlscDaodianTicketConsultAPIRequest) GetApiParams added in v1.2.8

func (r AlibabaAlscDaodianTicketConsultAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlibabaAlscDaodianTicketConsultAPIRequest) GetConsultRequest added in v1.2.8

GetConsultRequest ConsultRequest Getter

func (AlibabaAlscDaodianTicketConsultAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (*AlibabaAlscDaodianTicketConsultAPIRequest) SetConsultRequest added in v1.2.8

func (r *AlibabaAlscDaodianTicketConsultAPIRequest) SetConsultRequest(_consultRequest *TicketConsultTopRequest) error

SetConsultRequest is ConsultRequest Setter 券码咨询请求

type AlibabaAlscDaodianTicketConsultAPIResponse added in v1.2.8

type AlibabaAlscDaodianTicketConsultAPIResponse struct {
	model.CommonResponse
	AlibabaAlscDaodianTicketConsultAPIResponseModel
}

AlibabaAlscDaodianTicketConsultAPIResponse 券码预览 API返回值 alibaba.alsc.daodian.ticket.consult

券码预览

type AlibabaAlscDaodianTicketConsultAPIResponseModel added in v1.2.8

type AlibabaAlscDaodianTicketConsultAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_alsc_daodian_ticket_consult_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 返回结构体
	Result *AlibabaAlscDaodianTicketConsultResult `json:"result,omitempty" xml:"result,omitempty"`
}

AlibabaAlscDaodianTicketConsultAPIResponseModel is 券码预览 成功返回结果

type AlibabaAlscDaodianTicketConsultResult added in v1.2.8

type AlibabaAlscDaodianTicketConsultResult struct {
	// 错误码,success=false时有效
	ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
	// 错误文案,success=false时有效
	ErrorMsg string `json:"error_msg,omitempty" xml:"error_msg,omitempty"`
	// 结构体
	Value *TicketConsultResponse `json:"value,omitempty" xml:"value,omitempty"`
	// 处理结果是否成功,true为成功,false为失败
	Success bool `json:"success,omitempty" xml:"success,omitempty"`
}

AlibabaAlscDaodianTicketConsultResult 结构体

type AlibabaAlscDaodianTicketReserveAPIRequest added in v1.2.8

type AlibabaAlscDaodianTicketReserveAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlibabaAlscDaodianTicketReserveAPIRequest 外部券冲正 API请求 alibaba.alsc.daodian.ticket.reserve

外部券冲正

func NewAlibabaAlscDaodianTicketReserveRequest added in v1.2.8

func NewAlibabaAlscDaodianTicketReserveRequest() *AlibabaAlscDaodianTicketReserveAPIRequest

NewAlibabaAlscDaodianTicketReserveRequest 初始化AlibabaAlscDaodianTicketReserveAPIRequest对象

func (AlibabaAlscDaodianTicketReserveAPIRequest) GetApiMethodName added in v1.2.8

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlibabaAlscDaodianTicketReserveAPIRequest) GetApiParams added in v1.2.8

func (r AlibabaAlscDaodianTicketReserveAPIRequest) GetApiParams(params url.Values)

GetApiParams IRequest interface 方法, 获取API参数

func (AlibabaAlscDaodianTicketReserveAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (AlibabaAlscDaodianTicketReserveAPIRequest) GetTicketReverseTopRequest added in v1.2.8

GetTicketReverseTopRequest TicketReverseTopRequest Getter

func (*AlibabaAlscDaodianTicketReserveAPIRequest) SetTicketReverseTopRequest added in v1.2.8

func (r *AlibabaAlscDaodianTicketReserveAPIRequest) SetTicketReverseTopRequest(_ticketReverseTopRequest *TicketReverseTopRequest) error

SetTicketReverseTopRequest is TicketReverseTopRequest Setter 凭证冲正请求

type AlibabaAlscDaodianTicketReserveAPIResponse added in v1.2.8

type AlibabaAlscDaodianTicketReserveAPIResponse struct {
	model.CommonResponse
	AlibabaAlscDaodianTicketReserveAPIResponseModel
}

AlibabaAlscDaodianTicketReserveAPIResponse 外部券冲正 API返回值 alibaba.alsc.daodian.ticket.reserve

外部券冲正

type AlibabaAlscDaodianTicketReserveAPIResponseModel added in v1.2.8

type AlibabaAlscDaodianTicketReserveAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_alsc_daodian_ticket_reserve_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 返回结构体
	Result *AlibabaAlscDaodianTicketReserveResult `json:"result,omitempty" xml:"result,omitempty"`
}

AlibabaAlscDaodianTicketReserveAPIResponseModel is 外部券冲正 成功返回结果

type AlibabaAlscDaodianTicketReserveResult added in v1.2.8

type AlibabaAlscDaodianTicketReserveResult struct {
	// 错误码,success=false时有效
	ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
	// 错误文案,success=false时有效
	ErrorMsg string `json:"error_msg,omitempty" xml:"error_msg,omitempty"`
	// 处理结果是否成功,true为成功,false为失败
	Success bool `json:"success,omitempty" xml:"success,omitempty"`
	// 是否可重试,success=false时有效
	Retry bool `json:"retry,omitempty" xml:"retry,omitempty"`
}

AlibabaAlscDaodianTicketReserveResult 结构体

type AlibabaAlscMerchantExtTicketcodeSendAPIRequest added in v1.2.5

type AlibabaAlscMerchantExtTicketcodeSendAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlibabaAlscMerchantExtTicketcodeSendAPIRequest 异步发码 API请求 alibaba.alsc.merchant.ext.ticketcode.send

外部券异步发码

func NewAlibabaAlscMerchantExtTicketcodeSendRequest added in v1.2.5

func NewAlibabaAlscMerchantExtTicketcodeSendRequest() *AlibabaAlscMerchantExtTicketcodeSendAPIRequest

NewAlibabaAlscMerchantExtTicketcodeSendRequest 初始化AlibabaAlscMerchantExtTicketcodeSendAPIRequest对象

func (AlibabaAlscMerchantExtTicketcodeSendAPIRequest) GetApiMethodName added in v1.2.5

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlibabaAlscMerchantExtTicketcodeSendAPIRequest) GetApiParams added in v1.2.5

GetApiParams IRequest interface 方法, 获取API参数

func (AlibabaAlscMerchantExtTicketcodeSendAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (AlibabaAlscMerchantExtTicketcodeSendAPIRequest) GetSendRequest added in v1.2.5

GetSendRequest SendRequest Getter

func (*AlibabaAlscMerchantExtTicketcodeSendAPIRequest) SetSendRequest added in v1.2.5

SetSendRequest is SendRequest Setter 外部券异步发码

type AlibabaAlscMerchantExtTicketcodeSendAPIResponse added in v1.2.5

type AlibabaAlscMerchantExtTicketcodeSendAPIResponse struct {
	model.CommonResponse
	AlibabaAlscMerchantExtTicketcodeSendAPIResponseModel
}

AlibabaAlscMerchantExtTicketcodeSendAPIResponse 异步发码 API返回值 alibaba.alsc.merchant.ext.ticketcode.send

外部券异步发码

type AlibabaAlscMerchantExtTicketcodeSendAPIResponseModel added in v1.2.5

type AlibabaAlscMerchantExtTicketcodeSendAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_alsc_merchant_ext_ticketcode_send_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 请求id
	TicketRequestId string `json:"ticket_request_id,omitempty" xml:"ticket_request_id,omitempty"`
	// 该字段用于描述本次返回中的业务属性,现有:BIZ_ALREADY_SUCCESS(幂等业务码)。
	BizCode string `json:"biz_code,omitempty" xml:"biz_code,omitempty"`
}

AlibabaAlscMerchantExtTicketcodeSendAPIResponseModel is 异步发码 成功返回结果

type AlibabaAlscMerchantExtTicketcodeUseAPIRequest added in v1.2.0

type AlibabaAlscMerchantExtTicketcodeUseAPIRequest struct {
	model.Params
	// contains filtered or unexported fields
}

AlibabaAlscMerchantExtTicketcodeUseAPIRequest 外部核销服务 API请求 alibaba.alsc.merchant.ext.ticketcode.use

外部核销服务

func NewAlibabaAlscMerchantExtTicketcodeUseRequest

func NewAlibabaAlscMerchantExtTicketcodeUseRequest() *AlibabaAlscMerchantExtTicketcodeUseAPIRequest

NewAlibabaAlscMerchantExtTicketcodeUseRequest 初始化AlibabaAlscMerchantExtTicketcodeUseAPIRequest对象

func (AlibabaAlscMerchantExtTicketcodeUseAPIRequest) GetApiMethodName added in v1.2.0

GetApiMethodName IRequest interface 方法, 获取Api method

func (AlibabaAlscMerchantExtTicketcodeUseAPIRequest) GetApiParams added in v1.2.0

GetApiParams IRequest interface 方法, 获取API参数

func (AlibabaAlscMerchantExtTicketcodeUseAPIRequest) GetRawParams added in v1.2.8

GetRawParams IRequest interface 方法, 获取API原始参数

func (AlibabaAlscMerchantExtTicketcodeUseAPIRequest) GetUseRequest added in v1.2.0

GetUseRequest UseRequest Getter

func (*AlibabaAlscMerchantExtTicketcodeUseAPIRequest) SetUseRequest added in v1.2.0

SetUseRequest is UseRequest Setter 外部券使用请求

type AlibabaAlscMerchantExtTicketcodeUseAPIResponse

type AlibabaAlscMerchantExtTicketcodeUseAPIResponse struct {
	model.CommonResponse
	AlibabaAlscMerchantExtTicketcodeUseAPIResponseModel
}

AlibabaAlscMerchantExtTicketcodeUseAPIResponse 外部核销服务 API返回值 alibaba.alsc.merchant.ext.ticketcode.use

外部核销服务

type AlibabaAlscMerchantExtTicketcodeUseAPIResponseModel added in v1.2.0

type AlibabaAlscMerchantExtTicketcodeUseAPIResponseModel struct {
	XMLName xml.Name `xml:"alibaba_alsc_merchant_ext_ticketcode_use_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 一次性核销多份场景,被核销的凭证明细信息
	TicketUseDetails []MerchantTicketUseDetail `json:"ticket_use_details,omitempty" xml:"ticket_use_details>merchant_ticket_use_detail,omitempty"`
	// 口碑子订单号, 即alsc_sub_order_no /***** 20220922后对接的服务商,不支持该字段 ******
	OrderNo string `json:"order_no,omitempty" xml:"order_no,omitempty"`
	// 用户购买时商品的原价,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	OriginalPrice string `json:"original_price,omitempty" xml:"original_price,omitempty"`
	// 该字段用于描述本次返回中的业务属性,现有:TICKET_ALREADY_USED(幂等业务码)
	BizCode string `json:"biz_code,omitempty" xml:"biz_code,omitempty"`
	// 用户购买时商品的现价,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	CurrentPrice string `json:"current_price,omitempty" xml:"current_price,omitempty"`
	// 商家优惠金额,单位为元,精确到小数点后两位,一次性核销多份券场景,返回总商家优惠金额 /***** 20220922后对接的服务商,不支持该字段 ******
	DiscountAmount string `json:"discount_amount,omitempty" xml:"discount_amount,omitempty"`
	// 交易中可给用户开具发票的金额,单位为元,精确到小数点后两位,一次性核销多份券场景,返回总开票金额 /***** 20220922后对接的服务商,不支持该字段 ******
	InvoiceAmount string `json:"invoice_amount,omitempty" xml:"invoice_amount,omitempty"`
	// 券核销门店ID /***** 20220922后对接的服务商,不支持该字段 ******
	UseShopId string `json:"use_shop_id,omitempty" xml:"use_shop_id,omitempty"`
	// 凭证对应商品别名,在口碑商品创建时候设置 /***** 20220922后对接的服务商,不支持该字段 ******
	ItemAlias string `json:"item_alias,omitempty" xml:"item_alias,omitempty"`
	// 券核销门店名称 /***** 20220922后对接的服务商,不支持该字段 ******
	UseShopName string `json:"use_shop_name,omitempty" xml:"use_shop_name,omitempty"`
	// 口碑商品ID /***** 20220922后对接的服务商,不支持该字段 ******
	ItemId string `json:"item_id,omitempty" xml:"item_id,omitempty"`
	// 商家实收金额,单位为元,精确到小数点后两位,一次性核销多份券场景,返回总商家实收金额 /***** 20220922后对接的服务商,不支持该字段 ******
	ReceiptAmount string `json:"receipt_amount,omitempty" xml:"receipt_amount,omitempty"`
	// 用户购买时商品的名称 /***** 20220922后对接的服务商,不支持该字段 ******
	ItemName string `json:"item_name,omitempty" xml:"item_name,omitempty"`
	// 核销流水号 /***** 20220922后对接的服务商,不支持该字段 ******
	TicketTransId string `json:"ticket_trans_id,omitempty" xml:"ticket_trans_id,omitempty"`
	// 券核销时间
	UseDate string `json:"use_date,omitempty" xml:"use_date,omitempty"`
	// 凭证码对应的凭证资产id /***** 20220922后对接的服务商,不支持该字段 ******
	VoucherId string `json:"voucher_id,omitempty" xml:"voucher_id,omitempty"`
	// 外部请求号,支持英文字母和数字,由开发者自行定义(不允许重复)
	TicketRequestId string `json:"ticket_request_id,omitempty" xml:"ticket_request_id,omitempty"`
	// 用户购买券的时候实际支付的金额,单位为元,精确到小数点后两位,一次性核销多份券场景,返回总实际支付金额 /***** 20220922后对接的服务商,不支持该字段 ******
	BuyerPayAmount string `json:"buyer_pay_amount,omitempty" xml:"buyer_pay_amount,omitempty"`
	// 口碑补贴金额,单位为元,精确到小数点后两位,一次性核销多份券场景,返回总口碑补贴金额 /***** 20220922后对接的服务商,不支持该字段 ******
	MerchantSubsidyAmount string `json:"merchant_subsidy_amount,omitempty" xml:"merchant_subsidy_amount,omitempty"`
	// 12位的券码,券码为纯数字,且唯一不重复 /***** 20220922后对接的服务商,不支持该字段 ******
	TicketCode string `json:"ticket_code,omitempty" xml:"ticket_code,omitempty"`
}

AlibabaAlscMerchantExtTicketcodeUseAPIResponseModel is 外部核销服务 成功返回结果

type ExternalTicketCode added in v1.2.5

type ExternalTicketCode struct {
	// 码的可核销份数
	Num string `json:"num,omitempty" xml:"num,omitempty"`
	// 凭证码值,必填。核销二维码生成规则:优先用url生成,url为空,再用code生成。
	Code string `json:"code,omitempty" xml:"code,omitempty"`
	// 本地生活凭证id(奇门发码通知中的ticketId),必填
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
	// 支持核销的三方url。核销二维码生成规则:优先用url生成,url为空,再用code生成。
	Url string `json:"url,omitempty" xml:"url,omitempty"`
}

ExternalTicketCode 结构体

type ExternalTicketSendRequest added in v1.2.5

type ExternalTicketSendRequest struct {
	// 需要发送的码列表,其中code表示串码码值,num表示码的可核销份数
	ExternalTicketCodes []ExternalTicketCode `json:"external_ticket_codes,omitempty" xml:"external_ticket_codes>external_ticket_code,omitempty"`
	// 口碑子订单号, 即alsc_sub_order_no
	OrderNo string `json:"order_no,omitempty" xml:"order_no,omitempty"`
	// 请求id,唯一标识一次请求
	TicketRequestId string `json:"ticket_request_id,omitempty" xml:"ticket_request_id,omitempty"`
	// 券生效时间,默认为口碑商品配置生效时间
	ValidStart string `json:"valid_start,omitempty" xml:"valid_start,omitempty"`
	// 券过期时间,默认为口碑商品配置失效时间
	ValidEnd string `json:"valid_end,omitempty" xml:"valid_end,omitempty"`
	// 口碑发码通知透传码商,码商需要跟发码通知获取到的参数一致
	SendToken string `json:"send_token,omitempty" xml:"send_token,omitempty"`
	// 口碑商品发货单号
	SendOrderNo string `json:"send_order_no,omitempty" xml:"send_order_no,omitempty"`
	// 三方异步发码是否成功,值为success 代表发码成功,external_ticket_codes 不能为空,fail代表三方发码失败,本地侧凭证发放状态推进到发码失败
	DeliverCodeSuccess string `json:"deliver_code_success,omitempty" xml:"deliver_code_success,omitempty"`
}

ExternalTicketSendRequest 结构体

type ExternalTicketUseRequest

type ExternalTicketUseRequest struct {
	// 需要发送的码列表,其中code表示串码码值,num表示码的可核销份数
	TicketInfos []TicketInfo `json:"ticket_infos,omitempty" xml:"ticket_infos>ticket_info,omitempty"`
	// 特殊可选 核销份数,次卡业务必填、非次卡业务选填, 非次卡场景表示核销同一订单下的同类凭证的个数
	Quantity string `json:"quantity,omitempty" xml:"quantity,omitempty"`
	// 外部请求号,支持英文字母和数字,由开发者自行定义(不允许重复)
	TicketRequestId string `json:"ticket_request_id,omitempty" xml:"ticket_request_id,omitempty"`
	// 核销的口碑门店id(门店同步API中的alsc_store_id),目前是必填。只有加白的合作方法可以不填写
	ShopId string `json:"shop_id,omitempty" xml:"shop_id,omitempty"`
	// 门店id类型,INTERNAL_SHOP(内部店铺id),EXTERNAL_SHOP(外部店铺id),默认INTERNAL_SHOP
	ShopType string `json:"shop_type,omitempty" xml:"shop_type,omitempty"`
	// 凭证码,包括内部凭证码和外部凭证码,内部凭证码为12位,纯数字,且唯一不重复
	TicketCode string `json:"ticket_code,omitempty" xml:"ticket_code,omitempty"`
	// 业务发生时间,默认为接口调用时间
	GmtBiz string `json:"gmt_biz,omitempty" xml:"gmt_biz,omitempty"`
	// 本地侧凭证id,如果是三方码值核销传参ticketId,则该参数必须
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
}

ExternalTicketUseRequest 结构体

type MerchantTicketUseDetail

type MerchantTicketUseDetail struct {
	// 券核销流水号
	TicketTransId string `json:"ticket_trans_id,omitempty" xml:"ticket_trans_id,omitempty"`
	// 核销的券码
	TicketCode string `json:"ticket_code,omitempty" xml:"ticket_code,omitempty"`
	// 用户购买券的时候实际支付的金额,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	BuyerPayAmount string `json:"buyer_pay_amount,omitempty" xml:"buyer_pay_amount,omitempty"`
	// 商家实收金额,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	ReceiptAmount string `json:"receipt_amount,omitempty" xml:"receipt_amount,omitempty"`
	// 商家优惠金额,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	DiscountAmount string `json:"discount_amount,omitempty" xml:"discount_amount,omitempty"`
	// 口碑补贴金额,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	MerchantSubsidyAmount string `json:"merchant_subsidy_amount,omitempty" xml:"merchant_subsidy_amount,omitempty"`
	// 交易中可给用户开具发票的金额,单位为元,精确到小数点后两位 /***** 20220922后对接的服务商,不支持该字段 ******
	InvoiceAmount string `json:"invoice_amount,omitempty" xml:"invoice_amount,omitempty"`
	// 对应的凭证id
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
}

MerchantTicketUseDetail 结构体

type TicketConsultResponse added in v1.2.8

type TicketConsultResponse struct {
	// 券码所属订单下,可使用的凭证(同商品)列表
	TicketInfoList []TicketInfo `json:"ticket_info_list,omitempty" xml:"ticket_info_list>ticket_info,omitempty"`
	// 脱敏手机号,例:*******4139。如果商品类目未开放电话组件,不返回数据
	UserPhone string `json:"user_phone,omitempty" xml:"user_phone,omitempty"`
	// 混淆后的用户uid。查询订单接口用
	BuyerId string `json:"buyer_id,omitempty" xml:"buyer_id,omitempty"`
	// 本地订单-主单号。长度:19位
	AlscOrderNo string `json:"alsc_order_no,omitempty" xml:"alsc_order_no,omitempty"`
	// 本地订单-子单号。长度:19位
	AlscSubOrderNo string `json:"alsc_sub_order_no,omitempty" xml:"alsc_sub_order_no,omitempty"`
	// 口碑商品id
	ItemId string `json:"item_id,omitempty" xml:"item_id,omitempty"`
	// 外部商品id
	OutItemId string `json:"out_item_id,omitempty" xml:"out_item_id,omitempty"`
	// 剩余可核销数量。团购举例:购买2份团购券,已核销了1份,该属性返回1;次卡举例:购买了3次卡,已核销1次,该属性返回2
	AvailableQuantity int64 `json:"available_quantity,omitempty" xml:"available_quantity,omitempty"`
}

TicketConsultResponse 结构体

type TicketConsultTopRequest added in v1.2.8

type TicketConsultTopRequest struct {
	// 请求id
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 本地门店id,长度32位
	ShopId string `json:"shop_id,omitempty" xml:"shop_id,omitempty"`
	// 券码code
	TicketCode string `json:"ticket_code,omitempty" xml:"ticket_code,omitempty"`
}

TicketConsultTopRequest 结构体

type TicketInfo added in v1.2.8

type TicketInfo struct {
	// 凭证ID。核销接口入参
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
	// 下单时的商品名称
	TicketName string `json:"ticket_name,omitempty" xml:"ticket_name,omitempty"`
	// 凭证券码。仅入参券码对应的凭证会返回该值,其余凭证此属性无返回值
	TicketCode string `json:"ticket_code,omitempty" xml:"ticket_code,omitempty"`
	// 凭证金额,单位分。如果是团购,为单份凭证的金额(对应商品售价,不是商品原价,不能作为代金券抵扣金额);如果是N次次卡,则为N次卡的总金额,N 对应quantity值
	TotalAmount int64 `json:"total_amount,omitempty" xml:"total_amount,omitempty"`
	// 商户实收金额(抽佣前),单位分。团购和次卡场景,解释同total_amount。公式:凭证金额-实收金额=商户优惠金额
	RealAmount int64 `json:"real_amount,omitempty" xml:"real_amount,omitempty"`
	// 团购场景,固定为1,购买多份与此值无关;次卡场景,例如3次卡,该属性返回3
	Quantity int64 `json:"quantity,omitempty" xml:"quantity,omitempty"`
	// 购买时商品的原价(次卡是多次的总原价),单位分
	OriginalPrice int64 `json:"original_price,omitempty" xml:"original_price,omitempty"`
}

TicketInfo 结构体

type TicketReverseTopRequest added in v1.2.8

type TicketReverseTopRequest struct {
	// 凭证核销流水id
	TicketUseTransId string `json:"ticket_use_trans_id,omitempty" xml:"ticket_use_trans_id,omitempty"`
	// 业务发生时间,为空取调用时间
	BizDate string `json:"biz_date,omitempty" xml:"biz_date,omitempty"`
	// 请求id
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// 口碑凭证id
	TicketId string `json:"ticket_id,omitempty" xml:"ticket_id,omitempty"`
}

TicketReverseTopRequest 结构体

Jump to

Keyboard shortcuts

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