diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddRequest.cs new file mode 100644 index 00000000..e84251ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddRequest.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/add 接口的请求。 + /// + public class MerchantExpressAddRequest : WechatApiRequest + { + public static class Types + { + public class Template + { + public static class Types + { + public class Charging + { + /// + /// 获取或设置快递类型。 + /// + [Newtonsoft.Json.JsonProperty("Type")] + [System.Text.Json.Serialization.JsonPropertyName("Type")] + public int Type { get; set; } + + /// + /// 获取或设置默认邮费计算方法。 + /// + [Newtonsoft.Json.JsonProperty("Normal")] + [System.Text.Json.Serialization.JsonPropertyName("Normal")] + public NormalCharging Normal { get; set; } = new NormalCharging(); + + /// + /// 获取或设置指定地区邮费计算方法。 + /// + [Newtonsoft.Json.JsonProperty("Custom")] + [System.Text.Json.Serialization.JsonPropertyName("Custom")] + public IList CustomList { get; set; } = new List(); + } + + public class NormalCharging + { + /// + /// 获取或设置起始计费数量。 + /// + [Newtonsoft.Json.JsonProperty("StartStandards")] + [System.Text.Json.Serialization.JsonPropertyName("StartStandards")] + public int StartStandards { get; set; } + + /// + /// 获取或设置起始计费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("StartFees")] + [System.Text.Json.Serialization.JsonPropertyName("StartFees")] + public int StartFee { get; set; } + + /// + /// 获取或设置递增计费数量。 + /// + [Newtonsoft.Json.JsonProperty("AddStandards")] + [System.Text.Json.Serialization.JsonPropertyName("AddStandards")] + public int AddStandards { get; set; } + + /// + /// 获取或设置递增计费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("AddFees")] + [System.Text.Json.Serialization.JsonPropertyName("AddFees")] + public int AddFee { get; set; } + } + + public class CustomCharging : NormalCharging + { + /// + /// 获取或设置目的地国家。 + /// + [Newtonsoft.Json.JsonProperty("DestCountry")] + [System.Text.Json.Serialization.JsonPropertyName("DestCountry")] + public string DestinationCountry { get; set; } = string.Empty; + + /// + /// 获取或设置目的地省份。 + /// + [Newtonsoft.Json.JsonProperty("DestProvince")] + [System.Text.Json.Serialization.JsonPropertyName("DestProvince")] + public string DestinationProvince { get; set; } = string.Empty; + + /// + /// 获取或设置目的地城市。 + /// + [Newtonsoft.Json.JsonProperty("DestCity")] + [System.Text.Json.Serialization.JsonPropertyName("DestCity")] + public string DestinationCity { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置模板名称。 + /// + [Newtonsoft.Json.JsonProperty("Name")] + [System.Text.Json.Serialization.JsonPropertyName("Name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置支付方式。 + /// + [Newtonsoft.Json.JsonProperty("Assumer")] + [System.Text.Json.Serialization.JsonPropertyName("Assumer")] + public int Assumer { get; set; } + + /// + /// 获取或设置计费方式。 + /// + [Newtonsoft.Json.JsonProperty("Valuation")] + [System.Text.Json.Serialization.JsonPropertyName("Valuation")] + public int Valuation { get; set; } + + /// + /// 获取或设置运费计算列表。 + /// + [Newtonsoft.Json.JsonProperty("TopFee")] + [System.Text.Json.Serialization.JsonPropertyName("TopFee")] + public IList ChargingList { get; set; } = new List(); + } + } + + /// + /// 获取或设置邮费模板信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_template")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_template")] + public Types.Template Template { get; set; } = new Types.Template(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddResponse.cs new file mode 100644 index 00000000..e6751ebb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressAddResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/add 接口的响应。 + /// + public class MerchantExpressAddResponse : WechatApiResponse + { + /// + /// 获取或设置邮费模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public int TemplateId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteRequest.cs new file mode 100644 index 00000000..84826b66 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/del 接口的请求。 + /// + public class MerchantExpressDeleteRequest : WechatApiRequest + { + /// + /// 获取或设置邮费模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public int TemplateId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteResponse.cs new file mode 100644 index 00000000..c0b01f03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/del 接口的响应。 + /// + public class MerchantExpressDeleteResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllRequest.cs new file mode 100644 index 00000000..f155e40e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /merchant/express/getall 接口的请求。 + /// + public class MerchantExpressGetAllRequest : WechatApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllResponse.cs new file mode 100644 index 00000000..55f66e81 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetAllResponse.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [GET] /merchant/express/getall 接口的响应。 + /// + public class MerchantExpressGetAllResponse : WechatApiResponse + { + public static class Types + { + public class Template : MerchantExpressGetByIdResponse.Types.Template + { + } + } + + /// + /// 获取或设置邮费模板列表。 + /// + [Newtonsoft.Json.JsonProperty("templates_info")] + [System.Text.Json.Serialization.JsonPropertyName("templates_info")] + public Types.Template[] TemplateList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdRequest.cs new file mode 100644 index 00000000..b83e1620 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdRequest.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/getbyid 接口的请求。 + /// + public class MerchantExpressGetByIdRequest : WechatApiRequest + { + /// + /// 获取或设置邮费模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public int TemplateId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdResponse.cs new file mode 100644 index 00000000..d8089450 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressGetByIdResponse.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/getbyid 接口的响应。 + /// + public class MerchantExpressGetByIdResponse : WechatApiResponse + { + public static class Types + { + public class Template + { + public static class Types + { + public class Charging + { + /// + /// 获取或设置快递类型。 + /// + [Newtonsoft.Json.JsonProperty("Type")] + [System.Text.Json.Serialization.JsonPropertyName("Type")] + public int Type { get; set; } + + /// + /// 获取或设置默认邮费计算方法。 + /// + [Newtonsoft.Json.JsonProperty("Normal")] + [System.Text.Json.Serialization.JsonPropertyName("Normal")] + public NormalCharging Normal { get; set; } = default!; + + /// + /// 获取或设置指定地区邮费计算方法。 + /// + [Newtonsoft.Json.JsonProperty("Custom")] + [System.Text.Json.Serialization.JsonPropertyName("Custom")] + public CustomCharging[] CustomList { get; set; } = default!; + } + + public class NormalCharging : MerchantExpressAddRequest.Types.Template.Types.NormalCharging + { + } + + public class CustomCharging : MerchantExpressAddRequest.Types.Template.Types.CustomCharging + { + } + } + + /// + /// 获取或设置邮费模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("Id")] + [System.Text.Json.Serialization.JsonPropertyName("Id")] + public int TemplateId { get; set; } + + /// + /// 获取或设置模板名称。 + /// + [Newtonsoft.Json.JsonProperty("Name")] + [System.Text.Json.Serialization.JsonPropertyName("Name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置支付方式。 + /// + [Newtonsoft.Json.JsonProperty("Assumer")] + [System.Text.Json.Serialization.JsonPropertyName("Assumer")] + public int Assumer { get; set; } + + /// + /// 获取或设置计费方式。 + /// + [Newtonsoft.Json.JsonProperty("Valuation")] + [System.Text.Json.Serialization.JsonPropertyName("Valuation")] + public int Valuation { get; set; } + + /// + /// 获取或设置运费计算列表。 + /// + [Newtonsoft.Json.JsonProperty("TopFee")] + [System.Text.Json.Serialization.JsonPropertyName("TopFee")] + public Types.Charging[] ChargingList { get; set; } = default!; + } + } + + /// + /// 获取或设置邮费模板信息。 + /// + [Newtonsoft.Json.JsonProperty("template_info")] + [System.Text.Json.Serialization.JsonPropertyName("template_info")] + public Types.Template Template { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateRequest.cs new file mode 100644 index 00000000..1f4bf2bc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateRequest.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/update 接口的请求。 + /// + public class MerchantExpressUpdateRequest : WechatApiRequest + { + public static class Types + { + public class Template : MerchantExpressAddRequest.Types.Template + { + } + } + + /// + /// 获取或设置邮费模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public int TemplateId { get; set; } + + /// + /// 获取或设置邮费模板信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_template")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_template")] + public Types.Template Template { get; set; } = new Types.Template(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateResponse.cs new file mode 100644 index 00000000..9118e76b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Merchant/Express/MerchantExpressUpdateResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /merchant/express/update 接口的响应。 + /// + public class MerchantExpressUpdateResponse : WechatApiResponse + { + } +}