mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 09:54:44 +08:00
feat(wxapi): 新增普通代云开发配置相关接口
This commit is contained in:
@@ -386,6 +386,166 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbShareEnvironmentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/usecloudaccesstoken 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/usecloudaccesstoken.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbUseCloudAccessTokenResponse> ExecuteTcbUseCloudAccessTokenAsync(this WechatApiClient client, Models.TcbUseCloudAccessTokenRequest 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, "tcb", "usecloudaccesstoken")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbUseCloudAccessTokenResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/uploadappconfig 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/uploadAppConfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbUploadAppConfigResponse> ExecuteTcbUploadAppConfigAsync(this WechatApiClient client, Models.TcbUploadAppConfigRequest 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, "tcb", "uploadappconfig")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbUploadAppConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/getappconfig 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/getAppConfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbGetAppConfigResponse> ExecuteTcbGetAppConfigAsync(this WechatApiClient client, Models.TcbGetAppConfigRequest 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, "tcb", "getappconfig")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbGetAppConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/setcallbackconfig 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/setcallbackconfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbSetCallbackConfigResponse> ExecuteTcbSetCallbackConfigAsync(this WechatApiClient client, Models.TcbSetCallbackConfigRequest 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, "tcb", "setcallbackconfig")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbSetCallbackConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/getcallbackconfig 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/getcallbackconfig.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbGetCallbackConfigResponse> ExecuteTcbGetCallbackConfigAsync(this WechatApiClient client, Models.TcbGetCallbackConfigRequest 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, "tcb", "getcallbackconfig")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbGetCallbackConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/getqcloudtoken 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/getqcloudtoken.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbGetQCloudTokenResponse> ExecuteTcbGetQCloudTokenAsync(this WechatApiClient client, Models.TcbGetQCloudTokenRequest 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, "tcb", "getqcloudtoken")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbGetQCloudTokenResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/wxpaylist 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/wxpaylist.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbWxpayListResponse> ExecuteTcbWxpayListAsync(this WechatApiClient client, Models.TcbWxpayListRequest 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, "tcb", "wxpaylist")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbWxpayListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /tcb/wxpayopenauth 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/cloudbase/common/wxpayopenauth.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.TcbWxpayOpenAuthResponse> ExecuteTcbWxpayOpenAuthAsync(this WechatApiClient client, Models.TcbWxpayOpenAuthRequest 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, "tcb", "wxpayopenauth")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.TcbWxpayOpenAuthResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
public class ComponentTcbSetContainerServiceVersionConfigRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置第三方平台 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getappconfig 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbGetAppConfigRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置配置类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getappconfig 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbGetAppConfigResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 JSON 格式的配置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("config")]
|
||||
public string JsonConfig { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getcallbackconfig 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbGetCallbackConfigRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getcallbackconfig 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbGetCallbackConfigResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ContainerConfig : TcbSetCallbackConfigRequest.Types.ContainerConfig
|
||||
{
|
||||
}
|
||||
|
||||
public class FunctionConfig
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Callback : TcbSetCallbackConfigRequest.Types.FunctionConfig.Types.Callback
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("enable")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("enable")]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回调列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("callbacks")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("callbacks")]
|
||||
public Types.Callback[]? CallbackList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置云托管配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("container_config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("container_config")]
|
||||
public Types.ContainerConfig Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置云函数配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("function_config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("function_config")]
|
||||
public Types.FunctionConfig FunctionConfig { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getqcloudtoken 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbGetQCloudTokenRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置有效期(单位:秒)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("lifespan")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("lifespan")]
|
||||
public int ExpiresIn { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/getqcloudtoken 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbGetQCloudTokenResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 SecretId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("secretid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("secretid")]
|
||||
public string SecretId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SecretKey。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("secretkey")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("secretkey")]
|
||||
public string SecretKey { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 Token。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("token")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("token")]
|
||||
public string Token { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置过期时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expired_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expired_time")]
|
||||
public long ExpireTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/setcallbackconfig 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbSetCallbackConfigRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ContainerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("enable")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("enable")]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置环境 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qbase_env")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qbase_env")]
|
||||
public string? EnvironmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qbase_container_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qbase_container_path")]
|
||||
public string? ContainerPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本格式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text_mode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text_mode")]
|
||||
public int? TextMode { get; set; }
|
||||
}
|
||||
|
||||
public class FunctionConfig
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Callback
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("enable")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("enable")]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgType")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgType")]
|
||||
public string MessageType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("event")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("event")]
|
||||
public string Event { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置环境 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("env")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("env")]
|
||||
public string EnvironmentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置云函数名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("functionName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("functionName")]
|
||||
public string FunctionName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("enable")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("enable")]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回调列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("callbacks")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("callbacks")]
|
||||
public IList<Types.Callback>? CallbackList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置云托管配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("container_config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("container_config")]
|
||||
public Types.ContainerConfig? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置云函数配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("function_config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("function_config")]
|
||||
public Types.FunctionConfig? FunctionConfig { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/setcallbackconfig 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbSetCallbackConfigResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/uploadappconfig 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbUploadAppConfigRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置配置类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 JSON 格式的配置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("config")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("config")]
|
||||
public string JsonConfig { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/uploadappconfig 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbUploadAppConfigResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/usecloudaccesstoken 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbUseCloudAccessTokenRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置操作类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action")]
|
||||
public string Action { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置环境 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("env")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("env")]
|
||||
public string EnvironmentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open")]
|
||||
public bool? IsOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 API 白名单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("api_whitelist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("api_whitelist")]
|
||||
public IList<string>? ApiWhiteList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/usecloudaccesstoken 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbUseCloudAccessTokenResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open")]
|
||||
public bool? IsOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 API 白名单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("api_whitelist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("api_whitelist")]
|
||||
public string[]? ApiWhiteList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/wxpaylist 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbWxpayListRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/wxpaylist 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbWxpayListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Merchant
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_code")]
|
||||
public string MerchantId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
|
||||
public string MerchantName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主体名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("company_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("company_name")]
|
||||
public string CompanyName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置绑定关系。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mch_relation_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mch_relation_state")]
|
||||
public string RelationState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 JS-API 授权状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jsapi_auth_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jsapi_auth_state")]
|
||||
public string JsapiAuthState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置退款授权状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("refund_auth_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("refund_auth_state")]
|
||||
public string RefundAuthState { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.Merchant[] MerchantList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/wxpayopenauth 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class TcbWxpayOpenAuthRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置操作类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action")]
|
||||
public string Action { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_code")]
|
||||
public string MerchantId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /tcb/wxpayopenauth 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class TcbWxpayOpenAuthResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user