diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index 6fc890d4..5a575eab 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -199,6 +199,108 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } #endregion + + #region Merchant/Address + /// + /// 异步调用 [POST] /channels/ec/merchant/address/list 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/merchant/address/list.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECMerchantAddressListAsync(this WechatApiClient client, Models.ChannelsECMerchantAddressListRequest 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, "channels", "ec", "merchant", "address", "list") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/merchant/address/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/merchant/address/get.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECMerchantAddressGetAsync(this WechatApiClient client, Models.ChannelsECMerchantAddressGetRequest 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, "channels", "ec", "merchant", "address", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/merchant/address/add 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/merchant/address/add.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECMerchantAddressAddAsync(this WechatApiClient client, Models.ChannelsECMerchantAddressAddRequest 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, "channels", "ec", "merchant", "address", "add") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/merchant/address/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/merchant/address/update.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECMerchantAddressUpdateAsync(this WechatApiClient client, Models.ChannelsECMerchantAddressUpdateRequest 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, "channels", "ec", "merchant", "address", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/merchant/address/delete 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/merchant/address/delete.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECMerchantAddressDeleteAsync(this WechatApiClient client, Models.ChannelsECMerchantAddressDeleteRequest 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, "channels", "ec", "merchant", "address", "delete") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #endregion #endregion #region Order diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.cs new file mode 100644 index 00000000..ca9ab789 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.cs @@ -0,0 +1,133 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/add 接口的请求。 + /// + public class ChannelsECMerchantAddressAddRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class AddressDetail + { + public static class Types + { + public class Address : ChannelsECMerchantAddFreightTemplateRequest.Types.FreightTemplate.Types.Address + { + /// + /// 获取或设置门牌号。 + /// + [Newtonsoft.Json.JsonProperty("house_number")] + [System.Text.Json.Serialization.JsonPropertyName("house_number")] + public string? HouseNumber { get; set; } + + /// + /// 获取或设置经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + public double? Longitude { get; set; } + + /// + /// 获取或设置纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + public double? Latitude { get; set; } + } + + public class AddressType + { + /// + /// 获取或设置是否为同城配送地址。 + /// + [Newtonsoft.Json.JsonProperty("same_city")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("same_city")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSupportSameCity { get; set; } + + /// + /// 获取或设置是否为线下自提地址。 + /// + [Newtonsoft.Json.JsonProperty("pickup")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("pickup")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSupportPickup { get; set; } + } + } + + /// + /// 获取或设置地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.Address Address { get; set; } = new Types.Address(); + + /// + /// 获取或设置地址类型信息。 + /// + [Newtonsoft.Json.JsonProperty("address_type")] + [System.Text.Json.Serialization.JsonPropertyName("address_type")] + public Types.AddressType? AddressType { get; set; } + + /// + /// 获取或设置座机。 + /// + [Newtonsoft.Json.JsonProperty("landline")] + [System.Text.Json.Serialization.JsonPropertyName("landline")] + public string? Landline { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置是否为发货地址。 + /// + [Newtonsoft.Json.JsonProperty("send_addr")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("send_addr")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSendAddress { get; set; } + + /// + /// 获取或设置是否为默认发货地址。 + /// + [Newtonsoft.Json.JsonProperty("default_send")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("default_send")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsDefaultSendAddress { get; set; } + + /// + /// 获取或设置是否为收货地址。 + /// + [Newtonsoft.Json.JsonProperty("recv_addr")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("recv_addr")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsReceiveAddress { get; set; } + + /// + /// 获取或设置是否为默认收货地址。 + /// + [Newtonsoft.Json.JsonProperty("default_recv")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("default_recv")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsDefaultReceiveAddress { get; set; } + } + } + + /// + /// 获取或设置地址详细信息。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public Types.AddressDetail AddressDetail { get; set; } = new Types.AddressDetail(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.cs new file mode 100644 index 00000000..b6b28779 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.cs @@ -0,0 +1,16 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/add 接口的响应。 + /// + public class ChannelsECMerchantAddressAddResponse : WechatApiResponse + { + /// + /// 获取或设置地址 ID。 + /// + [Newtonsoft.Json.JsonProperty("address_id")] + [System.Text.Json.Serialization.JsonPropertyName("address_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long AddressId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.cs new file mode 100644 index 00000000..755f7296 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/delete 接口的请求。 + /// + public class ChannelsECMerchantAddressDeleteRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置地址 ID。 + /// + [Newtonsoft.Json.JsonProperty("address_id")] + [System.Text.Json.Serialization.JsonPropertyName("address_id")] + public long AddressId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteResponse.cs new file mode 100644 index 00000000..55f5acb3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/delete 接口的响应。 + /// + public class ChannelsECMerchantAddressDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.cs new file mode 100644 index 00000000..2ef5e9a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/get 接口的请求。 + /// + public class ChannelsECMerchantAddressGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置地址 ID。 + /// + [Newtonsoft.Json.JsonProperty("address_id")] + [System.Text.Json.Serialization.JsonPropertyName("address_id")] + public long AddressId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.cs new file mode 100644 index 00000000..e5650342 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.cs @@ -0,0 +1,155 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/get 接口的响应。 + /// + public class ChannelsECMerchantAddressGetResponse : WechatApiResponse + { + public static class Types + { + public class AddressDetail + { + public static class Types + { + public class Address : ChannelsECMerchantGetFreightTemplateDetailResponse.Types.FreightTemplate.Types.Address + { + /// + /// 获取或设置门牌号。 + /// + [Newtonsoft.Json.JsonProperty("house_number")] + [System.Text.Json.Serialization.JsonPropertyName("house_number")] + public string? HouseNumber { get; set; } + + /// + /// 获取或设置经度。 + /// + [Newtonsoft.Json.JsonProperty("lng")] + [System.Text.Json.Serialization.JsonPropertyName("lng")] + public double? Longitude { get; set; } + + /// + /// 获取或设置纬度。 + /// + [Newtonsoft.Json.JsonProperty("lat")] + [System.Text.Json.Serialization.JsonPropertyName("lat")] + public double? Latitude { get; set; } + } + + public class AddressType + { + /// + /// 获取或设置是否为同城配送地址。 + /// + [Newtonsoft.Json.JsonProperty("same_city")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("same_city")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsSupportSameCity { get; set; } + + /// + /// 获取或设置是否为线下自提地址。 + /// + [Newtonsoft.Json.JsonProperty("pickup")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("pickup")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsSupportPickup { get; set; } + } + } + + /// + /// 获取或设置地址 ID。 + /// + [Newtonsoft.Json.JsonProperty("address_id")] + [System.Text.Json.Serialization.JsonPropertyName("address_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long AddressId { get; set; } + + /// + /// 获取或设置地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.Address Address { get; set; } = default!; + + /// + /// 获取或设置地址类型信息。 + /// + [Newtonsoft.Json.JsonProperty("address_type")] + [System.Text.Json.Serialization.JsonPropertyName("address_type")] + public Types.AddressType? AddressType { get; set; } = default!; + + /// + /// 获取或设置座机。 + /// + [Newtonsoft.Json.JsonProperty("landline")] + [System.Text.Json.Serialization.JsonPropertyName("landline")] + public string? Landline { get; set; } + + /// + /// 获取或设置备注。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + + /// + /// 获取或设置是否为发货地址。 + /// + [Newtonsoft.Json.JsonProperty("send_addr")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("send_addr")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsSendAddress { get; set; } + + /// + /// 获取或设置是否为默认发货地址。 + /// + [Newtonsoft.Json.JsonProperty("default_send")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("default_send")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsDefaultSendAddress { get; set; } + + /// + /// 获取或设置是否为收货地址。 + /// + [Newtonsoft.Json.JsonProperty("recv_addr")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("recv_addr")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsReceiveAddress { get; set; } + + /// + /// 获取或设置是否为默认收货地址。 + /// + [Newtonsoft.Json.JsonProperty("default_recv")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("default_recv")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsDefaultReceiveAddress { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置地址详细信息。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public Types.AddressDetail AddressDetail { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.cs new file mode 100644 index 00000000..85768aeb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.cs @@ -0,0 +1,23 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/list 接口的请求。 + /// + public class ChannelsECMerchantAddressListRequest : 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/ECMerchant/Address/ChannelsECMerchantAddressListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressListResponse.cs new file mode 100644 index 00000000..ba543c5f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressListResponse.cs @@ -0,0 +1,16 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/list 接口的响应。 + /// + public class ChannelsECMerchantAddressListResponse : WechatApiResponse + { + /// + /// 获取或设置地址 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("address_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("address_id_list")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualLongArrayConverter))] + public long[] AddressIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.cs new file mode 100644 index 00000000..0ff3c8ac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.cs @@ -0,0 +1,53 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/update 接口的请求。 + /// + public class ChannelsECMerchantAddressUpdateRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class AddressDetail : ChannelsECMerchantAddressAddRequest.Types.AddressDetail + { + public static new class Types + { + public class Address : ChannelsECMerchantAddressAddRequest.Types.AddressDetail.Types.Address + { + } + + public class AddressType : ChannelsECMerchantAddressAddRequest.Types.AddressDetail.Types.AddressType + { + } + } + + /// + /// 获取或设置地址 ID。 + /// + [Newtonsoft.Json.JsonProperty("address_id")] + [System.Text.Json.Serialization.JsonPropertyName("address_id")] + public long AddressId { get; set; } + + /// + /// 获取或设置地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public new Types.Address Address { get; set; } = new Types.Address(); + + /// + /// 获取或设置地址类型信息。 + /// + [Newtonsoft.Json.JsonProperty("address_type")] + [System.Text.Json.Serialization.JsonPropertyName("address_type")] + public new Types.AddressType? AddressType { get; set; } + } + } + + /// + /// 获取或设置地址详细信息。 + /// + [Newtonsoft.Json.JsonProperty("address_detail")] + [System.Text.Json.Serialization.JsonPropertyName("address_detail")] + public Types.AddressDetail AddressDetail { get; set; } = new Types.AddressDetail(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateResponse.cs new file mode 100644 index 00000000..d2e5d759 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/merchant/address/update 接口的响应。 + /// + public class ChannelsECMerchantAddressUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantAddFreightTemplateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantAddFreightTemplateRequest.cs index d7bd8ee0..9234ae5d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantAddFreightTemplateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantAddFreightTemplateRequest.cs @@ -15,47 +15,47 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models { public class Address { + /// + /// 获取或设置联系人姓名。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string UserName { get; set; } = string.Empty; + + /// + /// 获取或设置邮政编码。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string? PostalCode { get; set; } + /// /// 获取或设置省份。 /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string? Province { get; set; } + public string ProvinceName { get; set; } = string.Empty; /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string? City { get; set; } + public string CityName { get; set; } = string.Empty; /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string? District { get; set; } + public string DistrictName { get; set; } = string.Empty; /// /// 获取或设置详细地址。 /// [Newtonsoft.Json.JsonProperty("detail_info")] [System.Text.Json.Serialization.JsonPropertyName("detail_info")] - public string? Detail { get; set; } - - /// - /// 获取或设置收件人姓名。 - /// - [Newtonsoft.Json.JsonProperty("user_name")] - [System.Text.Json.Serialization.JsonPropertyName("user_name")] - public string? Name { get; set; } - - /// - /// 获取或设置收件人电话。 - /// - [Newtonsoft.Json.JsonProperty("tel_number")] - [System.Text.Json.Serialization.JsonPropertyName("tel_number")] - public string? TeleNumber { get; set; } + public string Detail { get; set; } = string.Empty; /// /// 获取或设置国家码。 @@ -65,11 +65,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public string? NationalCode { get; set; } /// - /// 获取或设置邮政编码。 + /// 获取或设置电话号码。 /// - [Newtonsoft.Json.JsonProperty("postal_code")] - [System.Text.Json.Serialization.JsonPropertyName("postal_code")] - public string? PostalCode { get; set; } + [Newtonsoft.Json.JsonProperty("tel_number")] + [System.Text.Json.Serialization.JsonPropertyName("tel_number")] + public string TeleNumber { get; set; } = string.Empty; + } public class Area diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantGetFreightTemplateDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantGetFreightTemplateDetailResponse.cs index 434a75ac..7b79adfa 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantGetFreightTemplateDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECMerchant/FreightTemplate/ChannelsECMerchantGetFreightTemplateDetailResponse.cs @@ -13,26 +13,33 @@ { public class Address { + /// + /// 获取或设置收件人姓名。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string UserName { get; set; } = default!; + /// /// 获取或设置省份。 /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string? Province { get; set; } + public string? ProvinceName { get; set; } /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string? City { get; set; } + public string? CityName { get; set; } /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string? District { get; set; } + public string? DistrictName { get; set; } /// /// 获取或设置详细地址。 @@ -42,25 +49,18 @@ public string? Detail { get; set; } /// - /// 获取或设置收件人姓名。 + /// 获取或设置国家码。 /// - [Newtonsoft.Json.JsonProperty("user_name")] - [System.Text.Json.Serialization.JsonPropertyName("user_name")] - public string? Name { get; set; } + [Newtonsoft.Json.JsonProperty("national_code")] + [System.Text.Json.Serialization.JsonPropertyName("national_code")] + public string? NationalCode { get; set; } /// /// 获取或设置收件人电话。 /// [Newtonsoft.Json.JsonProperty("tel_number")] [System.Text.Json.Serialization.JsonPropertyName("tel_number")] - public string? TeleNumber { get; set; } - - /// - /// 获取或设置国家码。 - /// - [Newtonsoft.Json.JsonProperty("national_code")] - [System.Text.Json.Serialization.JsonPropertyName("national_code")] - public string? NationalCode { get; set; } + public string TeleNumber { get; set; } = default!; /// /// 获取或设置邮政编码。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressAddRequest.cs index a06ef4e0..359b36ff 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressAddRequest.cs @@ -7,53 +7,46 @@ { public static class Types { - public class Address + public class AddressDetail { public static class Types { - public class AddressInformation + public class Address { /// /// 获取或设置联系人姓名。 /// [Newtonsoft.Json.JsonProperty("user_name")] [System.Text.Json.Serialization.JsonPropertyName("user_name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置邮政编码。 - /// - [Newtonsoft.Json.JsonProperty("postal_code")] - [System.Text.Json.Serialization.JsonPropertyName("postal_code")] - public string? PostalCode { get; set; } + public string UserName { get; set; } = string.Empty; /// /// 获取或设置省份。 /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string Province { get; set; } = string.Empty; + public string ProvinceName { get; set; } = string.Empty; /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string City { get; set; } = string.Empty; + public string CityName { get; set; } = string.Empty; /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string District { get; set; } = string.Empty; + public string DistrictName { get; set; } = string.Empty; /// /// 获取或设置详细地址。 /// [Newtonsoft.Json.JsonProperty("detail_info")] [System.Text.Json.Serialization.JsonPropertyName("detail_info")] - public string AddressDetail { get; set; } = string.Empty; + public string Detail { get; set; } = string.Empty; /// /// 获取或设置国家码。 @@ -69,6 +62,20 @@ [System.Text.Json.Serialization.JsonPropertyName("tel_number")] public string TeleNumber { get; set; } = string.Empty; + /// + /// 获取或设置邮政编码。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string? PostalCode { get; set; } + + /// + /// 获取或设置门牌号。 + /// + [Newtonsoft.Json.JsonProperty("house_number")] + [System.Text.Json.Serialization.JsonPropertyName("house_number")] + public string? HouseNumber { get; set; } + /// /// 获取或设置经度。 /// @@ -82,13 +89,6 @@ [Newtonsoft.Json.JsonProperty("lat")] [System.Text.Json.Serialization.JsonPropertyName("lat")] public double? Latitude { get; set; } - - /// - /// 获取或设置门牌号。 - /// - [Newtonsoft.Json.JsonProperty("house_number")] - [System.Text.Json.Serialization.JsonPropertyName("house_number")] - public string? HouseNumber { get; set; } } public class AddressType @@ -118,7 +118,7 @@ /// [Newtonsoft.Json.JsonProperty("address_info")] [System.Text.Json.Serialization.JsonPropertyName("address_info")] - public Types.AddressInformation AddressInformation { get; set; } = new Types.AddressInformation(); + public Types.Address Address { get; set; } = new Types.Address(); /// /// 获取或设置地址类型信息。 @@ -180,10 +180,10 @@ } /// - /// 获取或设置地址信息。 + /// 获取或设置地址详细信息。 /// [Newtonsoft.Json.JsonProperty("address_detail")] [System.Text.Json.Serialization.JsonPropertyName("address_detail")] - public Types.Address Address { get; set; } = new Types.Address(); + public Types.AddressDetail AddressDetail { get; set; } = new Types.AddressDetail(); } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressGetResponse.cs index 75db376e..374e0fc2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressGetResponse.cs @@ -7,46 +7,39 @@ { public static class Types { - public class Address + public class AddressDetail { public static class Types { - public class AddressDetail + public class Address { /// /// 获取或设置联系人姓名。 /// [Newtonsoft.Json.JsonProperty("user_name")] [System.Text.Json.Serialization.JsonPropertyName("user_name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置邮政编码。 - /// - [Newtonsoft.Json.JsonProperty("postal_code")] - [System.Text.Json.Serialization.JsonPropertyName("postal_code")] - public string? PostalCode { get; set; } + public string UserName { get; set; } = default!; /// /// 获取或设置省份。 /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string Province { get; set; } = default!; + public string ProvinceName { get; set; } = default!; /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string City { get; set; } = default!; + public string CityName { get; set; } = default!; /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string District { get; set; } = default!; + public string DistrictName { get; set; } = default!; /// /// 获取或设置详细地址。 @@ -69,6 +62,20 @@ [System.Text.Json.Serialization.JsonPropertyName("tel_number")] public string? TeleNumber { get; set; } + /// + /// 获取或设置邮政编码。 + /// + [Newtonsoft.Json.JsonProperty("postal_code")] + [System.Text.Json.Serialization.JsonPropertyName("postal_code")] + public string? PostalCode { get; set; } + + /// + /// 获取或设置门牌号。 + /// + [Newtonsoft.Json.JsonProperty("house_number")] + [System.Text.Json.Serialization.JsonPropertyName("house_number")] + public string? HouseNumber { get; set; } + /// /// 获取或设置经度。 /// @@ -82,13 +89,6 @@ [Newtonsoft.Json.JsonProperty("lat")] [System.Text.Json.Serialization.JsonPropertyName("lat")] public double? Latitude { get; set; } - - /// - /// 获取或设置门牌号。 - /// - [Newtonsoft.Json.JsonProperty("house_number")] - [System.Text.Json.Serialization.JsonPropertyName("house_number")] - public string? HouseNumber { get; set; } } public class AddressType @@ -121,11 +121,11 @@ public int AddressId { get; set; } /// - /// 获取或设置地址详细信息。 + /// 获取或设置地址信息。 /// [Newtonsoft.Json.JsonProperty("address_info")] [System.Text.Json.Serialization.JsonPropertyName("address_info")] - public Types.AddressDetail AddressDetail { get; set; } = default!; + public Types.Address Address { get; set; } = default!; /// /// 获取或设置地址类型信息。 @@ -205,6 +205,6 @@ /// [Newtonsoft.Json.JsonProperty("address_list")] [System.Text.Json.Serialization.JsonPropertyName("address_list")] - public Types.Address[] AddressList { get; set; } = default!; + public Types.AddressDetail[] AddressDetailList { get; set; } = default!; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressUpdateRequest.cs index a7b16df0..a7aec111 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressUpdateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Address/ProductAddressUpdateRequest.cs @@ -7,7 +7,7 @@ { public static class Types { - public class Address : ProductAddressAddRequest.Types.Address + public class AddressDetail : ProductAddressAddRequest.Types.AddressDetail { /// /// 获取或设置地址 ID。 @@ -19,10 +19,10 @@ } /// - /// 获取或设置地址信息。 + /// 获取或设置地址详细信息。 /// [Newtonsoft.Json.JsonProperty("address_detail")] [System.Text.Json.Serialization.JsonPropertyName("address_detail")] - public Types.Address Address { get; set; } = new Types.Address(); + public Types.AddressDetail AddressDetail { get; set; } = new Types.AddressDetail(); } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryGetFreightTemplateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryGetFreightTemplateResponse.cs index 68ae5fa3..c3756551 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryGetFreightTemplateResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryGetFreightTemplateResponse.cs @@ -18,21 +18,21 @@ /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string? Province { get; set; } + public string? ProvinceName { get; set; } /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string? City { get; set; } + public string? CityName { get; set; } /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string? District { get; set; } + public string? DistrictName { get; set; } } public class Area diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryInsertFreightTemplateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryInsertFreightTemplateRequest.cs index 2e5bb722..1926444a 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryInsertFreightTemplateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Delivery/FreightTemplate/ProductDeliveryInsertFreightTemplateRequest.cs @@ -20,21 +20,21 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("province_name")] [System.Text.Json.Serialization.JsonPropertyName("province_name")] - public string? Province { get; set; } + public string? ProvinceName { get; set; } /// /// 获取或设置城市。 /// [Newtonsoft.Json.JsonProperty("city_name")] [System.Text.Json.Serialization.JsonPropertyName("city_name")] - public string? City { get; set; } + public string? CityName { get; set; } /// /// 获取或设置区县。 /// [Newtonsoft.Json.JsonProperty("county_name")] [System.Text.Json.Serialization.JsonPropertyName("county_name")] - public string? District { get; set; } + public string? DistrictName { get; set; } } public class Area diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Order/ProductOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Order/ProductOrderGetResponse.cs index e81a8dac..1763b805 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Order/ProductOrderGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Order/ProductOrderGetResponse.cs @@ -191,7 +191,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public string WaybillId { get; set; } = default!; } - public class Address : ProductAddressGetResponse.Types.Address.Types.AddressDetail + public class Address : ProductAddressGetResponse.Types.AddressDetail.Types.Address { } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Register/ProductRegisterSubmitBasicInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Register/ProductRegisterSubmitBasicInfoRequest.cs index 90424334..4aaeba9e 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Register/ProductRegisterSubmitBasicInfoRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Product/Register/ProductRegisterSubmitBasicInfoRequest.cs @@ -44,7 +44,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models { public static class Types { - public class Address : ProductAddressAddRequest.Types.Address.Types.AddressInformation + public class Address : ProductAddressAddRequest.Types.AddressDetail.Types.Address { } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetInfoResponse.cs index 5badc5ce..b4fff890 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetInfoResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetInfoResponse.cs @@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("contact_name")] [System.Text.Json.Serialization.JsonPropertyName("contact_name")] - public string Name { get; set; } = default!; + public string UserName { get; set; } = default!; /// /// 获取或设置联系人身份证号。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetResponse.cs index cf15b641..05393da2 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Wxpay/ShopWxpayGetResponse.cs @@ -128,7 +128,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("contact_name")] [System.Text.Json.Serialization.JsonPropertyName("contact_name")] - public string Name { get; set; } = default!; + public string UserName { get; set; } = default!; /// /// 获取或设置联系人身份证号。 diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.json new file mode 100644 index 00000000..f0ab14ab --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddRequest.json @@ -0,0 +1,26 @@ +{ + "address_detail": { + "address_info": { + "user_name": "xasdss", + "postal_code": "510983", + "province_name": "广东省", + "city_name": "广州市", + "county_name": "天河区", + "detail_info": "广州市天河区****", + "tel_number": "18666666666", + "lat": 23.12463, + "lng": 113.36199, + "house_number": "111222" + }, + "landline": "", + "remark": "", + "send_addr": false, + "default_send": false, + "recv_addr": false, + "default_recv": false, + "address_type": { + "same_city": 0, + "pickup": 0 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.json new file mode 100644 index 00000000..136485df --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressAddResponse.json @@ -0,0 +1,3 @@ +{ + "address_id": "123123" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.json new file mode 100644 index 00000000..b9d8c6d1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressDeleteRequest.json @@ -0,0 +1,3 @@ +{ + "address_id": "123345" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.json new file mode 100644 index 00000000..b9d8c6d1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetRequest.json @@ -0,0 +1,3 @@ +{ + "address_id": "123345" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.json new file mode 100644 index 00000000..193e2cd1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressGetResponse.json @@ -0,0 +1,31 @@ +{ + "errcode": 0, + "errmsg": "", + "address_detail": { + "address_id": 12345, + "address_info": { + "user_name": "xasdss", + "postal_code": "510983", + "province_name": "广东省", + "city_name": "广州市", + "county_name": "天河区", + "detail_info": "广州市天河区****", + "tel_number": "18666666666", + "lat": 23.12463, + "lng": 113.36199, + "house_number": "111222" + }, + "landline": "", + "remark": "", + "send_addr": 0, + "default_send": 1, + "recv_addr": 0, + "default_recv": 1, + "create_time": 1662480000, + "update_time": 1662480000, + "address_type": { + "same_city": 0, + "pickup": 0 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.json new file mode 100644 index 00000000..fc907be8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListRequest.json @@ -0,0 +1,4 @@ +{ + "offset": 0, + "limit": 100 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListResponse.json new file mode 100644 index 00000000..e891230f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressListResponse.json @@ -0,0 +1,3 @@ +{ + "address_id_list": ["111222", "222333"] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.json new file mode 100644 index 00000000..bbc0d542 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECMerchant/Address/ChannelsECMerchantAddressUpdateRequest.json @@ -0,0 +1,27 @@ +{ + "address_detail": { + "address_id": "12345", + "address_info": { + "user_name": "xasdss", + "postal_code": "510983", + "province_name": "广东省", + "city_name": "广州市", + "county_name": "天河区", + "detail_info": "广州市天河区****", + "tel_number": "18666666666", + "lat": 23.12463, + "lng": 113.36199, + "house_number": "12" + }, + "landline": "", + "remark": "", + "send_addr": 0, + "default_send": 1, + "recv_addr": 0, + "default_recv": 1, + "address_type": { + "same_city": 0, + "pickup": 0 + } + } +}