-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
317 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
...ient.Wechat.TenpayV3/Models/PayrollCard/Wesure/CreatePayrollCardWesureInsuranceRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using System; | ||
|
||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /payroll-card/wesure/insurance 接口的请求。</para> | ||
/// </summary> | ||
public class CreatePayrollCardWesureInsuranceRequest : WechatTenpayRequest | ||
{ | ||
/// <summary> | ||
/// 获取或设置微信商户号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("sp_mchid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")] | ||
public string MerchantId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置子商户号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("sub_mchid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] | ||
public string? SubMerchantId { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置微保保单号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("wesure_order_no")] | ||
[System.Text.Json.Serialization.JsonPropertyName("wesure_order_no")] | ||
public string WesureOrderNumber { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置保险公司保单号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("insurance_company_order_no")] | ||
[System.Text.Json.Serialization.JsonPropertyName("insurance_company_order_no")] | ||
public string InsuranceCompanyOrderNumber { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置保险公司名称。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("insurance_company_name")] | ||
[System.Text.Json.Serialization.JsonPropertyName("insurance_company_name")] | ||
public string InsuranceCompanyName { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置授权 Token。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("token")] | ||
[System.Text.Json.Serialization.JsonPropertyName("token")] | ||
public string? Token { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置用户唯一标识。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("openid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("openid")] | ||
public string OpenId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置投保状态。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("insure_state")] | ||
[System.Text.Json.Serialization.JsonPropertyName("insure_state")] | ||
public string InsureState { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置保障生效时间。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("insure_effect_time")] | ||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))] | ||
[System.Text.Json.Serialization.JsonPropertyName("insure_effect_time")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))] | ||
public DateTimeOffset InsureEffectTime { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置保障失效时间。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("insure_invalid_time")] | ||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))] | ||
[System.Text.Json.Serialization.JsonPropertyName("insure_invalid_time")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))] | ||
public DateTimeOffset InsureInvalidTime { get; set; } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ent.Wechat.TenpayV3/Models/PayrollCard/Wesure/CreatePayrollCardWesureInsuranceResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /payroll-card/wesure/insurance 接口的响应。</para> | ||
/// </summary> | ||
public class CreatePayrollCardWesureInsuranceResponse : WechatTenpayResponse | ||
{ | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...t.Wechat.TenpayV3/Models/PayrollCard/Wesure/GetPayrollCardWesureTokenValidationRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
|
||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /payroll-card/wesure/token-validations 接口的请求。</para> | ||
/// </summary> | ||
[WechatTenpaySensitive] | ||
public class GetPayrollCardWesureTokenValidationRequest : WechatTenpayRequest | ||
{ | ||
/// <summary> | ||
/// 获取或设置微信商户号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("sp_mchid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("sp_mchid")] | ||
public string MerchantId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置子商户号。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("sub_mchid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")] | ||
public string? SubMerchantId { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置授权 Token。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("token")] | ||
[System.Text.Json.Serialization.JsonPropertyName("token")] | ||
public string? Token { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置用户姓名(需使用平台公钥/证书加密)。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("user_name")] | ||
[System.Text.Json.Serialization.JsonPropertyName("user_name")] | ||
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_RSA_2048_WITH_SHA256, algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS8_OAEP_WITH_SHA1_AND_MGF1)] | ||
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_SM2_WITH_SM3, algorithm: Constants.EncryptionAlgorithms.SM2_C1C3C2_ASN1)] | ||
public string? UserName { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置身份证号码(需使用平台公钥/证书加密)。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id_card_number")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id_card_number")] | ||
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_RSA_2048_WITH_SHA256, algorithm: Constants.EncryptionAlgorithms.RSA_2048_ECB_PKCS8_OAEP_WITH_SHA1_AND_MGF1)] | ||
[WechatTenpaySensitiveProperty(scheme: Constants.SignSchemes.WECHATPAY2_SM2_WITH_SM3, algorithm: Constants.EncryptionAlgorithms.SM2_C1C3C2_ASN1)] | ||
public string? IdCardNumber { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置核身类型。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("authenticate_type")] | ||
[System.Text.Json.Serialization.JsonPropertyName("authenticate_type")] | ||
public string AuthenticateType { get; set; } = string.Empty; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
....Wechat.TenpayV3/Models/PayrollCard/Wesure/GetPayrollCardWesureTokenValidationResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
|
||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /payroll-card/wesure/token-validations 接口的响应。</para> | ||
/// </summary> | ||
public class GetPayrollCardWesureTokenValidationResponse : WechatTenpayResponse | ||
{ | ||
/// <summary> | ||
/// 获取或设置校验结果。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("result")] | ||
[System.Text.Json.Serialization.JsonPropertyName("result")] | ||
public string Result { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置用户唯一标识。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("openid")] | ||
[System.Text.Json.Serialization.JsonPropertyName("openid")] | ||
public string? OpenId { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置核身成功时间。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("authenticate_success_time")] | ||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))] | ||
[System.Text.Json.Serialization.JsonPropertyName("authenticate_success_time")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))] | ||
public DateTimeOffset? SuccessTime { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置失败原因。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("fail_reason")] | ||
[System.Text.Json.Serialization.JsonPropertyName("fail_reason")] | ||
public string? FailReason { get; set; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
....UnitTests/ModelSamples/_/PayrollCard/Wesure/CreatePayrollCardWesureInsuranceRequest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"insurance_company_name": "平安", | ||
"insurance_company_order_no": "5fds5345dfd", | ||
"insure_effect_time": "2018-06-08T10:34:56+08:00", | ||
"insure_invalid_time": "2018-06-08T10:34:56+08:00", | ||
"insure_state": "INSURE_SUCCESS", | ||
"openid": "11111111", | ||
"sp_mchid": "1900000109", | ||
"sub_mchid": "1900000109", | ||
"wesure_order_no": "5fds5345dfd" | ||
} |
8 changes: 8 additions & 0 deletions
8
...itTests/ModelSamples/_/PayrollCard/Wesure/GetPayrollCardWesureTokenValidationRequest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"authenticate_type": "NORMAL", | ||
"id_card_number": "7FzH5XksJG3a8HLLsaaUV6K54y1OnPMY5", | ||
"sp_mchid": "1900000109", | ||
"sub_mchid": "1900000109", | ||
"token": "abcdefghijklmn", | ||
"user_name": "LP7bT4hQXUsOZCEvK2YrSiqFsnP0oRMfeoLN0vBg" | ||
} |
6 changes: 6 additions & 0 deletions
6
...tTests/ModelSamples/_/PayrollCard/Wesure/GetPayrollCardWesureTokenValidationResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"authenticate_success_time": "2015-05-20T13:29:35+08:00", | ||
"fail_reason": "SP_MCH_NO_PERMISSION", | ||
"openid": "11111111", | ||
"result": "SUCCESS" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters