|
@@ -169,7 +169,7 @@ type Detail struct {
|
|
|
// 1.商户侧一张小票订单可能被分多次支付,订单原价用于记录整张小票的交易金额。 2.当订单原价与支付金额不相等,则不享受优惠。 3.该字段主要用于防止同一张小票分多次支付,以享受多次优惠的情况,正常支付订单不必上传此参数。
|
|
|
CostPrice *int64 `json:"cost_price,omitempty"`
|
|
|
// 商家小票ID。
|
|
|
- InvoiceId *string `json:"invoice_id,omitempty"`
|
|
|
+ ReceiptId *string `json:"receipt_id,omitempty"`
|
|
|
GoodsDetail []GoodsDetail `json:"goods_detail,omitempty"`
|
|
|
}
|
|
|
|
|
@@ -180,8 +180,8 @@ func (o Detail) MarshalJSON() ([]byte, error) {
|
|
|
toSerialize["cost_price"] = o.CostPrice
|
|
|
}
|
|
|
|
|
|
- if o.InvoiceId != nil {
|
|
|
- toSerialize["invoice_id"] = o.InvoiceId
|
|
|
+ if o.ReceiptId != nil {
|
|
|
+ toSerialize["invoice_id"] = o.ReceiptId
|
|
|
}
|
|
|
|
|
|
if o.GoodsDetail != nil {
|
|
@@ -198,10 +198,10 @@ func (o Detail) String() string {
|
|
|
ret += fmt.Sprintf("CostPrice:%v, ", *o.CostPrice)
|
|
|
}
|
|
|
|
|
|
- if o.InvoiceId == nil {
|
|
|
+ if o.ReceiptId == nil {
|
|
|
ret += "InvoiceId:<nil>, "
|
|
|
} else {
|
|
|
- ret += fmt.Sprintf("InvoiceId:%v, ", *o.InvoiceId)
|
|
|
+ ret += fmt.Sprintf("InvoiceId:%v, ", *o.ReceiptId)
|
|
|
}
|
|
|
|
|
|
ret += fmt.Sprintf("GoodsDetail:%v", o.GoodsDetail)
|
|
@@ -217,9 +217,9 @@ func (o Detail) Clone() *Detail {
|
|
|
*ret.CostPrice = *o.CostPrice
|
|
|
}
|
|
|
|
|
|
- if o.InvoiceId != nil {
|
|
|
- ret.InvoiceId = new(string)
|
|
|
- *ret.InvoiceId = *o.InvoiceId
|
|
|
+ if o.ReceiptId != nil {
|
|
|
+ ret.ReceiptId = new(string)
|
|
|
+ *ret.ReceiptId = *o.ReceiptId
|
|
|
}
|
|
|
|
|
|
if o.GoodsDetail != nil {
|
|
@@ -235,7 +235,7 @@ func (o Detail) Clone() *Detail {
|
|
|
// GoodsDetail
|
|
|
type GoodsDetail struct {
|
|
|
// 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。
|
|
|
- MerchantGoodsId *string `json:"merchant_goods_id"`
|
|
|
+ GoodsId *string `json:"goods_id"`
|
|
|
// 微信支付定义的统一商品编号(没有可不传)。
|
|
|
WechatpayGoodsId *string `json:"wechatpay_goods_id,omitempty"`
|
|
|
// 商品的实际名称。
|
|
@@ -249,10 +249,10 @@ type GoodsDetail struct {
|
|
|
func (o GoodsDetail) MarshalJSON() ([]byte, error) {
|
|
|
toSerialize := map[string]interface{}{}
|
|
|
|
|
|
- if o.MerchantGoodsId == nil {
|
|
|
+ if o.GoodsId == nil {
|
|
|
return nil, fmt.Errorf("field `MerchantGoodsId` is required and must be specified in GoodsDetail")
|
|
|
}
|
|
|
- toSerialize["merchant_goods_id"] = o.MerchantGoodsId
|
|
|
+ toSerialize["merchant_goods_id"] = o.GoodsId
|
|
|
|
|
|
if o.WechatpayGoodsId != nil {
|
|
|
toSerialize["wechatpay_goods_id"] = o.WechatpayGoodsId
|
|
@@ -276,10 +276,10 @@ func (o GoodsDetail) MarshalJSON() ([]byte, error) {
|
|
|
|
|
|
func (o GoodsDetail) String() string {
|
|
|
var ret string
|
|
|
- if o.MerchantGoodsId == nil {
|
|
|
+ if o.GoodsId == nil {
|
|
|
ret += "MerchantGoodsId:<nil>, "
|
|
|
} else {
|
|
|
- ret += fmt.Sprintf("MerchantGoodsId:%v, ", *o.MerchantGoodsId)
|
|
|
+ ret += fmt.Sprintf("MerchantGoodsId:%v, ", *o.GoodsId)
|
|
|
}
|
|
|
|
|
|
if o.WechatpayGoodsId == nil {
|
|
@@ -312,9 +312,9 @@ func (o GoodsDetail) String() string {
|
|
|
func (o GoodsDetail) Clone() *GoodsDetail {
|
|
|
ret := GoodsDetail{}
|
|
|
|
|
|
- if o.MerchantGoodsId != nil {
|
|
|
- ret.MerchantGoodsId = new(string)
|
|
|
- *ret.MerchantGoodsId = *o.MerchantGoodsId
|
|
|
+ if o.GoodsId != nil {
|
|
|
+ ret.GoodsId = new(string)
|
|
|
+ *ret.GoodsId = *o.GoodsId
|
|
|
}
|
|
|
|
|
|
if o.WechatpayGoodsId != nil {
|
|
@@ -837,6 +837,8 @@ type SceneInfo struct {
|
|
|
PayerClientIp *string `json:"payer_client_ip"`
|
|
|
// 商户端设备号
|
|
|
DeviceId *string `json:"device_id,omitempty"`
|
|
|
+ DeviceIp *string `json:"device_ip,omitempty"`
|
|
|
+
|
|
|
StoreInfo *StoreInfo `json:"store_info,omitempty"`
|
|
|
}
|
|
|
|
|
@@ -1000,7 +1002,7 @@ func (o StoreInfo) Clone() *StoreInfo {
|
|
|
*ret.Name = *o.Name
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
if o.Address != nil {
|
|
|
ret.Address = new(string)
|