diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipCloseEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipCloseEvent.cs deleted file mode 100644 index a769ec94..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipCloseEvent.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_close 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipCloseEvent : WechatApiEvent - { - public static class Types - { - public class User - { - /// - /// 获取或设置注销时间戳。 - /// - [Newtonsoft.Json.JsonProperty("close_time")] - [System.Text.Json.Serialization.JsonPropertyName("close_time")] - [System.Xml.Serialization.XmlElement("close_time")] - public long CloseTimestamp { get; set; } - } - } - - /// - /// 获取或设置用户信息。 - /// - [Newtonsoft.Json.JsonProperty("user_info")] - [System.Text.Json.Serialization.JsonPropertyName("user_info")] - [System.Xml.Serialization.XmlElement("user_info")] - public Types.User User { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.cs deleted file mode 100644 index 288cae49..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_grade_info_update 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipGradeInfoUpgradeEvent : WechatApiEvent - { - public static class Types - { - public class User - { - /// - /// 获取或设置会员等级。 - /// - [Newtonsoft.Json.JsonProperty("grade")] - [System.Text.Json.Serialization.JsonPropertyName("grade")] - [System.Xml.Serialization.XmlElement("grade")] - public int Grade { get; set; } - - /// - /// 获取或设置经验值。 - /// - [Newtonsoft.Json.JsonProperty("experience_value")] - [System.Text.Json.Serialization.JsonPropertyName("experience_value")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("experience_value")] - public int ExperienceValue { get; set; } - } - } - - /// - /// 获取或设置用户信息。 - /// - [Newtonsoft.Json.JsonProperty("user_info")] - [System.Text.Json.Serialization.JsonPropertyName("user_info")] - [System.Xml.Serialization.XmlElement("user_info")] - public Types.User User { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipJoinEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipJoinEvent.cs deleted file mode 100644 index f08b2cde..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipJoinEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_join 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipJoinEvent : WechatApiEvent - { - public static class Types - { - public class User - { - /// - /// 获取或设置手机号码。 - /// - [Newtonsoft.Json.JsonProperty("phone_number")] - [System.Text.Json.Serialization.JsonPropertyName("phone_number")] - [System.Xml.Serialization.XmlElement("phone_number")] - public string PhoneNumber { get; set; } = default!; - - /// - /// 获取或设置加入时间戳。 - /// - [Newtonsoft.Json.JsonProperty("join_time")] - [System.Text.Json.Serialization.JsonPropertyName("join_time")] - [System.Xml.Serialization.XmlElement("join_time")] - public long JoinTimestamp { get; set; } - } - } - - /// - /// 获取或设置用户信息。 - /// - [Newtonsoft.Json.JsonProperty("user_info")] - [System.Text.Json.Serialization.JsonPropertyName("user_info")] - [System.Xml.Serialization.XmlElement("user_info")] - public Types.User User { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreExchangeEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreExchangeEvent.cs deleted file mode 100644 index a58e5aae..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreExchangeEvent.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_score_exchange 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipScoreExchangeEvent : WechatApiEvent - { - public static class Types - { - public class Exchange - { - public static class Types - { - public class Coupon - { - /// - /// 获取或设置优惠券 ID。 - /// - [Newtonsoft.Json.JsonProperty("related_coupon_id")] - [System.Text.Json.Serialization.JsonPropertyName("related_coupon_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("related_coupon_id")] - public long CouponId { get; set; } - } - - public class Product - { - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("related_product_id")] - [System.Text.Json.Serialization.JsonPropertyName("related_product_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("related_product_id")] - public long CouponId { get; set; } - } - } - - /// - /// 获取或设置兑换类型。 - /// - [Newtonsoft.Json.JsonProperty("score_item_type")] - [System.Text.Json.Serialization.JsonPropertyName("score_item_type")] - [System.Xml.Serialization.XmlElement("score_item_type")] - public int ScoreItemType { get; set; } - - /// - /// 获取或设置兑换积分。 - /// - [Newtonsoft.Json.JsonProperty("pay_score")] - [System.Text.Json.Serialization.JsonPropertyName("pay_score")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("pay_score")] - public int PayScore { get; set; } - - /// - /// 获取或设置兑换的优惠券信息。 - /// - [Newtonsoft.Json.JsonProperty("coupon_info")] - [System.Text.Json.Serialization.JsonPropertyName("coupon_info")] - [System.Xml.Serialization.XmlElement("coupon_info", IsNullable = true)] - public Types.Coupon? Coupon { get; set; } - - /// - /// 获取或设置兑换的商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product_info")] - [System.Text.Json.Serialization.JsonPropertyName("product_info")] - [System.Xml.Serialization.XmlElement("product_info", IsNullable = true)] - public Types.Product? Product { get; set; } - } - } - - /// - /// 获取或设置兑换信息。 - /// - [Newtonsoft.Json.JsonProperty("exchange_info")] - [System.Text.Json.Serialization.JsonPropertyName("exchange_info")] - [System.Xml.Serialization.XmlElement("exchange_info")] - public Types.Exchange Exchange { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreUpdateEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreUpdateEvent.cs deleted file mode 100644 index 84d44e38..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipScoreUpdateEvent.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_score_update 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipScoreUpdateEvent : WechatApiEvent - { - public static class Types - { - public class User - { - /// - /// 获取或设置会员等级。 - /// - [Newtonsoft.Json.JsonProperty("grade")] - [System.Text.Json.Serialization.JsonPropertyName("grade")] - [System.Xml.Serialization.XmlElement("grade")] - public int Grade { get; set; } - - /// - /// 获取或设置当前积分。 - /// - [Newtonsoft.Json.JsonProperty("score")] - [System.Text.Json.Serialization.JsonPropertyName("score")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("score")] - public int Score { get; set; } - - /// - /// 获取或设置本次改动积分。 - /// - [Newtonsoft.Json.JsonProperty("delta_score")] - [System.Text.Json.Serialization.JsonPropertyName("delta_score")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("delta_score")] - public int DeltaScore { get; set; } - - /// - /// 获取或设置流水类型。 - /// - [Newtonsoft.Json.JsonProperty("flow_type")] - [System.Text.Json.Serialization.JsonPropertyName("flow_type")] - [System.Xml.Serialization.XmlElement("flow_type")] - public int FlowType { get; set; } - } - } - - /// - /// 获取或设置用户信息。 - /// - [Newtonsoft.Json.JsonProperty("user_info")] - [System.Text.Json.Serialization.JsonPropertyName("user_info")] - [System.Xml.Serialization.XmlElement("user_info")] - public Types.User User { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipTaskAwardEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipTaskAwardEvent.cs deleted file mode 100644 index 9404c9c4..00000000 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipTaskAwardEvent.cs +++ /dev/null @@ -1,82 +0,0 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Events -{ - /// - /// 表示 EVENT.channels_ec_vip_task_award 事件的数据。 - /// - /// REF:
- /// - ///
- ///
- public class ChannelsECVipTaskAwardEvent : WechatApiEvent - { - public static class Types - { - public class Task - { - public static class Types - { - public class AwardInfo - { - /// - /// 获取或设置奖励类型。 - /// - [Newtonsoft.Json.JsonProperty("award_type")] - [System.Text.Json.Serialization.JsonPropertyName("award_type")] - [System.Xml.Serialization.XmlElement("award_type")] - public int AwardType { get; set; } - - /// - /// 获取或设置奖励的优惠券 ID。 - /// - [Newtonsoft.Json.JsonProperty("coupon_id")] - [System.Text.Json.Serialization.JsonPropertyName("coupon_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("coupon_id", IsNullable = true)] - public long? CouponId { get; set; } - - /// - /// 获取或设置奖励的积分。 - /// - [Newtonsoft.Json.JsonProperty("gain_score")] - [System.Text.Json.Serialization.JsonPropertyName("gain_score")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("gain_score", IsNullable = true)] - public int? GainScore { get; set; } - } - } - - /// - /// 获取或设置任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - [System.Xml.Serialization.XmlElement("task_id")] - public long TaskId { get; set; } - - /// - /// 获取或设置任务名称。 - /// - [Newtonsoft.Json.JsonProperty("task_name")] - [System.Text.Json.Serialization.JsonPropertyName("task_name")] - [System.Xml.Serialization.XmlElement("task_name")] - public string TaskName { get; set; } = default!; - - /// - /// 获取或设置奖励信息。 - /// - [Newtonsoft.Json.JsonProperty("award_info")] - [System.Text.Json.Serialization.JsonPropertyName("award_info")] - [System.Xml.Serialization.XmlElement("award_info")] - public Types.AwardInfo AwardInfo { get; set; } = default!; - } - } - - /// - /// 获取或设置任务信息。 - /// - [Newtonsoft.Json.JsonProperty("task_info")] - [System.Text.Json.Serialization.JsonPropertyName("task_info")] - [System.Xml.Serialization.XmlElement("task_info")] - public Types.Task Task { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserAutoAddEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserAutoAddEvent.cs new file mode 100644 index 00000000..873049a6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserAutoAddEvent.cs @@ -0,0 +1,58 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_vip_user_auto_add 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ChannelsECVipUserAutoAddEvent : WechatApiEvent + { + public static class Types + { + public class EventData + { + /// + /// 获取或设置小店 AppId。 + /// + [Newtonsoft.Json.JsonProperty("shop_appid")] + [System.Text.Json.Serialization.JsonPropertyName("shop_appid")] + [System.Xml.Serialization.XmlElement("shop_appid")] + public string ShopAppId { get; set; } = default!; + + /// + /// 获取或设置用户会员身份。 + /// + [Newtonsoft.Json.JsonProperty("identity")] + [System.Text.Json.Serialization.JsonPropertyName("identity")] + [System.Xml.Serialization.XmlElement("identity")] + public string Identity { get; set; } = default!; + + /// + /// 获取或设置用户会员 ID。 + /// + [Newtonsoft.Json.JsonProperty("outer_userid")] + [System.Text.Json.Serialization.JsonPropertyName("outer_userid")] + [System.Xml.Serialization.XmlElement("outer_userid", IsNullable = true)] + public string? OutUserId { get; set; } + + /// + /// 获取或设置关联成功时间戳。 + /// + [Newtonsoft.Json.JsonProperty("add_time")] + [System.Text.Json.Serialization.JsonPropertyName("add_time")] + [System.Xml.Serialization.XmlElement("add_time")] + public long AddTimestamp { get; set; } + } + } + + /// + /// 获取或设置事件信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + [System.Xml.Serialization.XmlElement("info")] + public Types.EventData EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserInfoGetEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserInfoGetEvent.cs new file mode 100644 index 00000000..6bc2c013 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/Channels/EC/ChannelsECVipUserInfoGetEvent.cs @@ -0,0 +1,34 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_vip_user_info_get 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ChannelsECVipUserInfoGetEvent : WechatApiEvent + { + public static class Types + { + public class EventData + { + /// + /// 获取或设置小店 AppId。 + /// + [Newtonsoft.Json.JsonProperty("shop_appid")] + [System.Text.Json.Serialization.JsonPropertyName("shop_appid")] + [System.Xml.Serialization.XmlElement("shop_appid")] + public string ShopAppId { get; set; } = default!; + } + } + + /// + /// 获取或设置事件信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + [System.Xml.Serialization.XmlElement("info")] + public Types.EventData EventData { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index fee12aa3..3670c2d2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -7084,6 +7084,169 @@ namespace SKIT.FlurlHttpClient.Wechat.Api #endregion #endregion + #region ECVip + /// + /// 异步调用 [POST] /channels/ec/vip/v3/wxa/info/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipWxaInfoGetV3Async(this WechatApiClient client, Models.ChannelsECVipWxaInfoGetV3Request 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", "vip", "v3", "wxa", "info", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/user/info/add 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipUserInfoAddAsync(this WechatApiClient client, Models.ChannelsECVipUserInfoAddRequest 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", "vip", "user", "info", "add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/user/info/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipUserInfoUpdateAsync(this WechatApiClient client, Models.ChannelsECVipUserInfoUpdateRequest 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", "vip", "user", "info", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/user/info/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipUserInfoGetAsync(this WechatApiClient client, Models.ChannelsECVipUserInfoGetRequest 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", "vip", "user", "info", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/user/list/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipUserListGetAsync(this WechatApiClient client, Models.ChannelsECVipUserListGetRequest 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", "vip", "user", "list", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/user/info/delete 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipUserInfoDeleteAsync(this WechatApiClient client, Models.ChannelsECVipUserInfoDeleteRequest 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", "vip", "user", "info", "delete") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /channels/ec/vip/shop/list/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECVipShopListGetAsync(this WechatApiClient client, Models.ChannelsECVipShopListGetRequest 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", "vip", "shop", "list", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region ECVoucher #region ECVoucher/Bill /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetRequest.cs new file mode 100644 index 00000000..bedc5b07 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/shop/list/get 接口的请求。 + /// + public class ChannelsECVipShopListGetRequest : WechatApiRequest, IInferable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetResponse.cs new file mode 100644 index 00000000..34372897 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipShopListGetResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/shop/list/get 接口的响应。 + /// + public class ChannelsECVipShopListGetResponse : WechatApiResponse + { + public static class Types + { + public class ShopInfo + { + /// + /// 获取或设置小店 AppId。 + /// + [Newtonsoft.Json.JsonProperty("shop_appid")] + [System.Text.Json.Serialization.JsonPropertyName("shop_appid")] + public string ShopAppId { get; set; } = default!; + } + } + + /// + /// 获取或设置已关联的小店列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.ShopInfo[] ShopList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddRequest.cs new file mode 100644 index 00000000..1062e2ac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddRequest.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/add 接口的请求。 + /// + public class ChannelsECVipUserInfoAddRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class UserInfo + { + /// + /// 获取或设置用户会员身份。 + /// + [Newtonsoft.Json.JsonProperty("identity")] + [System.Text.Json.Serialization.JsonPropertyName("identity")] + public string Identity { get; set; } = string.Empty; + + /// + /// 获取或设置用户会员 ID。 + /// + [Newtonsoft.Json.JsonProperty("outer_userid")] + [System.Text.Json.Serialization.JsonPropertyName("outer_userid")] + public string? OutUserId { get; set; } + } + } + + /// + /// 获取或设置用户操作的会话 ID。 + /// + [Newtonsoft.Json.JsonProperty("session_id")] + [System.Text.Json.Serialization.JsonPropertyName("session_id")] + public string SessionId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序用户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.UserInfo UserInfo { get; set; } = new Types.UserInfo(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddResponse.cs new file mode 100644 index 00000000..df2a1082 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoAddResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/add 接口的响应。 + /// + public class ChannelsECVipUserInfoAddResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.cs new file mode 100644 index 00000000..6878c313 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/delete 接口的请求。 + /// + public class ChannelsECVipUserInfoDeleteRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置小程序用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_openid")] + public string OpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteResponse.cs new file mode 100644 index 00000000..91de227b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoDeleteResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/delete 接口的响应。 + /// + public class ChannelsECVipUserInfoDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetRequest.cs new file mode 100644 index 00000000..762f8b1a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/get 接口的请求。 + /// + public class ChannelsECVipUserInfoGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置小程序用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_openid")] + public string OpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetResponse.cs new file mode 100644 index 00000000..a2de0353 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoGetResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/get 接口的响应。 + /// + public class ChannelsECVipUserInfoGetResponse : WechatApiResponse + { + public static class Types + { + public class UserInfo + { + /// + /// 获取或设置用户会员身份。 + /// + [Newtonsoft.Json.JsonProperty("identity")] + [System.Text.Json.Serialization.JsonPropertyName("identity")] + public string Identity { get; set; } = default!; + + /// + /// 获取或设置用户会员 ID。 + /// + [Newtonsoft.Json.JsonProperty("outer_userid")] + [System.Text.Json.Serialization.JsonPropertyName("outer_userid")] + public string? OutUserId { get; set; } + + /// + /// 获取或设置已关联的小店 AppId 列表。 + /// + [Newtonsoft.Json.JsonProperty("related_shop_appid")] + [System.Text.Json.Serialization.JsonPropertyName("related_shop_appid")] + public string[] RelatedShopAppIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置小程序用户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.UserInfo UserInfo { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.cs new file mode 100644 index 00000000..297847bf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/update 接口的请求。 + /// + public class ChannelsECVipUserInfoUpdateRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class UserInfo : ChannelsECVipUserInfoAddRequest.Types.UserInfo + { + } + } + + /// + /// 获取或设置小程序用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_openid")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序用户信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.UserInfo UserInfo { get; set; } = new Types.UserInfo(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateResponse.cs new file mode 100644 index 00000000..18c334d5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserInfoUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/info/update 接口的响应。 + /// + public class ChannelsECVipUserInfoUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserListGetRequest.cs new file mode 100644 index 00000000..9f205df2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserListGetRequest.cs @@ -0,0 +1,23 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/list/get 接口的请求。 + /// + public class ChannelsECVipUserListGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置分页起始位置。 + /// + [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/Channels/ECVip/ChannelsECVipUserListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserListGetResponse.cs new file mode 100644 index 00000000..c7a76af0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipUserListGetResponse.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/user/list/get 接口的响应。 + /// + public class ChannelsECVipUserListGetResponse : WechatApiResponse + { + public static class Types + { + public class UserInfo + { + /// + /// 获取或设置小程序用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置用户会员身份。 + /// + [Newtonsoft.Json.JsonProperty("identity")] + [System.Text.Json.Serialization.JsonPropertyName("identity")] + public string Identity { get; set; } = default!; + + /// + /// 获取或设置用户会员 ID。 + /// + [Newtonsoft.Json.JsonProperty("outer_userid")] + [System.Text.Json.Serialization.JsonPropertyName("outer_userid")] + public string? OutUserId { get; set; } + + /// + /// 获取或设置已关联的小店 AppId 列表。 + /// + [Newtonsoft.Json.JsonProperty("related_shop_appid")] + [System.Text.Json.Serialization.JsonPropertyName("related_shop_appid")] + public string[] RelatedShopAppIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置小程序用户列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.UserInfo[] UserList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Request.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Request.cs new file mode 100644 index 00000000..2bd0a2b3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/v3/wxa/info/get 接口的请求。 + /// + public class ChannelsECVipWxaInfoGetV3Request : WechatApiRequest, IInferable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.cs new file mode 100644 index 00000000..a2c41c47 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.cs @@ -0,0 +1,86 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/vip/v3/wxa/info/get 接口的响应。 + /// + public class ChannelsECVipWxaInfoGetV3Response : WechatApiResponse + { + public static class Types + { + public class MiniProgramInfo + { + public static class Types + { + public class PathInfo + { + /// + /// 获取或设置会员注册页面路径。 + /// + [Newtonsoft.Json.JsonProperty("register_path")] + [System.Text.Json.Serialization.JsonPropertyName("register_path")] + public string RegisterPathPath { get; set; } = default!; + + /// + /// 获取或设置会员权益页面路径。 + /// + [Newtonsoft.Json.JsonProperty("rights_path")] + [System.Text.Json.Serialization.JsonPropertyName("rights_path")] + public string RightsPagePath { get; set; } = default!; + } + + public class DisplayInfo + { + /// + /// 获取或设置下单页权益展示开关。 + /// + [Newtonsoft.Json.JsonProperty("order_page_display")] + [System.Text.Json.Serialization.JsonPropertyName("order_page_display")] + public int OrderPageDisplayMode { get; set; } + } + } + + /// + /// 获取或设置页面路径信息。 + /// + [Newtonsoft.Json.JsonProperty("paths")] + [System.Text.Json.Serialization.JsonPropertyName("paths")] + public Types.PathInfo PathInfo { get; set; } = default!; + + /// + /// 获取或设置测试白名单用户 OpenId 列表。 + /// + [Newtonsoft.Json.JsonProperty("whitelist_openids")] + [System.Text.Json.Serialization.JsonPropertyName("whitelist_openids")] + public string[] WhiteListOpenIdList { get; set; } = default!; + + /// + /// 获取或设置展示信息。 + /// + [Newtonsoft.Json.JsonProperty("display_info")] + [System.Text.Json.Serialization.JsonPropertyName("display_info")] + public Types.DisplayInfo DisplayInfo { get; set; } = default!; + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("wxa_appid")] + [System.Text.Json.Serialization.JsonPropertyName("wxa_appid")] + public string MiniProgramAppId { get; set; } = default!; + + /// + /// 获取或设置小程序信息。 + /// + [Newtonsoft.Json.JsonProperty("info")] + [System.Text.Json.Serialization.JsonPropertyName("info")] + public Types.MiniProgramInfo MiniProgramInfo { get; set; } = default!; + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("state")] + [System.Text.Json.Serialization.JsonPropertyName("state")] + public int State { get; set; } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.json deleted file mode 100644 index dae84a7b..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipGradeInfoUpgradeEvent.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ToUserName": "gh_*", - "FromUserName": "OPENID", - "CreateTime": 1662480000, - "MsgType": "event", - "Event": "channels_ec_vip_grade_info_update", - "user_info": { - "grade": 2, - "experience_value": 100 - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipJoinEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipJoinEvent.json deleted file mode 100644 index c6f6dfc2..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipJoinEvent.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ToUserName": "gh_*", - "FromUserName": "OPENID", - "CreateTime": 1662480000, - "MsgType": "event", - "Event": "channels_ec_vip_join", - "user_info": { - "join_time": 1662480000, - "phone_number": "123456789" - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreExchangeEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreExchangeEvent.json deleted file mode 100644 index b8da8c1d..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreExchangeEvent.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "ToUserName": "gh_*", - "FromUserName": "OPENID", - "CreateTime": 1662480000, - "MsgType": "event", - "Event": "channels_ec_vip_score_exchange", - "exchange_info": { - "pay_score": 100, - "score_item_type": 1, - "coupon_info": { - "related_coupon_id": 1234 - }, - "product_info": { - "related_product_id": 1234 - } - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreUpdateEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreUpdateEvent.json deleted file mode 100644 index 62948a8b..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipScoreUpdateEvent.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ToUserName": "gh_*", - "FromUserName": "OPENID", - "CreateTime": 1662480000, - "MsgType": "event", - "Event": "channels_ec_vip_score_update", - "user_info": { - "score": 100, - "delta_score": -10, - "flow_type": 3 - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipTaskAwardEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipTaskAwardEvent.json deleted file mode 100644 index 3d58716c..00000000 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipTaskAwardEvent.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "ToUserName": "gh_*", - "FromUserName": "OPENID", - "CreateTime": 1662480000, - "MsgType": "event", - "Event": "channels_ec_vip_task_award", - "task_info": { - "task_id": 123, - "task_name": "任务名称", - "award_info": { - "award_type": 1, - "coupon_id": 1234, - "gain_score": 100 - } - } -} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserAutoAddEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserAutoAddEvent.json new file mode 100644 index 00000000..2651abf4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserAutoAddEvent.json @@ -0,0 +1,13 @@ +{ + "ToUserName": "gh_*", + "FromUserName": "OPENID", + "CreateTime": 1662480000, + "MsgType": "event", + "Event": "channels_ec_vip_user_auto_add", + "info": { + "shop_appid": "xxxxxxxxx", + "outer_userid": "xxxxxxxx", + "identity": "V1", + "add_time": 1666673734 + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipCloseEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserInfoGetEvent.json similarity index 55% rename from test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipCloseEvent.json rename to test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserInfoGetEvent.json index d161311f..7c32f906 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipCloseEvent.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/Channels/EC/ChannelsECVipUserInfoGetEvent.json @@ -3,8 +3,8 @@ "FromUserName": "OPENID", "CreateTime": 1662480000, "MsgType": "event", - "Event": "channels_ec_vip_close", - "user_info": { - "close_time": 1662480000 + "Event": "channels_ec_vip_user_info_get", + "info": { + "shop_appid": "shop_appid" } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipShopListGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipShopListGetResponse.json new file mode 100644 index 00000000..776c2e73 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipShopListGetResponse.json @@ -0,0 +1,9 @@ +{ + "errcode": 0, + "errmsg": "ok", + "list": [ + { + "shop_appid": "shop_appid" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoAddRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoAddRequest.json new file mode 100644 index 00000000..8288c18d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoAddRequest.json @@ -0,0 +1,8 @@ +{ + "session_id": "session_id", + "wxa_openid": "wxa_openid", + "info": { + "identity": "Lv.1", + "outer_userid": "outer_userid" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.json new file mode 100644 index 00000000..c33b674a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoDeleteRequest.json @@ -0,0 +1,3 @@ +{ + "wxa_openid": "wxa_openid" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetRequest.json new file mode 100644 index 00000000..c33b674a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetRequest.json @@ -0,0 +1,3 @@ +{ + "wxa_openid": "wxa_openid" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetResponse.json new file mode 100644 index 00000000..1ea84f09 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoGetResponse.json @@ -0,0 +1,9 @@ +{ + "errcode": 0, + "errmsg": "ok", + "info": { + "identity": "Lv.1", + "outer_userid": "outer_userid", + "related_shop_appid": [ "appid1", "appid2" ] + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.json new file mode 100644 index 00000000..90487959 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserInfoUpdateRequest.json @@ -0,0 +1,7 @@ +{ + "wxa_openid": "wxa_openid", + "info": { + "identity": "Lv.1", + "outer_userid": "outer_userid" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetRequest.json new file mode 100644 index 00000000..f1261a2f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetRequest.json @@ -0,0 +1,4 @@ +{ + "offset": 0, + "limit": 10 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetResponse.json new file mode 100644 index 00000000..d56f10cf --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipUserListGetResponse.json @@ -0,0 +1,12 @@ +{ + "errcode": 0, + "errmsg": "ok", + "list": [ + { + "wxa_openid": "wxa_openid", + "identity": "Lv.1", + "outer_userid": "outer_userid", + "related_shop_appid": [ "shop_appid1", "shop_appid2" ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.json new file mode 100644 index 00000000..f127250b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECVip/ChannelsECVipWxaInfoGetV3Response.json @@ -0,0 +1,19 @@ +{ + "errcode": 0, + "errmsg": "ok", + "wxa_appid": "wxxxxxxxxxxxxxxxxx", + "info": { + "paths": { + "register_path": "main/register/path", + "rights_path": "main/rights/path" + }, + "whitelist_openids": [ + "openid_1", + "openid_2" + ], + "display_info": { + "order_page_display": 0 + } + }, + "state": 0 +}