moov_ruby 26.4.0.pre.dev.6 → 26.4.0.pre.dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (526) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/metadata_fields.rb +66 -9
  3. data/lib/crystalline/module.rb +3 -3
  4. data/lib/moov/account_terminal_applications.rb +5 -5
  5. data/lib/moov/accounts.rb +22 -22
  6. data/lib/moov/adjustments.rb +2 -2
  7. data/lib/moov/apple_pay.rb +14 -14
  8. data/lib/moov/authentication.rb +3 -3
  9. data/lib/moov/avatars.rb +2 -2
  10. data/lib/moov/bank_accounts.rb +26 -26
  11. data/lib/moov/branding.rb +5 -5
  12. data/lib/moov/capabilities.rb +6 -6
  13. data/lib/moov/card_issuing.rb +8 -8
  14. data/lib/moov/cards.rb +32 -17
  15. data/lib/moov/client.rb +2 -1
  16. data/lib/moov/disputes.rb +32 -32
  17. data/lib/moov/end_to_end_encryption.rb +2 -2
  18. data/lib/moov/enriched_profile.rb +1 -1
  19. data/lib/moov/fee_plans.rb +12 -12
  20. data/lib/moov/files.rb +5 -5
  21. data/lib/moov/images.rb +10 -10
  22. data/lib/moov/industries.rb +1 -1
  23. data/lib/moov/institutions.rb +7 -7
  24. data/lib/moov/invoices.rb +914 -0
  25. data/lib/moov/issuing_transactions.rb +5 -5
  26. data/lib/moov/models/components/account.rb +5 -5
  27. data/lib/moov/models/components/accountnameverification.rb +4 -4
  28. data/lib/moov/models/components/accountverificationstatus.rb +2 -2
  29. data/lib/moov/models/components/achcreditsamedaypaymentmethod.rb +1 -1
  30. data/lib/moov/models/components/achcreditsamedaytransferpaymentmethod.rb +1 -1
  31. data/lib/moov/models/components/achcreditstandardpaymentmethod.rb +1 -1
  32. data/lib/moov/models/components/achcreditstandardtransferpaymentmethod.rb +1 -1
  33. data/lib/moov/models/components/achdebitcollectpaymentmethod.rb +1 -1
  34. data/lib/moov/models/components/achdebitcollecttransferpaymentmethod.rb +1 -1
  35. data/lib/moov/models/components/achdebitfundpaymentmethod.rb +1 -1
  36. data/lib/moov/models/components/achdebitfundtransferpaymentmethod.rb +1 -1
  37. data/lib/moov/models/components/achreturncode.rb +1 -1
  38. data/lib/moov/models/components/achtransactiondetails.rb +10 -10
  39. data/lib/moov/models/components/adjustment.rb +1 -1
  40. data/lib/moov/models/components/adjustmentfees.rb +3 -3
  41. data/lib/moov/models/components/amount.rb +1 -1
  42. data/lib/moov/models/components/amountdecimal.rb +1 -1
  43. data/lib/moov/models/components/amountdecimalupdate.rb +38 -0
  44. data/lib/moov/models/components/amountdecimalupdate.rbi +15 -0
  45. data/lib/moov/models/components/amountupdate.rb +1 -1
  46. data/lib/moov/models/components/applepayheader.rb +1 -1
  47. data/lib/moov/models/components/applepaymerchantdomains.rb +2 -2
  48. data/lib/moov/models/components/applepaypaymentmethod.rb +1 -1
  49. data/lib/moov/models/components/applepayresponse.rb +2 -2
  50. data/lib/moov/models/components/applepaytransferpaymentmethod.rb +1 -1
  51. data/lib/moov/models/components/asynccreatedrefund.rb +1 -1
  52. data/lib/moov/models/components/asynctransfer.rb +1 -1
  53. data/lib/moov/models/components/authtoken.rb +1 -1
  54. data/lib/moov/models/components/authtokenrequest.rb +2 -2
  55. data/lib/moov/models/components/bankaccount.rb +7 -7
  56. data/lib/moov/models/components/bankaccountexception.rb +5 -5
  57. data/lib/moov/models/components/bankaccountintegration.rb +2 -2
  58. data/lib/moov/models/components/bankaccountverification.rb +2 -2
  59. data/lib/moov/models/components/bankaccountverificationcreated.rb +2 -2
  60. data/lib/moov/models/components/basicpaymentmethod.rb +1 -1
  61. data/lib/moov/models/components/billablefee.rb +2 -2
  62. data/lib/moov/models/components/billingsummary.rb +6 -6
  63. data/lib/moov/models/components/billingsummary_platformfees.rb +3 -3
  64. data/lib/moov/models/components/billingsummary_volumeamount.rb +3 -3
  65. data/lib/moov/models/components/billingsummarydetails.rb +4 -4
  66. data/lib/moov/models/components/billingsummarydetails_volumeamount.rb +3 -3
  67. data/lib/moov/models/components/businessprofile.rb +2 -2
  68. data/lib/moov/models/components/calltoaction.rb +1 -1
  69. data/lib/moov/models/components/cancellation.rb +2 -2
  70. data/lib/moov/models/components/capability.rb +6 -6
  71. data/lib/moov/models/components/capabilityid.rb +1 -1
  72. data/lib/moov/models/components/card.rb +5 -5
  73. data/lib/moov/models/components/cardaccountupdater.rb +2 -2
  74. data/lib/moov/models/components/cardacquiring.rb +4 -4
  75. data/lib/moov/models/components/cardacquiringdispute.rb +1 -1
  76. data/lib/moov/models/components/cardacquiringrefund.rb +3 -3
  77. data/lib/moov/models/components/cardpaymentpaymentmethod.rb +1 -1
  78. data/lib/moov/models/components/cardpaymenttransferpaymentmethod.rb +1 -1
  79. data/lib/moov/models/components/cardpresentpaymentpaymentmethod.rb +1 -1
  80. data/lib/moov/models/components/cardpresentpaymenttransferpaymentmethod.rb +1 -1
  81. data/lib/moov/models/components/cardtransactiondetails.rb +12 -12
  82. data/lib/moov/models/components/cardverification.rb +3 -3
  83. data/lib/moov/models/components/collectfundscardpayments.rb +1 -1
  84. data/lib/moov/models/components/completedmicrodeposits.rb +1 -1
  85. data/lib/moov/models/components/createaccount.rb +2 -2
  86. data/lib/moov/models/components/createbusinessprofile.rb +2 -2
  87. data/lib/moov/models/components/createdtransfer.rb +4 -4
  88. data/lib/moov/models/components/createevidencefilemultipart.rb +1 -1
  89. data/lib/moov/models/components/createevidencetext.rb +1 -1
  90. data/lib/moov/models/components/createinvoice.rb +52 -0
  91. data/lib/moov/models/components/createinvoice.rbi +23 -0
  92. data/lib/moov/models/components/createinvoicelineitem.rb +49 -0
  93. data/lib/moov/models/components/createinvoicelineitem.rbi +21 -0
  94. data/lib/moov/models/components/createinvoicelineitemoption.rb +44 -0
  95. data/lib/moov/models/components/createinvoicelineitemoption.rbi +19 -0
  96. data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rb +44 -0
  97. data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rbi +19 -0
  98. data/lib/moov/models/components/createinvoicelineitems.rb +32 -0
  99. data/lib/moov/models/components/createinvoicelineitems.rbi +13 -0
  100. data/lib/moov/models/components/createinvoicelineitemsupdate.rb +32 -0
  101. data/lib/moov/models/components/createinvoicelineitemsupdate.rbi +13 -0
  102. data/lib/moov/models/components/createinvoicelineitemsvalidationerror.rb +32 -0
  103. data/lib/moov/models/components/createinvoicelineitemsvalidationerror.rbi +13 -0
  104. data/lib/moov/models/components/createinvoicelineitemvalidationerror.rb +48 -0
  105. data/lib/moov/models/components/createinvoicelineitemvalidationerror.rbi +21 -0
  106. data/lib/moov/models/components/createinvoicepayment.rb +44 -0
  107. data/lib/moov/models/components/createinvoicepayment.rbi +19 -0
  108. data/lib/moov/models/components/createpaymentlink.rb +4 -4
  109. data/lib/moov/models/components/createpaymentlinklineitem.rb +2 -2
  110. data/lib/moov/models/components/createpaymentlinklineitemoption.rb +2 -2
  111. data/lib/moov/models/components/createproductoption.rb +1 -1
  112. data/lib/moov/models/components/createproductoptiongroup.rb +2 -2
  113. data/lib/moov/models/components/createrefund.rb +1 -1
  114. data/lib/moov/models/components/createsweepconfig.rb +1 -1
  115. data/lib/moov/models/components/createterminalapplication.rb +1 -1
  116. data/lib/moov/models/components/createtransfersourceach.rb +2 -2
  117. data/lib/moov/models/components/createtransfersourcecard.rb +2 -2
  118. data/lib/moov/models/components/createwebhook.rb +1 -1
  119. data/lib/moov/models/components/dispute.rb +7 -7
  120. data/lib/moov/models/components/disputeevidenceresponse.rb +4 -4
  121. data/lib/moov/models/components/disputestatus.rb +1 -1
  122. data/lib/moov/models/components/document.rb +2 -2
  123. data/lib/moov/models/components/estimatedactivity.rb +1 -1
  124. data/lib/moov/models/components/evidencetextresponse.rb +2 -2
  125. data/lib/moov/models/components/evidenceuploadresponse.rb +2 -2
  126. data/lib/moov/models/components/facilitatorfee.rb +1 -1
  127. data/lib/moov/models/components/feeplan.rb +2 -2
  128. data/lib/moov/models/components/feeplanagreement.rb +3 -3
  129. data/lib/moov/models/components/feeproperties.rb +1 -1
  130. data/lib/moov/models/components/filedetails.rb +4 -4
  131. data/lib/moov/models/components/fileuploadrequestmultipart.rb +1 -1
  132. data/lib/moov/models/components/fulfillment.rb +2 -2
  133. data/lib/moov/models/components/fulfillmentdetails.rb +1 -1
  134. data/lib/moov/models/components/fullissuedcard.rb +5 -5
  135. data/lib/moov/models/components/granttype.rb +1 -1
  136. data/lib/moov/models/components/imagemetadata.rb +3 -3
  137. data/lib/moov/models/components/incurredfee.rb +1 -1
  138. data/lib/moov/models/components/instantbankcreditpaymentmethod.rb +1 -1
  139. data/lib/moov/models/components/instantbankcredittransferpaymentmethod.rb +1 -1
  140. data/lib/moov/models/components/invoice.rb +116 -0
  141. data/lib/moov/models/components/invoice.rbi +55 -0
  142. data/lib/moov/models/components/invoiceexternalpayment.rb +40 -0
  143. data/lib/moov/models/components/invoiceexternalpayment.rbi +17 -0
  144. data/lib/moov/models/components/invoicelineitem.rb +53 -0
  145. data/lib/moov/models/components/invoicelineitem.rbi +23 -0
  146. data/lib/moov/models/components/invoicelineitemimagemetadata.rb +44 -0
  147. data/lib/moov/models/components/invoicelineitemimagemetadata.rbi +19 -0
  148. data/lib/moov/models/components/invoicelineitemoption.rb +48 -0
  149. data/lib/moov/models/components/invoicelineitemoption.rbi +21 -0
  150. data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rb +44 -0
  151. data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rbi +19 -0
  152. data/lib/moov/models/components/invoicelineitems.rb +32 -0
  153. data/lib/moov/models/components/invoicelineitems.rbi +13 -0
  154. data/lib/moov/models/components/invoicelineitemsvalidationerror.rb +32 -0
  155. data/lib/moov/models/components/invoicelineitemsvalidationerror.rbi +13 -0
  156. data/lib/moov/models/components/invoicelineitemvalidationerror.rb +48 -0
  157. data/lib/moov/models/components/invoicelineitemvalidationerror.rbi +21 -0
  158. data/lib/moov/models/components/invoicepayment.rb +48 -0
  159. data/lib/moov/models/components/invoicepayment.rbi +21 -0
  160. data/lib/moov/models/components/invoicepaymenttype.rb +19 -0
  161. data/lib/moov/models/components/invoicepaymenttype.rbi +11 -0
  162. data/lib/moov/models/components/invoicetransferpayment.rb +32 -0
  163. data/lib/moov/models/components/invoicetransferpayment.rbi +13 -0
  164. data/lib/moov/models/components/issuedcard.rb +5 -5
  165. data/lib/moov/models/components/issuedcardauthorization.rb +3 -3
  166. data/lib/moov/models/components/issuedcardauthorizationevent.rb +3 -3
  167. data/lib/moov/models/components/issuedcardstate.rb +1 -1
  168. data/lib/moov/models/components/issuedcardtransaction.rb +2 -2
  169. data/lib/moov/models/components/issuingvelocitylimit.rb +1 -1
  170. data/lib/moov/models/components/jsonwebkey.rb +6 -6
  171. data/lib/moov/models/components/linkapplepay.rb +2 -2
  172. data/lib/moov/models/components/linkapplepaymentdata.rb +2 -2
  173. data/lib/moov/models/components/linkapplepaymentmethod.rb +1 -1
  174. data/lib/moov/models/components/linkapplepaytoken.rb +3 -3
  175. data/lib/moov/models/components/linkedapplepaypaymentmethod.rb +1 -1
  176. data/lib/moov/models/components/manualtermsofservice.rb +1 -1
  177. data/lib/moov/models/components/manualtermsofserviceupdate.rb +1 -1
  178. data/lib/moov/models/components/minimumcommitment.rb +1 -1
  179. data/lib/moov/models/components/monthlyplatformfee.rb +1 -1
  180. data/lib/moov/models/components/moovfee.rb +1 -1
  181. data/lib/moov/models/components/moovwalletpaymentmethod.rb +1 -1
  182. data/lib/moov/models/components/moovwallettransferpaymentmethod.rb +1 -1
  183. data/lib/moov/models/components/mxauthorizationcode.rb +1 -1
  184. data/lib/moov/models/components/mxpayload.rb +3 -3
  185. data/lib/moov/models/components/occurrence.rb +1 -1
  186. data/lib/moov/models/components/occurrencesresponse.rb +5 -5
  187. data/lib/moov/models/components/onboardinginvite.rb +3 -3
  188. data/lib/moov/models/components/onboardingpartneraccount.rb +1 -1
  189. data/lib/moov/models/components/otherfees.rb +3 -3
  190. data/lib/moov/models/components/partnerpricingagreement.rb +3 -3
  191. data/lib/moov/models/components/patchbusiness.rb +2 -2
  192. data/lib/moov/models/components/patchsweepconfig.rb +1 -1
  193. data/lib/moov/models/components/patchwallet.rb +1 -1
  194. data/lib/moov/models/components/paymentlink.rb +9 -9
  195. data/lib/moov/models/components/paymentlinkdisplayoptions.rb +2 -2
  196. data/lib/moov/models/components/paymentlinkdisplayoptionsupdate.rb +2 -2
  197. data/lib/moov/models/components/paymentlinkpayoutdetails.rb +1 -1
  198. data/lib/moov/models/components/paymentlinkpayoutdetailsupdate.rb +1 -1
  199. data/lib/moov/models/components/paymentlinktype.rb +1 -0
  200. data/lib/moov/models/components/paymentmethodsbankaccount.rb +5 -5
  201. data/lib/moov/models/components/paymentmethodscard.rb +4 -4
  202. data/lib/moov/models/components/paymentmethodswallet.rb +1 -1
  203. data/lib/moov/models/components/payoutrecipient.rb +1 -1
  204. data/lib/moov/models/components/plaidintegration.rb +2 -2
  205. data/lib/moov/models/components/plaidlinkintegration.rb +2 -2
  206. data/lib/moov/models/components/plaidlinkpayload.rb +3 -3
  207. data/lib/moov/models/components/plaidpayload.rb +2 -2
  208. data/lib/moov/models/components/platformfees.rb +2 -2
  209. data/lib/moov/models/components/product.rb +4 -4
  210. data/lib/moov/models/components/productoption.rb +1 -1
  211. data/lib/moov/models/components/productoptiongroup.rb +2 -2
  212. data/lib/moov/models/components/productrequest.rb +1 -1
  213. data/lib/moov/models/components/pullfromcardpaymentmethod.rb +1 -1
  214. data/lib/moov/models/components/pullfromcardtransferpaymentmethod.rb +1 -1
  215. data/lib/moov/models/components/pushtocardpaymentmethod.rb +1 -1
  216. data/lib/moov/models/components/pushtocardtransferpaymentmethod.rb +1 -1
  217. data/lib/moov/models/components/receiptrequest.rb +1 -1
  218. data/lib/moov/models/components/receiptresponse.rb +2 -2
  219. data/lib/moov/models/components/recur.rb +1 -1
  220. data/lib/moov/models/components/recurresponse.rb +1 -1
  221. data/lib/moov/models/components/refundcarddetails.rb +7 -7
  222. data/lib/moov/models/components/representative.rb +3 -3
  223. data/lib/moov/models/components/requestcard.rb +1 -1
  224. data/lib/moov/models/components/requirementerror.rb +2 -2
  225. data/lib/moov/models/components/residual.rb +4 -4
  226. data/lib/moov/models/components/revoketokenrequest.rb +1 -1
  227. data/lib/moov/models/components/rtpcreditpaymentmethod.rb +1 -1
  228. data/lib/moov/models/components/rtpcredittransferpaymentmethod.rb +1 -1
  229. data/lib/moov/models/components/rtprejectioncode.rb +1 -1
  230. data/lib/moov/models/components/rtptransactiondetails.rb +6 -6
  231. data/lib/moov/models/components/schedulelistresponse.rb +4 -4
  232. data/lib/moov/models/components/scheduleresponse.rb +4 -4
  233. data/lib/moov/models/components/sentreceipt.rb +1 -1
  234. data/lib/moov/models/components/statement.rb +6 -6
  235. data/lib/moov/models/components/sweep.rb +3 -3
  236. data/lib/moov/models/components/sweepconfig.rb +3 -3
  237. data/lib/moov/models/components/sweepconfigpaymentmethod.rb +1 -1
  238. data/lib/moov/models/components/sweepsubtotal.rb +1 -1
  239. data/lib/moov/models/components/terminalapplication.rb +2 -2
  240. data/lib/moov/models/components/terminalcard.rb +3 -3
  241. data/lib/moov/models/components/termsofservice.rb +1 -1
  242. data/lib/moov/models/components/ticket.rb +5 -5
  243. data/lib/moov/models/components/ticketmessage.rb +1 -1
  244. data/lib/moov/models/components/transactionsource.rb +1 -1
  245. data/lib/moov/models/components/transfer.rb +10 -6
  246. data/lib/moov/models/components/transfer.rbi +2 -0
  247. data/lib/moov/models/components/transferdestination.rb +1 -1
  248. data/lib/moov/models/components/transferpaymentmethodsbankaccount.rb +5 -5
  249. data/lib/moov/models/components/transferpaymentmethodscard.rb +4 -4
  250. data/lib/moov/models/components/transferpaymentmethodswallet.rb +1 -1
  251. data/lib/moov/models/components/transfersource.rb +1 -1
  252. data/lib/moov/models/components/transferterminalcard.rb +3 -3
  253. data/lib/moov/models/components/underwriting.rb +5 -5
  254. data/lib/moov/models/components/underwritingstatus.rb +2 -2
  255. data/lib/moov/models/components/updateevidence.rb +1 -1
  256. data/lib/moov/models/components/updateinvoice.rb +54 -0
  257. data/lib/moov/models/components/updateinvoice.rbi +23 -0
  258. data/lib/moov/models/components/updateissuedcard.rb +1 -1
  259. data/lib/moov/models/components/updatepaymentlink.rb +1 -1
  260. data/lib/moov/models/components/updateticket.rb +1 -1
  261. data/lib/moov/models/components/updatewebhook.rb +1 -1
  262. data/lib/moov/models/components/upsertunderwriting.rb +4 -4
  263. data/lib/moov/models/components/verification.rb +9 -9
  264. data/lib/moov/models/components/verificationstatus.rb +2 -2
  265. data/lib/moov/models/components/verificationstatusdetail.rb +2 -2
  266. data/lib/moov/models/components/wallet.rb +4 -4
  267. data/lib/moov/models/components/walletavailablebalance.rb +1 -1
  268. data/lib/moov/models/components/wallettransaction.rb +5 -5
  269. data/lib/moov/models/components/wallettransactiontype.rb +1 -0
  270. data/lib/moov/models/components/webhook.rb +4 -4
  271. data/lib/moov/models/components/webhookdatabankaccountupdated.rb +2 -2
  272. data/lib/moov/models/components/webhookdatacancellationcreated.rb +1 -1
  273. data/lib/moov/models/components/webhookdatacancellationupdated.rb +1 -1
  274. data/lib/moov/models/components/webhookdatacapabilityrequested.rb +2 -2
  275. data/lib/moov/models/components/webhookdatacapabilityupdated.rb +3 -3
  276. data/lib/moov/models/components/webhookdatacardautoupdated.rb +1 -1
  277. data/lib/moov/models/components/webhookdatadisputecreated.rb +3 -3
  278. data/lib/moov/models/components/webhookdatadisputeupdated.rb +3 -3
  279. data/lib/moov/models/components/webhookdatainvoiceupdated.rb +1 -1
  280. data/lib/moov/models/components/webhookdatanetworkidupdated.rb +1 -1
  281. data/lib/moov/models/components/webhookdatarefundupdated.rb +1 -1
  282. data/lib/moov/models/components/webhookdatasweepupdated.rb +1 -1
  283. data/lib/moov/models/components/webhookdataterminalapplicationcreated.rb +1 -1
  284. data/lib/moov/models/components/webhookdataterminalapplicationupdated.rb +1 -1
  285. data/lib/moov/models/components/webhookdataticketupdated.rb +1 -1
  286. data/lib/moov/models/components/webhookdatatransfercreated.rb +1 -1
  287. data/lib/moov/models/components/webhookdatatransferupdated.rb +1 -1
  288. data/lib/moov/models/components/webhookdatawallettransactionupdated.rb +1 -1
  289. data/lib/moov/models/components/webhookdatawalletupdated.rb +1 -1
  290. data/lib/moov/models/components/webhookevent.rb +2 -2
  291. data/lib/moov/models/components.rb +23 -0
  292. data/lib/moov/models/errors/cardacquiringrefund_error.rb +3 -3
  293. data/lib/moov/models/errors/createinvoiceerror.rb +56 -0
  294. data/lib/moov/models/errors/createinvoiceerror.rbi +25 -0
  295. data/lib/moov/models/errors/createinvoicepaymenterror.rb +48 -0
  296. data/lib/moov/models/errors/createinvoicepaymenterror.rbi +21 -0
  297. data/lib/moov/models/errors/duplicatecarderror.rb +41 -0
  298. data/lib/moov/models/errors/duplicatecarderror.rbi +17 -0
  299. data/lib/moov/models/errors/listinvoicesvalidationerror.rb +64 -0
  300. data/lib/moov/models/errors/listinvoicesvalidationerror.rbi +29 -0
  301. data/lib/moov/models/errors/transfer_error.rb +10 -6
  302. data/lib/moov/models/errors/transfer_error.rbi +2 -0
  303. data/lib/moov/models/errors/updateinvoiceerror.rb +56 -0
  304. data/lib/moov/models/errors/updateinvoiceerror.rbi +25 -0
  305. data/lib/moov/models/errors.rb +5 -0
  306. data/lib/moov/models/operations/acceptdispute_request.rb +3 -3
  307. data/lib/moov/models/operations/assignaccountcountries_request.rb +3 -3
  308. data/lib/moov/models/operations/cancelschedule_request.rb +3 -3
  309. data/lib/moov/models/operations/completebankaccountverification_request.rb +3 -3
  310. data/lib/moov/models/operations/completemicrodeposits_request.rb +3 -3
  311. data/lib/moov/models/operations/connectaccount_request.rb +3 -3
  312. data/lib/moov/models/operations/createaccesstoken_request.rb +3 -3
  313. data/lib/moov/models/operations/createaccount_request.rb +3 -3
  314. data/lib/moov/models/operations/createapplepaysession_request.rb +3 -3
  315. data/lib/moov/models/operations/createbrand_request.rb +3 -3
  316. data/lib/moov/models/operations/createcancellation_request.rb +3 -3
  317. data/lib/moov/models/operations/createfeeplanagreements_request.rb +3 -3
  318. data/lib/moov/models/operations/createinvoice_request.rb +49 -0
  319. data/lib/moov/models/operations/createinvoice_request.rbi +17 -0
  320. data/lib/moov/models/operations/createinvoice_response.rb +48 -0
  321. data/lib/moov/models/operations/createinvoice_response.rbi +21 -0
  322. data/lib/moov/models/operations/createinvoicepayment_request.rb +53 -0
  323. data/lib/moov/models/operations/createinvoicepayment_request.rbi +19 -0
  324. data/lib/moov/models/operations/createinvoicepayment_response.rb +48 -0
  325. data/lib/moov/models/operations/createinvoicepayment_response.rbi +21 -0
  326. data/lib/moov/models/operations/createonboardinginvite_request.rb +3 -3
  327. data/lib/moov/models/operations/createpaymentlink_request.rb +3 -3
  328. data/lib/moov/models/operations/createproduct_request.rb +3 -3
  329. data/lib/moov/models/operations/createreceipts_request.rb +3 -3
  330. data/lib/moov/models/operations/createrepresentative_request.rb +3 -3
  331. data/lib/moov/models/operations/createreversal_request.rb +3 -3
  332. data/lib/moov/models/operations/createschedule_request.rb +3 -3
  333. data/lib/moov/models/operations/createsweepconfig_request.rb +3 -3
  334. data/lib/moov/models/operations/createterminalapplication_request.rb +3 -3
  335. data/lib/moov/models/operations/createterminalapplicationversion_request.rb +3 -3
  336. data/lib/moov/models/operations/createticket_request.rb +3 -3
  337. data/lib/moov/models/operations/createtransfer_request.rb +3 -3
  338. data/lib/moov/models/operations/createtransferoptions_request.rb +3 -3
  339. data/lib/moov/models/operations/createwallet_request.rb +3 -3
  340. data/lib/moov/models/operations/createwebhook_request.rb +3 -3
  341. data/lib/moov/models/operations/deletedisputeevidencefile_request.rb +3 -3
  342. data/lib/moov/models/operations/deleteimage_request.rb +3 -3
  343. data/lib/moov/models/operations/deleterepresentative_request.rb +3 -3
  344. data/lib/moov/models/operations/deleteterminalapplication_request.rb +3 -3
  345. data/lib/moov/models/operations/disablebankaccount_request.rb +3 -3
  346. data/lib/moov/models/operations/disablecapability_request.rb +4 -4
  347. data/lib/moov/models/operations/disablecard_request.rb +3 -3
  348. data/lib/moov/models/operations/disablepaymentlink_request.rb +3 -3
  349. data/lib/moov/models/operations/disableproduct_request.rb +3 -3
  350. data/lib/moov/models/operations/disablewebhook_request.rb +3 -3
  351. data/lib/moov/models/operations/disconnectaccount_request.rb +3 -3
  352. data/lib/moov/models/operations/generateendtoendkey_request.rb +3 -3
  353. data/lib/moov/models/operations/getaccount_request.rb +3 -3
  354. data/lib/moov/models/operations/getaccountcountries_request.rb +3 -3
  355. data/lib/moov/models/operations/getaccountterminalapplication_request.rb +3 -3
  356. data/lib/moov/models/operations/getadjustment_request.rb +3 -3
  357. data/lib/moov/models/operations/getapplepaymerchantdomains_request.rb +3 -3
  358. data/lib/moov/models/operations/getavatar_request.rb +3 -3
  359. data/lib/moov/models/operations/getbankaccount_request.rb +3 -3
  360. data/lib/moov/models/operations/getbankaccountverification_request.rb +3 -3
  361. data/lib/moov/models/operations/getbrand_request.rb +3 -3
  362. data/lib/moov/models/operations/getcancellation_request.rb +3 -3
  363. data/lib/moov/models/operations/getcapability_request.rb +4 -4
  364. data/lib/moov/models/operations/getcard_request.rb +3 -3
  365. data/lib/moov/models/operations/getdispute_request.rb +3 -3
  366. data/lib/moov/models/operations/getdisputeevidence_request.rb +3 -3
  367. data/lib/moov/models/operations/getdisputeevidencedata_request.rb +3 -3
  368. data/lib/moov/models/operations/getenrichmentaddress_request.rb +3 -3
  369. data/lib/moov/models/operations/getenrichmentprofile_request.rb +3 -3
  370. data/lib/moov/models/operations/getfiledetails_request.rb +3 -3
  371. data/lib/moov/models/operations/getfullissuedcard_request.rb +3 -3
  372. data/lib/moov/models/operations/getimagemetadata_request.rb +3 -3
  373. data/lib/moov/models/operations/getinvoice_request.rb +49 -0
  374. data/lib/moov/models/operations/getinvoice_request.rbi +17 -0
  375. data/lib/moov/models/operations/getinvoice_response.rb +48 -0
  376. data/lib/moov/models/operations/getinvoice_response.rbi +21 -0
  377. data/lib/moov/models/operations/getissuedcard_request.rb +3 -3
  378. data/lib/moov/models/operations/getissuedcardauthorization_request.rb +3 -3
  379. data/lib/moov/models/operations/getissuedcardtransaction_request.rb +3 -3
  380. data/lib/moov/models/operations/getmerchantprocessingagreement_request.rb +3 -3
  381. data/lib/moov/models/operations/getonboardinginvite_request.rb +3 -3
  382. data/lib/moov/models/operations/getpaymentlink_request.rb +3 -3
  383. data/lib/moov/models/operations/getpaymentlinkqrcode_request.rb +3 -3
  384. data/lib/moov/models/operations/getpaymentmethod_request.rb +3 -3
  385. data/lib/moov/models/operations/getproduct_request.rb +3 -3
  386. data/lib/moov/models/operations/getpublicimage_request.rb +1 -1
  387. data/lib/moov/models/operations/getrefund_request.rb +3 -3
  388. data/lib/moov/models/operations/getrepresentative_request.rb +3 -3
  389. data/lib/moov/models/operations/getresidual_request.rb +3 -3
  390. data/lib/moov/models/operations/getscheduledoccurrence_request.rb +4 -4
  391. data/lib/moov/models/operations/getschedules_request.rb +3 -3
  392. data/lib/moov/models/operations/getstatement_request.rb +3 -3
  393. data/lib/moov/models/operations/getsweep_request.rb +3 -3
  394. data/lib/moov/models/operations/getsweepconfig_request.rb +3 -3
  395. data/lib/moov/models/operations/getterminalapplication_request.rb +3 -3
  396. data/lib/moov/models/operations/getterminalconfiguration_request.rb +3 -3
  397. data/lib/moov/models/operations/gettermsofservicetoken_request.rb +3 -3
  398. data/lib/moov/models/operations/getticket_request.rb +3 -3
  399. data/lib/moov/models/operations/gettransfer_request.rb +3 -3
  400. data/lib/moov/models/operations/getunderwriting_request.rb +3 -3
  401. data/lib/moov/models/operations/getwallet_request.rb +3 -3
  402. data/lib/moov/models/operations/getwallettransaction_request.rb +3 -3
  403. data/lib/moov/models/operations/getwebhook_request.rb +3 -3
  404. data/lib/moov/models/operations/getwebhooksecret_request.rb +3 -3
  405. data/lib/moov/models/operations/initiatebankaccountverification_request.rb +4 -4
  406. data/lib/moov/models/operations/initiatemicrodeposits_request.rb +3 -3
  407. data/lib/moov/models/operations/initiaterefund_request.rb +3 -3
  408. data/lib/moov/models/operations/linkaccountterminalapplication_request.rb +3 -3
  409. data/lib/moov/models/operations/linkapplepaytoken_request.rb +3 -3
  410. data/lib/moov/models/operations/linkbankaccount_request.rb +4 -4
  411. data/lib/moov/models/operations/linkcard_request.rb +4 -4
  412. data/lib/moov/models/operations/listaccounts_request.rb +9 -9
  413. data/lib/moov/models/operations/listaccountterminalapplications_request.rb +3 -3
  414. data/lib/moov/models/operations/listadjustments_request.rb +3 -3
  415. data/lib/moov/models/operations/listbankaccounts_request.rb +3 -3
  416. data/lib/moov/models/operations/listcapabilities_request.rb +3 -3
  417. data/lib/moov/models/operations/listcards_request.rb +3 -3
  418. data/lib/moov/models/operations/listconnectedaccountsforaccount_request.rb +9 -9
  419. data/lib/moov/models/operations/listdisputeevidence_request.rb +3 -3
  420. data/lib/moov/models/operations/listdisputes_request.rb +3 -3
  421. data/lib/moov/models/operations/listeventtypes_request.rb +3 -3
  422. data/lib/moov/models/operations/listfeeplanagreements_request.rb +3 -3
  423. data/lib/moov/models/operations/listfeeplans_request.rb +3 -3
  424. data/lib/moov/models/operations/listfeerevenue_request.rb +3 -3
  425. data/lib/moov/models/operations/listfeesfetch_request.rb +3 -3
  426. data/lib/moov/models/operations/listfiles_request.rb +3 -3
  427. data/lib/moov/models/operations/listimagemetadata_request.rb +3 -3
  428. data/lib/moov/models/operations/listindustries_request.rb +3 -3
  429. data/lib/moov/models/operations/listinstitutions_request.rb +3 -3
  430. data/lib/moov/models/operations/listinvoicepayments_request.rb +49 -0
  431. data/lib/moov/models/operations/listinvoicepayments_request.rbi +17 -0
  432. data/lib/moov/models/operations/listinvoicepayments_response.rb +48 -0
  433. data/lib/moov/models/operations/listinvoicepayments_response.rbi +21 -0
  434. data/lib/moov/models/operations/listinvoices_request.rb +77 -0
  435. data/lib/moov/models/operations/listinvoices_request.rbi +31 -0
  436. data/lib/moov/models/operations/listinvoices_response.rb +48 -0
  437. data/lib/moov/models/operations/listinvoices_response.rbi +21 -0
  438. data/lib/moov/models/operations/listissuedcardauthorizationevents_request.rb +3 -3
  439. data/lib/moov/models/operations/listissuedcardauthorizations_request.rb +3 -3
  440. data/lib/moov/models/operations/listissuedcards_request.rb +3 -3
  441. data/lib/moov/models/operations/listissuedcardtransactions_request.rb +3 -3
  442. data/lib/moov/models/operations/listonboardinginvites_request.rb +3 -3
  443. data/lib/moov/models/operations/listpartnerpricingagreements_request.rb +3 -3
  444. data/lib/moov/models/operations/listpaymentlinks_request.rb +9 -13
  445. data/lib/moov/models/operations/listpaymentlinks_request.rbi +2 -4
  446. data/lib/moov/models/operations/listpaymentmethods_request.rb +4 -4
  447. data/lib/moov/models/operations/listproducts_request.rb +3 -3
  448. data/lib/moov/models/operations/listreceipts_request.rb +3 -3
  449. data/lib/moov/models/operations/listrefunds_request.rb +3 -3
  450. data/lib/moov/models/operations/listrepresentatives_request.rb +3 -3
  451. data/lib/moov/models/operations/listresidualfees_request.rb +3 -3
  452. data/lib/moov/models/operations/listresiduals_request.rb +3 -3
  453. data/lib/moov/models/operations/listschedules_request.rb +3 -3
  454. data/lib/moov/models/operations/liststatements_request.rb +3 -3
  455. data/lib/moov/models/operations/listsweepconfigs_request.rb +3 -3
  456. data/lib/moov/models/operations/listsweeps_request.rb +3 -3
  457. data/lib/moov/models/operations/listterminalapplications_request.rb +3 -3
  458. data/lib/moov/models/operations/listticketmessages_request.rb +3 -3
  459. data/lib/moov/models/operations/listtickets_request.rb +3 -3
  460. data/lib/moov/models/operations/listtransfers_request.rb +3 -3
  461. data/lib/moov/models/operations/listwallets_request.rb +3 -3
  462. data/lib/moov/models/operations/listwallettransactions_request.rb +3 -3
  463. data/lib/moov/models/operations/listwebhooks_request.rb +3 -3
  464. data/lib/moov/models/operations/ping_request.rb +3 -3
  465. data/lib/moov/models/operations/pingwebhook_request.rb +3 -3
  466. data/lib/moov/models/operations/registerapplepaymerchantdomains_request.rb +3 -3
  467. data/lib/moov/models/operations/requestcapabilities_request.rb +3 -3
  468. data/lib/moov/models/operations/requestcard_request.rb +3 -3
  469. data/lib/moov/models/operations/retrievefees_request.rb +3 -3
  470. data/lib/moov/models/operations/revokeaccesstoken_request.rb +3 -3
  471. data/lib/moov/models/operations/revokeonboardinginvite_request.rb +3 -3
  472. data/lib/moov/models/operations/saveunderwriting_request.rb +3 -3
  473. data/lib/moov/models/operations/searchinstitutions_request.rb +3 -3
  474. data/lib/moov/models/operations/submitdisputeevidence_request.rb +3 -3
  475. data/lib/moov/models/operations/testendtoendtoken_request.rb +3 -3
  476. data/lib/moov/models/operations/updateaccount_request.rb +3 -3
  477. data/lib/moov/models/operations/updateapplepaymerchantdomains_request.rb +3 -3
  478. data/lib/moov/models/operations/updatecard_request.rb +3 -3
  479. data/lib/moov/models/operations/updatedisputeevidence_request.rb +3 -3
  480. data/lib/moov/models/operations/updateimage_request.rb +3 -3
  481. data/lib/moov/models/operations/updateimagemetadata_request.rb +3 -3
  482. data/lib/moov/models/operations/updateinvoice_request.rb +53 -0
  483. data/lib/moov/models/operations/updateinvoice_request.rbi +19 -0
  484. data/lib/moov/models/operations/updateinvoice_response.rb +48 -0
  485. data/lib/moov/models/operations/updateinvoice_response.rbi +21 -0
  486. data/lib/moov/models/operations/updateissuedcard_request.rb +3 -3
  487. data/lib/moov/models/operations/updatepaymentlink_request.rb +3 -3
  488. data/lib/moov/models/operations/updateproduct_request.rb +3 -3
  489. data/lib/moov/models/operations/updaterepresentative_request.rb +3 -3
  490. data/lib/moov/models/operations/updateschedule_request.rb +3 -3
  491. data/lib/moov/models/operations/updatesweepconfig_request.rb +3 -3
  492. data/lib/moov/models/operations/updateticket_request.rb +3 -3
  493. data/lib/moov/models/operations/updatetransfer_request.rb +3 -3
  494. data/lib/moov/models/operations/updatewallet_request.rb +3 -3
  495. data/lib/moov/models/operations/updatewebhook_request.rb +3 -3
  496. data/lib/moov/models/operations/uploaddisputeevidencefile_request.rb +3 -3
  497. data/lib/moov/models/operations/uploaddisputeevidencetext_request.rb +3 -3
  498. data/lib/moov/models/operations/uploadfile_request.rb +3 -3
  499. data/lib/moov/models/operations/uploadimage_request.rb +3 -3
  500. data/lib/moov/models/operations/upsertbrand_request.rb +3 -3
  501. data/lib/moov/models/operations/upsertunderwriting_request.rb +3 -3
  502. data/lib/moov/models/operations.rb +12 -0
  503. data/lib/moov/onboarding.rb +5 -5
  504. data/lib/moov/payment_links.rb +13 -13
  505. data/lib/moov/payment_methods.rb +2 -2
  506. data/lib/moov/ping.rb +1 -1
  507. data/lib/moov/products.rb +3 -3
  508. data/lib/moov/receipts.rb +3 -3
  509. data/lib/moov/representatives.rb +12 -12
  510. data/lib/moov/scheduling.rb +8 -8
  511. data/lib/moov/sdkconfiguration.rb +3 -3
  512. data/lib/moov/statements.rb +7 -7
  513. data/lib/moov/support.rb +12 -12
  514. data/lib/moov/sweeps.rb +8 -8
  515. data/lib/moov/terminal_applications.rb +7 -7
  516. data/lib/moov/transfers.rb +22 -22
  517. data/lib/moov/underwriting.rb +8 -8
  518. data/lib/moov/utils/request_bodies.rb +8 -3
  519. data/lib/moov/utils/security.rb +10 -0
  520. data/lib/moov/utils/url.rb +11 -5
  521. data/lib/moov/utils/utils.rb +33 -3
  522. data/lib/moov/wallet_transactions.rb +4 -4
  523. data/lib/moov/wallets.rb +10 -10
  524. data/lib/moov/webhooks.rb +2 -2
  525. data/lib/moov_ruby.rb +1 -0
  526. metadata +83 -2
@@ -43,11 +43,11 @@ module Moov
43
43
  def generate_options(create_transfer_options:, account_id:, x_moov_version: nil, timeout_ms: nil)
44
44
  # generate_options - Generate available payment method options for one or multiple transfer participants depending on the accountID or paymentMethodID you
45
45
  # supply in the request body.
46
- #
46
+ #
47
47
  # The accountID in the route should the partner's accountID.
48
- #
48
+ #
49
49
  # Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
50
- #
50
+ #
51
51
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
52
52
  # you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
53
53
  request = Models::Operations::CreateTransferOptionsRequest.new(
@@ -70,7 +70,7 @@ module Moov
70
70
  headers['content-type'] = req_content_type
71
71
  raise StandardError, 'request body is required' if data.nil? && form.nil?
72
72
 
73
- if form
73
+ if form && !form.empty?
74
74
  body = Utils.encode_form(form)
75
75
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
76
76
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -211,9 +211,9 @@ module Moov
211
211
  sig { params(request: Models::Operations::CreateTransferRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateTransferResponse) }
212
212
  def create(request:, timeout_ms: nil)
213
213
  # create - Move money by providing the source, destination, and amount in the request body.
214
- #
214
+ #
215
215
  # Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
216
- #
216
+ #
217
217
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
218
218
  # you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
219
219
  url, params = @sdk_configuration.get_server_details
@@ -231,7 +231,7 @@ module Moov
231
231
  headers['content-type'] = req_content_type
232
232
  raise StandardError, 'request body is required' if data.nil? && form.nil?
233
233
 
234
- if form
234
+ if form && !form.empty?
235
235
  body = Utils.encode_form(form)
236
236
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
237
237
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -431,14 +431,14 @@ module Moov
431
431
  sig { params(request: Models::Operations::ListTransfersRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListTransfersResponse) }
432
432
  def list(request:, timeout_ms: nil)
433
433
  # list - List all the transfers associated with a particular Moov account.
434
- #
434
+ #
435
435
  # Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
436
- #
436
+ #
437
437
  # When you run this request, you retrieve 200 transfers at a time. You can advance past a results set of 200 transfers by using the `skip` parameter (for example,
438
438
  # if you set `skip`= 10, you will see a results set of 200 transfers after the first 10). If you are searching a high volume of transfers, the request will likely
439
439
  # process very slowly. To achieve faster performance, restrict the data as much as you can by using the `StartDateTime` and `EndDateTime` parameters for a limited
440
440
  # period of time. You can run multiple requests in smaller time window increments until you've retrieved all the transfers you need.
441
- #
441
+ #
442
442
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
443
443
  # you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
444
444
  url, params = @sdk_configuration.get_server_details
@@ -572,10 +572,10 @@ module Moov
572
572
  sig { params(transfer_id: ::String, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetTransferResponse) }
573
573
  def get(transfer_id:, account_id:, x_moov_version: nil, timeout_ms: nil)
574
574
  # get - Retrieve full transfer details for an individual transfer of a particular Moov account.
575
- #
575
+ #
576
576
  # Payment rail-specific details are included in the source and destination. Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/)
577
577
  # to learn more.
578
- #
578
+ #
579
579
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
580
580
  # you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
581
581
  request = Models::Operations::GetTransferRequest.new(
@@ -697,9 +697,9 @@ module Moov
697
697
  sig { params(patch_transfer: Models::Components::PatchTransfer, transfer_id: ::String, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateTransferResponse) }
698
698
  def update(patch_transfer:, transfer_id:, account_id:, x_moov_version: nil, timeout_ms: nil)
699
699
  # update - Update the metadata contained on a transfer.
700
- #
700
+ #
701
701
  # Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
702
- #
702
+ #
703
703
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
704
704
  # you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
705
705
  request = Models::Operations::UpdateTransferRequest.new(
@@ -723,7 +723,7 @@ module Moov
723
723
  headers['content-type'] = req_content_type
724
724
  raise StandardError, 'request body is required' if data.nil? && form.nil?
725
725
 
726
- if form
726
+ if form && !form.empty?
727
727
  body = Utils.encode_form(form)
728
728
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
729
729
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -1109,10 +1109,10 @@ module Moov
1109
1109
  sig { params(request: Models::Operations::InitiateRefundRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::InitiateRefundResponse) }
1110
1110
  def initiate_refund(request:, timeout_ms: nil)
1111
1111
  # initiate_refund - Initiate a refund for a card transfer.
1112
- #
1112
+ #
1113
1113
  # **Use the [Cancel or refund a card transfer](https://docs.moov.io/api/money-movement/refunds/cancel/) endpoint for more comprehensive cancel and refund options.**
1114
1114
  # See the [reversals](https://docs.moov.io/guides/money-movement/accept-payments/card-acceptance/reversals/) guide for more information.
1115
- #
1115
+ #
1116
1116
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1117
1117
  # you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
1118
1118
  url, params = @sdk_configuration.get_server_details
@@ -1129,7 +1129,7 @@ module Moov
1129
1129
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_refund, :json)
1130
1130
  headers['content-type'] = req_content_type
1131
1131
 
1132
- if form
1132
+ if form && !form.empty?
1133
1133
  body = Utils.encode_form(form)
1134
1134
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1135
1135
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -1307,7 +1307,7 @@ module Moov
1307
1307
  sig { params(account_id: ::String, transfer_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListRefundsResponse) }
1308
1308
  def list_refunds(account_id:, transfer_id:, x_moov_version: nil, timeout_ms: nil)
1309
1309
  # list_refunds - Get a list of refunds for a card transfer.
1310
- #
1310
+ #
1311
1311
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1312
1312
  # you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
1313
1313
  request = Models::Operations::ListRefundsRequest.new(
@@ -1429,7 +1429,7 @@ module Moov
1429
1429
  sig { params(transfer_id: ::String, account_id: ::String, refund_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetRefundResponse) }
1430
1430
  def get_refund(transfer_id:, account_id:, refund_id:, x_moov_version: nil, timeout_ms: nil)
1431
1431
  # get_refund - Get details of a refund for a card transfer.
1432
- #
1432
+ #
1433
1433
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1434
1434
  # you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
1435
1435
  request = Models::Operations::GetRefundRequest.new(
@@ -1554,7 +1554,7 @@ module Moov
1554
1554
  # create_reversal - Reverses a card transfer by initiating a cancellation or refund depending on the transaction status.
1555
1555
  # Read our [reversals guide](https://docs.moov.io/guides/money-movement/accept-payments/card-acceptance/reversals/)
1556
1556
  # to learn more.
1557
- #
1557
+ #
1558
1558
  # To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
1559
1559
  # to specify the `/accounts/{accountID}/transfers.write` scope.
1560
1560
  url, params = @sdk_configuration.get_server_details
@@ -1571,7 +1571,7 @@ module Moov
1571
1571
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_reversal, :json)
1572
1572
  headers['content-type'] = req_content_type
1573
1573
 
1574
- if form
1574
+ if form && !form.empty?
1575
1575
  body = Utils.encode_form(form)
1576
1576
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1577
1577
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -42,9 +42,9 @@ module Moov
42
42
  sig { params(account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetUnderwritingResponse) }
43
43
  def get(account_id:, x_moov_version: nil, timeout_ms: nil)
44
44
  # get - Retrieve underwriting associated with a given Moov account.
45
- #
45
+ #
46
46
  # Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
47
- #
47
+ #
48
48
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
49
49
  # you'll need to specify the `/accounts/{accountID}/profile.read` scope.
50
50
  request = Models::Operations::GetUnderwritingRequest.new(
@@ -165,9 +165,9 @@ module Moov
165
165
  sig { params(upsert_underwriting: Models::Components::UpsertUnderwriting, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::SaveUnderwritingResponse) }
166
166
  def save(upsert_underwriting:, account_id:, x_moov_version: nil, timeout_ms: nil)
167
167
  # save - Create or update the account's underwriting.
168
- #
168
+ #
169
169
  # Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
170
- #
170
+ #
171
171
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
172
172
  # you'll need to specify the `/accounts/{accountID}/profile.write` scope.
173
173
  request = Models::Operations::SaveUnderwritingRequest.new(
@@ -190,7 +190,7 @@ module Moov
190
190
  headers['content-type'] = req_content_type
191
191
  raise StandardError, 'request body is required' if data.nil? && form.nil?
192
192
 
193
- if form
193
+ if form && !form.empty?
194
194
  body = Utils.encode_form(form)
195
195
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
196
196
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -331,9 +331,9 @@ module Moov
331
331
  sig { params(update_underwriting: Models::Components::UpdateUnderwriting, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpsertUnderwritingResponse) }
332
332
  def upsert(update_underwriting:, account_id:, x_moov_version: nil, timeout_ms: nil)
333
333
  # upsert - Create or update the account's underwriting.
334
- #
334
+ #
335
335
  # Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
336
- #
336
+ #
337
337
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
338
338
  # you'll need to specify the `/accounts/{accountID}/profile.write` scope.
339
339
  request = Models::Operations::UpsertUnderwritingRequest.new(
@@ -356,7 +356,7 @@ module Moov
356
356
  headers['content-type'] = req_content_type
357
357
  raise StandardError, 'request body is required' if data.nil? && form.nil?
358
358
 
359
- if form
359
+ if form && !form.empty?
360
360
  body = Utils.encode_form(form)
361
361
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
362
362
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -29,8 +29,6 @@ module Moov
29
29
 
30
30
  return serialize_content_type(SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request) if !request.respond_to?(:fields) || !request.respond_to?(request_field_name)
31
31
 
32
- request_val = request.send(request_field_name)
33
-
34
32
  request_metadata = T.let(nil, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]]))
35
33
  T.unsafe(request).fields.each do |f|
36
34
  if f.name == request_field_name
@@ -38,7 +36,14 @@ module Moov
38
36
  break
39
37
  end
40
38
  end
41
- raise StandardError, 'invalid request type' if request_metadata.nil?
39
+ if request_metadata.nil?
40
+ # Field name collision: model has a field matching request_field_name but without :request metadata.
41
+ # Serialize the entire object as the request body.
42
+ return serialize_content_type(SERIALIZATION_METHOD_TO_CONTENT_TYPE[serialization_method], request)
43
+ end
44
+
45
+ request_val = request.send(request_field_name)
46
+ return ['', nil, nil] if request_val.nil?
42
47
 
43
48
  serialize_content_type(
44
49
  request_metadata.fetch(:media_type, 'application/octet-stream'), request_val
@@ -37,6 +37,16 @@ module Moov
37
37
 
38
38
  sig { params(req: Faraday::Request, option: Object).void }
39
39
  def self._parse_security_option(req, option)
40
+ # Check if this option uses basic auth (needs the whole object, not individual fields)
41
+ first_field = T.unsafe(option).fields.first
42
+ if first_field
43
+ first_meta = first_field.metadata[:security]
44
+ if first_meta && first_meta[:type] == 'http' && first_meta[:sub_type] == 'basic'
45
+ _parse_security_scheme(req, first_meta, option)
46
+ return
47
+ end
48
+ end
49
+
40
50
  T.unsafe(option).fields.each do |opt_field|
41
51
  metadata = opt_field.metadata[:security]
42
52
  next if metadata.nil? || !metadata.include?(:scheme)
@@ -24,7 +24,7 @@ module Moov
24
24
  if serialization != ''
25
25
  serialized_params = _get_serialized_params(param_metadata, f_name, param)
26
26
  serialized_params.each do |k, v|
27
- path = path.sub("{#{k}}", v.join(', '))
27
+ path = path.gsub("{#{k}}", v.join(', '))
28
28
  end
29
29
  else
30
30
  if param.is_a? Array
@@ -32,7 +32,7 @@ module Moov
32
32
  param.each do |pp_val|
33
33
  pp_vals.append(pp_val.to_s)
34
34
  end
35
- path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
35
+ path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
36
36
  elsif param.is_a? Hash
37
37
  pp_vals = []
38
38
  param.each do |pp_key, pp_val|
@@ -44,7 +44,7 @@ module Moov
44
44
  pp_vals.append("#{pp_key},#{value}")
45
45
  end
46
46
  end
47
- path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
47
+ path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
48
48
  elsif param.class.include?(::Crystalline::MetadataFields)
49
49
  pp_vals = []
50
50
  attrs = T.unsafe(param).fields.filter { |field| field.name && param.respond_to?(field.name.to_sym) }.map(&:name)
@@ -72,9 +72,9 @@ module Moov
72
72
  pp_vals.append("#{parm_name},#{param_field_val}")
73
73
  end
74
74
  end
75
- path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
75
+ path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
76
76
  else
77
- path = path.sub("{#{param_metadata.fetch(:field_name, f.name)}}", val_to_string(param))
77
+ path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", _encode_path_param(val_to_string(param)))
78
78
  end
79
79
  end
80
80
  end
@@ -82,6 +82,12 @@ module Moov
82
82
  server_url.delete_suffix('/') + path
83
83
  end
84
84
 
85
+ # Percent-encode characters that are invalid in URI path segments
86
+ sig { params(value: String).returns(String) }
87
+ def self._encode_path_param(value)
88
+ value.gsub(/[<>{}\[\]|\\^`\s?#%]/) { |c| format('%%%02X', c.ord) }
89
+ end
90
+
85
91
  sig { params(url_with_params: String, params: T::Hash[Symbol, T.any(String, T::Enum)]).returns(String) }
86
92
  def self.template_url(url_with_params, params)
87
93
  params.each do |key, value|
@@ -19,13 +19,43 @@ module Moov
19
19
  if val.class.respond_to?(:enums)
20
20
  T.unsafe(val).serialize.to_s
21
21
  elsif val.is_a? DateTime
22
- val.strftime('%Y-%m-%dT%H:%M:%S.%NZ')
22
+ val.strftime('%Y-%m-%dT%H:%M:%S.%NZ').sub(/(\.\d*[1-9])0+Z\z/, '\1Z').sub(/\.0+Z\z/, 'Z')
23
23
  else
24
24
  val.to_s
25
25
 
26
26
  end
27
27
  end
28
28
 
29
+ MIME_TYPES = {
30
+ '.json' => 'application/json',
31
+ '.xml' => 'application/xml',
32
+ '.pdf' => 'application/pdf',
33
+ '.zip' => 'application/zip',
34
+ '.gz' => 'application/gzip',
35
+ '.csv' => 'text/csv',
36
+ '.txt' => 'text/plain',
37
+ '.html' => 'text/html',
38
+ '.htm' => 'text/html',
39
+ '.css' => 'text/css',
40
+ '.js' => 'application/javascript',
41
+ '.png' => 'image/png',
42
+ '.jpg' => 'image/jpeg',
43
+ '.jpeg' => 'image/jpeg',
44
+ '.gif' => 'image/gif',
45
+ '.svg' => 'image/svg+xml',
46
+ '.webp' => 'image/webp',
47
+ '.mp3' => 'audio/mpeg',
48
+ '.mp4' => 'video/mp4',
49
+ '.yaml' => 'application/yaml',
50
+ '.yml' => 'application/yaml',
51
+ }.freeze
52
+
53
+ sig { params(filename: String).returns(String) }
54
+ def self.mime_type_for_filename(filename)
55
+ ext = File.extname(filename).downcase
56
+ MIME_TYPES.fetch(ext, 'application/octet-stream')
57
+ end
58
+
29
59
  sig do
30
60
  params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object)
31
61
  .returns(T::Hash[Symbol, T::Array[String]])
@@ -155,7 +185,7 @@ module Moov
155
185
  # Handle file uploads
156
186
  file_part = Faraday::Multipart::FilePart.new(
157
187
  StringIO.new(T.must(field[1])),
158
- 'application/octet-stream',
188
+ mime_type_for_filename(T.must(field[0])),
159
189
  field[0]
160
190
  )
161
191
 
@@ -170,7 +200,7 @@ module Moov
170
200
  end
171
201
  end
172
202
  elsif field.length == 3
173
- param_part = Faraday::Multipart::ParamPart.new(field[1].to_json, field[2])
203
+ param_part = Faraday::Multipart::ParamPart.new(field[1], field[2])
174
204
 
175
205
  # Handle multiple values for the same field name (arrays)
176
206
  if payload.key?(field_name)
@@ -42,9 +42,9 @@ module Moov
42
42
  sig { params(request: Models::Operations::ListWalletTransactionsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListWalletTransactionsResponse) }
43
43
  def list(request:, timeout_ms: nil)
44
44
  # list - List all the transactions associated with a particular Moov wallet.
45
- #
45
+ #
46
46
  # Read our [wallet transactions guide](https://docs.moov.io/guides/sources/wallets/transactions/) to learn more.
47
- #
47
+ #
48
48
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
49
49
  # you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
50
50
  url, params = @sdk_configuration.get_server_details
@@ -178,9 +178,9 @@ module Moov
178
178
  sig { params(account_id: ::String, wallet_id: ::String, transaction_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWalletTransactionResponse) }
179
179
  def get(account_id:, wallet_id:, transaction_id:, x_moov_version: nil, timeout_ms: nil)
180
180
  # get - Get details on a specific wallet transaction.
181
- #
181
+ #
182
182
  # Read our [wallet transactions guide](https://docs.moov.io/guides/sources/wallets/transactions/) to learn more.
183
- #
183
+ #
184
184
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
185
185
  # you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
186
186
  request = Models::Operations::GetWalletTransactionRequest.new(
data/lib/moov/wallets.rb CHANGED
@@ -42,9 +42,9 @@ module Moov
42
42
  sig { params(create_wallet: Models::Components::CreateWallet, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateWalletResponse) }
43
43
  def create(create_wallet:, account_id:, x_moov_version: nil, timeout_ms: nil)
44
44
  # create - Create a new wallet for an account. You can specify optional attributes such as a display name and description to specify the intended use of the wallet. This will generate a new moov-wallet payment method.
45
- #
45
+ #
46
46
  # Read our [Moov wallets guide](https://docs.moov.io/guides/sources/wallets/) to learn more.
47
- #
47
+ #
48
48
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
49
49
  # you'll need to specify the `/accounts/{accountID}/wallets.write` scope.
50
50
  request = Models::Operations::CreateWalletRequest.new(
@@ -67,7 +67,7 @@ module Moov
67
67
  headers['content-type'] = req_content_type
68
68
  raise StandardError, 'request body is required' if data.nil? && form.nil?
69
69
 
70
- if form
70
+ if form && !form.empty?
71
71
  body = Utils.encode_form(form)
72
72
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
73
73
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -208,9 +208,9 @@ module Moov
208
208
  sig { params(request: Models::Operations::ListWalletsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListWalletsResponse) }
209
209
  def list(request:, timeout_ms: nil)
210
210
  # list - List the wallets associated with a Moov account.
211
- #
211
+ #
212
212
  # Read our [Moov wallets guide](https://docs.moov.io/guides/sources/wallets/) to learn more.
213
- #
213
+ #
214
214
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
215
215
  # you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
216
216
  url, params = @sdk_configuration.get_server_details
@@ -344,9 +344,9 @@ module Moov
344
344
  sig { params(account_id: ::String, wallet_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetWalletResponse) }
345
345
  def get(account_id:, wallet_id:, x_moov_version: nil, timeout_ms: nil)
346
346
  # get - Get information on a specific wallet (e.g., the available balance).
347
- #
347
+ #
348
348
  # Read our [Moov wallets guide](https://docs.moov.io/guides/sources/wallets/) to learn more.
349
- #
349
+ #
350
350
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
351
351
  # you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
352
352
  request = Models::Operations::GetWalletRequest.new(
@@ -468,9 +468,9 @@ module Moov
468
468
  sig { params(patch_wallet: Models::Components::PatchWallet, wallet_id: ::String, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateWalletResponse) }
469
469
  def update(patch_wallet:, wallet_id:, account_id:, x_moov_version: nil, timeout_ms: nil)
470
470
  # update - Update properties of an existing wallet such as name, description, status, or metadata.
471
- #
471
+ #
472
472
  # Read our [Moov wallets guide](https://docs.moov.io/guides/sources/wallets/) to learn more.
473
- #
473
+ #
474
474
  # To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
475
475
  # you'll need to specify the `/accounts/{accountID}/wallets.write` scope.
476
476
  request = Models::Operations::UpdateWalletRequest.new(
@@ -494,7 +494,7 @@ module Moov
494
494
  headers['content-type'] = req_content_type
495
495
  raise StandardError, 'request body is required' if data.nil? && form.nil?
496
496
 
497
- if form
497
+ if form && !form.empty?
498
498
  body = Utils.encode_form(form)
499
499
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
500
500
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
data/lib/moov/webhooks.rb CHANGED
@@ -277,7 +277,7 @@ module Moov
277
277
  headers['content-type'] = req_content_type
278
278
  raise StandardError, 'request body is required' if data.nil? && form.nil?
279
279
 
280
- if form
280
+ if form && !form.empty?
281
281
  body = Utils.encode_form(form)
282
282
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
283
283
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -556,7 +556,7 @@ module Moov
556
556
  headers['content-type'] = req_content_type
557
557
  raise StandardError, 'request body is required' if data.nil? && form.nil?
558
558
 
559
- if form
559
+ if form && !form.empty?
560
560
  body = Utils.encode_form(form)
561
561
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
562
562
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
data/lib/moov_ruby.rb CHANGED
@@ -16,6 +16,7 @@ module Moov
16
16
  autoload :FeePlans, 'moov/fee_plans'
17
17
  autoload :Files, 'moov/files'
18
18
  autoload :Images, 'moov/images'
19
+ autoload :Invoices, 'moov/invoices'
19
20
  autoload :PaymentLinks, 'moov/payment_links'
20
21
  autoload :PaymentMethods, 'moov/payment_methods'
21
22
  autoload :Products, 'moov/products'