@@ -258,5 +258,121 @@ public static class WechatTenpayClientExecuteFundAppExtensions
258258 }
259259 #endregion
260260 #endregion
261+
262+ #region BrandRedPacket
263+ /// <summary>
264+ /// <para>异步调用 [POST] /fund-app/brand-redpacket/brand-merchant-batches 接口。</para>
265+ /// <para>
266+ /// REF: <br/>
267+ /// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014310358 ]]>
268+ /// </para>
269+ /// </summary>
270+ /// <param name="client"></param>
271+ /// <param name="request"></param>
272+ /// <param name="cancellationToken"></param>
273+ /// <returns></returns>
274+ public static async Task < Models . CreateFundAppBrandRedPacketBrandMerchantBatchResponse > ExecuteCreateFundAppBrandRedPacketBrandMerchantBatchAsync ( this WechatTenpayClient client , Models . CreateFundAppBrandRedPacketBrandMerchantBatchRequest request , CancellationToken cancellationToken = default )
275+ {
276+ if ( client is null ) throw new ArgumentNullException ( nameof ( client ) ) ;
277+ if ( request is null ) throw new ArgumentNullException ( nameof ( request ) ) ;
278+
279+ IFlurlRequest flurlReq = client
280+ . CreateFlurlRequest ( request , HttpMethod . Post , "fund-app" , "brand-redpacket" , "brand-merchant-batches" ) ;
281+
282+ return await client . SendFlurlRequestAsJsonAsync < Models . CreateFundAppBrandRedPacketBrandMerchantBatchResponse > ( flurlReq , data : request , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
283+ }
284+
285+ /// <summary>
286+ /// <para>异步调用 [GET] /fund-app/brand-redpacket/brand-merchant-out-batches/{out_batch_no} 接口。</para>
287+ /// <para>
288+ /// REF: <br/>
289+ /// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014310378 ]]>
290+ /// </para>
291+ /// </summary>
292+ /// <param name="client"></param>
293+ /// <param name="request"></param>
294+ /// <param name="cancellationToken"></param>
295+ /// <returns></returns>
296+ public static async Task < Models . GetFundAppBrandRedPacketBrandMerchantBatchByOutBatchNumberResponse > ExecuteGetFundAppBrandRedPacketBrandMerchantBatchByOutBatchNumberAsync ( this WechatTenpayClient client , Models . GetFundAppBrandRedPacketBrandMerchantBatchByOutBatchNumberRequest request , CancellationToken cancellationToken = default )
297+ {
298+ if ( client is null ) throw new ArgumentNullException ( nameof ( client ) ) ;
299+ if ( request is null ) throw new ArgumentNullException ( nameof ( request ) ) ;
300+
301+ IFlurlRequest flurlReq = client
302+ . CreateFlurlRequest ( request , HttpMethod . Get , "fund-app" , "brand-redpacket" , "brand-merchant-out-batches" , request . OutBatchNumber )
303+ . SetQueryParam ( "need_query_detail" , request . RequireQueryDetail )
304+ . SetQueryParam ( "detail_state" , request . DetailState ) ;
305+
306+ return await client . SendFlurlRequestAsJsonAsync < Models . GetFundAppBrandRedPacketBrandMerchantBatchByOutBatchNumberResponse > ( flurlReq , data : request , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
307+ }
308+
309+ /// <summary>
310+ /// <para>异步调用 [GET] /fund-app/brand-redpacket/brand-merchant-batches/{batch_no} 接口。</para>
311+ /// <para>
312+ /// REF: <br/>
313+ /// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014310369 ]]>
314+ /// </para>
315+ /// </summary>
316+ /// <param name="client"></param>
317+ /// <param name="request"></param>
318+ /// <param name="cancellationToken"></param>
319+ /// <returns></returns>
320+ public static async Task < Models . GetFundAppBrandRedPacketBrandMerchantBatchByBatchNumberResponse > ExecuteGetFundAppBrandRedPacketBrandMerchantBatchByBatchNumberAsync ( this WechatTenpayClient client , Models . GetFundAppBrandRedPacketBrandMerchantBatchByBatchNumberRequest request , CancellationToken cancellationToken = default )
321+ {
322+ if ( client is null ) throw new ArgumentNullException ( nameof ( client ) ) ;
323+ if ( request is null ) throw new ArgumentNullException ( nameof ( request ) ) ;
324+
325+ IFlurlRequest flurlReq = client
326+ . CreateFlurlRequest ( request , HttpMethod . Get , "fund-app" , "brand-redpacket" , "brand-merchant-batches" , request . BatchNumber )
327+ . SetQueryParam ( "need_query_detail" , request . RequireQueryDetail )
328+ . SetQueryParam ( "detail_state" , request . DetailState ) ;
329+
330+ return await client . SendFlurlRequestAsJsonAsync < Models . GetFundAppBrandRedPacketBrandMerchantBatchByBatchNumberResponse > ( flurlReq , data : request , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
331+ }
332+
333+ /// <summary>
334+ /// <para>异步调用 [GET] /fund-app/brand-redpacket/brand-merchant-out-batches/{out_batch_no}/out-details/{out_detail_no} 接口。</para>
335+ /// <para>
336+ /// REF: <br/>
337+ /// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014310391 ]]>
338+ /// </para>
339+ /// </summary>
340+ /// <param name="client"></param>
341+ /// <param name="request"></param>
342+ /// <param name="cancellationToken"></param>
343+ /// <returns></returns>
344+ public static async Task < Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByOutDetailNumberResponse > ExecuteGetFundAppBrandRedPacketBrandMerchantBatchDetailByOutDetailNumberAsync ( this WechatTenpayClient client , Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByOutDetailNumberRequest request , CancellationToken cancellationToken = default )
345+ {
346+ if ( client is null ) throw new ArgumentNullException ( nameof ( client ) ) ;
347+ if ( request is null ) throw new ArgumentNullException ( nameof ( request ) ) ;
348+
349+ IFlurlRequest flurlReq = client
350+ . CreateFlurlRequest ( request , HttpMethod . Get , "fund-app" , "brand-redpacket" , "brand-merchant-out-batches" , request . OutBatchNumber , "out-details" , request . OutDetailNumber ) ;
351+
352+ return await client . SendFlurlRequestAsJsonAsync < Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByOutDetailNumberResponse > ( flurlReq , data : request , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
353+ }
354+
355+ /// <summary>
356+ /// <para>异步调用 [GET] /fund-app/brand-redpacket/brand-merchant-batches/{batch_no}/details/{detail_no} 接口。</para>
357+ /// <para>
358+ /// REF: <br/>
359+ /// <![CDATA[ https://pay.weixin.qq.com/doc/v3/merchant/4014310384 ]]>
360+ /// </para>
361+ /// </summary>
362+ /// <param name="client"></param>
363+ /// <param name="request"></param>
364+ /// <param name="cancellationToken"></param>
365+ /// <returns></returns>
366+ public static async Task < Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByDetailNumberResponse > ExecuteGetFundAppBrandRedPacketBrandMerchantBatchDetailByDetailNumberAsync ( this WechatTenpayClient client , Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByDetailNumberRequest request , CancellationToken cancellationToken = default )
367+ {
368+ if ( client is null ) throw new ArgumentNullException ( nameof ( client ) ) ;
369+ if ( request is null ) throw new ArgumentNullException ( nameof ( request ) ) ;
370+
371+ IFlurlRequest flurlReq = client
372+ . CreateFlurlRequest ( request , HttpMethod . Get , "fund-app" , "brand-redpacket" , "brand-merchant-batches" , request . BatchNumber , "out-details" , request . DetailNumber ) ;
373+
374+ return await client . SendFlurlRequestAsJsonAsync < Models . GetFundAppBrandRedPacketBrandMerchantBatchDetailByDetailNumberResponse > ( flurlReq , data : request , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
375+ }
376+ #endregion
261377 }
262378}
0 commit comments