OapiFinanceLoanNotifyLendRequest.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.finance.loan.notify.lend request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2022.09.13
  7. */
  8. class OapiFinanceLoanNotifyLendRequest
  9. {
  10. /**
  11. * 借据更新时间(影响授信/可用额度等金额变化)
  12. **/
  13. private $amountUpdateTime;
  14. /**
  15. * 剩余可用/可借额度(单位:分)
  16. **/
  17. private $availableLimit;
  18. /**
  19. * 收款银行名称
  20. **/
  21. private $bankName;
  22. /**
  23. * 收款银行卡号
  24. **/
  25. private $bankcardNo;
  26. /**
  27. * 每月账单日,如每月3号
  28. **/
  29. private $billDate;
  30. /**
  31. * 账单分期期次信息,借款失败时传空数组
  32. **/
  33. private $billInfoList;
  34. /**
  35. * 授信总额度
  36. **/
  37. private $creditAmount;
  38. /**
  39. * 日利率(精确4位小数,百分之*)
  40. **/
  41. private $dailyInterestRate;
  42. /**
  43. * 优惠券id:不存在传0,多个使用,分隔
  44. **/
  45. private $discountsId;
  46. /**
  47. * 放款失败原因:失败时值不能为空(尽可能详细)
  48. **/
  49. private $failReason;
  50. /**
  51. * 支用时失败原因,失败时必传
  52. **/
  53. private $failReasonToUser;
  54. /**
  55. * 首期账单日:与每月账单日相同可不传
  56. **/
  57. private $firstBillDate;
  58. /**
  59. * 首期还款日:与每月还款日相同可不传
  60. **/
  61. private $firstRepayDate;
  62. /**
  63. * 身份证号
  64. **/
  65. private $idCardNo;
  66. /**
  67. * 最后还款日
  68. **/
  69. private $lastRepayDate;
  70. /**
  71. * 借款/支用金额(单位:分)
  72. **/
  73. private $loanAmount;
  74. /**
  75. * 借据生效时间(成功):用户支用金额申请/提交后,行方审核完成时间
  76. **/
  77. private $loanEffectiveTime;
  78. /**
  79. * 结清日期:最后一期(逾期)还款成功完成/结束时间
  80. **/
  81. private $loanEndTime;
  82. /**
  83. * 借据流水号:没有传0
  84. **/
  85. private $loanOrderFlowNo;
  86. /**
  87. * 借据编号
  88. **/
  89. private $loanOrderNo;
  90. /**
  91. * 分期申请提交时间:用户支用金额申请/提交时间
  92. **/
  93. private $loanSubmitTime;
  94. /**
  95. * 入账成功(打款到用户银行卡)时间:用户支用金额申请/提交后&行方审核通过后向用户银行卡打款时间
  96. **/
  97. private $loanTxnTime;
  98. /**
  99. * 借款用途
  100. **/
  101. private $loanUsage;
  102. /**
  103. * 渠道方名称
  104. **/
  105. private $openChannelName;
  106. /**
  107. * 渠道方产品码
  108. **/
  109. private $openProductCode;
  110. /**
  111. * 渠道方产品名称
  112. **/
  113. private $openProductName;
  114. /**
  115. * 渠道方产品类型
  116. **/
  117. private $openProductType;
  118. /**
  119. * 借据已还利息(单位:分)
  120. **/
  121. private $paidInterest;
  122. /**
  123. * 借据已还罚息(单位:分,没有则为0)=本金罚息+利息罚息
  124. **/
  125. private $paidPenalty;
  126. /**
  127. * 借据已还本金(单位:分)
  128. **/
  129. private $paidPrincipal;
  130. /**
  131. * 借据已还总金额(单位:分):已还本金+已还利息+已还罚息
  132. **/
  133. private $paidTotalAmount;
  134. /**
  135. * 应还利息(单位:分)
  136. **/
  137. private $payableInterest;
  138. /**
  139. * 借据应还罚息(单位:分,没有则为0)=本金罚息+利息罚息
  140. **/
  141. private $payablePenalty;
  142. /**
  143. * 应还本金(单位:分)
  144. **/
  145. private $payablePrincipal;
  146. /**
  147. * 应还总金额(单位:分):应还本金+应还利息+应还罚息
  148. **/
  149. private $payableTotalAmount;
  150. /**
  151. * 优惠券减免金额(单位:分):不存在传0
  152. **/
  153. private $reductionTotalAmount;
  154. /**
  155. * 每月还款日,如每月5号
  156. **/
  157. private $repayDate;
  158. /**
  159. * 还款方式:RMT00 等额本息,RMT01 先息后本
  160. **/
  161. private $repayType;
  162. /**
  163. * 状态:APPLYING 支用申请中,CREDIT_SUCCESS 审核通过,CREDIT_FAILED 审核不通过/借款申请失败,USE_SUCCESS 支用成功:打款到用户银行卡成功,USE_FAILED 支用失败,NORMAL 还款中,OVERDUE 逾期,CLEAR 结清,WRITEOFF 核销
  164. **/
  165. private $status;
  166. /**
  167. * 分期总期数
  168. **/
  169. private $totalTerm;
  170. /**
  171. * 手机号
  172. **/
  173. private $userMobile;
  174. /**
  175. * 年利率(精确2位小数,百分之*)
  176. **/
  177. private $yearLoanInterestRate;
  178. private $apiParas = array();
  179. public function setAmountUpdateTime($amountUpdateTime)
  180. {
  181. $this->amountUpdateTime = $amountUpdateTime;
  182. $this->apiParas["amount_update_time"] = $amountUpdateTime;
  183. }
  184. public function getAmountUpdateTime()
  185. {
  186. return $this->amountUpdateTime;
  187. }
  188. public function setAvailableLimit($availableLimit)
  189. {
  190. $this->availableLimit = $availableLimit;
  191. $this->apiParas["available_limit"] = $availableLimit;
  192. }
  193. public function getAvailableLimit()
  194. {
  195. return $this->availableLimit;
  196. }
  197. public function setBankName($bankName)
  198. {
  199. $this->bankName = $bankName;
  200. $this->apiParas["bank_name"] = $bankName;
  201. }
  202. public function getBankName()
  203. {
  204. return $this->bankName;
  205. }
  206. public function setBankcardNo($bankcardNo)
  207. {
  208. $this->bankcardNo = $bankcardNo;
  209. $this->apiParas["bankcard_no"] = $bankcardNo;
  210. }
  211. public function getBankcardNo()
  212. {
  213. return $this->bankcardNo;
  214. }
  215. public function setBillDate($billDate)
  216. {
  217. $this->billDate = $billDate;
  218. $this->apiParas["bill_date"] = $billDate;
  219. }
  220. public function getBillDate()
  221. {
  222. return $this->billDate;
  223. }
  224. public function setBillInfoList($billInfoList)
  225. {
  226. $this->billInfoList = $billInfoList;
  227. $this->apiParas["bill_info_list"] = $billInfoList;
  228. }
  229. public function getBillInfoList()
  230. {
  231. return $this->billInfoList;
  232. }
  233. public function setCreditAmount($creditAmount)
  234. {
  235. $this->creditAmount = $creditAmount;
  236. $this->apiParas["credit_amount"] = $creditAmount;
  237. }
  238. public function getCreditAmount()
  239. {
  240. return $this->creditAmount;
  241. }
  242. public function setDailyInterestRate($dailyInterestRate)
  243. {
  244. $this->dailyInterestRate = $dailyInterestRate;
  245. $this->apiParas["daily_interest_rate"] = $dailyInterestRate;
  246. }
  247. public function getDailyInterestRate()
  248. {
  249. return $this->dailyInterestRate;
  250. }
  251. public function setDiscountsId($discountsId)
  252. {
  253. $this->discountsId = $discountsId;
  254. $this->apiParas["discounts_id"] = $discountsId;
  255. }
  256. public function getDiscountsId()
  257. {
  258. return $this->discountsId;
  259. }
  260. public function setFailReason($failReason)
  261. {
  262. $this->failReason = $failReason;
  263. $this->apiParas["fail_reason"] = $failReason;
  264. }
  265. public function getFailReason()
  266. {
  267. return $this->failReason;
  268. }
  269. public function setFailReasonToUser($failReasonToUser)
  270. {
  271. $this->failReasonToUser = $failReasonToUser;
  272. $this->apiParas["fail_reason_to_user"] = $failReasonToUser;
  273. }
  274. public function getFailReasonToUser()
  275. {
  276. return $this->failReasonToUser;
  277. }
  278. public function setFirstBillDate($firstBillDate)
  279. {
  280. $this->firstBillDate = $firstBillDate;
  281. $this->apiParas["first_bill_date"] = $firstBillDate;
  282. }
  283. public function getFirstBillDate()
  284. {
  285. return $this->firstBillDate;
  286. }
  287. public function setFirstRepayDate($firstRepayDate)
  288. {
  289. $this->firstRepayDate = $firstRepayDate;
  290. $this->apiParas["first_repay_date"] = $firstRepayDate;
  291. }
  292. public function getFirstRepayDate()
  293. {
  294. return $this->firstRepayDate;
  295. }
  296. public function setIdCardNo($idCardNo)
  297. {
  298. $this->idCardNo = $idCardNo;
  299. $this->apiParas["id_card_no"] = $idCardNo;
  300. }
  301. public function getIdCardNo()
  302. {
  303. return $this->idCardNo;
  304. }
  305. public function setLastRepayDate($lastRepayDate)
  306. {
  307. $this->lastRepayDate = $lastRepayDate;
  308. $this->apiParas["last_repay_date"] = $lastRepayDate;
  309. }
  310. public function getLastRepayDate()
  311. {
  312. return $this->lastRepayDate;
  313. }
  314. public function setLoanAmount($loanAmount)
  315. {
  316. $this->loanAmount = $loanAmount;
  317. $this->apiParas["loan_amount"] = $loanAmount;
  318. }
  319. public function getLoanAmount()
  320. {
  321. return $this->loanAmount;
  322. }
  323. public function setLoanEffectiveTime($loanEffectiveTime)
  324. {
  325. $this->loanEffectiveTime = $loanEffectiveTime;
  326. $this->apiParas["loan_effective_time"] = $loanEffectiveTime;
  327. }
  328. public function getLoanEffectiveTime()
  329. {
  330. return $this->loanEffectiveTime;
  331. }
  332. public function setLoanEndTime($loanEndTime)
  333. {
  334. $this->loanEndTime = $loanEndTime;
  335. $this->apiParas["loan_end_time"] = $loanEndTime;
  336. }
  337. public function getLoanEndTime()
  338. {
  339. return $this->loanEndTime;
  340. }
  341. public function setLoanOrderFlowNo($loanOrderFlowNo)
  342. {
  343. $this->loanOrderFlowNo = $loanOrderFlowNo;
  344. $this->apiParas["loan_order_flow_no"] = $loanOrderFlowNo;
  345. }
  346. public function getLoanOrderFlowNo()
  347. {
  348. return $this->loanOrderFlowNo;
  349. }
  350. public function setLoanOrderNo($loanOrderNo)
  351. {
  352. $this->loanOrderNo = $loanOrderNo;
  353. $this->apiParas["loan_order_no"] = $loanOrderNo;
  354. }
  355. public function getLoanOrderNo()
  356. {
  357. return $this->loanOrderNo;
  358. }
  359. public function setLoanSubmitTime($loanSubmitTime)
  360. {
  361. $this->loanSubmitTime = $loanSubmitTime;
  362. $this->apiParas["loan_submit_time"] = $loanSubmitTime;
  363. }
  364. public function getLoanSubmitTime()
  365. {
  366. return $this->loanSubmitTime;
  367. }
  368. public function setLoanTxnTime($loanTxnTime)
  369. {
  370. $this->loanTxnTime = $loanTxnTime;
  371. $this->apiParas["loan_txn_time"] = $loanTxnTime;
  372. }
  373. public function getLoanTxnTime()
  374. {
  375. return $this->loanTxnTime;
  376. }
  377. public function setLoanUsage($loanUsage)
  378. {
  379. $this->loanUsage = $loanUsage;
  380. $this->apiParas["loan_usage"] = $loanUsage;
  381. }
  382. public function getLoanUsage()
  383. {
  384. return $this->loanUsage;
  385. }
  386. public function setOpenChannelName($openChannelName)
  387. {
  388. $this->openChannelName = $openChannelName;
  389. $this->apiParas["open_channel_name"] = $openChannelName;
  390. }
  391. public function getOpenChannelName()
  392. {
  393. return $this->openChannelName;
  394. }
  395. public function setOpenProductCode($openProductCode)
  396. {
  397. $this->openProductCode = $openProductCode;
  398. $this->apiParas["open_product_code"] = $openProductCode;
  399. }
  400. public function getOpenProductCode()
  401. {
  402. return $this->openProductCode;
  403. }
  404. public function setOpenProductName($openProductName)
  405. {
  406. $this->openProductName = $openProductName;
  407. $this->apiParas["open_product_name"] = $openProductName;
  408. }
  409. public function getOpenProductName()
  410. {
  411. return $this->openProductName;
  412. }
  413. public function setOpenProductType($openProductType)
  414. {
  415. $this->openProductType = $openProductType;
  416. $this->apiParas["open_product_type"] = $openProductType;
  417. }
  418. public function getOpenProductType()
  419. {
  420. return $this->openProductType;
  421. }
  422. public function setPaidInterest($paidInterest)
  423. {
  424. $this->paidInterest = $paidInterest;
  425. $this->apiParas["paid_interest"] = $paidInterest;
  426. }
  427. public function getPaidInterest()
  428. {
  429. return $this->paidInterest;
  430. }
  431. public function setPaidPenalty($paidPenalty)
  432. {
  433. $this->paidPenalty = $paidPenalty;
  434. $this->apiParas["paid_penalty"] = $paidPenalty;
  435. }
  436. public function getPaidPenalty()
  437. {
  438. return $this->paidPenalty;
  439. }
  440. public function setPaidPrincipal($paidPrincipal)
  441. {
  442. $this->paidPrincipal = $paidPrincipal;
  443. $this->apiParas["paid_principal"] = $paidPrincipal;
  444. }
  445. public function getPaidPrincipal()
  446. {
  447. return $this->paidPrincipal;
  448. }
  449. public function setPaidTotalAmount($paidTotalAmount)
  450. {
  451. $this->paidTotalAmount = $paidTotalAmount;
  452. $this->apiParas["paid_total_amount"] = $paidTotalAmount;
  453. }
  454. public function getPaidTotalAmount()
  455. {
  456. return $this->paidTotalAmount;
  457. }
  458. public function setPayableInterest($payableInterest)
  459. {
  460. $this->payableInterest = $payableInterest;
  461. $this->apiParas["payable_interest"] = $payableInterest;
  462. }
  463. public function getPayableInterest()
  464. {
  465. return $this->payableInterest;
  466. }
  467. public function setPayablePenalty($payablePenalty)
  468. {
  469. $this->payablePenalty = $payablePenalty;
  470. $this->apiParas["payable_penalty"] = $payablePenalty;
  471. }
  472. public function getPayablePenalty()
  473. {
  474. return $this->payablePenalty;
  475. }
  476. public function setPayablePrincipal($payablePrincipal)
  477. {
  478. $this->payablePrincipal = $payablePrincipal;
  479. $this->apiParas["payable_principal"] = $payablePrincipal;
  480. }
  481. public function getPayablePrincipal()
  482. {
  483. return $this->payablePrincipal;
  484. }
  485. public function setPayableTotalAmount($payableTotalAmount)
  486. {
  487. $this->payableTotalAmount = $payableTotalAmount;
  488. $this->apiParas["payable_total_amount"] = $payableTotalAmount;
  489. }
  490. public function getPayableTotalAmount()
  491. {
  492. return $this->payableTotalAmount;
  493. }
  494. public function setReductionTotalAmount($reductionTotalAmount)
  495. {
  496. $this->reductionTotalAmount = $reductionTotalAmount;
  497. $this->apiParas["reduction_total_amount"] = $reductionTotalAmount;
  498. }
  499. public function getReductionTotalAmount()
  500. {
  501. return $this->reductionTotalAmount;
  502. }
  503. public function setRepayDate($repayDate)
  504. {
  505. $this->repayDate = $repayDate;
  506. $this->apiParas["repay_date"] = $repayDate;
  507. }
  508. public function getRepayDate()
  509. {
  510. return $this->repayDate;
  511. }
  512. public function setRepayType($repayType)
  513. {
  514. $this->repayType = $repayType;
  515. $this->apiParas["repay_type"] = $repayType;
  516. }
  517. public function getRepayType()
  518. {
  519. return $this->repayType;
  520. }
  521. public function setStatus($status)
  522. {
  523. $this->status = $status;
  524. $this->apiParas["status"] = $status;
  525. }
  526. public function getStatus()
  527. {
  528. return $this->status;
  529. }
  530. public function setTotalTerm($totalTerm)
  531. {
  532. $this->totalTerm = $totalTerm;
  533. $this->apiParas["total_term"] = $totalTerm;
  534. }
  535. public function getTotalTerm()
  536. {
  537. return $this->totalTerm;
  538. }
  539. public function setUserMobile($userMobile)
  540. {
  541. $this->userMobile = $userMobile;
  542. $this->apiParas["user_mobile"] = $userMobile;
  543. }
  544. public function getUserMobile()
  545. {
  546. return $this->userMobile;
  547. }
  548. public function setYearLoanInterestRate($yearLoanInterestRate)
  549. {
  550. $this->yearLoanInterestRate = $yearLoanInterestRate;
  551. $this->apiParas["year_loan_interest_rate"] = $yearLoanInterestRate;
  552. }
  553. public function getYearLoanInterestRate()
  554. {
  555. return $this->yearLoanInterestRate;
  556. }
  557. public function getApiMethodName()
  558. {
  559. return "dingtalk.oapi.finance.loan.notify.lend";
  560. }
  561. public function getApiParas()
  562. {
  563. return $this->apiParas;
  564. }
  565. public function check()
  566. {
  567. RequestCheckUtil::checkNotNull($this->amountUpdateTime,"amountUpdateTime");
  568. RequestCheckUtil::checkNotNull($this->availableLimit,"availableLimit");
  569. RequestCheckUtil::checkNotNull($this->bankName,"bankName");
  570. RequestCheckUtil::checkNotNull($this->bankcardNo,"bankcardNo");
  571. RequestCheckUtil::checkNotNull($this->billDate,"billDate");
  572. RequestCheckUtil::checkNotNull($this->creditAmount,"creditAmount");
  573. RequestCheckUtil::checkNotNull($this->dailyInterestRate,"dailyInterestRate");
  574. RequestCheckUtil::checkNotNull($this->discountsId,"discountsId");
  575. RequestCheckUtil::checkNotNull($this->failReason,"failReason");
  576. RequestCheckUtil::checkNotNull($this->failReasonToUser,"failReasonToUser");
  577. RequestCheckUtil::checkNotNull($this->firstBillDate,"firstBillDate");
  578. RequestCheckUtil::checkNotNull($this->firstRepayDate,"firstRepayDate");
  579. RequestCheckUtil::checkNotNull($this->idCardNo,"idCardNo");
  580. RequestCheckUtil::checkNotNull($this->lastRepayDate,"lastRepayDate");
  581. RequestCheckUtil::checkNotNull($this->loanAmount,"loanAmount");
  582. RequestCheckUtil::checkNotNull($this->loanEffectiveTime,"loanEffectiveTime");
  583. RequestCheckUtil::checkNotNull($this->loanEndTime,"loanEndTime");
  584. RequestCheckUtil::checkNotNull($this->loanOrderFlowNo,"loanOrderFlowNo");
  585. RequestCheckUtil::checkNotNull($this->loanOrderNo,"loanOrderNo");
  586. RequestCheckUtil::checkNotNull($this->loanSubmitTime,"loanSubmitTime");
  587. RequestCheckUtil::checkNotNull($this->loanTxnTime,"loanTxnTime");
  588. RequestCheckUtil::checkNotNull($this->loanUsage,"loanUsage");
  589. RequestCheckUtil::checkNotNull($this->openChannelName,"openChannelName");
  590. RequestCheckUtil::checkNotNull($this->openProductCode,"openProductCode");
  591. RequestCheckUtil::checkNotNull($this->openProductName,"openProductName");
  592. RequestCheckUtil::checkNotNull($this->openProductType,"openProductType");
  593. RequestCheckUtil::checkNotNull($this->paidInterest,"paidInterest");
  594. RequestCheckUtil::checkNotNull($this->paidPenalty,"paidPenalty");
  595. RequestCheckUtil::checkNotNull($this->paidPrincipal,"paidPrincipal");
  596. RequestCheckUtil::checkNotNull($this->paidTotalAmount,"paidTotalAmount");
  597. RequestCheckUtil::checkNotNull($this->payableInterest,"payableInterest");
  598. RequestCheckUtil::checkNotNull($this->payablePenalty,"payablePenalty");
  599. RequestCheckUtil::checkNotNull($this->payablePrincipal,"payablePrincipal");
  600. RequestCheckUtil::checkNotNull($this->payableTotalAmount,"payableTotalAmount");
  601. RequestCheckUtil::checkNotNull($this->reductionTotalAmount,"reductionTotalAmount");
  602. RequestCheckUtil::checkNotNull($this->repayDate,"repayDate");
  603. RequestCheckUtil::checkNotNull($this->repayType,"repayType");
  604. RequestCheckUtil::checkNotNull($this->status,"status");
  605. RequestCheckUtil::checkNotNull($this->totalTerm,"totalTerm");
  606. RequestCheckUtil::checkNotNull($this->userMobile,"userMobile");
  607. RequestCheckUtil::checkNotNull($this->yearLoanInterestRate,"yearLoanInterestRate");
  608. }
  609. public function putOtherTextParam($key, $value) {
  610. $this->apiParas[$key] = $value;
  611. $this->$key = $value;
  612. }
  613. }