-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
....Wechat.TenpayV3/Extensions/WechatTenpayClientExecuteMerchantOperationManageExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...antOperationManage/GetMerchantOperationManageMerchantLimitationsBySubMerchantIdRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
...ntOperationManage/GetMerchantOperationManageMerchantLimitationsBySubMerchantIdResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...OperationManage/GetMerchantOperationManageMerchantLimitationsBySubMerchantIdResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "关闭相册扫码支付,关闭长按识别支付" | ||
} |