From acd0b44f0867b90150c9e9db00b96ba07dee285a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 15 Jul 2024 18:59:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E6=9C=AC=E5=9C=B0=E7=94=9F=E6=B4=BB=E7=9B=B8?= =?UTF-8?q?=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/WechatApi/Basic_ModelDefinition.md | 10 +- .../Channels/EC/ChannelsECOrderPayEvent.cs | 3 +- ...ChannelsECProductOrderStatusUpdateEvent.cs | 5 +- .../EC/ChannelsECProductSPUAuditEvent.cs | 3 +- .../EC/ChannelsECProductSPUListingEvent.cs | 3 +- .../EC/ChannelsECProductSPUUpdateEvent.cs | 6 +- .../EC/ChannelsECSharerChangeEvent.cs | 5 +- .../EC/ChannelsECStockNoEnoughEvent.cs | 62 ++++ ...echatApiClientExecuteChannelsExtensions.cs | 329 +++++++++++++++++- ...elsECAftersaleGetAftersaleOrderResponse.cs | 27 ++ .../ChannelsECCategoryAddRequest.cs | 6 +- .../ChannelsECCategoryAllResponse.cs | 4 +- ...tegoryAvailableSonCategoriesGetResponse.cs | 2 +- .../ChannelsECCategoryDetailRequest.cs | 2 +- .../ChannelsECCategoryDetailResponse.cs | 2 +- .../ChannelsECCategoryListGetResponse.cs | 2 +- ...hannelsECFundsGetFundsFlowDetailRequest.cs | 15 + ...annelsECFundsGetFundsFlowDetailResponse.cs | 124 +++++++ .../ChannelsECFundsGetFundsFlowListRequest.cs | 51 +++ ...ChannelsECFundsGetFundsFlowListResponse.cs | 29 ++ .../ECOrder/ChannelsECOrderGetResponse.cs | 38 ++ .../ECProduct/ChannelsECProductAddRequest.cs | 4 +- .../ECProduct/ChannelsECProductGetResponse.cs | 4 +- .../ChannelsECProductUpdateRequest.cs | 2 +- .../ChannelsECProductLocalLifeAddRequest.cs | 135 +++++++ .../ChannelsECProductLocalLifeAddResponse.cs | 37 ++ ...nnelsECProductLocalLifeAuditFreeRequest.cs | 44 +++ ...nelsECProductLocalLifeAuditFreeResponse.cs | 9 + .../ChannelsECProductLocalLifeGetRequest.cs | 22 ++ .../ChannelsECProductLocalLifeGetResponse.cs | 233 +++++++++++++ ...hannelsECProductLocalLifeListGetRequest.cs | 30 ++ ...annelsECProductLocalLifeListGetResponse.cs | 30 ++ ...ChannelsECProductLocalLifeUpdateRequest.cs | 122 +++++++ ...hannelsECProductLocalLifeUpdateResponse.cs | 9 + .../ChannelsECVoucherGetBillListRequest.cs | 37 ++ .../ChannelsECVoucherGetBillListResponse.cs | 141 ++++++++ .../ChannelsECVoucherConsumeRequest.cs | 59 ++++ .../ChannelsECVoucherConsumeResponse.cs | 67 ++++ .../ChannelsECVoucherGetListRequest.cs | 37 ++ .../ChannelsECVoucherGetListResponse.cs | 205 +++++++++++ .../ECVoucher/ChannelsECVoucherGetRequest.cs | 29 ++ .../ECVoucher/ChannelsECVoucherGetResponse.cs | 62 ++++ .../ChannelsECVoucherRevokeRequest.cs | 58 +++ .../ChannelsECVoucherRevokeResponse.cs | 33 ++ .../ChannelsECVoucherCodesUploadRequest.cs | 31 ++ .../ChannelsECVoucherCodesUploadResponse.cs | 78 +++++ .../ChannelsECWindowProductGetResponse.cs | 6 +- ...sECAftersaleGetAftersaleOrderResponse.json | 13 +- ...nnelsECFundsGetFundsFlowDetailRequest.json | 3 + ...nelsECFundsGetFundsFlowDetailResponse.json | 23 ++ ...hannelsECFundsGetFundsFlowListRequest.json | 8 + ...annelsECFundsGetFundsFlowListResponse.json | 7 + .../ECOrder/ChannelsECOrderGetResponse.json | 9 +- .../ChannelsECProductLocalLifeAddRequest.json | 37 ++ ...ChannelsECProductLocalLifeAddResponse.json | 10 + ...elsECProductLocalLifeAuditFreeRequest.json | 9 + .../ChannelsECProductLocalLifeGetRequest.json | 4 + ...ChannelsECProductLocalLifeGetResponse.json | 43 +++ ...annelsECProductLocalLifeUpdateRequest.json | 34 ++ .../ChannelsECVoucherGetBillListRequest.json | 6 + .../ChannelsECVoucherGetBillListResponse.json | 23 ++ .../ChannelsECVoucherConsumeRequest.json | 8 + .../ChannelsECVoucherConsumeResponse.json | 35 ++ .../ChannelsECVoucherGetListRequest.json | 6 + .../ChannelsECVoucherGetListResponse.json | 28 ++ .../ChannelsECVoucherGetRequest.json | 5 + .../ChannelsECVoucherGetResponse.json | 25 ++ .../ChannelsECVoucherRevokeRequest.json | 12 + .../ChannelsECVoucherRevokeResponse.json | 35 ++ .../ChannelsECVoucherCodesUploadRequest.json | 5 + .../ChannelsECVoucherCodesUploadResponse.json | 16 + 71 files changed, 2618 insertions(+), 38 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECStockNoEnoughEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.json diff --git a/docs/WechatApi/Basic_ModelDefinition.md b/docs/WechatApi/Basic_ModelDefinition.md index f9a417e7..9ad84bd1 100644 --- a/docs/WechatApi/Basic_ModelDefinition.md +++ b/docs/WechatApi/Basic_ModelDefinition.md @@ -159,11 +159,11 @@ [展开查看] -| | 微信 API | 备注 | -| :-: | :----------------: | :--: | -| √ | 视频号小店开放接口 | | -| √ | 视频号助手开放接口 | | -| √ | 接口管理 | | +| | 微信 API | 备注 | +| :-: | :--------: | :--: | +| √ | 视频号小店 | | +| √ | 视频号助手 | | +| √ | 本地生活 | | diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECOrderPayEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECOrderPayEvent.cs index 06ac3e84..c8b66e74 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECOrderPayEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECOrderPayEvent.cs @@ -4,7 +4,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// 表示 EVENT.channels_ec_order_pay 事件的数据。 /// /// REF:
- /// + ///
+ /// ///
/// public class ChannelsECOrderPayEvent : WechatApiEvent diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductOrderStatusUpdateEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductOrderStatusUpdateEvent.cs index cad338c2..de9c4782 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductOrderStatusUpdateEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductOrderStatusUpdateEvent.cs @@ -2,7 +2,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { /// /// 表示 EVENT.product_order_status_update 事件的数据。 - /// REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/product_order_status_update.html + /// + /// REF:
+ /// + ///
///
public class ChannelsECProductOrderStatusUpdateEvent : WechatApiEvent { diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUAuditEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUAuditEvent.cs index b8488a65..c5a2c456 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUAuditEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUAuditEvent.cs @@ -4,7 +4,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// 表示 EVENT.product_spu_audit 事件的数据。 /// /// REF:
- /// + ///
+ /// ///
/// public class ChannelsECProductSPUAuditEvent : WechatApiEvent diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUListingEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUListingEvent.cs index a4bae901..60a756a9 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUListingEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUListingEvent.cs @@ -4,7 +4,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// 表示 EVENT.product_spu_listing 事件的数据。 /// /// REF:
- /// + ///
+ /// ///
/// public class ChannelsECProductSPUListingEvent : WechatApiEvent diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUUpdateEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUUpdateEvent.cs index ae40248c..278a4a5a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUUpdateEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECProductSPUUpdateEvent.cs @@ -2,7 +2,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { /// /// 表示 EVENT.product_spu_update 事件的数据。 - /// REF: https://developers.weixin.qq.com/doc/channels/API/product/callback/ProductSpuUpdate.html + /// + /// REF:
+ ///
+ /// + ///
///
public class ChannelsECProductSPUUpdateEvent : WechatApiEvent { diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECSharerChangeEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECSharerChangeEvent.cs index 938aee1f..7984a093 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECSharerChangeEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECSharerChangeEvent.cs @@ -2,7 +2,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { /// /// 表示 EVENT.channels_ec_sharer_change 事件的数据。 - /// REF: https://developers.weixin.qq.com/doc/channels/API/sharer/bindsharer.html + /// + /// REF:
+ /// + ///
///
public class ChannelsECSharerChangeEvent : WechatApiEvent { diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECStockNoEnoughEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECStockNoEnoughEvent.cs new file mode 100644 index 00000000..a91a1640 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECStockNoEnoughEvent.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_stock_no_enough 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ChannelsECStockNoEnoughEvent : WechatApiEvent + { + public static class Types + { + public class StockInfo + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("sku_id")] + public long SKUId { get; set; } + + /// + /// 获取或设置剩余库存数量。 + /// + [Newtonsoft.Json.JsonProperty("remaining_stock_amount")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_stock_amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("remaining_stock_amount")] + public int RemainingStockAmount { get; set; } + + /// + /// 获取或设置剩余预存券码数量。 + /// + [Newtonsoft.Json.JsonProperty("remaining_code_amount")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_code_amount")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("remaining_code_amount")] + public int RemainingCodeAmount { get; set; } + } + } + + /// + /// 获取或设置库存信息。 + /// + [Newtonsoft.Json.JsonProperty("channels_ec_stock_no_enough")] + [System.Text.Json.Serialization.JsonPropertyName("channels_ec_stock_no_enough")] + [System.Xml.Serialization.XmlElement("channels_ec_stock_no_enough")] + public Types.StockInfo StockInfo { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index a258a379..0dff2ed3 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -37,7 +37,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/aftersale/getaftersaleorder 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -970,6 +971,53 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } + /// + /// 异步调用 [POST] /channels/ec/funds/getfundsflowlist 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECFundsGetFundsFlowListAsync(this WechatApiClient client, Models.ChannelsECFundsGetFundsFlowListRequest 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, "channels", "ec", "funds", "getfundsflowlist") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/funds/getfundsflowdetail 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECFundsGetFundsFlowDetailAsync(this WechatApiClient client, Models.ChannelsECFundsGetFundsFlowDetailRequest 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, "channels", "ec", "funds", "getfundsflowdetail") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #region ECFunds/BankAccount /// /// 异步调用 [POST] /channels/ec/funds/getbankacct 接口。 @@ -2446,7 +2494,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/order/get 接口。 /// /// REF:
- /// + ///
+ /// ///
///
/// @@ -2751,7 +2800,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/product/delete 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -2820,7 +2870,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/product/listing 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -2843,7 +2894,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/product/delisting 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -2866,7 +2918,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/product/audit/cancel 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -3053,7 +3106,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api /// 异步调用 [POST] /channels/ec/product/stock/update 接口。 /// /// REF:
- /// + ///
+ /// ///
/// /// @@ -3143,6 +3197,123 @@ namespace SKIT.FlurlHttpClient.Wechat.Api #endregion #endregion + #region ECProductLocalLife + /// + /// 异步调用 [POST] /channels/ec/product/locallife/list/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductLocalLifeListGetAsync(this WechatApiClient client, Models.ChannelsECProductLocalLifeListGetRequest 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, "channels", "ec", "product", "locallife", "list", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/product/locallife/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductLocalLifeGetAsync(this WechatApiClient client, Models.ChannelsECProductLocalLifeGetRequest 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, "channels", "ec", "product", "locallife", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/product/locallife/add 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductLocalLifeAddAsync(this WechatApiClient client, Models.ChannelsECProductLocalLifeAddRequest 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, "channels", "ec", "product", "locallife", "add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/product/locallife/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductLocalLifeUpdateAsync(this WechatApiClient client, Models.ChannelsECProductLocalLifeUpdateRequest 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, "channels", "ec", "product", "locallife", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/product/locallife/auditfree 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductLocalLifeAuditFreeAsync(this WechatApiClient client, Models.ChannelsECProductLocalLifeAuditFreeRequest 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, "channels", "ec", "product", "locallife", "auditfree") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region ECQIC /// /// 异步调用 [GET] /channels/ec/qic/inspect/config/get 接口。 @@ -3801,6 +3972,150 @@ namespace SKIT.FlurlHttpClient.Wechat.Api #endregion #endregion + #region ECVoucher + #region ECVoucher/Bill + /// + /// 异步调用 [POST] /channels/ec/voucher/get_bill_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherGetBillListAsync(this WechatApiClient client, Models.ChannelsECVoucherGetBillListRequest 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, "channels", "ec", "voucher", "get_bill_list") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region ECVoucher/Codes + /// + /// 异步调用 [POST] /channels/ec/voucher/codes/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherCodesUploadAsync(this WechatApiClient client, Models.ChannelsECVoucherCodesUploadRequest 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, "channels", "ec", "voucher", "codes", "upload") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + /// + /// 异步调用 [POST] /channels/ec/voucher/get_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherGetListAsync(this WechatApiClient client, Models.ChannelsECVoucherGetListRequest 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, "channels", "ec", "voucher", "get_list") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/voucher/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherGetAsync(this WechatApiClient client, Models.ChannelsECVoucherGetRequest 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, "channels", "ec", "voucher", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/voucher/consume 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherConsumeAsync(this WechatApiClient client, Models.ChannelsECVoucherConsumeRequest 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, "channels", "ec", "voucher", "consume") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/voucher/revoke 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVoucherRevokeAsync(this WechatApiClient client, Models.ChannelsECVoucherRevokeRequest 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, "channels", "ec", "voucher", "revoke") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region ECWarehouse /// /// 异步调用 [POST] /channels/ec/warehouse/create 接口。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs index bec52ac9..bd3f480c 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs @@ -13,6 +13,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models { public class Product { + public static class Types + { + public class Voucher + { + /// + /// 获取或设置团购优惠券码。 + /// + [Newtonsoft.Json.JsonProperty("vourcher_code")] + [System.Text.Json.Serialization.JsonPropertyName("vourcher_code")] + public string VoucherCode { get; set; } = default!; + } + } + /// /// 获取或设置商品 ID。 /// @@ -35,6 +48,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("count")] [System.Text.Json.Serialization.JsonPropertyName("count")] public int Count { get; set; } + + /// + /// 获取或设置团购优惠券列表。 + /// + [Newtonsoft.Json.JsonProperty("voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] + public Types.Voucher[]? VoucherList { get; set; } } public class AftersaleDetail @@ -244,6 +264,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("refund_resp")] public Types.RefundResultInfo? RefundResultInfo { get; set; } + /// + /// 获取或设置生成售后单场景值。 + /// + [Newtonsoft.Json.JsonProperty("gen_scene")] + [System.Text.Json.Serialization.JsonPropertyName("gen_scene")] + public int? GenerateScene { get; set; } + /// /// 获取或设置操作剩余时间(单位:秒)。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAddRequest.cs index 3a8c521c..b2b3f99f 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAddRequest.cs @@ -29,21 +29,21 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("level1")] [System.Text.Json.Serialization.JsonPropertyName("level1")] - public int FirstCategoryId { get; set; } + public long FirstCategoryId { get; set; } /// /// 获取或设置二级类目 ID。 /// [Newtonsoft.Json.JsonProperty("level2")] [System.Text.Json.Serialization.JsonPropertyName("level2")] - public int SecondCategoryId { get; set; } + public long SecondCategoryId { get; set; } /// /// 获取或设置三级类目 ID。 /// [Newtonsoft.Json.JsonProperty("level3")] [System.Text.Json.Serialization.JsonPropertyName("level3")] - public int ThirdCategoryId { get; set; } + public long ThirdCategoryId { get; set; } /// /// 获取或设置资质材料图片 MediaId 列表。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs index ad7a139c..426e8381 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs @@ -25,7 +25,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int CategoryId { get; set; } + public long CategoryId { get; set; } /// /// 获取或设置类目名称。 @@ -40,7 +40,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("f_cat_id")] [System.Text.Json.Serialization.JsonPropertyName("f_cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int ParentCategoryId { get; set; } + public long ParentCategoryId { get; set; } /// /// 获取或设置类目层级。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAvailableSonCategoriesGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAvailableSonCategoriesGetResponse.cs index 364695e5..b4aa92a6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAvailableSonCategoriesGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAvailableSonCategoriesGetResponse.cs @@ -15,7 +15,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int CategoryId { get; set; } + public long longCategoryId { get; set; } /// /// 获取或设置类目名称。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailRequest.cs index ec2e11a2..b73289d7 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailRequest.cs @@ -10,6 +10,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] - public int CategoryId { get; set; } + public long CategoryId { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs index 720496c8..869a0a64 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs @@ -17,7 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int CategoryId { get; set; } + public long CategoryId { get; set; } /// /// 获取或设置类目名称。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryListGetResponse.cs index e612e55e..e22781d5 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryListGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryListGetResponse.cs @@ -15,7 +15,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int CategoryId { get; set; } + public long CategoryId { get; set; } /// /// 获取或设置资质 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.cs new file mode 100644 index 00000000..0081a294 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/funds/getfundsflowdetail 接口的请求。 + /// + public class ChannelsECFundsGetFundsFlowDetailRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置流水单号。 + /// + [Newtonsoft.Json.JsonProperty("flow_id")] + [System.Text.Json.Serialization.JsonPropertyName("flow_id")] + public string FlowId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.cs new file mode 100644 index 00000000..e4db994b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.cs @@ -0,0 +1,124 @@ +using System; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/funds/getfundsflowdetail 接口的响应。 + /// + public class ChannelsECFundsGetFundsFlowDetailResponse : WechatApiResponse + { + public static class Types + { + public class FundsFlow + { + public static class Types + { + public class RelatedInfo + { + /// + /// 获取或设置关联类型。 + /// + [Newtonsoft.Json.JsonProperty("related_type")] + [System.Text.Json.Serialization.JsonPropertyName("related_type")] + public int RelatedType { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? OrderId { get; set; } + + /// + /// 获取或设置售后单 ID。 + /// + [Newtonsoft.Json.JsonProperty("aftersale_id")] + [System.Text.Json.Serialization.JsonPropertyName("aftersale_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? AftersaleOrderId { get; set; } + + /// + /// 获取或设置支付单号。 + /// + [Newtonsoft.Json.JsonProperty("transaction_id")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_id")] + public string? TransactionId { get; set; } + + /// + /// 获取或设置提现单号。 + /// + [Newtonsoft.Json.JsonProperty("withdraw_id")] + [System.Text.Json.Serialization.JsonPropertyName("withdraw_id")] + public string? WithdrawId { get; set; } + } + } + + /// + /// 获取或设置流水单号。 + /// + [Newtonsoft.Json.JsonProperty("flow_id")] + [System.Text.Json.Serialization.JsonPropertyName("flow_id")] + public string FlowId { get; set; } = default!; + + /// + /// 获取或设置资金类型。 + /// + [Newtonsoft.Json.JsonProperty("funds_type")] + [System.Text.Json.Serialization.JsonPropertyName("funds_type")] + public int FundsType { get; set; } + + /// + /// 获取或设置流水类型。 + /// + [Newtonsoft.Json.JsonProperty("flow_type")] + [System.Text.Json.Serialization.JsonPropertyName("flow_type")] + public int FlowType { get; set; } + + /// + /// 获取或设置流水金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public int Amount { get; set; } + + /// + /// 获取或设置账户余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int Balance { get; set; } + + /// + /// 获取或设置流水关联信息列表。 + /// + [Newtonsoft.Json.JsonProperty("related_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("related_info_list")] + public Types.RelatedInfo[] RelatedInfoList { get; set; } = default!; + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置记账时间。 + /// + [Newtonsoft.Json.JsonProperty("bookkeeping_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("bookkeeping_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))] + public DateTimeOffset BookkeepingTIme { get; set; } + } + } + + /// + /// 获取或设置流水单信息。 + /// + [Newtonsoft.Json.JsonProperty("funds_flow")] + [System.Text.Json.Serialization.JsonPropertyName("funds_flow")] + public Types.FundsFlow FundsFlow { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.cs new file mode 100644 index 00000000..a0d1091f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.cs @@ -0,0 +1,51 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/funds/getfundsflowlist 接口的请求。 + /// + public class ChannelsECFundsGetFundsFlowListRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置微信支付单号。 + /// + [Newtonsoft.Json.JsonProperty("transaction_id")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_id")] + public string? TransactionId { get; set; } + + /// + /// 获取或设置流水产生的开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long? StartTimestamp { get; set; } + + /// + /// 获取或设置流水产生的结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置分页页数。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public int? Page { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? Cursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.cs new file mode 100644 index 00000000..70d626ad --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/funds/getfundsflowlist 接口的响应。 + /// + public class ChannelsECFundsGetFundsFlowListResponse : WechatApiResponse + { + /// + /// 获取或设置流水单号列表。 + /// + [Newtonsoft.Json.JsonProperty("flow_ids")] + [System.Text.Json.Serialization.JsonPropertyName("flow_ids")] + public string[] FlowIdList { get; set; } = default!; + + /// + /// 获取或设置是否还有更多。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? NextCursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs index 1dd54112..9fe067f2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs @@ -68,6 +68,37 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("user_coupon_id")] public string? UserCouponId { get; set; } } + + public class Voucher + { + /// + /// 获取或设置团购优惠券码。 + /// + [Newtonsoft.Json.JsonProperty("voucher_code")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_code")] + public string VoucherCode { get; set; } = default!; + + /// + /// 获取或设置团购优惠券类型。 + /// + [Newtonsoft.Json.JsonProperty("voucher_type")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_type")] + public int VoucherType { get; set; } + + /// + /// 获取或设置团购优惠券价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("voucher_buy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_buy_amount")] + public int VoucherBuyAmount { get; set; } + + /// + /// 获取或设置次卡序号标识。 + /// + [Newtonsoft.Json.JsonProperty("time_index")] + [System.Text.Json.Serialization.JsonPropertyName("time_index")] + public int? TimeIndex { get; set; } + } } /// @@ -239,6 +270,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("delivery_deadline")] [System.Text.Json.Serialization.JsonPropertyName("delivery_deadline")] public long? DeliveryDeadlineTimestamp { get; set; } + + /// + /// 获取或设置团购优惠列表。 + /// + [Newtonsoft.Json.JsonProperty("voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] + public Types.Voucher[]? VoucherList { get; set; } } public class Payment diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs index f84fc6de..d117436c 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs @@ -34,7 +34,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] - public int CategoryId { get; set; } + public long CategoryId { get; set; } } public class Attribute @@ -398,7 +398,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("spu_code")] [System.Text.Json.Serialization.JsonPropertyName("spu_code")] - public string? ApuCode { get; set; } + public string? SpuCode { get; set; } /// /// 获取或设置品牌 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs index 46fd271c..7f6b0b41 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs @@ -36,7 +36,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("cat_id")] [System.Text.Json.Serialization.JsonPropertyName("cat_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int CategoryId { get; set; } + public long CategoryId { get; set; } } public class Attribute @@ -425,7 +425,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("spu_code")] [System.Text.Json.Serialization.JsonPropertyName("spu_code")] - public string? ApuCode { get; set; } + public string? SpuCode { get; set; } /// /// 获取或设置品牌 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs index fede06f0..6f1df5c6 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs @@ -183,7 +183,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("spu_code")] [System.Text.Json.Serialization.JsonPropertyName("spu_code")] - public string? ApuCode { get; set; } + public string? SpuCode { get; set; } /// /// 获取或设置品牌 ID。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.cs new file mode 100644 index 00000000..82c7173b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.cs @@ -0,0 +1,135 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/add 接口的请求。 + /// + public class ChannelsECProductLocalLifeAddRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Qualification : ChannelsECProductAddRequest.Types.Qualification + { + } + + public class MiniProgramPage + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = string.Empty; + } + + public class SKU + { + /// + /// 获取或设置售价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + public int SalePrice { get; set; } + + /// + /// 获取或设置属性字典。 + /// + [Newtonsoft.Json.JsonProperty("sku_attr_map")] + [System.Text.Json.Serialization.JsonPropertyName("sku_attr_map")] + public IDictionary? AttributeKeyValueMap { get; set; } + } + } + + /// + /// 获取或设置商家自定义商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_product_id")] + public string? OutProductId { get; set; } + + /// + /// 获取或设置券类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = string.Empty; + + /// + /// 获取或设置商品三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public long ThirdCategoryId { get; set; } + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public long BrandId { get; set; } + + /// + /// 获取或设置主图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("head_imgs")] + [System.Text.Json.Serialization.JsonPropertyName("head_imgs")] + public IList HeadImageUrlList { get; set; } = new List(); + + /// + /// 获取或设置商品资质列表。 + /// + [Newtonsoft.Json.JsonProperty("product_qua_infos")] + [System.Text.Json.Serialization.JsonPropertyName("product_qua_infos")] + public IList? ProductQualificationList { get; set; } + + /// + /// 获取或设置核销跳转出口小程序页面信息。 + /// + [Newtonsoft.Json.JsonProperty("verify_page")] + [System.Text.Json.Serialization.JsonPropertyName("verify_page")] + public Types.MiniProgramPage? VerifyPage { get; set; } + + /// + /// 获取或设置到店核销类型。 + /// + [Newtonsoft.Json.JsonProperty("verify_at_store")] + [System.Text.Json.Serialization.JsonPropertyName("verify_at_store")] + public int? VerifyAtStoreType { get; set; } + + /// + /// 获取或设置券码来源类型。 + /// + [Newtonsoft.Json.JsonProperty("code_source_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_source_type")] + public int CodeSourceType { get; set; } + + /// + /// 获取或设置商品属性字典。 + /// + [Newtonsoft.Json.JsonProperty("attr_kv_map")] + [System.Text.Json.Serialization.JsonPropertyName("attr_kv_map")] + public IDictionary AttributeKeyValueMap { get; set; } = new Dictionary(); + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.cs new file mode 100644 index 00000000..af46d623 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/add 接口的响应。 + /// + public class ChannelsECProductLocalLifeAddResponse : WechatApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_ids")] + [System.Text.Json.Serialization.JsonPropertyName("sku_ids")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long[] SKUIdList { 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.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.cs new file mode 100644 index 00000000..73bd4112 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/auditfree 接口的请求。 + /// + public class ChannelsECProductLocalLifeAuditFreeRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long SKUId { get; set; } + + /// + /// 获取或设置售价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + public int SalePrice { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeResponse.cs new file mode 100644 index 00000000..e8d4ca1b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/auditfree 接口的响应。 + /// + public class ChannelsECProductLocalLifeAuditFreeResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.cs new file mode 100644 index 00000000..72116465 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/get 接口的请求。 + /// + public class ChannelsECProductLocalLifeGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置数据类型。 + /// + [Newtonsoft.Json.JsonProperty("data_type")] + [System.Text.Json.Serialization.JsonPropertyName("data_type")] + public int? DataType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.cs new file mode 100644 index 00000000..6d538e28 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.cs @@ -0,0 +1,233 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/get 接口的响应。 + /// + public class ChannelsECProductLocalLifeGetResponse : WechatApiResponse + { + public static class Types + { + public class Product + { + public static class Types + { + public class Qualification : ChannelsECProductGetResponse.Types.Product.Types.Qualification + { + /// + /// 获取或设置资质 ID。 + /// + [Newtonsoft.Json.JsonProperty("qua_id")] + [System.Text.Json.Serialization.JsonPropertyName("qua_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long QualificationId { get; set; } + + /// + /// 获取或设置资质图片 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("qua_url")] + [System.Text.Json.Serialization.JsonPropertyName("qua_url")] + public string[] PictureUrlList { get; set; } = default!; + } + + public class MiniProgramPage + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = default!; + } + + public class AuditResult + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("audit_status")] + [System.Text.Json.Serialization.JsonPropertyName("audit_status")] + public int AuditStatus { get; set; } + + /// + /// 获取或设置失败原因。 + /// + [Newtonsoft.Json.JsonProperty("audit_reason")] + [System.Text.Json.Serialization.JsonPropertyName("audit_reason")] + public string? RejectReason { get; set; } + } + + public class SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置售价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + public int SalePrice { get; set; } + + /// + /// 获取或设置库存。 + /// + [Newtonsoft.Json.JsonProperty("stock_num")] + [System.Text.Json.Serialization.JsonPropertyName("stock_num")] + public int Stock { get; set; } + + /// + /// 获取或设置属性字典。 + /// + [Newtonsoft.Json.JsonProperty("sku_attr_map")] + [System.Text.Json.Serialization.JsonPropertyName("sku_attr_map")] + public IDictionary? AttributeKeyValueMap { get; set; } + } + + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置商家自定义商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_product_id")] + public string? OutProductId { get; set; } + + /// + /// 获取或设置券类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = default!; + + /// + /// 获取或设置主图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("head_imgs")] + [System.Text.Json.Serialization.JsonPropertyName("head_imgs")] + public string[] HeadImageUrlList { get; set; } = default!; + + /// + /// 获取或设置商品三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ThirdCategoryId { get; set; } + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long BrandId { get; set; } + + /// + /// 获取或设置商品上线状态。 + /// + [Newtonsoft.Json.JsonProperty("online_status")] + [System.Text.Json.Serialization.JsonPropertyName("online_status")] + public int OnlineStatus { get; set; } + + /// + /// 获取或设置商品草稿状态。 + /// + [Newtonsoft.Json.JsonProperty("draft_status")] + [System.Text.Json.Serialization.JsonPropertyName("draft_status")] + public int DraftStatus { get; set; } + + /// + /// 获取或设置商品资质列表。 + /// + [Newtonsoft.Json.JsonProperty("product_qua_infos")] + [System.Text.Json.Serialization.JsonPropertyName("product_qua_infos")] + public Types.Qualification[]? QualificationList { get; set; } + + /// + /// 获取或设置核销跳转出口小程序页面信息。 + /// + [Newtonsoft.Json.JsonProperty("verify_page")] + [System.Text.Json.Serialization.JsonPropertyName("verify_page")] + public Types.MiniProgramPage? VerifyPage { get; set; } + + /// + /// 获取或设置到店核销类型。 + /// + [Newtonsoft.Json.JsonProperty("verify_at_store")] + [System.Text.Json.Serialization.JsonPropertyName("verify_at_store")] + public int? VerifyAtStoreType { get; set; } + + /// + /// 获取或设置券码来源类型。 + /// + [Newtonsoft.Json.JsonProperty("code_source_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_source_type")] + public int CodeSourceType { get; set; } + + /// + /// 获取或设置商品属性字典。 + /// + [Newtonsoft.Json.JsonProperty("attr_kv_map")] + [System.Text.Json.Serialization.JsonPropertyName("attr_kv_map")] + public IDictionary AttributeKeyValueMap { get; set; } = default!; + + /// + /// 获取或设置审核结果信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_result")] + [System.Text.Json.Serialization.JsonPropertyName("audit_result")] + public Types.AuditResult? AuditResult { get; set; } + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public Types.SKU[] SKUList { get; set; } = default!; + } + } + + /// + /// 获取或设置线上商品信息。 + /// + [Newtonsoft.Json.JsonProperty("online_data")] + [System.Text.Json.Serialization.JsonPropertyName("online_data")] + public Types.Product? OnlineProduct { get; set; } + + /// + /// 获取或设置草稿商品信息。 + /// + [Newtonsoft.Json.JsonProperty("draft_data")] + [System.Text.Json.Serialization.JsonPropertyName("draft_data")] + public Types.Product? DraftProduct { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetRequest.cs new file mode 100644 index 00000000..8e525725 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetRequest.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/list/get 接口的请求。 + /// + public class ChannelsECProductLocalLifeListGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int? Status { get; set; } + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? Cursor { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetResponse.cs new file mode 100644 index 00000000..0ade6ce3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeListGetResponse.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/list/get 接口的响应。 + /// + public class ChannelsECProductLocalLifeListGetResponse : WechatApiResponse + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long[] ProductIdList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? NextCursor { get; set; } + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.cs new file mode 100644 index 00000000..954b9cce --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/update 接口的请求。 + /// + public class ChannelsECProductLocalLifeUpdateRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Qualification : ChannelsECProductLocalLifeAddRequest.Types.Qualification + { + } + + public class MiniProgramPage : ChannelsECProductLocalLifeAddRequest.Types.MiniProgramPage + { + } + + public class SKU : ChannelsECProductLocalLifeAddRequest.Types.SKU + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long SKUId { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置商家自定义商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_product_id")] + public string? OutProductId { get; set; } + + /// + /// 获取或设置券类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("product_name")] + [System.Text.Json.Serialization.JsonPropertyName("product_name")] + public string ProductName { get; set; } = string.Empty; + + /// + /// 获取或设置商品三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public long ThirdCategoryId { get; set; } + + /// + /// 获取或设置品牌 ID。 + /// + [Newtonsoft.Json.JsonProperty("brand_id")] + [System.Text.Json.Serialization.JsonPropertyName("brand_id")] + public long BrandId { get; set; } + + /// + /// 获取或设置主图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("head_imgs")] + [System.Text.Json.Serialization.JsonPropertyName("head_imgs")] + public IList HeadImageUrlList { get; set; } = new List(); + + /// + /// 获取或设置商品资质列表。 + /// + [Newtonsoft.Json.JsonProperty("product_qua_infos")] + [System.Text.Json.Serialization.JsonPropertyName("product_qua_infos")] + public IList? ProductQualificationList { get; set; } + + /// + /// 获取或设置核销跳转出口小程序页面信息。 + /// + [Newtonsoft.Json.JsonProperty("verify_page")] + [System.Text.Json.Serialization.JsonPropertyName("verify_page")] + public Types.MiniProgramPage? VerifyPage { get; set; } + + /// + /// 获取或设置到店核销类型。 + /// + [Newtonsoft.Json.JsonProperty("verify_at_store")] + [System.Text.Json.Serialization.JsonPropertyName("verify_at_store")] + public int? VerifyAtStoreType { get; set; } + + /// + /// 获取或设置券码来源类型。 + /// + [Newtonsoft.Json.JsonProperty("code_source_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_source_type")] + public int CodeSourceType { get; set; } + + /// + /// 获取或设置商品属性字典。 + /// + [Newtonsoft.Json.JsonProperty("attr_kv_map")] + [System.Text.Json.Serialization.JsonPropertyName("attr_kv_map")] + public IDictionary AttributeKeyValueMap { get; set; } = new Dictionary(); + + /// + /// 获取或设置 SKU 列表。 + /// + [Newtonsoft.Json.JsonProperty("skus")] + [System.Text.Json.Serialization.JsonPropertyName("skus")] + public IList SKUList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateResponse.cs new file mode 100644 index 00000000..fd90bc3e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/locallife/update 接口的响应。 + /// + public class ChannelsECProductLocalLifeUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.cs new file mode 100644 index 00000000..7e918f4e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get_bill_list 接口的请求。 + /// + public class ChannelsECVoucherGetBillListRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置账单日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("bill_date")] + [System.Text.Json.Serialization.JsonPropertyName("bill_date")] + public string BillDateString { get; set; } = string.Empty; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("page_ctx")] + [System.Text.Json.Serialization.JsonPropertyName("page_ctx")] + public string? Cursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.cs new file mode 100644 index 00000000..ee241652 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.cs @@ -0,0 +1,141 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get_bill_list 接口的响应。 + /// + public class ChannelsECVoucherGetBillListResponse : WechatApiResponse + { + public static class Types + { + public class VoucherBill + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置券名称。 + /// + [Newtonsoft.Json.JsonProperty("voucher_name")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_name")] + public string VoucherName { get; set; } = default!; + + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string VoucherCode { get; set; } = default!; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置券售卖价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("voucher_buy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_buy_amount")] + public int VoucherBuyAmount { get; set; } + + /// + /// 获取或设置用户支付金额金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("voucher_pay_amount")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_pay_amount")] + public int VoucherPayAmount { get; set; } + + /// + /// 获取或设置商家优惠减价金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("mch_favor_amount")] + [System.Text.Json.Serialization.JsonPropertyName("mch_favor_amount")] + public int MerchantFavorAmount { get; set; } + + /// + /// 获取或设置平台优惠减价金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("platform_favor_amount")] + [System.Text.Json.Serialization.JsonPropertyName("platform_favor_amount")] + public int PlatformFavorAmount { get; set; } + + /// + /// 获取或设置商家已结算金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("mch_settle_amount")] + [System.Text.Json.Serialization.JsonPropertyName("mch_settle_amount")] + public int MerchantSettleAmount { get; set; } + + /// + /// 获取或设置达人已结算金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("finder_settle_amount")] + [System.Text.Json.Serialization.JsonPropertyName("finder_settle_amount")] + public int FinderSettleAmount { get; set; } + + /// + /// 获取或设置购买时间戳。 + /// + [Newtonsoft.Json.JsonProperty("voucher_buy_time")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_buy_time")] + public long BuyTimestamp { get; set; } + + /// + /// 获取或设置核销时间戳。 + /// + [Newtonsoft.Json.JsonProperty("consume_time")] + [System.Text.Json.Serialization.JsonPropertyName("consume_time")] + public long ConsumeTimestamp { get; set; } + + /// + /// 获取或设置核销门店名称。 + /// + [Newtonsoft.Json.JsonProperty("consume_store_name")] + [System.Text.Json.Serialization.JsonPropertyName("consume_store_name")] + public string? ConsumeStoreName { get; set; } + + /// + /// 获取或设置核销门店外部 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string? OutStoreId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置次卡序号标识。 + /// + [Newtonsoft.Json.JsonProperty("time_index")] + [System.Text.Json.Serialization.JsonPropertyName("time_index")] + public int? TimeIndex { get; set; } + } + } + + /// + /// 获取或设置团购优惠券账单列表。 + /// + [Newtonsoft.Json.JsonProperty("bill_list")] + [System.Text.Json.Serialization.JsonPropertyName("bill_list")] + public Types.VoucherBill[] VoucherBillList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("page_ctx")] + [System.Text.Json.Serialization.JsonPropertyName("page_ctx")] + public string? NextCursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.cs new file mode 100644 index 00000000..08d4ebaa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/consume 接口的请求。 + /// + public class ChannelsECVoucherConsumeRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商户核销单号。 + /// + [Newtonsoft.Json.JsonProperty("consume_request_no")] + [System.Text.Json.Serialization.JsonPropertyName("consume_request_no")] + public string ConsumeRequestNumber { get; set; } = string.Empty; + + /// + /// 获取或设置核销门店名称。 + /// + [Newtonsoft.Json.JsonProperty("consume_store_name")] + [System.Text.Json.Serialization.JsonPropertyName("consume_store_name")] + public string? ConsumeStoreName { get; set; } + + /// + /// 获取或设置核销渠道。 + /// + [Newtonsoft.Json.JsonProperty("consume_channel")] + [System.Text.Json.Serialization.JsonPropertyName("consume_channel")] + public int? ConsumeChannel { get; set; } + + /// + /// 获取或设置核销门店外部 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string? OutStoreId { get; set; } + + /// + /// 获取或设置加密的券码列表。 + /// + [Newtonsoft.Json.JsonProperty("encrypted_codes")] + [System.Text.Json.Serialization.JsonPropertyName("encrypted_codes")] + public IList? EncryptedCodeList { get; set; } + + /// + /// 获取或设置券码列表。 + /// + [Newtonsoft.Json.JsonProperty("codes")] + [System.Text.Json.Serialization.JsonPropertyName("codes")] + public IList? CodeList { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long? SKUId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.cs new file mode 100644 index 00000000..0d688554 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.cs @@ -0,0 +1,67 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/consume 接口的响应。 + /// + public class ChannelsECVoucherConsumeResponse : WechatApiResponse + { + public static class Types + { + public class Voucher : ChannelsECVoucherGetListResponse.Types.Voucher + { + } + + public class FailedVoucher + { + /// + /// 获取或设置加密的券码。 + /// + [Newtonsoft.Json.JsonProperty("encrypted_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypted_code")] + public string? EncryptedCode { get; set; } + + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long? SKUId { get; set; } + + /// + /// 获取或设置操作结果。 + /// + [Newtonsoft.Json.JsonProperty("ret_code")] + [System.Text.Json.Serialization.JsonPropertyName("ret_code")] + public int ReturnCode { get; set; } + + /// + /// 获取或设置操作结果说明。 + /// + [Newtonsoft.Json.JsonProperty("ret_msg")] + [System.Text.Json.Serialization.JsonPropertyName("ret_msg")] + public string? ReturnMessage { get; set; } + } + } + + /// + /// 获取或设置团购优惠券列表。 + /// + [Newtonsoft.Json.JsonProperty("voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] + public Types.Voucher[]? VoucherList { get; set; } + + /// + /// 获取或设置核销失败的券列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_voucher_list")] + public Types.FailedVoucher[]? FailedVoucherList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListRequest.cs new file mode 100644 index 00000000..0015ceac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListRequest.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get_list 接口的请求。 + /// + public class ChannelsECVoucherGetListRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置团购优惠券状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int? VoucherStatus { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("page_ctx")] + [System.Text.Json.Serialization.JsonPropertyName("page_ctx")] + public string? Cursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListResponse.cs new file mode 100644 index 00000000..7d7af3b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetListResponse.cs @@ -0,0 +1,205 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get_list 接口的响应。 + /// + public class ChannelsECVoucherGetListResponse : WechatApiResponse + { + public static class Types + { + public class Voucher + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置券类型。 + /// + [Newtonsoft.Json.JsonProperty("voucher_type")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_type")] + public int VoucherType { get; set; } + + /// + /// 获取或设置券售卖价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("voucher_buy_amount")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_buy_amount")] + public int VoucherBuyAmount { get; set; } + + /// + /// 获取或设置券市场金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("voucher_actual_amount")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_actual_amount")] + public int VoucherActualAmount { get; set; } + + /// + /// 获取或设置券码类型。 + /// + [Newtonsoft.Json.JsonProperty("code_type")] + [System.Text.Json.Serialization.JsonPropertyName("code_type")] + public int CodeType { get; set; } + + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; + + /// + /// 获取或设置券状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置发放时间戳。 + /// + [Newtonsoft.Json.JsonProperty("send_time")] + [System.Text.Json.Serialization.JsonPropertyName("send_time")] + public long SendTimestamp { get; set; } + + /// + /// 获取或设置有效期开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置有效期结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置核销时间戳。 + /// + [Newtonsoft.Json.JsonProperty("consume_time")] + [System.Text.Json.Serialization.JsonPropertyName("consume_time")] + public long? ConsumeTimestamp { get; set; } + + /// + /// 获取或设置核销门店名称。 + /// + [Newtonsoft.Json.JsonProperty("consume_store_name")] + [System.Text.Json.Serialization.JsonPropertyName("consume_store_name")] + public string? ConsumeStoreName { get; set; } + + /// + /// 获取或设置核销门店外部 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_store_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_store_id")] + public string? OutStoreId { get; set; } + + /// + /// 获取或设置退款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("refund_time")] + [System.Text.Json.Serialization.JsonPropertyName("refund_time")] + public long? RefundTimestamp { get; set; } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置用户的 UnionId。 + /// + [Newtonsoft.Json.JsonProperty("union_id")] + [System.Text.Json.Serialization.JsonPropertyName("union_id")] + public string? UnionId { get; set; } + + /// + /// 获取或设置用户的手机号码。 + /// + [Newtonsoft.Json.JsonProperty("telphone_no")] + [System.Text.Json.Serialization.JsonPropertyName("telphone_no")] + public string? TelephoneNumber { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置结算状态。 + /// + [Newtonsoft.Json.JsonProperty("voucher_settle_status")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_settle_status")] + public int? VoucherSettleStatus { get; set; } + + /// + /// 获取或设置最后一次成功发起核销的核销单号。 + /// + [Newtonsoft.Json.JsonProperty("last_consume_no")] + [System.Text.Json.Serialization.JsonPropertyName("last_consume_no")] + public string? LastConsumeNumber { get; set; } + + /// + /// 获取或设置最后一次成功发起撤销核销的撤销核销单号。 + /// + [Newtonsoft.Json.JsonProperty("last_withdraw_consume_no")] + [System.Text.Json.Serialization.JsonPropertyName("last_withdraw_consume_no")] + public string? LastWithdrawConsumeNumber { get; set; } + } + } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置团购优惠券列表。 + /// + [Newtonsoft.Json.JsonProperty("voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] + public Types.Voucher[] VoucherList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("page_ctx")] + [System.Text.Json.Serialization.JsonPropertyName("page_ctx")] + public string? NextCursor { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetRequest.cs new file mode 100644 index 00000000..a8fe1843 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get 接口的请求。 + /// + public class ChannelsECVoucherGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置加密的券码。 + /// + [Newtonsoft.Json.JsonProperty("encrypted_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypted_code")] + public string? EncryptedCode { get; set; } + + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long? SKUId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetResponse.cs new file mode 100644 index 00000000..00d223f2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherGetResponse.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/get 接口的响应。 + /// + public class ChannelsECVoucherGetResponse : WechatApiResponse + { + public static class Types + { + public class Voucher : ChannelsECVoucherGetListResponse.Types.Voucher + { + public static class Types + { + public class TimeCard + { + /// + /// 获取或设置可用总次数。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置剩余可用次数。 + /// + [Newtonsoft.Json.JsonProperty("available_count")] + [System.Text.Json.Serialization.JsonPropertyName("available_count")] + public int AvailableCount { get; set; } + + /// + /// 获取或设置已核销次数。 + /// + [Newtonsoft.Json.JsonProperty("consumed_count")] + [System.Text.Json.Serialization.JsonPropertyName("consumed_count")] + public int ConsumedCount { get; set; } + + /// + /// 获取或设置已退券次数。 + /// + [Newtonsoft.Json.JsonProperty("refunded_count")] + [System.Text.Json.Serialization.JsonPropertyName("refunded_count")] + public int RefundedCount { get; set; } + } + } + + /// + /// 获取或设置次卡信息。 + /// + [Newtonsoft.Json.JsonProperty("time_card")] + [System.Text.Json.Serialization.JsonPropertyName("time_card")] + public Types.TimeCard? TimeCard { get; set; } + } + } + + /// + /// 获取或设置团购优惠券信息。 + /// + [Newtonsoft.Json.JsonProperty("voucher")] + [System.Text.Json.Serialization.JsonPropertyName("voucher")] + public Types.Voucher Voucher { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.cs new file mode 100644 index 00000000..b9bd50a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/revoke 接口的请求。 + /// + public class ChannelsECVoucherRevokeRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class RevokeVoucher + { + /// + /// 获取或设置加密的券码。 + /// + [Newtonsoft.Json.JsonProperty("encrypted_code")] + [System.Text.Json.Serialization.JsonPropertyName("encrypted_code")] + public string? EncryptedCode { get; set; } + + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string? Code { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long? SKUId { get; set; } + } + } + + /// + /// 获取或设置商户撤销单号。 + /// + [Newtonsoft.Json.JsonProperty("revoke_request_no")] + [System.Text.Json.Serialization.JsonPropertyName("revoke_request_no")] + public string RevokeRequestNumber { get; set; } = string.Empty; + + /// + /// 获取或设置商户核销单号。 + /// + [Newtonsoft.Json.JsonProperty("consume_request_no")] + [System.Text.Json.Serialization.JsonPropertyName("consume_request_no")] + public string? ConsumeRequestNumber { get; set; } + + /// + /// 获取或设置撤销券列表。 + /// + [Newtonsoft.Json.JsonProperty("reovke_vouchers")] + [System.Text.Json.Serialization.JsonPropertyName("reovke_vouchers")] + public IList RevokeVoucherList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.cs new file mode 100644 index 00000000..27c9720e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.cs @@ -0,0 +1,33 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/revoke 接口的响应。 + /// + public class ChannelsECVoucherRevokeResponse : WechatApiResponse + { + public static class Types + { + public class Voucher : ChannelsECVoucherConsumeResponse.Types.Voucher + { + } + + public class FailedVoucher : ChannelsECVoucherConsumeResponse.Types.FailedVoucher + { + } + } + + /// + /// 获取或设置团购优惠券列表。 + /// + [Newtonsoft.Json.JsonProperty("voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] + public Types.Voucher[]? VoucherList { get; set; } + + /// + /// 获取或设置核销失败的券列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_voucher_list")] + [System.Text.Json.Serialization.JsonPropertyName("fail_voucher_list")] + public Types.FailedVoucher[]? FailedVoucherList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.cs new file mode 100644 index 00000000..5b34e3de --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/codes/upload 接口的请求。 + /// + public class ChannelsECVoucherCodesUploadRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long SKUId { get; set; } + + /// + /// 获取或设置券码列表。 + /// + [Newtonsoft.Json.JsonProperty("codes")] + [System.Text.Json.Serialization.JsonPropertyName("codes")] + public IList CodeList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.cs new file mode 100644 index 00000000..aad7fc78 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.cs @@ -0,0 +1,78 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/voucher/codes/upload 接口的响应。 + /// + public class ChannelsECVoucherCodesUploadResponse : WechatApiResponse + { + public static class Types + { + public class FailedCode + { + /// + /// 获取或设置券码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public string? ErrorMessage { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置上传总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + + /// + /// 获取或设置上传成功的券码列表。 + /// + [Newtonsoft.Json.JsonProperty("success_codes")] + [System.Text.Json.Serialization.JsonPropertyName("success_codes")] + public string[]? SucceededCodeList { get; set; } + + /// + /// 获取或设置上传成功的数量。 + /// + [Newtonsoft.Json.JsonProperty("success_count")] + [System.Text.Json.Serialization.JsonPropertyName("success_count")] + public int SucceededCount { get; set; } + + /// + /// 获取或设置上传失败的券码列表。 + /// + [Newtonsoft.Json.JsonProperty("fail_codes")] + [System.Text.Json.Serialization.JsonPropertyName("fail_codes")] + public Types.FailedCode[]? FailedCodeList { get; set; } + + /// + /// 获取或设置上传失败的数量。 + /// + [Newtonsoft.Json.JsonProperty("fail_count")] + [System.Text.Json.Serialization.JsonPropertyName("fail_count")] + public int FailedCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs index 4addeca5..48a452d8 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Models +namespace SKIT.FlurlHttpClient.Wechat.Api.Models { /// /// 表示 [POST] /channels/ec/window/product/get 接口的响应。 @@ -51,7 +51,7 @@ [Newtonsoft.Json.JsonProperty("need_apply_category_id")] [System.Text.Json.Serialization.JsonPropertyName("need_apply_category_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int? RequiredCategoryId { get; set; } = default!; + public long? RequiredCategoryId { get; set; } = default!; /// /// 获取或设置需要申请的类目名称。 @@ -160,7 +160,7 @@ [Newtonsoft.Json.JsonProperty("third_category_id")] [System.Text.Json.Serialization.JsonPropertyName("third_category_id")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public int ThirdCategoryId { get; set; } + public long ThirdCategoryId { get; set; } /// /// 获取或设置商品状态。 diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json index 976fff6e..0c86298e 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json @@ -8,7 +8,15 @@ "product_info": { "product_id": "3286", "sku_id": "4740", - "count": 1 + "count": 1, + "voucher_list": [ + { + "vourcher_code": "232323" + }, + { + "vourcher_code": "232324" + } + ] }, "details": { "desc": "1234", @@ -38,6 +46,7 @@ "ret": 0, "message": "" }, - "type": "REFUND" + "type": "REFUND", + "gen_scene": 0 } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.json new file mode 100644 index 00000000..8985f12a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailRequest.json @@ -0,0 +1,3 @@ +{ + "flow_id": "10000057741221110" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.json new file mode 100644 index 00000000..674c4719 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowDetailResponse.json @@ -0,0 +1,23 @@ +{ + "errcode": 0, + "errmsg": "ok", + "funds_flow": { + "flow_id": "10000057741221110", + "funds_type": 3, + "flow_type": 2, + "amount": 1, + "balance": 28281, + "related_info_list": [ + { + "related_type": 2, + "aftersale_id": "1000283382788072", + "transaction_id": "4200001619202211090964182530" + }, + { + "related_type": 1, + "order_id": "3707337764590192128", + "transaction_id": "4200001619202211090964182530" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.json new file mode 100644 index 00000000..bcb72eb2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListRequest.json @@ -0,0 +1,8 @@ +{ + "page": 1, + "page_size": 10, + "start_time": 1668008734, + "end_time": 1668008737, + "next_key": "CAAQABgBIhExMDAwMDA0MTU3MzIyMTEwOSiflq+bBg==", + "transaction_id": "4200001619202211090964182530" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.json new file mode 100644 index 00000000..f71a5986 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECFunds/ChannelsECFundsGetFundsFlowListResponse.json @@ -0,0 +1,7 @@ +{ + "errcode": 0, + "errmsg": "ok", + "flow_ids": [ "123243", "123124134" ], + "has_more": true, + "next_key": "CO0GEGQY2vQFIhI1MTAwMDAxNDQ3NDgyMTEwMjEo7rfFiwY=" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json index 393a0f3f..160b3398 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json @@ -35,7 +35,14 @@ "extra_service": { "seven_day_return": 1, "freight_insurance": 0 - } + }, + "voucher_list": [ + { + "voucher_code": "12345", + "voucher_type": 1, + "voucher_buy_amount": 10000 + } + ] } ], "pay_info": { diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.json new file mode 100644 index 00000000..36d582f6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddRequest.json @@ -0,0 +1,37 @@ +{ + "out_product_id": "test_120719261", + "product_type": 1, + "product_name": "测试商品", + "category_id": "545201", + "brand_id": "10010719", + "head_imgs": [ + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HPfcDsYrzbTlVSFQI9Qar0uzDhKI-EB7Efryf-dxlUE", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HAOY-e61JPVNI5fsTlOcy-1r_rSxqnAsIUWqXXWNJSE", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HLD6dz9RbUkPzBQGHnpb9Z7BcK9kF1HYeLkwxiK9RtI" + ], + "verify_page": { + "appid": "wxca8d4b8e8feedc2a", + "path": "main/channels/buy/buy.html?productId=123" + }, + "code_source_type": 1, + "attr_kv_map": { + "use_date_rule": "{\\\"validate_type\\\":1,\\\"use_date\\\":{\\\"use_start_date\\\":\\\"2023-11-29\\\",\\\"use_end_date\\\":\\\"2023-12-31\\\"}\\}", + "use_time": "{\"use_time_type\":2,\"time_periods\":[{\"use_start_time\":\"10:00:00\",\"use_end_time\":\"20:00:00\"}]}", + "detail_imgs": "[\"https://mmecimage.cn/xxxxxxxxxx\",\"https://mmecimage.cn/yyyyyyyyyy\",\"https://mmecimage.cn/zzzzzzzzzz\"]", + "set_meals": "[{\"group_name\": \"套餐名称\", \"items\": [{\"item_count\": 1, \"item_name\": \"项目名称\",\"item_price\": 28800}],\"option_count\": 1}]", + "exclusive_date": "{\"enable\": 0}", + "voucher_amount": "100", + "bring_out_type": "1", + "appointment": "{\"need_appointment\":0}", + "need_phone_num": "0", + "additional_rule": "\"附加规则\"", + "available_store_desc": "\"可用门店描述\"", + "settle_type": "1", + "refund_policy": "1" + }, + "skus": [ + { + "sale_price": 100 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.json new file mode 100644 index 00000000..746a4473 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAddResponse.json @@ -0,0 +1,10 @@ +{ + "errcode": 0, + "errmsg": "ok", + "data": { + "product_id": "15000000000000", + "sku_ids": [ + "1234567890" + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.json new file mode 100644 index 00000000..d5a6dcf0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeAuditFreeRequest.json @@ -0,0 +1,9 @@ +{ + "product_id": "15000000392025", + "skus": [ + { + "sku_id": "2022104954", + "sale_price": 90 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.json new file mode 100644 index 00000000..9e9c3592 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetRequest.json @@ -0,0 +1,4 @@ +{ + "product_id": "15000000134007", + "data_type": 2 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.json new file mode 100644 index 00000000..cf6eac82 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeGetResponse.json @@ -0,0 +1,43 @@ +{ + "errcode": 0, + "errmsg": "ok", + "draft_data": { + "product_id": "15000000134007", + "out_product_id": "test1", + "product_type": 1, + "product_name": "测试商品改", + "category_id": "1452", + "brand_id": "2100000000", + "head_imgs": [ + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HA7ukhipcfggnDP8l5EqCwX1YsvxMZwAFvoPNqG-IbU", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HO7eONXc8Y9uLHr0q0Rs6UvJ0iC0oAuQD3whJEA5Sc4", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HKBXBm8pze5WcayaDacjfSveBYQIQzKrVaR3zi2tja4" + ], + "verify_page": { + "appid": "wxca8d4b8e8feedc2a", + "path": "main/channels/buy/buy.html?productId=123" + }, + "code_source_type": 1, + "attr_kv_map": { + "voucher_amount": "222", + "use_date_rule": "{\"validate_type\":1,\"use_date\":{\"use_start_date\":\"2023-11-29\",\"use_end_date\":\"2023-12-15\"}}", + "exclusive_date": "{\"days_of_week\":[]}", + "settle_type": "2", + "need_phone_num": "0", + "bring_out_type": "1", + "refund_policy": "0", + "use_time": "{\"use_time_type\":1,\"time_periods\":[]}" + }, + "skus": [ + { + "sku_id": "1930992007", + "sale_price": 123, + "stock_num": 21 + } + ], + "draft_status": 1, + "audit_result": { + "audit_status": 0 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.json new file mode 100644 index 00000000..09eee22b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProductLocalLife/ChannelsECProductLocalLifeUpdateRequest.json @@ -0,0 +1,34 @@ +{ + "product_id": 15000000134007, + "out_product_id": "test-out_id", + "product_type": 1, + "product_name": "测试商品改", + "category_id": 1452, + "brand_id": 2100000000, + "head_imgs": [ + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HA7ukhipcfggnDP8l5EqCwX1YsvxMZwAFvoPNqG-IbU", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HO7eONXc8Y9uLHr0q0Rs6UvJ0iC0oAuQD3whJEA5Sc4", + "https://mmecimage.cn/p/wx2b255582a7b4bfd0/HKBXBm8pze5WcayaDacjfSveBYQIQzKrVaR3zi2tja4" + ], + "verify_page": { + "appid": "wxca8d4b8e8feedc2a", + "path": "main/channels/buy/buy.html?productId=123" + }, + "code_source_type": 1, + "attr_kv_map": { + "voucher_amount": "222", + "use_date_rule": "{\"validate_type\":1,\"use_date\":{\"use_start_date\":\"2023-11-29\",\"use_end_date\":\"2023-12-15\"}}", + "exclusive_date": "{\"days_of_week\":[]}", + "settle_type": "2", + "need_phone_num": "0", + "bring_out_type": "1", + "refund_policy": "0", + "use_time": "{\"use_time_type\":1,\"time_periods\":[]}" + }, + "skus": [ + { + "sku_id": 1930992007, + "sale_price": 111 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.json new file mode 100644 index 00000000..2bd85f2e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListRequest.json @@ -0,0 +1,6 @@ +{ + "product_id": "123456", + "bill_date": "2023-12-03", + "page_size": 3, + "page_ctx": "" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.json new file mode 100644 index 00000000..7822f479 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Bill/ChannelsECVoucherGetBillListResponse.json @@ -0,0 +1,23 @@ +{ + "errcode": 0, + "errmsg": "成功", + "bill_list": [ + { + "voucher_name": "90抵100代金券", + "product_id": "123456", + "code": "123456789", + "order_id": "027828012830384172", + "openid": "asdjeine835k9fjeld93mf", + "voucher_buy_time": 1702016538, + "voucher_buy_amount": 9000, + "voucher_pay_amount": 8500, + "mch_favor_amount": 500, + "platform_favor_amount": 0, + "consume_time": 1702189338, + "consume_store_name": "开心小店", + "mch_settle_amount": 8300, + "finder_settle_amount": 0 + } + ], + "page_ctx": "dsfajasdlf3434" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.json new file mode 100644 index 00000000..34847f68 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeRequest.json @@ -0,0 +1,8 @@ +{ + "consume_request_no": "233244dfgfdfgsdfgsdf", + "encrypted_codes": [ "243234dsfsdf", "24334dfgd", "345453dsf" ], + "codes": [ "232323", "23232323", "32434454545" ], + "sku_id": "12345", + "consume_store_name": "xxx旗舰店", + "consume_channel": 2 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.json new file mode 100644 index 00000000..b6679699 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherConsumeResponse.json @@ -0,0 +1,35 @@ +{ + "errcode": 0, + "errmsg": "成功", + "voucher_list": [ + { + "code": "232323", + "status": 2, + "send_time": 1699856182, + "update_time": 1699856182, + "start_time": 1699856182, + "end_time": 1699856182, + "consume_time": 1699856182, + "refund_time": 1699856182, + "product_id": "12345", + "consume_store_name": "xxx旗舰店", + "voucher_type": 1, + "voucher_buy_amount": 0, + "voucher_actual_amount": 0, + "telphone_no": "fasdf343df34545", + "openid": "xsdfs4534543534534", + "code_type": 1, + "order_id": "23434sdfsdf34342", + "sku_id": "12345" + } + ], + "fail_voucher_list": [ + { + "encrypted_code": "csbm9", + "code": "sqfvm", + "sku_id": 12345, + "ret_code": 0, + "ret_msg": "" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListRequest.json new file mode 100644 index 00000000..068559d5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListRequest.json @@ -0,0 +1,6 @@ +{ + "openid": "xsdfs4534543534534", + "status": 1, + "page_size": 3, + "page_ctx": "" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListResponse.json new file mode 100644 index 00000000..9efdb73e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetListResponse.json @@ -0,0 +1,28 @@ +{ + "errcode": 0, + "errmsg": "成功", + "openid": "xsdfs4534543534534", + "voucher_list": [ + { + "code": "232323", + "status": 1, + "send_time": 1699856182, + "update_time": 1699856182, + "start_time": 1699856182, + "end_time": 1699856182, + "consume_time": 1699856182, + "refund_time": 1699856182, + "product_id": "12345", + "consume_store_name": "xxx旗舰店", + "voucher_type": 1, + "voucher_buy_amount": 0, + "voucher_actual_amount": 0, + "telphone_no": "fasdf343df34545", + "openid": "xsdfs4534543534534", + "code_type": 1, + "order_id": "23434sdfsdf34342", + "sku_id": "12345" + } + ], + "page_ctx": "dsfajasdlf3434" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetRequest.json new file mode 100644 index 00000000..66cef8db --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetRequest.json @@ -0,0 +1,5 @@ +{ + "encrypted_code": "csbm9", + "code": "sqfvm", + "sku_id": 12345 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetResponse.json new file mode 100644 index 00000000..899e91f0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherGetResponse.json @@ -0,0 +1,25 @@ +{ + "errcode": 0, + "errmsg": "成功", + "voucher": { + "code": "sqfvm", + "status": 1, + "send_time": 1699856182, + "update_time": 1699856182, + "start_time": 1699856182, + "end_time": 1699856182, + "consume_time": 1699856182, + "refund_time": 1699856182, + "product_id": "12345", + "consume_store_name": "xxx旗舰店", + "voucher_type": 1, + "voucher_buy_amount": 0, + "voucher_actual_amount": 0, + "telphone_no": "fasdf343df34545", + "openid": "xsdfs4534543534534", + "code_type": 1, + "order_id": "23434sdfsdf34342", + "sku_id": "12345", + "union_id": "232323" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.json new file mode 100644 index 00000000..57584be0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeRequest.json @@ -0,0 +1,12 @@ +{ + "revoke_request_no": "233244dfgfdfgsdfgsdf", + "reovke_vouchers": [ + { + "encrypted_code": "223dfsdf" + }, + { + "code": "123412", + "sku_id": "12345" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.json new file mode 100644 index 00000000..b6679699 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/ChannelsECVoucherRevokeResponse.json @@ -0,0 +1,35 @@ +{ + "errcode": 0, + "errmsg": "成功", + "voucher_list": [ + { + "code": "232323", + "status": 2, + "send_time": 1699856182, + "update_time": 1699856182, + "start_time": 1699856182, + "end_time": 1699856182, + "consume_time": 1699856182, + "refund_time": 1699856182, + "product_id": "12345", + "consume_store_name": "xxx旗舰店", + "voucher_type": 1, + "voucher_buy_amount": 0, + "voucher_actual_amount": 0, + "telphone_no": "fasdf343df34545", + "openid": "xsdfs4534543534534", + "code_type": 1, + "order_id": "23434sdfsdf34342", + "sku_id": "12345" + } + ], + "fail_voucher_list": [ + { + "encrypted_code": "csbm9", + "code": "sqfvm", + "sku_id": 12345, + "ret_code": 0, + "ret_msg": "" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.json new file mode 100644 index 00000000..26c4a25f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadRequest.json @@ -0,0 +1,5 @@ +{ + "product_id": "12345", + "sku_id": "12345", + "codes": [ "232323", "23232323", "32434454545" ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.json new file mode 100644 index 00000000..0b81afe4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVoucher/Codes/ChannelsECVoucherCodesUploadResponse.json @@ -0,0 +1,16 @@ +{ + "errcode": 10001, + "errmsg": "部分成功", + "product_id": "12345", + "total_count": 3, + "success_count": 2, + "success_codes": [ "232323", "23232323" ], + "fail_count": 1, + "fail_codes": [ + { + "code": "32434454545", + "errcode": 111, + "errmsg": "此code已上传" + } + ] +}