mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 02:29:40 +08:00
feat(wxapi): 新增交易组件资金管理相关接口
This commit is contained in:
@@ -1379,5 +1379,127 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductCouponGetUserResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Funds
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/getbalance 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/get_balance.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsGetBalanceResponse> ExecuteProductFundsGetBalanceAsync(this WechatApiClient client, Models.ProductFundsGetBalanceRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "getbalance")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsGetBalanceResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/scanorderflow 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/scan_order_flow.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsScanOrderFlowResponse> ExecuteProductFundsScanOrderFlowAsync(this WechatApiClient client, Models.ProductFundsScanOrderFlowRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "scanorderflow")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsScanOrderFlowResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/getorderflow 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/get_order_flow.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsGetOrderFlowResponse> ExecuteProductFundsGetOrderFlowAsync(this WechatApiClient client, Models.ProductFundsGetOrderFlowRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "getorderflow")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsGetOrderFlowResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/scanwithdraw 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/scan_withdraw.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsScanWithdrawResponse> ExecuteProductFundsScanWithdrawAsync(this WechatApiClient client, Models.ProductFundsScanWithdrawRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "scanwithdraw")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsScanWithdrawResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/getwithdrawdetail 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/get_withdraw_detail.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsGetWithdrawDetailResponse> ExecuteProductFundsGetWithdrawDetailAsync(this WechatApiClient client, Models.ProductFundsGetWithdrawDetailRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "getwithdrawdetail")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsGetWithdrawDetailResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /product/funds/setbankaccount 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent/API/funds/set_bank_account.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ProductFundsSetBankAccountResponse> ExecuteProductFundsSetBankAccountAsync(this WechatApiClient client, Models.ProductFundsSetBankAccountRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "product", "funds", "setbankaccount")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ProductFundsSetBankAccountResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getbalance 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetBalanceRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getbalance 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetBalanceResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置可提现余额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("available_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("available_amount")]
|
||||
public int AvailableAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置待结算余额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pending_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pending_amount")]
|
||||
public int PendingAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string SubMerchantId { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getorderflow 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetOrderFlowRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getorderflow 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetOrderFlowResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OrderFlow : ProductFundsScanOrderFlowResponse.Types.OrderFlow
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单资金流水信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_flow")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_flow")]
|
||||
public Types.OrderFlow OrderFlow { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getwithdrawdetail 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetWithdrawDetailRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户提现单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/getwithdrawdetail 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsGetWithdrawDetailResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户提现单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置失败原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reason")]
|
||||
public string? FailReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行账户。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_num")]
|
||||
public string BankAccount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_name")]
|
||||
public string BankName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行附言。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_memo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_memo")]
|
||||
public string? BankMemo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/scanorderflow 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsScanOrderFlowRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数(从 1 开始)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_num")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/scanorderflow 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsScanOrderFlowResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OrderFlow
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家所得金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("price")]
|
||||
public int Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单总金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_price")]
|
||||
public int TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置打折金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discount_fee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discount_fee")]
|
||||
public int DiscountFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置服务费金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_fee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_fee")]
|
||||
public int ServiceFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置手续费金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("handling_fee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("handling_fee")]
|
||||
public int HandlingFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refunding_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refunding_type")]
|
||||
public int RefundType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置已退款金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_fee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_fee")]
|
||||
public int RefundFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结算时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("settled_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("settled_time")]
|
||||
public long? SettleTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下单时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_time")]
|
||||
public long OrderTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单资金流水列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_flow")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_flow")]
|
||||
public Types.OrderFlow[] OrderFlowList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/scanwithdraw 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsScanWithdrawRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数(从 1 开始)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_num")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/scanwithdraw 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsScanWithdrawResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Withdraw
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户提现单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public string Status { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置失败原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reason")]
|
||||
public string? FailReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行附言。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_memo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_memo")]
|
||||
public string? BankMemo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wxpay_update_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wxpay_update_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wxpay_create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wxpay_create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现记录列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Withdraw[] WithdrawList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/setbankaccount 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsSetBankAccountRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Account
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置银行账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_account_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_account_type")]
|
||||
public string BankAccountType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行账户。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_number")]
|
||||
public string BankAccount { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_bank")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_bank")]
|
||||
public string BankName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行名称前端展示值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_bank4show")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_bank4show")]
|
||||
public string? BankNameForShow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行省市编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_address_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_address_code")]
|
||||
public string BankAddressCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户银行联行号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_branch_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_branch_id")]
|
||||
public string? BankBranchId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置账户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_info")]
|
||||
public Types.Account Account { get; set; } = new Types.Account();
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/setbankaccount 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsSetBankAccountResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/submitwithdraw 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsSubmitWithdrawRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置提现金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行附言。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_memo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_memo")]
|
||||
public string? BankMemo { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /product/funds/submitwithdraw 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ProductFundsSubmitWithdrawResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置二维码 Ticket。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qrcode_ticket")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qrcode_ticket")]
|
||||
public string QrcodeTicket { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"available_amount": 45331,
|
||||
"pending_amount": 7549,
|
||||
"sub_mchid": "1588759201"
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"order_id": 1651031426690650
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"order_flow": {
|
||||
"order_id": 1651031426690650,
|
||||
"status": "ORDER_FLOW_STATUS_TRANSACTION_PENDING_SETTLED",
|
||||
"price": 1,
|
||||
"order_price": 1,
|
||||
"discount_fee": 0,
|
||||
"service_fee": 0,
|
||||
"handling_fee": 0,
|
||||
"refund_fee": 0,
|
||||
"settled_time": 0,
|
||||
"order_time": 1625390752,
|
||||
"refunding_type": 0
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"out_request_no": "wd13675014323600561372"
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"amount": 7,
|
||||
"create_time": 1590733930,
|
||||
"update_time": 1590773555,
|
||||
"reason": "",
|
||||
"remark": "0529日14点31分提现",
|
||||
"bank_memo": "0529日14点31分提现",
|
||||
"bank_name": "",
|
||||
"bank_num": "",
|
||||
"status": "SUCCESS"
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"page_num": 1,
|
||||
"page_size": 100
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"order_flow": [
|
||||
{
|
||||
"order_id": 123456789123,
|
||||
"status": "ORDER_FLOW_STATUS_TRANSACTION_PENDING_SETTLED",
|
||||
"price": 1,
|
||||
"order_price": 1,
|
||||
"discount_fee": 0,
|
||||
"service_fee": 0,
|
||||
"handling_fee": 0,
|
||||
"refund_fee": 0,
|
||||
"settled_time": 0,
|
||||
"order_time": 1625834352,
|
||||
"refunding_type": 0
|
||||
},
|
||||
{
|
||||
"order_id": 12345678229,
|
||||
"status": "ORDER_FLOW_STATUS_TRANSACTION_PENDING_SETTLED",
|
||||
"price": 1,
|
||||
"order_price": 1,
|
||||
"discount_fee": 0,
|
||||
"service_fee": 0,
|
||||
"handling_fee": 0,
|
||||
"refund_fee": 0,
|
||||
"settled_time": 0,
|
||||
"order_time": 1625832229,
|
||||
"refunding_type": 0
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"page_num": 1,
|
||||
"page_size": 10
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"out_request_no": "3163339305837870",
|
||||
"amount": 1,
|
||||
"status": "SUCCESS",
|
||||
"reason": "",
|
||||
"remark": "",
|
||||
"bank_memo": "",
|
||||
"wxpay_update_time": 1594408007,
|
||||
"wxpay_create_time": 1594365375
|
||||
},
|
||||
{
|
||||
"out_request_no": "180687538055",
|
||||
"amount": 1,
|
||||
"status": "SUCCESS",
|
||||
"reason": "",
|
||||
"remark": "",
|
||||
"bank_memo": "",
|
||||
"wxpay_update_time": 1594404381,
|
||||
"wxpay_create_time": 1594365335
|
||||
}
|
||||
],
|
||||
"total_num": 103
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"account_info": {
|
||||
"bank_account_type": "ACCOUNT_TYPE_PRIVATE",
|
||||
"account_bank": "招商银行",
|
||||
"bank_address_code": "100000",
|
||||
"account_number": "1234567890"
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "OK"
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"amount": 1,
|
||||
"remark": "sss",
|
||||
"bank_memo": ""
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "OK",
|
||||
"qrcode_ticket": "xxxxx"
|
||||
}
|
Reference in New Issue
Block a user