mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 18:48:10 +08:00
feat(tenpayv3): 新增查询子商户管控情况接口
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Flurl.Http;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||||
|
{
|
||||||
|
public static class WechatTenpayClientExecuteMerchantOperationManageExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [GET] /mch-operation-manage/merchant-limitations/sub-mchid/{sub_mchid} 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/docs/partner/apis/limited-functions-and-reasons/mch-limitations/query-sub-mch-limitation.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.GetMerchantOperationManageMerchantLimitationsBySubMerchantIdResponse> ExecuteGetMerchantOperationManageMerchantLimitationsBySubMerchantIdAsync(this WechatTenpayClient client, Models.GetMerchantOperationManageMerchantLimitationsBySubMerchantIdRequest 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
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Get, "mch-operation-manage", "merchant-limitations", "sub-mchid", request.SubMerchantId);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.GetMerchantOperationManageMerchantLimitationsBySubMerchantIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,15 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /mch-operation-manage/merchant-limitations/sub-mchid/{sub_mchid} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetMerchantOperationManageMerchantLimitationsBySubMerchantIdRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置子商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
public string SubMerchantId { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,84 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /mch-operation-manage/merchant-limitations/sub-mchid/{sub_mchid} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetMerchantOperationManageMerchantLimitationsBySubMerchantIdResponse : WechatTenpayResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class RecoverySpecification
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被管控原因类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("limitation_reason_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("limitation_reason_type")]
|
||||||
|
public string? LimitationReasonType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被管控原因描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("limitation_reason")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("limitation_reason")]
|
||||||
|
public string? LimitationReason { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被该原因管控的解脱路径。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("recover_way")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("recover_way")]
|
||||||
|
public string? RecoverWay { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被该原因管控的解脱帮助链接。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("recover_help_url")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("recover_help_url")]
|
||||||
|
public string? RecoverHelpUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被该原因管控的能力列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("relate_limitations")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("relate_limitations")]
|
||||||
|
public string[]? RelateLimitationList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被该原因管控的其他能力描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("other_relate_limitations")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("other_relate_limitations")]
|
||||||
|
public string? OtherRelateLimitation { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置微信商户号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||||
|
public string MerchantId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户被管控能力列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("limited_functions")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("limited_functions")]
|
||||||
|
public string[]? LimitedFunctionList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置被管控原因及解脱路径列表列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("recovery_specifications")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("recovery_specifications")]
|
||||||
|
public Types.RecoverySpecification[]? RecoverySpecificationList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商户其他被管控能力描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("other_limited_functions")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("other_limited_functions")]
|
||||||
|
public string? OtherLimitedFunction { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"mchid": "123000110",
|
||||||
|
"limited_functions": [
|
||||||
|
"NO_TRANSACTION_AND_RECHARGE"
|
||||||
|
],
|
||||||
|
"recovery_specifications": [
|
||||||
|
{
|
||||||
|
"limitation_reason": "经营证照异常",
|
||||||
|
"recover_way": "修改主体资料",
|
||||||
|
"recover_help_url": "https://kf.qq.com",
|
||||||
|
"limitation_reason_type": "LICENSE_ABNORMAL",
|
||||||
|
"relate_limitations": [
|
||||||
|
"NO_TRANSACTION_AND_RECHARGE"
|
||||||
|
],
|
||||||
|
"other_relate_limitations": "关闭相册扫码支付,关闭长按识别支付"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"other_limited_functions": "关闭相册扫码支付,关闭长按识别支付"
|
||||||
|
}
|
Reference in New Issue
Block a user