using System;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
namespace DingTalk.Api.Request
{
///
/// TOP API: dingtalk.oapi.finance.loan.notify.repayment
///
public class OapiFinanceLoanNotifyRepaymentRequest : BaseDingTalkRequest
{
///
/// 授信额度(单位:分),授信成功必需
///
public Nullable Amount { get; set; }
///
/// 可用授信额度:等于授信总额度减去已经借款总额度
///
public Nullable AvailableAmount { get; set; }
///
/// 还款银行名称
///
public string BankName { get; set; }
///
/// 还款银行卡号
///
public string BankcardNo { get; set; }
///
/// 本次还款时利息逾期天数(不包括已经还逾期的,没有则为0):多笔分期还款逾期,求各逾期天数总和;如:1期逾期35天,第2期逾期4天,总逾期39天
///
public Nullable CurrentIntOvdDays { get; set; }
///
/// 本次还款时逾期期次(不包括已经还的逾期,没有则为0):如1,2=第1期+第2期都逾期
///
public string CurrentOvdTerms { get; set; }
///
/// 本次已还利息(单位:分)
///
public Nullable CurrentPaidInterest { get; set; }
///
/// 本次已还罚息(单位:分,精确2位小数,没有则为0)=本次本金罚息+本次利息罚息
///
public Nullable CurrentPaidPenalty { get; set; }
///
/// 本次已还本金(单位:分)
///
public Nullable CurrentPaidPrincipal { get; set; }
///
/// 本次已还总金额(单位:分):已还本金+已还利息+已还罚息
///
public Nullable CurrentPaidTotalAmount { get; set; }
///
/// 本次还款时本金逾期天数(不包括已经还逾期的,没有则为0):多笔分期还款逾期,求各逾期天数总和;如:1期逾期35天,第2期逾期4天,总逾期39天
///
public Nullable CurrentPrinOvdDays { get; set; }
///
/// 还款结果信息:失败原因等
///
public string FailReason { get; set; }
///
/// 还款失败原因(还款失败必传):用户发送钉钉卡片消息
///
public string FailReasonToUser { get; set; }
///
/// 身份证号
///
public string IdCardNo { get; set; }
///
/// 借据编号
///
public string LoanOrderNo { get; set; }
///
/// 渠道方名称
///
public string OpenChannelName { get; set; }
///
/// 渠道方产品码
///
public string OpenProductCode { get; set; }
///
/// 渠道方产品名称
///
public string OpenProductName { get; set; }
///
/// 渠道方产品类型
///
public string OpenProductType { get; set; }
///
/// 已还利息(单位:分)
///
public Nullable PaidInterest { get; set; }
///
/// 已还罚息(单位:分,没有则为0)=本金罚息+利息罚息
///
public Nullable PaidPenalty { get; set; }
///
/// 已还本金(单位:分)
///
public Nullable PaidPrincipal { get; set; }
///
/// 已还总金额(单位:分):已还本金+已还利息+已还罚息
///
public Nullable PaidTotalAmount { get; set; }
///
/// 应还利息(单位:分)
///
public Nullable PayableInterest { get; set; }
///
/// 应还罚息(单位:分,没有则为0)=本金罚息+利息罚息
///
public Nullable PayablePenalty { get; set; }
///
/// 应还本金(单位:分)
///
public Nullable PayablePrincipal { get; set; }
///
/// 应还总金额(单位:分):应还本金+应还利息+应还罚息
///
public Nullable PayableTotalAmount { get; set; }
///
/// 该期次是否已经全部还清:0 没有还清,1 全部还清
///
public Nullable PeriodPaidAll { get; set; }
///
/// 该期次已还利息(单位:分)
///
public Nullable PeriodPaidInterest { get; set; }
///
/// 该期次已还罚息(单位:分,精确2位小数,没有则为0)=该期次本金罚息+该期次利息罚息
///
public Nullable PeriodPaidPenalty { get; set; }
///
/// 该期次已还本金(单位:分)
///
public Nullable PeriodPaidPrincipal { get; set; }
///
/// 该期次已还总金额(单位:分)
///
public Nullable PeriodPaidTotalAmount { get; set; }
///
/// 该期次应还利息(单位:分)
///
public Nullable PeriodPayableInterest { get; set; }
///
/// 该期次应还罚息(单位:分,没有则为0)
///
public Nullable PeriodPayablePenalty { get; set; }
///
/// 该期次应还本金(单位:分)
///
public Nullable PeriodPayablePrincipal { get; set; }
///
/// 该期次应还总金额(单位:分):应还本金+应还利息+应还罚息
///
public Nullable PeriodPayableTotalAmount { get; set; }
///
/// 还款时间
///
public string RepayRealDate { get; set; }
///
/// 还款方式:RMT00 等额本息,RMT01 先息后本
///
public string RepayType { get; set; }
///
/// 还款编号:当前渠道唯一,用于处理重复通知问题
///
public string RepaymentNo { get; set; }
///
/// 还款期次:1=第1期
///
public string RepaymentTerms { get; set; }
///
/// 还款状态:SUCCESS=成功、FAIL=失败、PING=还款中
///
public string Status { get; set; }
///
/// 还款类型:SYSTERM=系统代扣、ONTIME=按期还款、ADVANCE=提前还款、OVERDUE=逾期还款
///
public string Type { get; set; }
///
/// 手机号
///
public string UserMobile { get; set; }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.finance.loan.notify.repayment";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("amount", this.Amount);
parameters.Add("available_amount", this.AvailableAmount);
parameters.Add("bank_name", this.BankName);
parameters.Add("bankcard_no", this.BankcardNo);
parameters.Add("current_int_ovd_days", this.CurrentIntOvdDays);
parameters.Add("current_ovd_terms", this.CurrentOvdTerms);
parameters.Add("current_paid_interest", this.CurrentPaidInterest);
parameters.Add("current_paid_penalty", this.CurrentPaidPenalty);
parameters.Add("current_paid_principal", this.CurrentPaidPrincipal);
parameters.Add("current_paid_total_amount", this.CurrentPaidTotalAmount);
parameters.Add("current_prin_ovd_days", this.CurrentPrinOvdDays);
parameters.Add("fail_reason", this.FailReason);
parameters.Add("fail_reason_to_user", this.FailReasonToUser);
parameters.Add("id_card_no", this.IdCardNo);
parameters.Add("loan_order_no", this.LoanOrderNo);
parameters.Add("open_channel_name", this.OpenChannelName);
parameters.Add("open_product_code", this.OpenProductCode);
parameters.Add("open_product_name", this.OpenProductName);
parameters.Add("open_product_type", this.OpenProductType);
parameters.Add("paid_interest", this.PaidInterest);
parameters.Add("paid_penalty", this.PaidPenalty);
parameters.Add("paid_principal", this.PaidPrincipal);
parameters.Add("paid_total_amount", this.PaidTotalAmount);
parameters.Add("payable_interest", this.PayableInterest);
parameters.Add("payable_penalty", this.PayablePenalty);
parameters.Add("payable_principal", this.PayablePrincipal);
parameters.Add("payable_total_amount", this.PayableTotalAmount);
parameters.Add("period_paid_all", this.PeriodPaidAll);
parameters.Add("period_paid_interest", this.PeriodPaidInterest);
parameters.Add("period_paid_penalty", this.PeriodPaidPenalty);
parameters.Add("period_paid_principal", this.PeriodPaidPrincipal);
parameters.Add("period_paid_total_amount", this.PeriodPaidTotalAmount);
parameters.Add("period_payable_interest", this.PeriodPayableInterest);
parameters.Add("period_payable_penalty", this.PeriodPayablePenalty);
parameters.Add("period_payable_principal", this.PeriodPayablePrincipal);
parameters.Add("period_payable_total_amount", this.PeriodPayableTotalAmount);
parameters.Add("repay_real_date", this.RepayRealDate);
parameters.Add("repay_type", this.RepayType);
parameters.Add("repayment_no", this.RepaymentNo);
parameters.Add("repayment_terms", this.RepaymentTerms);
parameters.Add("status", this.Status);
parameters.Add("type", this.Type);
parameters.Add("user_mobile", this.UserMobile);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("amount", this.Amount);
RequestValidator.ValidateRequired("available_amount", this.AvailableAmount);
RequestValidator.ValidateRequired("bank_name", this.BankName);
RequestValidator.ValidateRequired("bankcard_no", this.BankcardNo);
RequestValidator.ValidateRequired("current_int_ovd_days", this.CurrentIntOvdDays);
RequestValidator.ValidateRequired("current_ovd_terms", this.CurrentOvdTerms);
RequestValidator.ValidateRequired("current_paid_interest", this.CurrentPaidInterest);
RequestValidator.ValidateRequired("current_paid_penalty", this.CurrentPaidPenalty);
RequestValidator.ValidateRequired("current_paid_principal", this.CurrentPaidPrincipal);
RequestValidator.ValidateRequired("current_paid_total_amount", this.CurrentPaidTotalAmount);
RequestValidator.ValidateRequired("current_prin_ovd_days", this.CurrentPrinOvdDays);
RequestValidator.ValidateRequired("fail_reason", this.FailReason);
RequestValidator.ValidateRequired("fail_reason_to_user", this.FailReasonToUser);
RequestValidator.ValidateRequired("id_card_no", this.IdCardNo);
RequestValidator.ValidateRequired("loan_order_no", this.LoanOrderNo);
RequestValidator.ValidateRequired("open_channel_name", this.OpenChannelName);
RequestValidator.ValidateRequired("open_product_code", this.OpenProductCode);
RequestValidator.ValidateRequired("open_product_name", this.OpenProductName);
RequestValidator.ValidateRequired("open_product_type", this.OpenProductType);
RequestValidator.ValidateRequired("paid_interest", this.PaidInterest);
RequestValidator.ValidateRequired("paid_penalty", this.PaidPenalty);
RequestValidator.ValidateRequired("paid_principal", this.PaidPrincipal);
RequestValidator.ValidateRequired("paid_total_amount", this.PaidTotalAmount);
RequestValidator.ValidateRequired("payable_interest", this.PayableInterest);
RequestValidator.ValidateRequired("payable_penalty", this.PayablePenalty);
RequestValidator.ValidateRequired("payable_principal", this.PayablePrincipal);
RequestValidator.ValidateRequired("payable_total_amount", this.PayableTotalAmount);
RequestValidator.ValidateRequired("period_paid_all", this.PeriodPaidAll);
RequestValidator.ValidateRequired("period_paid_interest", this.PeriodPaidInterest);
RequestValidator.ValidateRequired("period_paid_penalty", this.PeriodPaidPenalty);
RequestValidator.ValidateRequired("period_paid_principal", this.PeriodPaidPrincipal);
RequestValidator.ValidateRequired("period_paid_total_amount", this.PeriodPaidTotalAmount);
RequestValidator.ValidateRequired("period_payable_interest", this.PeriodPayableInterest);
RequestValidator.ValidateRequired("period_payable_penalty", this.PeriodPayablePenalty);
RequestValidator.ValidateRequired("period_payable_principal", this.PeriodPayablePrincipal);
RequestValidator.ValidateRequired("period_payable_total_amount", this.PeriodPayableTotalAmount);
RequestValidator.ValidateRequired("repay_real_date", this.RepayRealDate);
RequestValidator.ValidateRequired("repay_type", this.RepayType);
RequestValidator.ValidateRequired("repayment_no", this.RepaymentNo);
RequestValidator.ValidateRequired("repayment_terms", this.RepaymentTerms);
RequestValidator.ValidateRequired("status", this.Status);
RequestValidator.ValidateRequired("type", this.Type);
RequestValidator.ValidateRequired("user_mobile", this.UserMobile);
}
#endregion
}
}