using System; namespace SKIT.FlurlHttpClient.Wechat.Api { /// /// 一个用于构造 时使用的配置项。 /// public class WechatApiClientOptions { /// /// 获取或设置请求超时时间(单位:毫秒)。 /// /// 默认值:30000 /// /// public int Timeout { get; set; } = 30 * 1000; /// /// 获取或设置微信 API 入口点。 /// /// 默认值: /// /// public string Endpoint { get; set; } = WechatApiEndpoints.DEFAULT; /// /// 获取或设置微信 AppId。 /// public string AppId { get; set; } = default!; /// /// 获取或设置微信 AppSecret。 /// public string AppSecret { get; set; } = default!; /// /// 获取或设置微信服务器推送的 EncodingAESKey。 /// public string? PushEncodingAESKey { get; set; } /// /// 获取或设置微信服务器推送的 Token。 /// public string? PushToken { get; set; } /// /// 获取或设置即时配送公司帐号 AppKey(用于小程序即使配送相关接口)。 /// public string? ImmeDeliveryAppKey { get; set; } /// /// 获取或设置即时配送公司帐号 AppSecret(用于小程序即使配送相关接口)。 /// public string? ImmeDeliveryAppSecret { get; set; } /// /// 获取或设置虚拟支付 AppKey(用于小程序虚拟支付相关接口)。 /// public string? VirtualPaymentAppKey { get; set; } /// /// 获取或设置米大师平台 OfferId(用于小游戏虚拟支付 1.0 相关接口)。 /// public string? MidasOfferId { get; set; } /// /// 获取或设置米大师平台 AppKey(用于小游戏虚拟支付 1.0 相关接口)。 /// public string? MidasAppKey { get; set; } /// /// 获取或设置米大师平台 OfferId(用于小游戏虚拟支付 2.0 相关接口)。 /// public string? MidasOfferIdV2 { get; set; } /// /// 获取或设置米大师平台 AppKey(用于小游戏虚拟支付 2.0 相关接口)。 /// public string? MidasAppKeyV2 { get; set; } /// /// 获取或设置 API 安全鉴权模式是否开启。 /// public bool SecurityApiEnabled { get; set; } /// /// 获取或设置 API 安全鉴权模式所使用的 AppId。如果不指定将使用 。 /// public string? SecurityApiAppId { get; set; } /// /// 获取或设置 API 安全鉴权模式对称加密算法。 /// /// 默认值: /// /// public string SecurityApiSymmetricAlgorithm { get; set; } = Constants.SecurityApiSymmetricAlgorithms.AES; /// /// 获取或设置 API 安全鉴权模式对称加密密钥编号。 /// public string? SecurityApiSymmetricNumber { get; set; } /// /// 获取或设置 API 安全鉴权模式对称加密密钥(经过 Base64 编码)。 /// public string? SecurityApiSymmetricEncodingKey { get; set; } /// /// 获取或设置 API 安全鉴权模式非对称加密算法。 /// /// 默认值: /// /// public string SecurityApiAsymmetricAlgorithm { get; set; } = Constants.SecurityApiAsymmetricAlgorithms.RSA; /// /// 获取或设置 API 安全鉴权模式非对称加密私钥编号。 /// public string? SecurityApiAsymmetricNumber { get; set; } /// /// 获取或设置 API 安全鉴权模式非对称加密私钥。 /// public string? SecurityApiAsymmetricPrivateKey { get; set; } /// /// 获取或设置 API 安全鉴权模式自定义请求路径匹配器。如果不指定将只匹配关键 API。 /// public Func? SecurityApiCustomRequestPathMatcher { get; set; } } }