feat(tenpayv3): 新增微工卡相关接口

This commit is contained in:
fudiwei
2022-11-24 13:00:26 +08:00
parent 492b7e4df3
commit 31bdc399b1
25 changed files with 1063 additions and 3 deletions

View File

@@ -209,7 +209,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
public int UsageCount { get; set; }
/// <summary>
/// 获取或设置优惠金额(单位:)。
/// 获取或设置优惠金额(单位:)。
/// </summary>
[Newtonsoft.Json.JsonProperty("amount")]
[System.Text.Json.Serialization.JsonPropertyName("amount")]

View File

@@ -105,7 +105,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
public int UsageCount { get; set; }
/// <summary>
/// 获取或设置优惠金额(单位:)。
/// 获取或设置优惠金额(单位:)。
/// </summary>
[Newtonsoft.Json.JsonProperty("amount")]
[System.Text.Json.Serialization.JsonPropertyName("amount")]

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/authentications/{authenticate_number} 接口的请求。</para>
/// </summary>
public class GetPayrollCardAuthenticationByAuthenticateNumberRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置商家核身单号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string AuthenticateNumber { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,96 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/authentications/{authenticate_number} 接口的响应。</para>
/// </summary>
public class GetPayrollCardAuthenticationByAuthenticateNumberResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置商家核身单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_number")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_number")]
public string AuthenticateNumber { get; set; } = default!;
/// <summary>
/// 获取或设置核身渠道。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_scene")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_scene")]
public string AuthenticateScene { get; set; } = default!;
/// <summary>
/// 获取或设置核身渠道标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_source")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_source")]
public string AuthenticateSource { get; set; } = default!;
/// <summary>
/// 获取或设置项目名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("project_name")]
[System.Text.Json.Serialization.JsonPropertyName("project_name")]
public string ProjectName { get; set; } = default!;
/// <summary>
/// 获取或设置单位名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("employer_name")]
[System.Text.Json.Serialization.JsonPropertyName("employer_name")]
public string EmployerName { get; set; } = default!;
/// <summary>
/// 获取或设置核身类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_type")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_type")]
public string AuthenticateType { get; set; } = default!;
/// <summary>
/// 获取或设置核身状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_state")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_state")]
public string AuthenticateState { get; set; } = default!;
/// <summary>
/// 获取或设置核身时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))]
public DateTimeOffset AuthenticateTime { get; set; }
/// <summary>
/// 获取或设置核身失败原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_failed_reason")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_failed_reason")]
public string? AuthenticateFailedReason { get; set; }
}
}

View File

@@ -0,0 +1,89 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/authentications/pre-order-with-auth 接口的请求。</para>
/// </summary>
public class PreOrderWithAuthPayrollCardAuthenticationRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
public string? SubAppId { get; set; }
/// <summary>
/// 获取或设置商家核身单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_number")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_number")]
public string AuthenticateNumber { get; set; } = string.Empty;
/// <summary>
/// 获取或设置项目名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("project_name")]
[System.Text.Json.Serialization.JsonPropertyName("project_name")]
public string ProjectName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置用工单位名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("employer_name")]
[System.Text.Json.Serialization.JsonPropertyName("employer_name")]
public string EmployerName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <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("employment_type")]
[System.Text.Json.Serialization.JsonPropertyName("employment_type")]
public string EmploymentType { get; set; } = string.Empty;
/// <summary>
/// 获取或设置核身类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_type")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_type")]
public string AuthenticateType { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,50 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/authentications/pre-order-with-auth 接口的响应。</para>
/// </summary>
public class PreOrderWithAuthPayrollCardAuthenticationResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置商家核身单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_number")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_number")]
public string AuthenticateNumber { get; set; } = default!;
/// <summary>
/// 获取或设置核身 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置核身 Token 有效期(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }
}
}

View File

@@ -0,0 +1,64 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/authentications 接口的请求。</para>
/// </summary>
public class QueryPayrollCardAuthenticationsRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubAppId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置核身日期字符串格式yyyy-MM-dd
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? AuthenticateDateString { get; set; }
/// <summary>
/// 获取或设置核身状态。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? AuthenticateState { get; set; }
/// <summary>
/// 获取或设置分页大小。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? Limit { get; set; }
/// <summary>
/// 获取或设置分页开始位置。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? Offset { get; set; }
}
}

View File

@@ -0,0 +1,130 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/authentications 接口的响应。</para>
/// </summary>
public class QueryPayrollCardAuthenticationsResponse : WechatTenpayResponse
{
public static class Types
{
public class Authentication
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置商家核身单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_number")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_number")]
public string AuthenticateNumber { get; set; } = default!;
/// <summary>
/// 获取或设置核身渠道。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_scene")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_scene")]
public string AuthenticateScene { get; set; } = default!;
/// <summary>
/// 获取或设置核身渠道标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_source")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_source")]
public string AuthenticateSource { get; set; } = default!;
/// <summary>
/// 获取或设置项目名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("project_name")]
[System.Text.Json.Serialization.JsonPropertyName("project_name")]
public string ProjectName { get; set; } = default!;
/// <summary>
/// 获取或设置单位名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("employer_name")]
[System.Text.Json.Serialization.JsonPropertyName("employer_name")]
public string EmployerName { get; set; } = default!;
/// <summary>
/// 获取或设置核身类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_type")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_type")]
public string AuthenticateType { get; set; } = default!;
/// <summary>
/// 获取或设置核身状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_state")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_state")]
public string AuthenticateState { get; set; } = default!;
/// <summary>
/// 获取或设置核身时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339DateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339DateTimeOffsetConverter))]
public DateTimeOffset AuthenticateTime { get; set; }
/// <summary>
/// 获取或设置核身失败原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("authenticate_failed_reason")]
[System.Text.Json.Serialization.JsonPropertyName("authenticate_failed_reason")]
public string? AuthenticateFailedReason { get; set; }
}
}
/// <summary>
/// 获取或设置核身记录列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("data")]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public Types.Authentication[] AuthenticationList { get; set; } = default!;
/// <summary>
/// 获取或设置分页大小。
/// </summary>
[Newtonsoft.Json.JsonProperty("limit")]
[System.Text.Json.Serialization.JsonPropertyName("limit")]
public int Limit { get; set; }
/// <summary>
/// 获取或设置分页开始位置。
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int Offset { get; set; }
/// <summary>
/// 获取或设置合作关系总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_count")]
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
public int? TotalCount { get; set; }
}
}

View File

@@ -0,0 +1,61 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/tokens 接口的请求。</para>
/// </summary>
public class CreatePayrollCardTokenRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
public string? SubAppId { 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("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("employment_type")]
[System.Text.Json.Serialization.JsonPropertyName("employment_type")]
public string EmploymentType { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/tokens 接口的响应。</para>
/// </summary>
public class CreatePayrollCardTokenResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置授权 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置授权 Token 有效期(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]
public int ExpiresIn { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/relations/{openid} 接口的请求。</para>
/// </summary>
public class GetPayrollRelationByOpenIdRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubAppId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OpenId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,95 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /payroll-card/relations/{openid} 接口的响应。</para>
/// </summary>
public class GetPayrollRelationByOpenIdResponse : WechatTenpayResponse
{
/// <summary>
/// 获取或设置微信商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("mchid")]
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
public string MerchantId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string AppId { get; set; } = default!;
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
public string? SubAppId { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置授权状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorize_state")]
[System.Text.Json.Serialization.JsonPropertyName("authorize_state")]
public string AuthorizeState { get; set; } = default!;
/// <summary>
/// 获取或设置授权时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorize_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("authorize_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
public DateTimeOffset? AuthorizeTime { get; set; }
/// <summary>
/// 获取或设置取消授权时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("deauthorize_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("deauthorize_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
public DateTimeOffset? DeauthorizeTime { get; set; }
/// <summary>
/// 获取或设置开通状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("register_state")]
[System.Text.Json.Serialization.JsonPropertyName("register_state")]
public string RegisterState { get; set; } = default!;
/// <summary>
/// 获取或设置开通时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("register_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("register_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
public DateTimeOffset? RegisterTime { get; set; }
/// <summary>
/// 获取或设置关闭时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("close_time")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
[System.Text.Json.Serialization.JsonPropertyName("close_time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
public DateTimeOffset? CloseTime { get; set; }
}
}

View File

@@ -0,0 +1,101 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/transfer-batches 接口的请求。</para>
/// </summary>
public class CreatePayrollCardTransferBatchRequest : WechatTenpayRequest
{
public static class Types
{
public class TransferDetail : CreateTransferBatchRequest.Types.TransferDetail
{
}
}
/// <summary>
/// 获取或设置子商户号。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sp_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sp_appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置子商户 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_appid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_appid")]
public string? SubAppId { get; set; }
/// <summary>
/// 获取或设置特约商户授权类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("authorization_type")]
[System.Text.Json.Serialization.JsonPropertyName("authorization_type")]
public string AuthorizationType { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商户批次单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_batch_no")]
[System.Text.Json.Serialization.JsonPropertyName("out_batch_no")]
public string OutBatchNumber { get; set; } = string.Empty;
/// <summary>
/// 获取或设置批次名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("batch_name")]
[System.Text.Json.Serialization.JsonPropertyName("batch_name")]
public string BatchName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置批次备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("batch_remark")]
[System.Text.Json.Serialization.JsonPropertyName("batch_remark")]
public string BatchRemark { get; set; } = string.Empty;
/// <summary>
/// 获取或设置转账总金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_amount")]
[System.Text.Json.Serialization.JsonPropertyName("total_amount")]
public int TotalAmount { get; set; }
/// <summary>
/// 获取或设置转账总笔数。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalNumber { get; set; }
/// <summary>
/// 获取或设置转账明细列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("transfer_detail_list")]
[System.Text.Json.Serialization.JsonPropertyName("transfer_detail_list")]
public IList<Types.TransferDetail> TransferDetailList { get; set; } = new List<Types.TransferDetail>();
/// <summary>
/// 获取或设置用工类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("employment_type")]
[System.Text.Json.Serialization.JsonPropertyName("employment_type")]
public string EmploymentType { get; set; } = string.Empty;
/// <summary>
/// 获取或设置用工场景。
/// </summary>
[Newtonsoft.Json.JsonProperty("employment_scene")]
[System.Text.Json.Serialization.JsonPropertyName("employment_scene")]
public string EmploymentScene { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /payroll-card/transfer-batches 接口的响应。</para>
/// </summary>
public class CreatePayrollCardTransferBatchResponse : CreateTransferBatchResponse
{
}
}