using Newtonsoft.Json; using System.Collections.Generic; namespace LifePayment.Domain.Shared; public interface IACOOLYRequestBaseResponse { /// /// 接口调用状态(true/false) /// public bool Success { get; set; } /// /// 请求号(16-40位) /// public string RequestNo { get; set; } /// /// 商户ID(定长20字符) /// public string PartnerId { get; set; } /// /// 服务名称 /// public string Service { get; set; } /// /// 服务版本(默认1.0) /// public string? Version { get; set; } /// /// 协议类型(HTTP/JSON) /// public string? Protocol { get; set; } /// /// 会话参数(JSON格式) /// public string? Context { get; set; } /// /// 扩展参数(JSON单层结构) /// public object Ext { get; set; } /// /// 响应编码(SUCCESS/PARAM_ERROR等) /// public string Code { get; set; } /// /// 响应消息 /// public string Message { get; set; } /// /// 响应详情 /// public string? Detail { get; set; } } /// /// 公共响应参数基类 /// public class ACOOLYRequestBaseResponse : IACOOLYRequestBaseResponse { /// /// 接口调用状态(true/false) /// public bool Success { get; set; } /// /// 请求号(16-40位) /// public string RequestNo { get; set; } /// /// 商户ID(定长20字符) /// public string PartnerId { get; set; } /// /// 服务名称 /// public string Service { get; set; } /// /// 服务版本(默认1.0) /// public string? Version { get; set; } /// /// 协议类型(HTTP/JSON) /// public string? Protocol { get; set; } /// /// 会话参数(JSON格式) /// public string? Context { get; set; } /// /// 扩展参数(JSON单层结构) /// public object Ext { get; set; } /// /// 响应编码(SUCCESS/PARAM_ERROR等) /// public string Code { get; set; } /// /// 响应消息 /// public string Message { get; set; } /// /// 响应详情 /// public string? Detail { get; set; } } /// /// 获取燃气面值返回参数 /// public class GasParValueResponse : ACOOLYRequestBaseResponse { /// /// 天然气公司类型 /// [JsonProperty("gasParValue")] public List GasParValue { get; set; } } public class GasOrgTypeValueResponse : ACOOLYRequestBaseResponse { /// /// 天然气公司类型 /// [JsonProperty("gasSupportMerchantInfos")] public List GasSupportMerchantInfos { get; set; } } public class GasSupportMerchantInfos { /// /// 燃气支持商户编码 /// public string gasOrgTypeCode { get; set; } /// /// 燃气支持商户名称 /// public string gasOrgTypeName { get; set; } } /// /// 燃气面值数据 /// public class GasParValueOutput { /// /// 天然气名称(示例:中国燃气天) /// [JsonProperty("gasOrgName")] public string GasOrgName { get; set; } /// /// 天然气单位编码(示例:zhong_guo) /// [JsonProperty("gasOrgCode")] public string GasOrgCode { get; set; } /// /// 面额数组(示例:100,200,300) /// [JsonProperty("parValue")] public List ParValue { get; set; } /// /// 折扣率(示例:0.94) /// [JsonProperty("rate")] public decimal Rate { get; set; } /// /// 备注信息(示例:转网用户不能充值) /// [JsonProperty("comments")] public string Comments { get; set; } } /// /// 提交燃气订单返回参数 /// public class ConfirmGasOrderResponse : ACOOLYRequestBaseResponse { [JsonProperty("gasChargeOrder")] public GasChargeOrderOutput GasChargeOrder { get; set; } } public class GasChargeOrderOutput { /// /// 商户订单号。 /// [JsonProperty("outOrderNo")] public string OutOrderNo { get; set; } /// /// 平台订单号。 /// [JsonProperty("busiOrderNo")] public string BusiOrderNo { get; set; } /// /// 天然气公司类型,例如:"xin_ao"代表新奥燃气。 /// [JsonProperty("gasOrgType")] public string GasOrgType { get; set; } /// /// 区域名称,如:北京,上海,广东,湖北等。 /// [JsonProperty("areaName")] public string AreaName { get; set; } /// /// 电费面值金额,单位为元。 /// [JsonProperty("parValue")] public decimal ParValue { get; set; } /// /// 实际扣款金额,单位为元。 /// [JsonProperty("payAmount")] public decimal PayAmount { get; set; } /// /// 天然气账号。 /// [JsonProperty("gasAccount")] public string GasAccount { get; set; } /// /// 充值状态,如:"SUCCESS"表示充值成功。 /// [JsonProperty("status")] public string Status { get; set; } /// /// 状态描述,如:"充值成功"。 /// [JsonProperty("statusText")] public string StatusText { get; set; } } /// /// 电费面值返回参数 /// public class ElectricParValueResponse : ACOOLYRequestBaseResponse { [JsonProperty("electricParValue")] public List ElectricParValue { get; set; } } /// /// 电费充值信息类,用于表示电费充值相关的详细信息。 /// public class ElectricParValueOutput { /// /// 电网类型,例如:"guowang"代表国家电网,"nanwang"代表南方电网。 /// [JsonProperty("electricType")] public string ElectricType { get; set; } /// /// 区域名称,如:北京,上海,广东,湖北等。 /// [JsonProperty("areaName")] public string AreaName { get; set; } /// /// 面额,单位为元。可能的值包括100,200,300等。 /// [JsonProperty("parValue")] public List ParValue { get; set; } // 假设面额为整数 /// /// 折扣率,可选项。折扣率为一个浮点数,例如0.94代表94%。 /// [JsonProperty("rate")] public decimal? Rate { get; set; } // 使用可空类型表示可选字段 /// /// 备注,可选项。例如:"转网用户不能充值"。 /// [JsonProperty("comments")] public string Comments { get; set; } // 备注字段默认可以为空字符串或null,表示可选 } public class ElectricSupportAreaResponse : ACOOLYRequestBaseResponse { [JsonProperty("electricSupportAreaList")] public List ElectricAreaList { get; set; } } public class ElectricSupportAreaListOutput { /// /// 城市自己列表。 /// [JsonProperty("childCityList")] public List ChildCityList { get; set; } /// /// 城市名称。 /// [JsonProperty("cityName")] public string CityName { get; set; } /// /// 城市父级Id。 /// [JsonProperty("cityParentId")] public string CityParentId { get; set; } // 假设面额为整数 /// /// 城市Id。 /// [JsonProperty("cityId")] public string CityId { get; set; } // 使用可空类型表示可选字段 /// /// 电网类型,例如:"guowang"代表国家电网,"nanwang"代表南方电网。 /// [JsonProperty("electricType")] public string ElectricType { get; set; } /// /// 面额,单位为元。可能的值包括100,200,300等。 /// [JsonProperty("parValue")] public List ParValue { get; set; } // 假设面额为整数 /// /// 折扣率,可选项。折扣率为一个浮点数,例如0.94代表94%。 /// [JsonProperty("rate")] public decimal? Rate { get; set; } // 使用可空类型表示可选字段 } public class ElectricSupportAreaChildCityListOutput { /// /// 城市名称。 /// [JsonProperty("cityName")] public string CityName { get; set; } /// /// 城市父级Id。 /// [JsonProperty("cityParentId")] public string CityParentId { get; set; } // 假设面额为整数 /// /// 城市Id。 /// [JsonProperty("cityId")] public string CityId { get; set; } // 使用可空类型表示可选字段 } /// /// 话费面值返回参数 /// public class PhoneParValueResponse : ACOOLYRequestBaseResponse { [JsonProperty("phoneParValue")] public List PhoneParValue { get; set; } } public class PhoneParValueOutput { /// /// 运营商编码,例如:"yidong", "dianxin", "liantong"。 /// [JsonProperty("ispCode")] public string IspCode { get; set; } /// /// 运营商名称,如:移动,联通,电信。 /// [JsonProperty("ispName")] public string IspName { get; set; } /// /// 面额,单位为元。可能的值包括100, 200, 300等。 /// [JsonProperty("parValue")] public List ParValue { get; set; } // 假设面额为整数 /// /// 折扣率,可选项。折扣率为一个浮点数,例如0.94代表94%。 /// [JsonProperty("rate")] public decimal? Rate { get; set; } // 使用可空类型表示可选字段 /// /// 手机号段,例如:移动的134,136等,使用逗号分隔。 /// [JsonProperty("phoneSection")] public string PhoneSection { get; set; } /// /// 备注,可选项。例如:"转网用户不能充值"。 /// [JsonProperty("comments")] public string Comments { get; set; } // 备注字段默认可以为空字符串或null,表示可选 } /// /// 提交电费订单返回参数 /// public class ConfirmElectricOrderResponse : ACOOLYRequestBaseResponse { [JsonProperty("electricChargeOrder")] public ElectricChargeOrderOutput ElectricChargeOrder { get; set; } } public class ElectricChargeOrderOutput { /// /// 商户订单号。 /// [JsonProperty("outOrderNo")] public string OutOrderNo { get; set; } /// /// 平台订单号。 /// [JsonProperty("busiOrderNo")] public string BusiOrderNo { get; set; } /// /// 电费户号。 /// [JsonProperty("electricAccount")] public string ElectricAccount { get; set; } /// /// 区域名称,如:北京,上海,广东,湖北等。 /// [JsonProperty("areaName")] public string AreaName { get; set; } /// /// 电网类型,例如:"guowang"代表国家电网,"nanwang"代表南方电网。 /// [JsonProperty("electricType")] public string ElectricType { get; set; } /// /// 电费面值金额,单位为元。 /// [JsonProperty("parValue")] public decimal ParValue { get; set; } /// /// 实际到账金额。 /// [JsonProperty("actualParValue")] public decimal ActualParValue { get; set; } /// /// 实际扣款金额,单位为元。 /// [JsonProperty("payAmount")] public decimal PayAmount { get; set; } /// /// 充值状态,如:"SUCCESS"表示充值成功。 /// [JsonProperty("status")] public string Status { get; set; } /// /// 状态描述,如:"充值成功"。 /// [JsonProperty("statusText")] public string StatusText { get; set; } /// /// 通知消息 /// [JsonProperty("responseMessage")] public string ResponseMessage { get; set; } } /// /// 提交电话费订单返回参数 /// public class ConfirmPhoneOrderResponse : ACOOLYRequestBaseResponse { [JsonProperty("phoneChargeOrder")] public PhoneChargeOrderOutput PhoneChargeOrder { get; set; } } public class PhoneChargeOrderOutput { /// /// 外部商户订单号。 /// [JsonProperty("outOrderNo")] public string OutOrderNo { get; set; } /// /// 平台订单号。 /// [JsonProperty("busiOrderNo")] public string BusiOrderNo { get; set; } /// /// 面值金额,单位为元。 /// [JsonProperty("parValue")] public decimal ParValue { get; set; } /// /// 实际扣款金额,单位为元。 /// [JsonProperty("payAmount")] public decimal PayAmount { get; set; } /// /// 充值状态,如:"SUCCESS"表示充值成功。 /// [JsonProperty("status")] public string Status { get; set; } /// /// 状态描述,如:"充值成功"。 /// [JsonProperty("statusText")] public string StatusText { get; set; } }