diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs index 05d81e03..00d6216e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/WxaSecurity/WxaMediaCheckEvent.cs @@ -7,7 +7,7 @@ /// https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html /// https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync-v1.html /// - public class WxaMediaCheckEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable + public class WxaMediaCheckEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable { public static class Types { @@ -18,6 +18,7 @@ /// [Newtonsoft.Json.JsonProperty("suggest")] [System.Text.Json.Serialization.JsonPropertyName("suggest")] + [System.Xml.Serialization.XmlElement("suggest")] public string SuggestType { get; set; } = default!; /// @@ -25,6 +26,7 @@ /// [Newtonsoft.Json.JsonProperty("label")] [System.Text.Json.Serialization.JsonPropertyName("label")] + [System.Xml.Serialization.XmlElement("label")] public int Label { get; set; } } @@ -35,6 +37,7 @@ /// [Newtonsoft.Json.JsonProperty("errcode")] [System.Text.Json.Serialization.JsonPropertyName("errcode")] + [System.Xml.Serialization.XmlElement("errcode")] public int ErrorCode { get; set; } /// @@ -42,6 +45,7 @@ /// [Newtonsoft.Json.JsonProperty("strategy")] [System.Text.Json.Serialization.JsonPropertyName("strategy")] + [System.Xml.Serialization.XmlElement("strategy")] public string Strategy { get; set; } = default!; /// @@ -49,6 +53,7 @@ /// [Newtonsoft.Json.JsonProperty("suggest")] [System.Text.Json.Serialization.JsonPropertyName("suggest")] + [System.Xml.Serialization.XmlElement("suggest", IsNullable = true)] public string? SuggestType { get; set; } /// @@ -56,6 +61,7 @@ /// [Newtonsoft.Json.JsonProperty("label")] [System.Text.Json.Serialization.JsonPropertyName("label")] + [System.Xml.Serialization.XmlElement("label", IsNullable = true)] public int? Label { get; set; } /// @@ -63,6 +69,7 @@ /// [Newtonsoft.Json.JsonProperty("prob")] [System.Text.Json.Serialization.JsonPropertyName("prob")] + [System.Xml.Serialization.XmlElement("prob", IsNullable = true)] public int? Probability { get; set; } } } @@ -74,6 +81,7 @@ [Newtonsoft.Json.JsonProperty("isrisky")] [System.Text.Json.Serialization.JsonPropertyName("isrisky")] [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Xml.Serialization.XmlElement("isrisky")] public bool IsRisky { get; set; } /// @@ -81,6 +89,7 @@ /// [Newtonsoft.Json.JsonProperty("extra_info_json")] [System.Text.Json.Serialization.JsonPropertyName("extra_info_json")] + [System.Xml.Serialization.XmlElement("extra_info_json", IsNullable = true)] public string? JsonExtra { get; set; } /// @@ -88,6 +97,7 @@ /// [Newtonsoft.Json.JsonProperty("appid")] [System.Text.Json.Serialization.JsonPropertyName("appid")] + [System.Xml.Serialization.XmlElement("appid")] public string AppId { get; set; } = default!; /// @@ -95,6 +105,7 @@ /// [Newtonsoft.Json.JsonProperty("trace_id")] [System.Text.Json.Serialization.JsonPropertyName("trace_id")] + [System.Xml.Serialization.XmlElement("trace_id")] public string TraceId { get; set; } = default!; /// @@ -102,6 +113,7 @@ /// [Newtonsoft.Json.JsonProperty("status_code")] [System.Text.Json.Serialization.JsonPropertyName("status_code")] + [System.Xml.Serialization.XmlElement("status_code")] public int StatusCode { get; set; } /// @@ -109,6 +121,7 @@ /// [Newtonsoft.Json.JsonProperty("version")] [System.Text.Json.Serialization.JsonPropertyName("version")] + [System.Xml.Serialization.XmlElement("version", IsNullable = true)] public int? Version { get; set; } /// @@ -116,6 +129,7 @@ /// [Newtonsoft.Json.JsonProperty("result")] [System.Text.Json.Serialization.JsonPropertyName("result")] + [System.Xml.Serialization.XmlElement("result", IsNullable = true)] public Types.Result? Result { get; set; } /// @@ -123,6 +137,7 @@ /// [Newtonsoft.Json.JsonProperty("detail")] [System.Text.Json.Serialization.JsonPropertyName("detail")] + [System.Xml.Serialization.XmlElement("detail", IsNullable = true)] public Types.Detail[]? DetailList { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs index 6b1c31d7..d85cb0b0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteWxaExtensions.cs @@ -875,6 +875,66 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + + /// + /// 异步调用 [POST] /wxa/servicemarket/service/get_service_buyer_list 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/service_market/interface/value_added/servicemarket_get_service_buyer_list.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaServiceMarketServiceGetServiceBuyerListAsync(this WechatApiClient client, Models.WxaServiceMarketServiceGetServiceBuyerListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "servicemarket", "service", "get_service_buyer_list") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/servicemarket/service/get_service_buyer 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/service_market/interface/value_added/servicemarket_get_service_buyer.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaServiceMarketServiceGetServiceBuyerAsync(this WechatApiClient client, Models.WxaServiceMarketServiceGetServiceBuyerRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "servicemarket", "service", "get_service_buyer") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /wxa/servicemarket/get_paid_order_list 接口。 + /// REF: https://developers.weixin.qq.com/doc/oplatform/service_market/interface/value_added/servicemarket_get_paid_order_list.html + /// + /// + /// + /// + /// + public static async Task ExecuteWxaServiceMarketGetPaidOrderListAsync(this WechatApiClient client, Models.WxaServiceMarketGetPaidOrderListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + IFlurlRequest flurlReq = client + .CreateRequest(request, HttpMethod.Post, "wxa", "servicemarket", "get_paid_order_list") + .SetQueryParam("access_token", request.ComponentAccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } #endregion #region ShortLink diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyRequest.cs index 1e23de02..7116a114 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginApplyRequest.cs @@ -13,7 +13,7 @@ public string Action { get; set; } = "apply"; /// - /// 获取或设置插件 Appid。 + /// 获取或设置插件 AppId。 /// [Newtonsoft.Json.JsonProperty("plugin_appid")] [System.Text.Json.Serialization.JsonPropertyName("plugin_appid")] diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindRequest.cs index 76212412..81833226 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/Plugin/WxaPluginUnbindRequest.cs @@ -13,7 +13,7 @@ public string Action { get; set; } = "unbind"; /// - /// 获取或设置插件 Appid。 + /// 获取或设置插件 AppId。 /// [Newtonsoft.Json.JsonProperty("plugin_appid")] [System.Text.Json.Serialization.JsonPropertyName("plugin_appid")] diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.cs new file mode 100644 index 00000000..276d539d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.cs @@ -0,0 +1,44 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/get_paid_order_list 接口的请求。 + /// + public class WxaServiceMarketGetPaidOrderListRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + public string ServiceId { get; set; } = string.Empty; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.cs new file mode 100644 index 00000000..b611066a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/get_paid_order_list 接口的响应。 + /// + public class WxaServiceMarketGetPaidOrderListResponse : WechatApiResponse + { + public static class Types + { + public class Order + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long OrderId { get; set; } + + /// + /// 获取或设置规格 ID。 + /// + [Newtonsoft.Json.JsonProperty("specification_id")] + [System.Text.Json.Serialization.JsonPropertyName("specification_id")] + public string SpecificationId { get; set; } = default!; + + /// + /// 获取或设置生效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("effective_time")] + [System.Text.Json.Serialization.JsonPropertyName("effective_time")] + public long EffectiveTimestamp { get; set; } + + /// + /// 获取或设置过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long ExpireTimestamp { get; set; } + + /// + /// 获取或设置订单总价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("total_price")] + [System.Text.Json.Serialization.JsonPropertyName("total_price")] + public int? TotalFee { get; set; } + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public Types.Order[] OrderList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.cs new file mode 100644 index 00000000..d09acd74 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/service/get_service_buyer_list 接口的请求。 + /// + public class WxaServiceMarketServiceGetServiceBuyerListRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + public string ServiceId { get; set; } = string.Empty; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.cs new file mode 100644 index 00000000..d45356e5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.cs @@ -0,0 +1,63 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/service/get_service_buyer_list 接口的响应。 + /// + public class WxaServiceMarketServiceGetServiceBuyerListResponse : WechatApiResponse + { + public static class Types + { + public class Buyer + { + public static class Types + { + public class Specification + { + /// + /// 获取或设置规格 ID。 + /// + [Newtonsoft.Json.JsonProperty("specification_id")] + [System.Text.Json.Serialization.JsonPropertyName("specification_id")] + public string SpecificationId { get; set; } = default!; + + /// + /// 获取或设置过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long ExpireTime { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] + public string ServiceId { get; set; } = default!; + + /// + /// 获取或设置规格列表。 + /// + [Newtonsoft.Json.JsonProperty("spec_list")] + [System.Text.Json.Serialization.JsonPropertyName("spec_list")] + public Types.Specification[]? SpecificationList { get; set; } + } + } + + /// + /// 获取或设置服务用户列表。 + /// + [Newtonsoft.Json.JsonProperty("buyer_list")] + [System.Text.Json.Serialization.JsonPropertyName("buyer_list")] + public Types.Buyer[] BuyerList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.cs new file mode 100644 index 00000000..3b24af04 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/service/get_service_buyer 接口的请求。 + /// + public class WxaServiceMarketServiceGetServiceBuyerRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentAccessToken { get; set; } = string.Empty; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("service_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_id")] + public string ServiceId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.cs new file mode 100644 index 00000000..dcbded20 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /wxa/servicemarket/service/get_service_buyer 接口的响应。 + /// + public class WxaServiceMarketServiceGetServiceBuyerResponse : WechatApiResponse + { + public static class Types + { + public class Buyer : WxaServiceMarketServiceGetServiceBuyerListResponse.Types.Buyer + { + } + } + + /// + /// 获取或设置服务用户信息。 + /// + [Newtonsoft.Json.JsonProperty("buyer")] + [System.Text.Json.Serialization.JsonPropertyName("buyer")] + public Types.Buyer Buyer { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.json new file mode 100644 index 00000000..57db54dc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListRequest.json @@ -0,0 +1,6 @@ +{ + "appid": "wx2333", + "service_id": "10000000005", + "offset": 0, + "limit": 20 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.json new file mode 100644 index 00000000..86177c3d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketGetPaidOrderListResponse.json @@ -0,0 +1,12 @@ +{ + "errcode": 0, + "errmsg": "ok", + "order_list": [ + { + "order_id": 123, + "effective_time": 1640173379, + "expire_time": 1640259780, + "specification_id": "special" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.json new file mode 100644 index 00000000..68a2e395 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListRequest.json @@ -0,0 +1,5 @@ +{ + "service_id": "10000000005", + "offset": 0, + "limit": 10 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.json new file mode 100644 index 00000000..880cf561 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerListResponse.json @@ -0,0 +1,34 @@ +{ + "errcode": 0, + "errmsg": "ok", + "buyer_list": [ + { + "appid": "wxb24cc230ace685a3", + "service_id": 10000000005, + "spec_list": [ + { + "expire_time": 1619010767, + "specification_id": "free" + }, + { + "expire_time": 1637987028, + "specification_id": "pro" + } + ] + }, + { + "appid": "wxd30af6a6a77d8a32", + "service_id": 10000000005, + "spec_list": [ + { + "expire_time": 1619010768, + "specification_id": "free" + }, + { + "expire_time": 1637987029, + "specification_id": "pro" + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.json new file mode 100644 index 00000000..6d0effd0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerRequest.json @@ -0,0 +1,4 @@ +{ + "appid": "wxb24cc230ace685a3", + "service_id": "10000000005" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.json new file mode 100644 index 00000000..98c399c3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Wxa/ServiceMarket/WxaServiceMarketServiceGetServiceBuyerResponse.json @@ -0,0 +1,18 @@ +{ + "errcode": 0, + "errmsg": "ok", + "buyer": { + "appid": "wxb24cc230ace685a3", + "service_id": 10000000005, + "spec_list": [ + { + "expire_time": 1619010767, + "specification_id": "free" + }, + { + "expire_time": 1637987028, + "specification_id": "pro" + } + ] + } +}