From ebdffce33fc2dea8d3b392a6e3c3eb169adb597c Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 28 May 2024 19:32:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(microapp):=20=E6=96=B0=E5=A2=9E=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E5=B7=A5=E5=85=B7=E4=BF=A1=E7=94=A8=E5=85=8D=E6=8A=BC?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/MicroApp/Basic_ModelDefinition.md | 98 +++---- ...ientExecuteTradeAuthDeveloperExtensions.cs | 249 ++++++++++++++++++ ...deAuthDeveloperCancelAuthOrderV1Request.cs | 15 ++ ...eAuthDeveloperCancelAuthOrderV1Response.cs | 9 + ...deAuthDeveloperCreateAuthOrderV1Request.cs | 29 ++ ...eAuthDeveloperCreateAuthOrderV1Response.cs | 28 ++ ...deAuthDeveloperFinishAuthOrderV1Request.cs | 15 ++ ...eAuthDeveloperFinishAuthOrderV1Response.cs | 9 + ...thDeveloperQueryAdmissibleAuthV1Request.cs | 43 +++ ...hDeveloperQueryAdmissibleAuthV1Response.cs | 42 +++ ...adeAuthDeveloperQueryAuthOrderV1Request.cs | 22 ++ ...deAuthDeveloperQueryAuthOrderV1Response.cs | 98 +++++++ ...radeAuthDeveloperClosePayOrderV1Request.cs | 15 ++ ...adeAuthDeveloperClosePayOrderV1Response.cs | 9 + ...adeAuthDeveloperCreatePayOrderV1Request.cs | 79 ++++++ ...deAuthDeveloperCreatePayOrderV1Response.cs | 28 ++ ...radeAuthDeveloperQueryPayOrderV1Request.cs | 22 ++ ...adeAuthDeveloperQueryPayOrderV1Response.cs | 139 ++++++++++ ...TradeAuthDeveloperCreateRefundV1Request.cs | 59 +++++ ...radeAuthDeveloperCreateRefundV1Response.cs | 28 ++ .../TradeAuthDeveloperQueryRefundV1Request.cs | 22 ++ ...TradeAuthDeveloperQueryRefundV1Response.cs | 112 ++++++++ ...AuthDeveloperCancelAuthOrderV1Request.json | 3 + ...AuthDeveloperCreateAuthOrderV1Request.json | 5 + ...uthDeveloperCreateAuthOrderV1Response.json | 8 + ...AuthDeveloperFinishAuthOrderV1Request.json | 3 + ...DeveloperQueryAdmissibleAuthV1Request.json | 7 + ...eveloperQueryAdmissibleAuthV1Response.json | 10 + ...eAuthDeveloperQueryAuthOrderV1Request.json | 4 + ...AuthDeveloperQueryAuthOrderV1Response.json | 18 ++ ...deAuthDeveloperClosePayOrderV1Request.json | 3 + ...eAuthDeveloperCreatePayOrderV1Request.json | 14 + ...AuthDeveloperCreatePayOrderV1Response.json | 8 + ...deAuthDeveloperQueryPayOrderV1Request.json | 4 + ...eAuthDeveloperQueryPayOrderV1Response.json | 26 ++ ...adeAuthDeveloperCreateRefundV1Request.json | 15 ++ ...deAuthDeveloperCreateRefundV1Response.json | 8 + ...radeAuthDeveloperQueryRefundV1Request.json | 4 + ...adeAuthDeveloperQueryRefundV1Response.json | 24 ++ 39 files changed, 1287 insertions(+), 47 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteTradeAuthDeveloperExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.cs create mode 100644 src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.cs create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.json create mode 100644 test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.json diff --git a/docs/MicroApp/Basic_ModelDefinition.md b/docs/MicroApp/Basic_ModelDefinition.md index 897f5594..4b583e38 100644 --- a/docs/MicroApp/Basic_ModelDefinition.md +++ b/docs/MicroApp/Basic_ModelDefinition.md @@ -20,53 +20,57 @@ [展开查看] -| | 抖音 API | 备注 | -| :-: | :---------------------------------------: | :--------------------------------: | -| × | 联合授权 | 异构协议,请使用 `DouyinOpen` 模块 | -| × | 接口调用凭证:经营能力调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | -| × | 接口调用凭证:用户授权调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | -| √ | 接口调用凭证:非用户授权调用凭证 | | -| √ | 登录 | | -| √ | 小程序码与小程序链接 | | -| √ | Web 化接入 | | -| × | 私聊和群聊 | 异构协议,请使用 `DouyinOpen` 模块 | -| × | 解决方案 | 异构协议,请使用 `DouyinOpen` 模块 | -| √ | 线索组件 | | -| √ | 隐私协议 | | -| √ | 直播预约能力 | | -| √ | 视频能力 | | -| √ | 搜索能力 | | -| √ | 任务能力 | | -| √ | 电商 | | -| × | 生活服务 | _开发中_ | -| √ | 短剧行业 | | -| √ | 用户信息 | | -| √ | 分享 | | -| √ | 客服 | | -| × | 交易工具 | _开发中_ | -| √ | 小程序券 | | -| × | 交易系统 | _开发中_ | -| √ | 内容安全 | | -| √ | 泛知识:角色系统 | | -| √ | 泛知识:课程库 | | -| √ | 担保支付 | | -| √ | 评价 | | -| √ | 其他:直播间自定义封面 | | -| √ | 其他:抖音开放平台与小程序视频打通能力 | | -| √ | 其他:上传资源 | | -| √ | 订阅消息 | | -| √ | 小程序推广计划 | | -| √ | 挂载 | | -| √ | 分发 | | -| √ | 数据分析 | | -| √ | 服务类目 | | -| √ | 直播间能力 | | -| √ | 抖音开放能力 | | -| √ | 页面结构自定义 | | -| √ | 普通二维码绑定 | | -| √ | 抖音号绑定 | | -| √ | 流量主 | | -| √ | 抖店绑定 | | +| | 抖音 API | 备注 | +| :-: | :-------------------------------------------------: | :--------------------------------: | +| × | 联合授权 | 异构协议,请使用 `DouyinOpen` 模块 | +| × | 接口调用凭证:经营能力调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | +| × | 接口调用凭证:用户授权调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | +| √ | 接口调用凭证:非用户授权调用凭证 | | +| √ | 登录 | | +| √ | 小程序码与小程序链接 | | +| √ | Web 化接入 | | +| × | 私聊和群聊 | 异构协议,请使用 `DouyinOpen` 模块 | +| × | 解决方案 | 异构协议,请使用 `DouyinOpen` 模块 | +| √ | 线索组件 | | +| √ | 隐私协议 | | +| √ | 直播预约能力 | | +| √ | 视频能力 | | +| √ | 搜索能力 | | +| √ | 任务能力 | | +| √ | 电商 | | +| × | 生活服务 | _开发中_ | +| √ | 短剧行业 | | +| √ | 用户信息 | | +| √ | 分享 | | +| √ | 客服 | | +| √ | 交易工具:信用免押 | | +| × | 交易工具:周期代扣 | _开发中_ | +| √ | 小程序券 | | +| × | 交易系统:通用交易系统 | _开发中_ | +| × | 交易系统:生活服务交易系统(全融合版) | _开发中_ | +| × | 交易系统:生活服务交易系统(账号融合版) | _开发中_ | +| × | 交易系统:行业交易系统 | _开发中_ | +| √ | 内容安全 | | +| √ | 泛知识:角色系统 | | +| √ | 泛知识:课程库 | | +| √ | 担保支付 | | +| √ | 评价 | | +| √ | 其他:直播间自定义封面 | | +| √ | 其他:抖音开放平台与小程序视频打通能力 | | +| √ | 其他:上传资源 | | +| √ | 订阅消息 | | +| √ | 小程序推广计划 | | +| √ | 挂载 | | +| √ | 分发 | | +| √ | 数据分析 | | +| √ | 服务类目 | | +| √ | 直播间能力 | | +| √ | 抖音开放能力 | | +| √ | 页面结构自定义 | | +| √ | 普通二维码绑定 | | +| √ | 抖音号绑定 | | +| √ | 流量主 | | +| √ | 抖店绑定 | | diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteTradeAuthDeveloperExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteTradeAuthDeveloperExtensions.cs new file mode 100644 index 00000000..ea8df110 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteTradeAuthDeveloperExtensions.cs @@ -0,0 +1,249 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteTradeAuthDeveloperExtensions + { + #region AuthDeposit + #region AuthDeposit/AuthOrder + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/query_admissible_auth/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperQueryAdmissibleAuthV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperQueryAdmissibleAuthV1Request 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.Post, "api", "trade_auth", "v1", "developer", "query_admissible_auth/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/create_auth_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperCreateAuthOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperCreateAuthOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "create_auth_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/cancel_auth_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperCancelAuthOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperCancelAuthOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "cancel_auth_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/finish_auth_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperFinishAuthOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperFinishAuthOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "finish_auth_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/query_auth_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperQueryAuthOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperQueryAuthOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "query_auth_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region AuthDeposit/PayOrder + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/create_pay_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperCreatePayOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperCreatePayOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "create_pay_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/close_pay_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperClosePayOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperClosePayOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "close_pay_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/query_pay_order/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperQueryPayOrderV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperQueryPayOrderV1Request 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.Post, "api", "trade_auth", "v1", "developer", "query_pay_order/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region AuthDeposit/Refund + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/create_refund/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperCreateRefundV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperCreateRefundV1Request 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.Post, "api", "trade_auth", "v1", "developer", "create_refund/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /api/trade_auth/v1/developer/query_refund/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTradeAuthDeveloperQueryRefundV1Async(this DouyinMicroAppClient client, Models.TradeAuthDeveloperQueryRefundV1Request 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.Post, "api", "trade_auth", "v1", "developer", "query_refund/") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.cs new file mode 100644 index 00000000..c90de1a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/cancel_auth_order/ 接口的请求。 + /// + public class TradeAuthDeveloperCancelAuthOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Response.cs new file mode 100644 index 00000000..6f9e29d3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/cancel_auth_order/ 接口的响应。 + /// + public class TradeAuthDeveloperCancelAuthOrderV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.cs new file mode 100644 index 00000000..ac126fbb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_auth_order/ 接口的请求。 + /// + public class TradeAuthDeveloperCreateAuthOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置准入 Token。 + /// + [Newtonsoft.Json.JsonProperty("admissible_token")] + [System.Text.Json.Serialization.JsonPropertyName("admissible_token")] + public string AdmissibleToken { get; set; } = string.Empty; + + /// + /// 获取或设置开发者信用单号。 + /// + [Newtonsoft.Json.JsonProperty("out_auth_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_auth_order_no")] + public string OutAuthOrderNumber { get; set; } = string.Empty; + + /// + /// 获取或设置回调通知 URL。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.cs new file mode 100644 index 00000000..092606cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_auth_order/ 接口的响应。 + /// + public class TradeAuthDeveloperCreateAuthOrderV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.cs new file mode 100644 index 00000000..71e2a52f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/finish_auth_order/ 接口的请求。 + /// + public class TradeAuthDeveloperFinishAuthOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Response.cs new file mode 100644 index 00000000..8a3be536 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/finish_auth_order/ 接口的响应。 + /// + public class TradeAuthDeveloperFinishAuthOrderV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.cs new file mode 100644 index 00000000..8b1ba56d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_admissible_auth/ 接口的请求。 + /// + public class TradeAuthDeveloperQueryAdmissibleAuthV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置免押场景。 + /// + [Newtonsoft.Json.JsonProperty("scene")] + [System.Text.Json.Serialization.JsonPropertyName("scene")] + public int Scene { get; set; } + + /// + /// 获取或设置信用模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + public string ServiceId { get; set; } = string.Empty; + + /// + /// 获取或设置押金金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("total_amount")] + public int TotalAmount { get; set; } + + /// + /// 获取或设置卖家商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_uid")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_uid")] + public string MerchantId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.cs new file mode 100644 index 00000000..28d8f063 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_admissible_auth/ 接口的响应。 + /// + public class TradeAuthDeveloperQueryAdmissibleAuthV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置准入性。 + /// + [Newtonsoft.Json.JsonProperty("admissibility")] + [System.Text.Json.Serialization.JsonPropertyName("admissibility")] + public int Admissibility { get; set; } + + /// + /// 获取或设置准入 Token。 + /// + [Newtonsoft.Json.JsonProperty("admissible_token")] + [System.Text.Json.Serialization.JsonPropertyName("admissible_token")] + public string? AdmissibleToken { get; set; } + + /// + /// 获取或设置过期时间(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expire_seconds")] + [System.Text.Json.Serialization.JsonPropertyName("expire_seconds")] + public int? ExpiresIn { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.cs new file mode 100644 index 00000000..78ab189a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_auth_order/ 接口的请求。 + /// + public class TradeAuthDeveloperQueryAuthOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置开发者信用单号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("out_auth_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_auth_order_no")] + public string? OutAuthOrderNumber { get; set; } + + /// + /// 获取或设置信用单 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string? AuthOrderId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.cs new file mode 100644 index 00000000..9033708a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.cs @@ -0,0 +1,98 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_auth_order/ 接口的响应。 + /// + public class TradeAuthDeveloperQueryAuthOrderV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置开发者信用单号。 + /// + [Newtonsoft.Json.JsonProperty("out_auth_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_auth_order_no")] + public string OutAuthOrderNumber { get; set; } = default!; + + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = default!; + + /// + /// 获取或设置信用单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置免押场景。 + /// + [Newtonsoft.Json.JsonProperty("scene")] + [System.Text.Json.Serialization.JsonPropertyName("scene")] + public int Scene { get; set; } + + /// + /// 获取或设置信用模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + public string ServiceId { get; set; } = default!; + + /// + /// 获取或设置押金金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("total_amount")] + public int TotalAmount { get; set; } + + /// + /// 获取或设置卖家商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_uid")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_uid")] + public string MerchantId { get; set; } = default!; + + /// + /// 获取或设置回调通知地址。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + + /// + /// 获取或设置签约时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("sign_time")] + [System.Text.Json.Serialization.JsonPropertyName("sign_time")] + public long? SignTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.cs new file mode 100644 index 00000000..22e8fe4f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/close_pay_order/ 接口的请求。 + /// + public class TradeAuthDeveloperClosePayOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置扣款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string PayOrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Response.cs new file mode 100644 index 00000000..4feaa2fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/close_pay_order/ 接口的响应。 + /// + public class TradeAuthDeveloperClosePayOrderV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.cs new file mode 100644 index 00000000..cfa8afce --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_pay_order/ 接口的请求。 + /// + public class TradeAuthDeveloperCreatePayOrderV1Request : DouyinMicroAppRequest + { + public static class Types + { + public class FeeDetail + { + /// + /// 获取或设置扣款项目名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置扣款项目描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = string.Empty; + + /// + /// 获取或设置扣款项目金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public int Amount { get; set; } + + /// + /// 获取或设置扣款项目数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = string.Empty; + + /// + /// 获取或设置开发者扣款单号。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_order_no")] + public string OutPayOrderNumber { get; set; } = string.Empty; + + /// + /// 获取或设置费用明细列表。 + /// + [Newtonsoft.Json.JsonProperty("fee_detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fee_detail_list")] + public IList FeeDetailList { get; set; } = new List(); + + /// + /// 获取或设置扣款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("total_amount")] + public int TotalAmount { get; set; } + + /// + /// 获取或设置回调通知 URL。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.cs new file mode 100644 index 00000000..ebdbb9e9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_pay_order/ 接口的响应。 + /// + public class TradeAuthDeveloperCreatePayOrderV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置扣款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string PayOrderId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.cs new file mode 100644 index 00000000..dbcc808b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_pay_order/ 接口的请求。 + /// + public class TradeAuthDeveloperQueryPayOrderV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置开发者扣款单号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_order_no")] + public string? OutPayOrderNumber { get; set; } + + /// + /// 获取或设置扣款单 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string? PayOrderId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.cs new file mode 100644 index 00000000..f907dc8f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.cs @@ -0,0 +1,139 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_pay_order/ 接口的响应。 + /// + public class TradeAuthDeveloperQueryPayOrderV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class FeeDetail + { + /// + /// 获取或设置扣款项目名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置扣款项目描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置扣款项目金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public int Amount { get; set; } + + /// + /// 获取或设置扣款项目数量。 + /// + [Newtonsoft.Json.JsonProperty("quantity")] + [System.Text.Json.Serialization.JsonPropertyName("quantity")] + public int Quantity { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置信用单 ID。 + /// + [Newtonsoft.Json.JsonProperty("auth_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("auth_order_id")] + public string AuthOrderId { get; set; } = default!; + + /// + /// 获取或设置开发者扣款单号。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_order_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_order_no")] + public string OutPayOrderNumber { get; set; } = default!; + + /// + /// 获取或设置扣款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string PayOrderId { get; set; } = default!; + + /// + /// 获取或设置扣款单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置费用明细列表。 + /// + [Newtonsoft.Json.JsonProperty("fee_detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fee_detail_list")] + public Types.FeeDetail[] FeeDetailList { get; set; } = default!; + + /// + /// 获取或设置扣款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("total_amount")] + public int TotalAmount { get; set; } + + /// + /// 获取或设置卖家商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_uid")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_uid")] + public string? MerchantId { get; set; } + + /// + /// 获取或设置回调通知地址。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + + /// + /// 获取或设置支付渠道。 + /// + [Newtonsoft.Json.JsonProperty("pay_channel")] + [System.Text.Json.Serialization.JsonPropertyName("pay_channel")] + public int? PayChannel { get; set; } + + /// + /// 获取或设置渠道支付单号。 + /// + [Newtonsoft.Json.JsonProperty("channel_pay_id")] + [System.Text.Json.Serialization.JsonPropertyName("channel_pay_id")] + public string? ChannelPayId { get; set; } + + /// + /// 获取或设置支付时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_time")] + public long? PayTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.cs new file mode 100644 index 00000000..5743dd1f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_refund/ 接口的请求。 + /// + public class TradeAuthDeveloperCreateRefundV1Request : DouyinMicroAppRequest + { + public static class Types + { + public class FeeDetail : TradeAuthDeveloperCreatePayOrderV1Request.Types.FeeDetail + { + } + } + + /// + /// 获取或设置扣款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string PayOrderId { get; set; } = string.Empty; + + /// + /// 获取或设置开发者退款单号。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_refund_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_refund_no")] + public string OutPayRefundNumber { get; set; } = string.Empty; + + /// + /// 获取或设置费用明细列表。 + /// + [Newtonsoft.Json.JsonProperty("fee_detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fee_detail_list")] + public IList FeeDetailList { get; set; } = new List(); + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_total_amount")] + public int RefundAmount { get; set; } + + /// + /// 获取或设置退款原因。 + /// + [Newtonsoft.Json.JsonProperty("refund_reason")] + [System.Text.Json.Serialization.JsonPropertyName("refund_reason")] + public string? RefundReason { get; set; } + + /// + /// 获取或设置回调通知 URL。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.cs new file mode 100644 index 00000000..32746d38 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/create_refund/ 接口的响应。 + /// + public class TradeAuthDeveloperCreateRefundV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置退款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_refund_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_refund_id")] + public string PayRefundId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.cs new file mode 100644 index 00000000..2789c987 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_refund/ 接口的请求。 + /// + public class TradeAuthDeveloperQueryRefundV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置开发者退款单号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_refund_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_refund_no")] + public string? OutPayRefundNumber { get; set; } + + /// + /// 获取或设置退款单 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("pay_refund_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_refund_id")] + public string? PayRefundId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.cs new file mode 100644 index 00000000..3be9d47a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.cs @@ -0,0 +1,112 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /api/trade_auth/v1/developer/query_refund/ 接口的响应。 + /// + public class TradeAuthDeveloperQueryRefundV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class FeeDetail : TradeAuthDeveloperQueryPayOrderV1Response.Types.Data.Types.FeeDetail + { + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置扣款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_order_id")] + public string PayOrderId { get; set; } = default!; + + /// + /// 获取或设置开发者退款单号。 + /// + [Newtonsoft.Json.JsonProperty("out_pay_refund_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_pay_refund_no")] + public string OutPayRefundNumber { get; set; } = default!; + + /// + /// 获取或设置退款单 ID。 + /// + [Newtonsoft.Json.JsonProperty("pay_refund_id")] + [System.Text.Json.Serialization.JsonPropertyName("pay_refund_id")] + public string PayRefundId { get; set; } = default!; + + /// + /// 获取或设置退款单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public string Status { get; set; } = default!; + + /// + /// 获取或设置费用明细列表。 + /// + [Newtonsoft.Json.JsonProperty("fee_detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("fee_detail_list")] + public Types.FeeDetail[] FeeDetailList { get; set; } = default!; + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_total_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_total_amount")] + public int RefundAmount { get; set; } + + /// + /// 获取或设置退款原因。 + /// + [Newtonsoft.Json.JsonProperty("refund_reason")] + [System.Text.Json.Serialization.JsonPropertyName("refund_reason")] + public string? RefundReason { get; set; } + + /// + /// 获取或设置卖家商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_uid")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_uid")] + public string? MerchantId { get; set; } + + /// + /// 获取或设置回调通知地址。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string? NotifyUrl { get; set; } + + /// + /// 获取或设置退款结果信息。 + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public string? ResultMessage { get; set; } + + /// + /// 获取或设置退款时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("refund_at")] + [System.Text.Json.Serialization.JsonPropertyName("refund_at")] + public long? RefundTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.json new file mode 100644 index 00000000..e57daee7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCancelAuthOrderV1Request.json @@ -0,0 +1,3 @@ +{ + "auth_order_id": "ad712312312313213" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.json new file mode 100644 index 00000000..adf6f687 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Request.json @@ -0,0 +1,5 @@ +{ + "admissible_token": "twerwe123", + "out_auth_order_no": "out_order_1", + "notify_url": "https://www.asdasd" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.json new file mode 100644 index 00000000..17614b85 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperCreateAuthOrderV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "auth_order_id": "ad712312312313213" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.json new file mode 100644 index 00000000..e57daee7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperFinishAuthOrderV1Request.json @@ -0,0 +1,3 @@ +{ + "auth_order_id": "ad712312312313213" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.json new file mode 100644 index 00000000..9142fa5a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Request.json @@ -0,0 +1,7 @@ +{ + "open_id": "ffwqeqgyqwe312", + "total_amount": 100, + "merchant_uid": "71243123123", + "service_id": "64", + "scene": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.json new file mode 100644 index 00000000..1a522172 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAdmissibleAuthV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "admissibility": 1, + "admissible_token": "gwqegqwey13123", + "expire_seconds": 1200 + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.json new file mode 100644 index 00000000..a617743f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Request.json @@ -0,0 +1,4 @@ +{ + "auth_order_id": "ad712312312313213", + "out_auth_order_no": "out_order_1" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.json new file mode 100644 index 00000000..feba5fc5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/AuthOrder/TradeAuthDeveloperQueryAuthOrderV1Response.json @@ -0,0 +1,18 @@ +{ + "data": { + "app_id": "tt312312313123", + "auth_order_id": "ad712312312313213", + "out_auth_order_no": "out_order_1", + "total_amount": 100, + "service_id": "64", + "scene": 1, + "status": "SERVING", + "open_id": "ffwqeqgyqwe312", + "merchant_uid": "71243123123", + "sign_time": 1698128528000, + "notify_url": "https://www.asdasd" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.json new file mode 100644 index 00000000..1335ebf3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperClosePayOrderV1Request.json @@ -0,0 +1,3 @@ +{ + "pay_order_id": "ad712312662434" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.json new file mode 100644 index 00000000..a905db83 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Request.json @@ -0,0 +1,14 @@ +{ + "auth_order_id": "ad7123123123123", + "out_pay_order_no": "out_pay_order_no_1", + "total_amount": 100, + "fee_detail_list": [ + { + "title": "油费", + "amount": 100, + "description": "租车产生的油费", + "quantity": 1 + } + ], + "notify_url": "https://www.asdasd" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.json new file mode 100644 index 00000000..1f83b655 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperCreatePayOrderV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "pay_order_id": "ad712312662434" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.json new file mode 100644 index 00000000..2756d844 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Request.json @@ -0,0 +1,4 @@ +{ + "pay_order_id": "ad712312662434", + "out_pay_order_no": "out_pay_order_no_1" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.json new file mode 100644 index 00000000..0a1b61fb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/PayOrder/TradeAuthDeveloperQueryPayOrderV1Response.json @@ -0,0 +1,26 @@ +{ + "data": { + "app_id": "tt312312313123", + "auth_order_id": "ad7123123123123", + "out_pay_order_no": "out_pay_order_no_1", + "pay_order_id": "ad712312662434", + "status": "SUCCESS", + "total_amount": 100, + "fee_detail_list": [ + { + "title": "油费", + "amount": 100, + "description": "租车产生的油费", + "quantity": 1 + } + ], + "pay_channel": 10, + "channel_pay_id": "TPeqw123123213", + "pay_time": 1698128528000, + "merchant_uid": "713123123132", + "notify_url": "https://www.asdasd" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.json new file mode 100644 index 00000000..d69d2e4f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Request.json @@ -0,0 +1,15 @@ +{ + "pay_order_id": "ad7123123123123", + "out_pay_refund_no": "out_pay_refund_no_1", + "refund_total_amount": 100, + "fee_detail_list": [ + { + "title": "油费", + "amount": 100, + "description": "租车产生的油费", + "quantity": 1 + } + ], + "refund_reason": "申请退款", + "notify_url": "https://www.asdasd" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.json new file mode 100644 index 00000000..df5e9f92 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperCreateRefundV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "pay_refund_id": "ad712312662312" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.json new file mode 100644 index 00000000..d047aa3e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Request.json @@ -0,0 +1,4 @@ +{ + "pay_refund_id": "ad712312662312", + "out_pay_refund_no": "out_pay_refund_no_1" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.json new file mode 100644 index 00000000..6792a159 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/TradeAuthDeveloper/AuthDeposit/Refund/TradeAuthDeveloperQueryRefundV1Response.json @@ -0,0 +1,24 @@ +{ + "data": { + "app_id": "tt71313213", + "status": "SUCCESS", + "pay_order_id": "ad7123123123123", + "pay_refund_id": "ad712312662312", + "out_pay_refund_no": "out_pay_refund_no_1", + "refund_total_amount": 100, + "refund_reason": "申请退款", + "fee_detail_list": [ + { + "title": "油费", + "amount": 100, + "description": "租车产生的油费", + "quantity": 1 + } + ], + "refund_at": 1698128528000, + "notify_url": "https://www.asdasd" + }, + "err_no": 0, + "err_msg": "success", + "log_id": "2022092115392201020812109511046" +}