From f4806f8531d619b97358d5279b50e7becda5b442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=86=E8=BF=B9=E5=A5=87=E6=9C=89=E6=B2=A1?= <54488712+whrss9527@users.noreply.github.com> Date: Mon, 13 May 2024 10:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E2=80=9C=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E8=BD=AC=E8=B4=A6=E5=88=B0=E9=9B=B6=E9=92=B1=E2=80=9D=20Notify?= =?UTF-8?q?Url=20=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 增加“商家转账到零钱” NotifyUrl 请求参数 * 完善 test 参数 --- .../api_transfer_batch_example_test.go | 1 + services/transferbatch/models.go | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/services/transferbatch/api_transfer_batch_example_test.go b/services/transferbatch/api_transfer_batch_example_test.go index 27a5cf0..212213b 100644 --- a/services/transferbatch/api_transfer_batch_example_test.go +++ b/services/transferbatch/api_transfer_batch_example_test.go @@ -152,6 +152,7 @@ func ExampleTransferBatchApiService_InitiateBatchTransfer() { UserName: core.String("757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45"), }}, TransferSceneId: core.String("1000"), + NotifyUrl: core.String("https://www.weixin.qq.com/wxpay/pay.php"), }, ) diff --git a/services/transferbatch/models.go b/services/transferbatch/models.go index 415353c..30a9e67 100644 --- a/services/transferbatch/models.go +++ b/services/transferbatch/models.go @@ -410,6 +410,8 @@ type InitiateBatchTransferRequest struct { TransferDetailList []TransferDetailInput `json:"transfer_detail_list"` // 该批次转账使用的转账场景,如不填写则使用商家的默认场景,如无默认场景可为空,可前往“商家转账到零钱-前往功能”中申请。 如:1001-现金营销 TransferSceneId *string `json:"transfer_scene_id,omitempty"` + // 商户接收批次结果通知的URL,必须支持https,且只能是直接可访问的URL,不允许携带查询参数 + NotifyUrl *string `json:"notify_url,omitempty"` } func (o InitiateBatchTransferRequest) MarshalJSON() ([]byte, error) { @@ -453,6 +455,9 @@ func (o InitiateBatchTransferRequest) MarshalJSON() ([]byte, error) { if o.TransferSceneId != nil { toSerialize["transfer_scene_id"] = o.TransferSceneId } + if o.NotifyUrl != nil { + toSerialize["notify_url"] = o.NotifyUrl + } return json.Marshal(toSerialize) } @@ -502,6 +507,12 @@ func (o InitiateBatchTransferRequest) String() string { ret += fmt.Sprintf("TransferSceneId:%v", *o.TransferSceneId) } + if o.NotifyUrl == nil { + ret += "NotifyUrl:" + } else { + ret += fmt.Sprintf("NotifyUrl:%v", *o.NotifyUrl) + } + return fmt.Sprintf("InitiateBatchTransferRequest{%s}", ret) } @@ -550,6 +561,10 @@ func (o InitiateBatchTransferRequest) Clone() *InitiateBatchTransferRequest { *ret.TransferSceneId = *o.TransferSceneId } + if o.NotifyUrl != nil { + ret.NotifyUrl = new(string) + *ret.NotifyUrl = *o.NotifyUrl + } return &ret }