mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(work): 新增对外收款账户相关接口
This commit is contained in:
parent
f3a271298e
commit
d7c4d57c4e
@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
{
|
||||
public static class WechatWorkClientExecuteCgibinMiniAppPayExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/miniapppay/upload_image 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/98972 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMiniAppPayUploadImageResponse> ExecuteCgibinMiniAppPayUploadImageAsync(this WechatWorkClient client, Models.CgibinMiniAppPayUploadImageRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
if (request.FileName == null)
|
||||
request.FileName = Guid.NewGuid().ToString("N").ToLower() + ".png";
|
||||
|
||||
if (request.FileContentType == null)
|
||||
request.FileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForImage(request.FileName!) ?? "image/png";
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "miniapppay", "upload_image")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.FileName, fileBytes: request.FileBytes, fileContentType: request.FileContentType, formDataName: "media");
|
||||
return await client.SendRequestAsync<Models.CgibinMiniAppPayUploadImageResponse>(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/miniapppay/apply_mch 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/98973 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMiniAppPayApplyMechantResponse> ExecuteCgibinMiniAppPayApplyMechantAsync(this WechatWorkClient client, Models.CgibinMiniAppPayApplyMechantRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "miniapppay", "apply_mch")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMiniAppPayApplyMechantResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/miniapppay/get_applyment_status 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/98974 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinMiniAppPayGetApplymentStatusResponse> ExecuteCgibinMiniAppPayGetApplymentStatusAsync(this WechatWorkClient client, Models.CgibinMiniAppPayGetApplymentStatusRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "miniapppay", "get_applyment_status")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinMiniAppPayGetApplymentStatusResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,388 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/apply_mch 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayApplyMechantRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class BusinessLicense
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置证书类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cert_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cert_type")]
|
||||
public int CertificateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业执照扫描件 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_license_copy_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_license_copy_open_wx_pay_media_id")]
|
||||
public string BusinessLicensePictureMediaId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业执照编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_license_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_license_number")]
|
||||
public string BusinessLicenseNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
|
||||
public string MerchantName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置法定代表人姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("legal_person")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("legal_person")]
|
||||
public string LegalPerson { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置注册地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("company_address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("company_address")]
|
||||
public string? CompanyAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业期限开始日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_time_begin_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_time_begin_time")]
|
||||
public string? BusinessTimeBeginDateString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业期限截止日期字符串(格式:yyyy-MM-dd / "长期")。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_time_end_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_time_end_time")]
|
||||
public string? BusinessTimeEndDateString { get; set; }
|
||||
}
|
||||
|
||||
public class FinanceInstitution
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置金融机构类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finance_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finance_type")]
|
||||
public string FinanceType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金融机构许可证图片 MediaId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finance_license_pics_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finance_license_pics_open_wx_pay_media_id")]
|
||||
public IList<string> FinanceLicensePictureMediaIdList { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class IdCard
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置证件类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_doc_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_doc_type")]
|
||||
public int IdDocumentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件人像面图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_copy_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_copy_open_wx_pay_media_id")]
|
||||
public string IdCardFrontPictureMediaId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件国徽面图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_national_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_national_open_wx_pay_media_id")]
|
||||
public string IdCardBackPictureMediaId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_name")]
|
||||
public string IdCardName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_number")]
|
||||
public string IdCardNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_address")]
|
||||
public string? IdCardAddress { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件有效期开始日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_valid_time_begin")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_valid_time_begin")]
|
||||
public string IdCardPeriodBeginDateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置证件有效期截止日期字符串(格式:yyyy-MM-dd / "长期")。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_valid_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_valid_time")]
|
||||
public string IdCardPeriodEndDateString { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class UBO : IdCard
|
||||
{
|
||||
}
|
||||
|
||||
public class Contact
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class IdCard : CgibinMiniAppPayApplyMechantRequest.Types.IdCard
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超级管理员类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contact_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contact_type")]
|
||||
public string ContactType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置业务办理授权函图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_authorization_letter_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_authorization_letter_open_wx_pay_media_id")]
|
||||
public string? BusinessAuthorizationLetterPictureMediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超级管理员证件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contact_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contact_info")]
|
||||
public Types.IdCard IdCard { get; set; } = new Types.IdCard();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超级管理员手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mobile_phone")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mobile_phone")]
|
||||
public string? MobileNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超级管理员邮箱。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contact_email")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contact_email")]
|
||||
public string? Email { get; set; }
|
||||
}
|
||||
|
||||
public class BankAccount
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class BankCardSupplement
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置结算证明图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("settlement_certificate_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("settlement_certificate_open_wx_pay_media_id")]
|
||||
public string? SettlementCertificatePictureMediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关系证明图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("relationship_certificate_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("relationship_certificate_open_wx_pay_media_id")]
|
||||
public string? RelationshipCertificatePictureMediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置其他证明图片 MediaId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("other_certificate_open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("other_certificate_open_wx_pay_media_id")]
|
||||
public IList<string>? OtherCertificatePictureMediaIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置账户类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_account_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_account_type")]
|
||||
public int? BankAccountType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户银行。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_bank")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_bank")]
|
||||
public string AccountBank { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_name")]
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_number")]
|
||||
public string AccountNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户银行省市编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_address_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_address_code")]
|
||||
public string BankAddressCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置开户银行全称(含支行)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_name")]
|
||||
public string? BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置银行卡补充资料。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bank_card_supplement")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("bank_card_supplement")]
|
||||
public Types.BankCardSupplement? BankCardSupplement { get; set; }
|
||||
}
|
||||
|
||||
public class Qualification
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片 MediaId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public IList<string> MediaId { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class AdditionalPicture : Qualification
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置业务申请编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主体类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("organization_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("organization_type")]
|
||||
public int OrganizationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置营业执照信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_license_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_license_info")]
|
||||
public Types.BusinessLicense BusinessLicense { get; set; } = new Types.BusinessLicense();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金融机构信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finance_institution_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finance_institution_info")]
|
||||
public Types.FinanceInstitution? FinanceInstitution { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户简称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_short_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_short_name")]
|
||||
public string MerchantShortName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置法人证件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_card_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_card_info")]
|
||||
public Types.IdCard IdCard { get; set; } = new Types.IdCard();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置法人是否为受益人。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("owner")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("owner")]
|
||||
public bool? IsOwner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置受益人证件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ubo_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ubo_info")]
|
||||
public Types.UBO? UBO { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置超级管理员信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("contact_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("contact_info")]
|
||||
public Types.Contact Contact { get; set; } = new Types.Contact();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结算账户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_info")]
|
||||
public Types.BankAccount BankAccount { get; set; } = new Types.BankAccount();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经营范围 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_id")]
|
||||
public int BusinessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置特殊资质信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qualifications")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qualifications")]
|
||||
public Types.Qualification? Qualification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置补充材料信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_addition_pics")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_addition_pics")]
|
||||
public Types.AdditionalPicture? AdditionalPicture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提现成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string? UserId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/apply_mch 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayApplyMechantResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置错误描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("error_description")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("error_description")]
|
||||
public string? ErrorDescription { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/get_applyment_status 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayGetApplymentStatusRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置业务申请编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_request_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_request_no")]
|
||||
public string OutRequestNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,177 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/get_applyment_status 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayGetApplymentStatusResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Applyment
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AuditDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置参数名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("param_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("param_name")]
|
||||
public string ParameterName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置驳回理由。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
|
||||
public class AccountValidation
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置付款户名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_name")]
|
||||
public string AccountName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款卡号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_no")]
|
||||
public string AccountNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收款开户银行。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_account_bank")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_account_bank")]
|
||||
public string DestinationAccountBank { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收款户名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_account_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_account_name")]
|
||||
public string DestinationAccountName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收款卡号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("destination_account_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("destination_account_number")]
|
||||
public string DestinationAccountNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount")]
|
||||
public int PayAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string Remark { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置汇款截止时间字符串。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deadline")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deadline")]
|
||||
public string DeadlineString { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("applyment_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("applyment_state")]
|
||||
public string ApplymentState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请状态描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("applyment_state_desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("applyment_state_desc")]
|
||||
public string ApplymentStateDescription { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sign_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sign_state")]
|
||||
public string SignState { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置签约链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sign_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sign_url")]
|
||||
public string? SignUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置驳回原因详细信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_detail")]
|
||||
public Types.AuditDetail[]? AuditDetailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置汇款账户验证信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("account_validation")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("account_validation")]
|
||||
public Types.AccountValidation? AccountValidation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置电商平台二级商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置法人验证链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("legal_validation_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("legal_validation_url")]
|
||||
public string? LegalPersonValidationUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public Types.Applyment Applyment { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请单当前所处阶段。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_state")]
|
||||
public int ApplyState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置当前签约阶段。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("real_sign_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("real_sign_state")]
|
||||
public int RealSignState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置驳回理由。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reject_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reject_reason")]
|
||||
public string? RejectReason { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/upload_image 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayUploadImageRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件字节数组。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public byte[] FileBytes { get; set; } = Array.Empty<byte>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件名。如果不指定将由系统自动生成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件 Conent-Type。如果不指定将由系统自动生成。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? FileContentType { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/miniapppay/upload_image 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinMiniAppPayUploadImageResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_wx_pay_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_wx_pay_media_id")]
|
||||
public string MediaId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"out_request_no": "xxxxx",
|
||||
"organization_type": 0,
|
||||
"business_license_info": {
|
||||
"cert_type": 2389,
|
||||
"business_license_copy_open_wx_pay_media_id": "xxxxx",
|
||||
"business_license_number": "xxxxx",
|
||||
"merchant_name": "xxxxx",
|
||||
"legal_person": "xxxxx",
|
||||
"company_address": "xxxxx",
|
||||
"business_time_begin_time": "xxxx-xx-xx",
|
||||
"business_time_end_time": "xxxx-xx-xx"
|
||||
},
|
||||
"finance_institution_info": {
|
||||
"finance_type": "xxxxx",
|
||||
"finance_license_pics_open_wx_pay_media_id": [
|
||||
"xxxxx",
|
||||
"xxxxx"
|
||||
]
|
||||
},
|
||||
"merchant_short_name": "xxxxx",
|
||||
"id_card_info": {
|
||||
"id_card_copy_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_national_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_name": "xxxxx",
|
||||
"id_card_number": "xxxxx",
|
||||
"id_card_address": "xxxxx",
|
||||
"id_card_valid_time_begin": "xxxx-xx-xx",
|
||||
"id_card_valid_time": "xxxx-xx-xx",
|
||||
"id_doc_type": 8
|
||||
},
|
||||
"owner": false,
|
||||
"ubo_info": {
|
||||
"id_card_copy_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_national_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_name": "xxxxx",
|
||||
"id_card_number": "xxxxx",
|
||||
"id_card_address": "xxxxx",
|
||||
"id_card_valid_time_begin": "xxxx-xx-xx",
|
||||
"id_card_valid_time": "xxxx-xx-xx",
|
||||
"id_doc_type": 8
|
||||
},
|
||||
"contact_info": {
|
||||
"contact_type": "66",
|
||||
"contact_info": {
|
||||
"id_card_copy_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_national_open_wx_pay_media_id": "xxxxx",
|
||||
"id_card_name": "xxxxx",
|
||||
"id_card_number": "xxxxx",
|
||||
"id_card_valid_time_begin": "xxxx-xx-xx",
|
||||
"id_card_valid_time": "xxxx-xx-xx",
|
||||
"id_doc_type": 8
|
||||
},
|
||||
"business_authorization_letter_open_wx_pay_media_id": "xxxxx",
|
||||
"mobile_phone": "xxxxx",
|
||||
"contact_email": "xxxxx"
|
||||
},
|
||||
"account_info": {
|
||||
"bank_account_type": 74,
|
||||
"account_bank": "xxxxx",
|
||||
"account_name": "xxxxx",
|
||||
"bank_address_code": "xxxxx",
|
||||
"bank_name": "xxxxx",
|
||||
"account_number": "xxxxx",
|
||||
"bank_card_supplement": {
|
||||
"settlement_certificate_open_wx_pay_media_id": "xxxxx",
|
||||
"relationship_certificate_open_wx_pay_media_id": "xxxxx",
|
||||
"other_certificate_open_wx_pay_media_id": [
|
||||
"xxxxx",
|
||||
"xxxxx"
|
||||
]
|
||||
}
|
||||
},
|
||||
"business_id": 1,
|
||||
"qualifications": {
|
||||
"id": [
|
||||
"xxxxx",
|
||||
"xxxxx"
|
||||
]
|
||||
},
|
||||
"business_addition_pics": {
|
||||
"id": [
|
||||
"xxxxx",
|
||||
"xxxxx"
|
||||
]
|
||||
},
|
||||
"userid": "xxxxx"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"error_description": "参数错误"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"out_request_no": "xxxxx"
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"status": {
|
||||
"applyment_state": "xxxxx",
|
||||
"applyment_state_desc": "xxxxx",
|
||||
"sign_state": "xxxxx",
|
||||
"sign_url": "xxxxx",
|
||||
"sub_mchid": "xxxxx",
|
||||
"audit_detail": [
|
||||
{
|
||||
"param_name": "xxxxx",
|
||||
"reject_reason": "xxxxx"
|
||||
},
|
||||
{
|
||||
"param_name": "xxxxx",
|
||||
"reject_reason": "xxxxx"
|
||||
}
|
||||
],
|
||||
"account_validation": {
|
||||
"account_name": "xxxxx",
|
||||
"account_no": "xxxxx",
|
||||
"pay_amount": 0,
|
||||
"destination_account_number": "xxxxx",
|
||||
"destination_account_name": "xxxxx",
|
||||
"destination_account_bank": "xxxxx",
|
||||
"remark": "xxxxx",
|
||||
"deadline": "xxxxx"
|
||||
},
|
||||
"legal_validation_url": "xxxxx"
|
||||
},
|
||||
"apply_state": 1,
|
||||
"real_sign_state": 2,
|
||||
"reject_reason": "xxxxx"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "",
|
||||
"open_wx_pay_media_id": "NF_LnvqOch94lvxMB5fUWw8fbKvYrF_EcH239fgIjIkG_q4Q5kyzEGpJtddhyfZY"
|
||||
}
|
Loading…
Reference in New Issue
Block a user