moov_ruby 0.0.0.pre.dev.0 → 0.0.0.pre.dev.1
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.
- checksums.yaml +4 -4
- data/lib/crystalline/metadata_fields.rb +66 -9
- data/lib/crystalline/module.rb +3 -3
- data/lib/moov/account_terminal_applications.rb +5 -5
- data/lib/moov/accounts.rb +22 -22
- data/lib/moov/adjustments.rb +2 -2
- data/lib/moov/apple_pay.rb +14 -14
- data/lib/moov/authentication.rb +3 -3
- data/lib/moov/avatars.rb +2 -2
- data/lib/moov/bank_accounts.rb +26 -26
- data/lib/moov/branding.rb +5 -5
- data/lib/moov/capabilities.rb +6 -6
- data/lib/moov/card_issuing.rb +8 -8
- data/lib/moov/cards.rb +32 -17
- data/lib/moov/disputes.rb +32 -32
- data/lib/moov/end_to_end_encryption.rb +2 -2
- data/lib/moov/enriched_profile.rb +1 -1
- data/lib/moov/fee_plans.rb +12 -12
- data/lib/moov/files.rb +5 -5
- data/lib/moov/images.rb +10 -10
- data/lib/moov/industries.rb +1 -1
- data/lib/moov/institutions.rb +7 -7
- data/lib/moov/invoices.rb +9 -9
- data/lib/moov/issuing_transactions.rb +5 -5
- data/lib/moov/models/components/account.rb +5 -5
- data/lib/moov/models/components/accountnameverification.rb +4 -4
- data/lib/moov/models/components/accountverificationstatus.rb +2 -2
- data/lib/moov/models/components/achcreditsamedaypaymentmethod.rb +1 -1
- data/lib/moov/models/components/achcreditsamedaytransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achcreditstandardpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achcreditstandardtransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achdebitcollectpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achdebitcollecttransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achdebitfundpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achdebitfundtransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/achreturncode.rb +1 -1
- data/lib/moov/models/components/achtransactiondetails.rb +10 -10
- data/lib/moov/models/components/adjustment.rb +1 -1
- data/lib/moov/models/components/adjustmentfees.rb +3 -3
- data/lib/moov/models/components/amount.rb +1 -1
- data/lib/moov/models/components/amountdecimal.rb +1 -1
- data/lib/moov/models/components/amountdecimalupdate.rb +1 -1
- data/lib/moov/models/components/amountupdate.rb +1 -1
- data/lib/moov/models/components/applepayheader.rb +1 -1
- data/lib/moov/models/components/applepaymerchantdomains.rb +2 -2
- data/lib/moov/models/components/applepaypaymentmethod.rb +1 -1
- data/lib/moov/models/components/applepayresponse.rb +2 -2
- data/lib/moov/models/components/applepaytransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/asynccreatedrefund.rb +1 -1
- data/lib/moov/models/components/asynctransfer.rb +1 -1
- data/lib/moov/models/components/authtoken.rb +1 -1
- data/lib/moov/models/components/authtokenrequest.rb +2 -2
- data/lib/moov/models/components/bankaccount.rb +7 -7
- data/lib/moov/models/components/bankaccountexception.rb +5 -5
- data/lib/moov/models/components/bankaccountintegration.rb +2 -2
- data/lib/moov/models/components/bankaccountverification.rb +2 -2
- data/lib/moov/models/components/bankaccountverificationcreated.rb +2 -2
- data/lib/moov/models/components/basicpaymentmethod.rb +1 -1
- data/lib/moov/models/components/billablefee.rb +2 -2
- data/lib/moov/models/components/billingsummary.rb +6 -6
- data/lib/moov/models/components/billingsummary_platformfees.rb +3 -3
- data/lib/moov/models/components/billingsummary_volumeamount.rb +3 -3
- data/lib/moov/models/components/billingsummarydetails.rb +4 -4
- data/lib/moov/models/components/billingsummarydetails_volumeamount.rb +3 -3
- data/lib/moov/models/components/businessprofile.rb +2 -2
- data/lib/moov/models/components/calltoaction.rb +1 -1
- data/lib/moov/models/components/cancellation.rb +2 -2
- data/lib/moov/models/components/capability.rb +6 -6
- data/lib/moov/models/components/capabilityid.rb +1 -1
- data/lib/moov/models/components/card.rb +5 -5
- data/lib/moov/models/components/cardaccountupdater.rb +2 -2
- data/lib/moov/models/components/cardacquiring.rb +4 -4
- data/lib/moov/models/components/cardacquiringdispute.rb +1 -1
- data/lib/moov/models/components/cardacquiringrefund.rb +3 -3
- data/lib/moov/models/components/cardpaymentpaymentmethod.rb +1 -1
- data/lib/moov/models/components/cardpaymenttransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/cardpresentpaymentpaymentmethod.rb +1 -1
- data/lib/moov/models/components/cardpresentpaymenttransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/cardtransactiondetails.rb +12 -12
- data/lib/moov/models/components/cardverification.rb +3 -3
- data/lib/moov/models/components/collectfundscardpayments.rb +1 -1
- data/lib/moov/models/components/completedmicrodeposits.rb +1 -1
- data/lib/moov/models/components/createaccount.rb +2 -2
- data/lib/moov/models/components/createbusinessprofile.rb +2 -2
- data/lib/moov/models/components/createdtransfer.rb +4 -4
- data/lib/moov/models/components/createevidencefilemultipart.rb +1 -1
- data/lib/moov/models/components/createevidencetext.rb +1 -1
- data/lib/moov/models/components/createinvoice.rb +2 -2
- data/lib/moov/models/components/createinvoicelineitem.rb +2 -6
- data/lib/moov/models/components/createinvoicelineitem.rbi +0 -2
- data/lib/moov/models/components/createinvoicelineitemoption.rb +2 -6
- data/lib/moov/models/components/createinvoicelineitemoption.rbi +0 -2
- data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rb +2 -6
- data/lib/moov/models/components/createinvoicelineitemoptionvalidationerror.rbi +0 -2
- data/lib/moov/models/components/createinvoicelineitemvalidationerror.rb +2 -6
- data/lib/moov/models/components/createinvoicelineitemvalidationerror.rbi +0 -2
- data/lib/moov/models/components/createinvoicepayment.rb +1 -1
- data/lib/moov/models/components/createpaymentlink.rb +4 -4
- data/lib/moov/models/components/createpaymentlinklineitem.rb +2 -2
- data/lib/moov/models/components/createpaymentlinklineitemoption.rb +2 -2
- data/lib/moov/models/components/createproductoption.rb +1 -1
- data/lib/moov/models/components/createproductoptiongroup.rb +2 -2
- data/lib/moov/models/components/createrefund.rb +1 -1
- data/lib/moov/models/components/createsweepconfig.rb +1 -1
- data/lib/moov/models/components/createterminalapplication.rb +1 -1
- data/lib/moov/models/components/createtransfersourceach.rb +2 -2
- data/lib/moov/models/components/createtransfersourcecard.rb +2 -2
- data/lib/moov/models/components/createwebhook.rb +1 -1
- data/lib/moov/models/components/dispute.rb +7 -7
- data/lib/moov/models/components/disputeevidenceresponse.rb +4 -4
- data/lib/moov/models/components/disputestatus.rb +1 -1
- data/lib/moov/models/components/document.rb +2 -2
- data/lib/moov/models/components/estimatedactivity.rb +1 -1
- data/lib/moov/models/components/evidencetextresponse.rb +2 -2
- data/lib/moov/models/components/evidenceuploadresponse.rb +2 -2
- data/lib/moov/models/components/facilitatorfee.rb +1 -1
- data/lib/moov/models/components/feeplan.rb +2 -2
- data/lib/moov/models/components/feeplanagreement.rb +3 -3
- data/lib/moov/models/components/feeproperties.rb +1 -1
- data/lib/moov/models/components/filedetails.rb +4 -4
- data/lib/moov/models/components/fileuploadrequestmultipart.rb +1 -1
- data/lib/moov/models/components/fulfillment.rb +2 -2
- data/lib/moov/models/components/fulfillmentdetails.rb +1 -1
- data/lib/moov/models/components/fullissuedcard.rb +5 -5
- data/lib/moov/models/components/granttype.rb +1 -1
- data/lib/moov/models/components/imagemetadata.rb +3 -3
- data/lib/moov/models/components/incurredfee.rb +1 -1
- data/lib/moov/models/components/instantbankcreditpaymentmethod.rb +1 -1
- data/lib/moov/models/components/instantbankcredittransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/instantbankfailurecode.rb +28 -0
- data/lib/moov/models/components/instantbankfailurecode.rbi +11 -0
- data/lib/moov/models/components/instantbanknetwork.rb +19 -0
- data/lib/moov/models/components/instantbanknetwork.rbi +11 -0
- data/lib/moov/models/components/instantbanktransactiondetails.rb +64 -0
- data/lib/moov/models/components/instantbanktransactiondetails.rbi +29 -0
- data/lib/moov/models/components/instantbanktransactionstatus.rb +21 -0
- data/lib/moov/models/components/instantbanktransactionstatus.rbi +11 -0
- data/lib/moov/models/components/invoice.rb +7 -7
- data/lib/moov/models/components/invoiceexternalpayment.rb +1 -1
- data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rb +2 -6
- data/lib/moov/models/components/invoicelineitemoptionvalidationerror.rbi +0 -2
- data/lib/moov/models/components/invoicelineitemvalidationerror.rb +2 -6
- data/lib/moov/models/components/invoicelineitemvalidationerror.rbi +0 -2
- data/lib/moov/models/components/invoicepayment.rb +1 -1
- data/lib/moov/models/components/issuedcard.rb +5 -5
- data/lib/moov/models/components/issuedcardauthorization.rb +3 -3
- data/lib/moov/models/components/issuedcardauthorizationevent.rb +3 -3
- data/lib/moov/models/components/issuedcardstate.rb +1 -1
- data/lib/moov/models/components/issuedcardtransaction.rb +2 -2
- data/lib/moov/models/components/issuingvelocitylimit.rb +1 -1
- data/lib/moov/models/components/jsonwebkey.rb +6 -6
- data/lib/moov/models/components/linkapplepay.rb +2 -2
- data/lib/moov/models/components/linkapplepaymentdata.rb +2 -2
- data/lib/moov/models/components/linkapplepaymentmethod.rb +1 -1
- data/lib/moov/models/components/linkapplepaytoken.rb +3 -3
- data/lib/moov/models/components/linkedapplepaypaymentmethod.rb +1 -1
- data/lib/moov/models/components/manualtermsofservice.rb +1 -1
- data/lib/moov/models/components/manualtermsofserviceupdate.rb +1 -1
- data/lib/moov/models/components/minimumcommitment.rb +1 -1
- data/lib/moov/models/components/monthlyplatformfee.rb +1 -1
- data/lib/moov/models/components/moovfee.rb +1 -1
- data/lib/moov/models/components/moovwalletpaymentmethod.rb +1 -1
- data/lib/moov/models/components/moovwallettransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/mxauthorizationcode.rb +1 -1
- data/lib/moov/models/components/mxpayload.rb +3 -3
- data/lib/moov/models/components/occurrence.rb +1 -1
- data/lib/moov/models/components/occurrencesresponse.rb +5 -5
- data/lib/moov/models/components/onboardinginvite.rb +3 -3
- data/lib/moov/models/components/onboardingpartneraccount.rb +1 -1
- data/lib/moov/models/components/otherfees.rb +3 -3
- data/lib/moov/models/components/partnerpricingagreement.rb +3 -3
- data/lib/moov/models/components/patchbusiness.rb +2 -2
- data/lib/moov/models/components/patchsweepconfig.rb +1 -1
- data/lib/moov/models/components/patchwallet.rb +1 -1
- data/lib/moov/models/components/paymentlink.rb +9 -9
- data/lib/moov/models/components/paymentlinkdisplayoptions.rb +2 -2
- data/lib/moov/models/components/paymentlinkdisplayoptionsupdate.rb +2 -2
- data/lib/moov/models/components/paymentlinkpayoutdetails.rb +1 -1
- data/lib/moov/models/components/paymentlinkpayoutdetailsupdate.rb +1 -1
- data/lib/moov/models/components/paymentlinktype.rb +1 -0
- data/lib/moov/models/components/paymentmethodsbankaccount.rb +5 -5
- data/lib/moov/models/components/paymentmethodscard.rb +4 -4
- data/lib/moov/models/components/paymentmethodswallet.rb +1 -1
- data/lib/moov/models/components/payoutrecipient.rb +1 -1
- data/lib/moov/models/components/plaidintegration.rb +2 -2
- data/lib/moov/models/components/plaidlinkintegration.rb +2 -2
- data/lib/moov/models/components/plaidlinkpayload.rb +3 -3
- data/lib/moov/models/components/plaidpayload.rb +2 -2
- data/lib/moov/models/components/platformfees.rb +2 -2
- data/lib/moov/models/components/product.rb +4 -4
- data/lib/moov/models/components/productoption.rb +1 -1
- data/lib/moov/models/components/productoptiongroup.rb +2 -2
- data/lib/moov/models/components/productrequest.rb +1 -1
- data/lib/moov/models/components/pullfromcardpaymentmethod.rb +1 -1
- data/lib/moov/models/components/pullfromcardtransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/pushtocardpaymentmethod.rb +1 -1
- data/lib/moov/models/components/pushtocardtransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/receiptrequest.rb +1 -1
- data/lib/moov/models/components/receiptresponse.rb +2 -2
- data/lib/moov/models/components/recur.rb +1 -1
- data/lib/moov/models/components/recurresponse.rb +1 -1
- data/lib/moov/models/components/refundcarddetails.rb +7 -7
- data/lib/moov/models/components/representative.rb +3 -3
- data/lib/moov/models/components/requestcard.rb +1 -1
- data/lib/moov/models/components/requirementerror.rb +2 -2
- data/lib/moov/models/components/residual.rb +4 -4
- data/lib/moov/models/components/revoketokenrequest.rb +1 -1
- data/lib/moov/models/components/rtpcreditpaymentmethod.rb +1 -1
- data/lib/moov/models/components/rtpcredittransferpaymentmethod.rb +1 -1
- data/lib/moov/models/components/rtprejectioncode.rb +1 -1
- data/lib/moov/models/components/rtptransactiondetails.rb +6 -6
- data/lib/moov/models/components/schedulelistresponse.rb +4 -4
- data/lib/moov/models/components/scheduleresponse.rb +4 -4
- data/lib/moov/models/components/sentreceipt.rb +1 -1
- data/lib/moov/models/components/statement.rb +6 -6
- data/lib/moov/models/components/sweep.rb +3 -3
- data/lib/moov/models/components/sweepconfig.rb +3 -3
- data/lib/moov/models/components/sweepconfigpaymentmethod.rb +1 -1
- data/lib/moov/models/components/sweepsubtotal.rb +1 -1
- data/lib/moov/models/components/terminalapplication.rb +2 -2
- data/lib/moov/models/components/terminalcard.rb +3 -3
- data/lib/moov/models/components/termsofservice.rb +1 -1
- data/lib/moov/models/components/ticket.rb +5 -5
- data/lib/moov/models/components/ticketmessage.rb +1 -1
- data/lib/moov/models/components/transactionsource.rb +1 -1
- data/lib/moov/models/components/transfer.rb +4 -4
- data/lib/moov/models/components/transferdestination.rb +7 -3
- data/lib/moov/models/components/transferdestination.rbi +2 -0
- data/lib/moov/models/components/transferpaymentmethodsbankaccount.rb +5 -5
- data/lib/moov/models/components/transferpaymentmethodscard.rb +4 -4
- data/lib/moov/models/components/transferpaymentmethodswallet.rb +1 -1
- data/lib/moov/models/components/transfersource.rb +1 -1
- data/lib/moov/models/components/transferterminalcard.rb +3 -3
- data/lib/moov/models/components/underwriting.rb +5 -5
- data/lib/moov/models/components/underwritingstatus.rb +2 -2
- data/lib/moov/models/components/updateevidence.rb +1 -1
- data/lib/moov/models/components/updateinvoice.rb +3 -3
- data/lib/moov/models/components/updateissuedcard.rb +1 -1
- data/lib/moov/models/components/updatepaymentlink.rb +1 -1
- data/lib/moov/models/components/updateticket.rb +1 -1
- data/lib/moov/models/components/updatewebhook.rb +1 -1
- data/lib/moov/models/components/upsertunderwriting.rb +4 -4
- data/lib/moov/models/components/verification.rb +9 -9
- data/lib/moov/models/components/verificationstatus.rb +2 -2
- data/lib/moov/models/components/verificationstatusdetail.rb +2 -2
- data/lib/moov/models/components/wallet.rb +4 -4
- data/lib/moov/models/components/walletavailablebalance.rb +1 -1
- data/lib/moov/models/components/wallettransaction.rb +5 -5
- data/lib/moov/models/components/wallettransactiontype.rb +1 -0
- data/lib/moov/models/components/webhook.rb +4 -4
- data/lib/moov/models/components/webhookdatabankaccountupdated.rb +2 -2
- data/lib/moov/models/components/webhookdatacancellationcreated.rb +1 -1
- data/lib/moov/models/components/webhookdatacancellationupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatacapabilityrequested.rb +2 -2
- data/lib/moov/models/components/webhookdatacapabilityupdated.rb +3 -3
- data/lib/moov/models/components/webhookdatacardautoupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatadisputecreated.rb +3 -3
- data/lib/moov/models/components/webhookdatadisputeupdated.rb +3 -3
- data/lib/moov/models/components/webhookdatainvoiceupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatanetworkidupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatarefundupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatasweepupdated.rb +1 -1
- data/lib/moov/models/components/webhookdataterminalapplicationcreated.rb +1 -1
- data/lib/moov/models/components/webhookdataterminalapplicationupdated.rb +1 -1
- data/lib/moov/models/components/webhookdataticketupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatatransfercreated.rb +1 -1
- data/lib/moov/models/components/webhookdatatransferupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatawallettransactionupdated.rb +1 -1
- data/lib/moov/models/components/webhookdatawalletupdated.rb +1 -1
- data/lib/moov/models/components/webhookevent.rb +2 -2
- data/lib/moov/models/components.rb +4 -3
- data/lib/moov/models/errors/cardacquiringrefund_error.rb +3 -3
- data/lib/moov/models/errors/duplicatecarderror.rb +41 -0
- data/lib/moov/models/errors/duplicatecarderror.rbi +17 -0
- data/lib/moov/models/errors/transfer_error.rb +4 -4
- data/lib/moov/models/errors.rb +1 -0
- data/lib/moov/models/operations/acceptdispute_request.rb +3 -3
- data/lib/moov/models/operations/assignaccountcountries_request.rb +3 -3
- data/lib/moov/models/operations/cancelschedule_request.rb +3 -3
- data/lib/moov/models/operations/completebankaccountverification_request.rb +3 -3
- data/lib/moov/models/operations/completemicrodeposits_request.rb +3 -3
- data/lib/moov/models/operations/connectaccount_request.rb +3 -3
- data/lib/moov/models/operations/createaccesstoken_request.rb +3 -3
- data/lib/moov/models/operations/createaccount_request.rb +3 -3
- data/lib/moov/models/operations/createapplepaysession_request.rb +3 -3
- data/lib/moov/models/operations/createbrand_request.rb +3 -3
- data/lib/moov/models/operations/createcancellation_request.rb +3 -3
- data/lib/moov/models/operations/createfeeplanagreements_request.rb +3 -3
- data/lib/moov/models/operations/createinvoice_request.rb +3 -3
- data/lib/moov/models/operations/createinvoicepayment_request.rb +3 -3
- data/lib/moov/models/operations/createonboardinginvite_request.rb +3 -3
- data/lib/moov/models/operations/createpaymentlink_request.rb +3 -3
- data/lib/moov/models/operations/createproduct_request.rb +3 -3
- data/lib/moov/models/operations/createreceipts_request.rb +3 -3
- data/lib/moov/models/operations/createrepresentative_request.rb +3 -3
- data/lib/moov/models/operations/createreversal_request.rb +3 -3
- data/lib/moov/models/operations/createschedule_request.rb +3 -3
- data/lib/moov/models/operations/createsweepconfig_request.rb +3 -3
- data/lib/moov/models/operations/createterminalapplication_request.rb +3 -3
- data/lib/moov/models/operations/createterminalapplicationversion_request.rb +3 -3
- data/lib/moov/models/operations/createticket_request.rb +3 -3
- data/lib/moov/models/operations/createtransfer_request.rb +3 -3
- data/lib/moov/models/operations/createtransferoptions_request.rb +3 -3
- data/lib/moov/models/operations/createwallet_request.rb +3 -3
- data/lib/moov/models/operations/createwebhook_request.rb +3 -3
- data/lib/moov/models/operations/deletedisputeevidencefile_request.rb +3 -3
- data/lib/moov/models/operations/deleteimage_request.rb +3 -3
- data/lib/moov/models/operations/deleterepresentative_request.rb +3 -3
- data/lib/moov/models/operations/deleteterminalapplication_request.rb +3 -3
- data/lib/moov/models/operations/disablebankaccount_request.rb +3 -3
- data/lib/moov/models/operations/disablecapability_request.rb +4 -4
- data/lib/moov/models/operations/disablecard_request.rb +3 -3
- data/lib/moov/models/operations/disablepaymentlink_request.rb +3 -3
- data/lib/moov/models/operations/disableproduct_request.rb +3 -3
- data/lib/moov/models/operations/disablewebhook_request.rb +3 -3
- data/lib/moov/models/operations/disconnectaccount_request.rb +3 -3
- data/lib/moov/models/operations/generateendtoendkey_request.rb +3 -3
- data/lib/moov/models/operations/getaccount_request.rb +3 -3
- data/lib/moov/models/operations/getaccountcountries_request.rb +3 -3
- data/lib/moov/models/operations/getaccountterminalapplication_request.rb +3 -3
- data/lib/moov/models/operations/getadjustment_request.rb +3 -3
- data/lib/moov/models/operations/getapplepaymerchantdomains_request.rb +3 -3
- data/lib/moov/models/operations/getavatar_request.rb +3 -3
- data/lib/moov/models/operations/getbankaccount_request.rb +3 -3
- data/lib/moov/models/operations/getbankaccountverification_request.rb +3 -3
- data/lib/moov/models/operations/getbrand_request.rb +3 -3
- data/lib/moov/models/operations/getcancellation_request.rb +3 -3
- data/lib/moov/models/operations/getcapability_request.rb +4 -4
- data/lib/moov/models/operations/getcard_request.rb +3 -3
- data/lib/moov/models/operations/getdispute_request.rb +3 -3
- data/lib/moov/models/operations/getdisputeevidence_request.rb +3 -3
- data/lib/moov/models/operations/getdisputeevidencedata_request.rb +3 -3
- data/lib/moov/models/operations/getenrichmentaddress_request.rb +3 -3
- data/lib/moov/models/operations/getenrichmentprofile_request.rb +3 -3
- data/lib/moov/models/operations/getfiledetails_request.rb +3 -3
- data/lib/moov/models/operations/getfullissuedcard_request.rb +3 -3
- data/lib/moov/models/operations/getimagemetadata_request.rb +3 -3
- data/lib/moov/models/operations/getinvoice_request.rb +3 -3
- data/lib/moov/models/operations/getissuedcard_request.rb +3 -3
- data/lib/moov/models/operations/getissuedcardauthorization_request.rb +3 -3
- data/lib/moov/models/operations/getissuedcardtransaction_request.rb +3 -3
- data/lib/moov/models/operations/getmerchantprocessingagreement_request.rb +3 -3
- data/lib/moov/models/operations/getonboardinginvite_request.rb +3 -3
- data/lib/moov/models/operations/getpaymentlink_request.rb +3 -3
- data/lib/moov/models/operations/getpaymentlinkqrcode_request.rb +3 -3
- data/lib/moov/models/operations/getpaymentmethod_request.rb +3 -3
- data/lib/moov/models/operations/getproduct_request.rb +3 -3
- data/lib/moov/models/operations/getpublicimage_request.rb +1 -1
- data/lib/moov/models/operations/getrefund_request.rb +3 -3
- data/lib/moov/models/operations/getrepresentative_request.rb +3 -3
- data/lib/moov/models/operations/getresidual_request.rb +3 -3
- data/lib/moov/models/operations/getscheduledoccurrence_request.rb +4 -4
- data/lib/moov/models/operations/getschedules_request.rb +3 -3
- data/lib/moov/models/operations/getstatement_request.rb +3 -3
- data/lib/moov/models/operations/getsweep_request.rb +3 -3
- data/lib/moov/models/operations/getsweepconfig_request.rb +3 -3
- data/lib/moov/models/operations/getterminalapplication_request.rb +3 -3
- data/lib/moov/models/operations/getterminalconfiguration_request.rb +3 -3
- data/lib/moov/models/operations/gettermsofservicetoken_request.rb +3 -3
- data/lib/moov/models/operations/getticket_request.rb +3 -3
- data/lib/moov/models/operations/gettransfer_request.rb +3 -3
- data/lib/moov/models/operations/getunderwriting_request.rb +3 -3
- data/lib/moov/models/operations/getwallet_request.rb +3 -3
- data/lib/moov/models/operations/getwallettransaction_request.rb +3 -3
- data/lib/moov/models/operations/getwebhook_request.rb +3 -3
- data/lib/moov/models/operations/getwebhooksecret_request.rb +3 -3
- data/lib/moov/models/operations/initiatebankaccountverification_request.rb +4 -4
- data/lib/moov/models/operations/initiatemicrodeposits_request.rb +3 -3
- data/lib/moov/models/operations/initiaterefund_request.rb +3 -3
- data/lib/moov/models/operations/linkaccountterminalapplication_request.rb +3 -3
- data/lib/moov/models/operations/linkapplepaytoken_request.rb +3 -3
- data/lib/moov/models/operations/linkbankaccount_request.rb +4 -4
- data/lib/moov/models/operations/linkcard_request.rb +4 -4
- data/lib/moov/models/operations/listaccounts_request.rb +9 -9
- data/lib/moov/models/operations/listaccountterminalapplications_request.rb +3 -3
- data/lib/moov/models/operations/listadjustments_request.rb +3 -3
- data/lib/moov/models/operations/listbankaccounts_request.rb +3 -3
- data/lib/moov/models/operations/listcapabilities_request.rb +3 -3
- data/lib/moov/models/operations/listcards_request.rb +3 -3
- data/lib/moov/models/operations/listconnectedaccountsforaccount_request.rb +9 -9
- data/lib/moov/models/operations/listdisputeevidence_request.rb +3 -3
- data/lib/moov/models/operations/listdisputes_request.rb +3 -3
- data/lib/moov/models/operations/listeventtypes_request.rb +3 -3
- data/lib/moov/models/operations/listfeeplanagreements_request.rb +3 -3
- data/lib/moov/models/operations/listfeeplans_request.rb +3 -3
- data/lib/moov/models/operations/listfeerevenue_request.rb +3 -3
- data/lib/moov/models/operations/listfeesfetch_request.rb +3 -3
- data/lib/moov/models/operations/listfiles_request.rb +3 -3
- data/lib/moov/models/operations/listimagemetadata_request.rb +3 -3
- data/lib/moov/models/operations/listindustries_request.rb +3 -3
- data/lib/moov/models/operations/listinstitutions_request.rb +3 -3
- data/lib/moov/models/operations/listinvoicepayments_request.rb +3 -3
- data/lib/moov/models/operations/listinvoices_request.rb +3 -3
- data/lib/moov/models/operations/listissuedcardauthorizationevents_request.rb +3 -3
- data/lib/moov/models/operations/listissuedcardauthorizations_request.rb +3 -3
- data/lib/moov/models/operations/listissuedcards_request.rb +3 -3
- data/lib/moov/models/operations/listissuedcardtransactions_request.rb +3 -3
- data/lib/moov/models/operations/listonboardinginvites_request.rb +3 -3
- data/lib/moov/models/operations/listpartnerpricingagreements_request.rb +3 -3
- data/lib/moov/models/operations/listpaymentlinks_request.rb +9 -13
- data/lib/moov/models/operations/listpaymentlinks_request.rbi +2 -4
- data/lib/moov/models/operations/listpaymentmethods_request.rb +4 -4
- data/lib/moov/models/operations/listproducts_request.rb +3 -3
- data/lib/moov/models/operations/listreceipts_request.rb +3 -3
- data/lib/moov/models/operations/listrefunds_request.rb +3 -3
- data/lib/moov/models/operations/listrepresentatives_request.rb +3 -3
- data/lib/moov/models/operations/listresidualfees_request.rb +3 -3
- data/lib/moov/models/operations/listresiduals_request.rb +3 -3
- data/lib/moov/models/operations/listschedules_request.rb +3 -3
- data/lib/moov/models/operations/liststatements_request.rb +3 -3
- data/lib/moov/models/operations/listsweepconfigs_request.rb +3 -3
- data/lib/moov/models/operations/listsweeps_request.rb +3 -3
- data/lib/moov/models/operations/listterminalapplications_request.rb +3 -3
- data/lib/moov/models/operations/listticketmessages_request.rb +3 -3
- data/lib/moov/models/operations/listtickets_request.rb +3 -3
- data/lib/moov/models/operations/listtransfers_request.rb +3 -3
- data/lib/moov/models/operations/listwallets_request.rb +3 -3
- data/lib/moov/models/operations/listwallettransactions_request.rb +3 -3
- data/lib/moov/models/operations/listwebhooks_request.rb +3 -3
- data/lib/moov/models/operations/ping_request.rb +3 -3
- data/lib/moov/models/operations/pingwebhook_request.rb +3 -3
- data/lib/moov/models/operations/registerapplepaymerchantdomains_request.rb +3 -3
- data/lib/moov/models/operations/requestcapabilities_request.rb +3 -3
- data/lib/moov/models/operations/requestcard_request.rb +3 -3
- data/lib/moov/models/operations/retrievefees_request.rb +3 -3
- data/lib/moov/models/operations/revokeaccesstoken_request.rb +3 -3
- data/lib/moov/models/operations/revokeonboardinginvite_request.rb +3 -3
- data/lib/moov/models/operations/saveunderwriting_request.rb +3 -3
- data/lib/moov/models/operations/searchinstitutions_request.rb +3 -3
- data/lib/moov/models/operations/submitdisputeevidence_request.rb +3 -3
- data/lib/moov/models/operations/testendtoendtoken_request.rb +3 -3
- data/lib/moov/models/operations/updateaccount_request.rb +3 -3
- data/lib/moov/models/operations/updateapplepaymerchantdomains_request.rb +3 -3
- data/lib/moov/models/operations/updatecard_request.rb +3 -3
- data/lib/moov/models/operations/updatedisputeevidence_request.rb +3 -3
- data/lib/moov/models/operations/updateimage_request.rb +3 -3
- data/lib/moov/models/operations/updateimagemetadata_request.rb +3 -3
- data/lib/moov/models/operations/updateinvoice_request.rb +3 -3
- data/lib/moov/models/operations/updateissuedcard_request.rb +3 -3
- data/lib/moov/models/operations/updatepaymentlink_request.rb +3 -3
- data/lib/moov/models/operations/updateproduct_request.rb +3 -3
- data/lib/moov/models/operations/updaterepresentative_request.rb +3 -3
- data/lib/moov/models/operations/updateschedule_request.rb +3 -3
- data/lib/moov/models/operations/updatesweepconfig_request.rb +3 -3
- data/lib/moov/models/operations/updateticket_request.rb +3 -3
- data/lib/moov/models/operations/updatetransfer_request.rb +3 -3
- data/lib/moov/models/operations/updatewallet_request.rb +3 -3
- data/lib/moov/models/operations/updatewebhook_request.rb +3 -3
- data/lib/moov/models/operations/uploaddisputeevidencefile_request.rb +3 -3
- data/lib/moov/models/operations/uploaddisputeevidencetext_request.rb +3 -3
- data/lib/moov/models/operations/uploadfile_request.rb +3 -3
- data/lib/moov/models/operations/uploadimage_request.rb +3 -3
- data/lib/moov/models/operations/upsertbrand_request.rb +3 -3
- data/lib/moov/models/operations/upsertunderwriting_request.rb +3 -3
- data/lib/moov/onboarding.rb +5 -5
- data/lib/moov/payment_links.rb +13 -13
- data/lib/moov/payment_methods.rb +2 -2
- data/lib/moov/ping.rb +1 -1
- data/lib/moov/products.rb +3 -3
- data/lib/moov/receipts.rb +3 -3
- data/lib/moov/representatives.rb +12 -12
- data/lib/moov/scheduling.rb +8 -8
- data/lib/moov/sdkconfiguration.rb +3 -3
- data/lib/moov/statements.rb +7 -7
- data/lib/moov/support.rb +12 -12
- data/lib/moov/sweeps.rb +8 -8
- data/lib/moov/terminal_applications.rb +7 -7
- data/lib/moov/transfers.rb +22 -22
- data/lib/moov/underwriting.rb +8 -8
- data/lib/moov/utils/request_bodies.rb +8 -3
- data/lib/moov/utils/security.rb +10 -0
- data/lib/moov/utils/url.rb +11 -5
- data/lib/moov/utils/utils.rb +33 -3
- data/lib/moov/wallet_transactions.rb +4 -4
- data/lib/moov/wallets.rb +10 -10
- data/lib/moov/webhooks.rb +2 -2
- metadata +12 -8
- data/lib/moov/models/components/createinvoicelineitemimage.rb +0 -32
- data/lib/moov/models/components/createinvoicelineitemimage.rbi +0 -13
- data/lib/moov/models/components/createinvoicelineitemimagevalidationerror.rb +0 -32
- data/lib/moov/models/components/createinvoicelineitemimagevalidationerror.rbi +0 -13
- data/lib/moov/models/components/invoicelineitemimagevalidationerror.rb +0 -32
- data/lib/moov/models/components/invoicelineitemimagevalidationerror.rbi +0 -13
data/lib/moov/statements.rb
CHANGED
|
@@ -42,7 +42,7 @@ module Moov
|
|
|
42
42
|
sig { params(request: Models::Operations::ListStatementsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListStatementsResponse) }
|
|
43
43
|
def list(request:, timeout_ms: nil)
|
|
44
44
|
# list - Retrieve all statements associated with an account.
|
|
45
|
-
#
|
|
45
|
+
#
|
|
46
46
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
47
|
# you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
48
48
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -173,12 +173,12 @@ module Moov
|
|
|
173
173
|
end
|
|
174
174
|
|
|
175
175
|
|
|
176
|
-
sig { params(account_id: ::String, statement_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetStatementResponse) }
|
|
177
|
-
def get(account_id:, statement_id:, x_moov_version: nil, timeout_ms: nil)
|
|
176
|
+
sig { params(account_id: ::String, statement_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer), accept_header_override: T.nilable(String)).returns(Models::Operations::GetStatementResponse) }
|
|
177
|
+
def get(account_id:, statement_id:, x_moov_version: nil, timeout_ms: nil, accept_header_override: nil)
|
|
178
178
|
# get - Retrieve a statement by its ID.
|
|
179
|
-
#
|
|
179
|
+
#
|
|
180
180
|
# Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `application/pdf`.
|
|
181
|
-
#
|
|
181
|
+
#
|
|
182
182
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
183
183
|
# you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
184
184
|
request = Models::Operations::GetStatementRequest.new(
|
|
@@ -197,7 +197,7 @@ module Moov
|
|
|
197
197
|
)
|
|
198
198
|
headers = Utils.get_headers(request, @sdk_configuration.globals)
|
|
199
199
|
headers = T.cast(headers, T::Hash[String, String])
|
|
200
|
-
headers['Accept'] = 'application/json;q=1, application/pdf;q=0'
|
|
200
|
+
headers['Accept'] = accept_header_override || 'application/json;q=1, application/pdf;q=0'
|
|
201
201
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
202
202
|
|
|
203
203
|
security = @sdk_configuration.security_source&.call
|
|
@@ -286,7 +286,7 @@ module Moov
|
|
|
286
286
|
),
|
|
287
287
|
response: http_response
|
|
288
288
|
)
|
|
289
|
-
obj = http_response.env.body
|
|
289
|
+
obj = http_response.env.body.force_encoding('UTF-8')
|
|
290
290
|
|
|
291
291
|
return Models::Operations::GetStatementResponse.new(
|
|
292
292
|
status_code: http_response.status,
|
data/lib/moov/support.rb
CHANGED
|
@@ -42,10 +42,10 @@ module Moov
|
|
|
42
42
|
sig { params(create_ticket: Models::Components::CreateTicket, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateTicketResponse) }
|
|
43
43
|
def create_ticket(create_ticket:, account_id:, x_moov_version: nil, timeout_ms: nil)
|
|
44
44
|
# create_ticket - Create a support ticket for a Moov account.
|
|
45
|
-
#
|
|
45
|
+
#
|
|
46
46
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
47
|
# you'll need to specify the `/accounts/{accountID}/tickets.write` scope.
|
|
48
|
-
#
|
|
48
|
+
#
|
|
49
49
|
# If you're creating the ticket on behalf of another account, then you'll need to
|
|
50
50
|
# specify the `/accounts/{partnerAccountID}/tickets.write` and `/accounts/{accountID}/profile.read` scopes.
|
|
51
51
|
request = Models::Operations::CreateTicketRequest.new(
|
|
@@ -68,7 +68,7 @@ module Moov
|
|
|
68
68
|
headers['content-type'] = req_content_type
|
|
69
69
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
70
70
|
|
|
71
|
-
if form
|
|
71
|
+
if form && !form.empty?
|
|
72
72
|
body = Utils.encode_form(form)
|
|
73
73
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
74
74
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -209,10 +209,10 @@ module Moov
|
|
|
209
209
|
sig { params(request: Models::Operations::ListTicketsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListTicketsResponse) }
|
|
210
210
|
def list_tickets(request:, timeout_ms: nil)
|
|
211
211
|
# list_tickets - List all the support tickets created under a Moov account.
|
|
212
|
-
#
|
|
212
|
+
#
|
|
213
213
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
214
214
|
# you'll need to specify the `/accounts/{accountID}/tickets.read` scope.
|
|
215
|
-
#
|
|
215
|
+
#
|
|
216
216
|
# If you're listing another account's tickets, then you'll need to
|
|
217
217
|
# specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes.
|
|
218
218
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -331,10 +331,10 @@ module Moov
|
|
|
331
331
|
sig { params(account_id: ::String, ticket_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetTicketResponse) }
|
|
332
332
|
def get_ticket(account_id:, ticket_id:, x_moov_version: nil, timeout_ms: nil)
|
|
333
333
|
# get_ticket - Retrieve a support ticket by ID.
|
|
334
|
-
#
|
|
334
|
+
#
|
|
335
335
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
336
336
|
# you'll need to specify the `/accounts/{accountID}/tickets.read` scope.
|
|
337
|
-
#
|
|
337
|
+
#
|
|
338
338
|
# If you're retrieving another account's ticket, then you'll need to
|
|
339
339
|
# specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes.
|
|
340
340
|
request = Models::Operations::GetTicketRequest.new(
|
|
@@ -456,10 +456,10 @@ module Moov
|
|
|
456
456
|
sig { params(update_ticket: Models::Components::UpdateTicket, account_id: ::String, ticket_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateTicketResponse) }
|
|
457
457
|
def update_ticket(update_ticket:, account_id:, ticket_id:, x_moov_version: nil, timeout_ms: nil)
|
|
458
458
|
# update_ticket - Updates a support ticket.
|
|
459
|
-
#
|
|
459
|
+
#
|
|
460
460
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
461
461
|
# you'll need to specify the `/accounts/{accountID}/tickets.write` scope.
|
|
462
|
-
#
|
|
462
|
+
#
|
|
463
463
|
# If you're updating the ticket on behalf of another account, then you'll need to
|
|
464
464
|
# specify the `/accounts/{partnerAccountID}/tickets.write` and `/accounts/{accountID}/profile.read` scopes.
|
|
465
465
|
request = Models::Operations::UpdateTicketRequest.new(
|
|
@@ -483,7 +483,7 @@ module Moov
|
|
|
483
483
|
headers['content-type'] = req_content_type
|
|
484
484
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
485
485
|
|
|
486
|
-
if form
|
|
486
|
+
if form && !form.empty?
|
|
487
487
|
body = Utils.encode_form(form)
|
|
488
488
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
489
489
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -624,10 +624,10 @@ module Moov
|
|
|
624
624
|
sig { params(account_id: ::String, ticket_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListTicketMessagesResponse) }
|
|
625
625
|
def list_ticket_messages(account_id:, ticket_id:, x_moov_version: nil, timeout_ms: nil)
|
|
626
626
|
# list_ticket_messages - List all the messages for a support ticket.
|
|
627
|
-
#
|
|
627
|
+
#
|
|
628
628
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
629
629
|
# you'll need to specify the `/accounts/{accountID}/tickets.read` scope.
|
|
630
|
-
#
|
|
630
|
+
#
|
|
631
631
|
# If you're listing another account's messages, then you'll need to
|
|
632
632
|
# specify the `/accounts/{partnerAccountID}/tickets.read` and `/accounts/{accountID}/profile.read` scopes.
|
|
633
633
|
request = Models::Operations::ListTicketMessagesRequest.new(
|
data/lib/moov/sweeps.rb
CHANGED
|
@@ -42,7 +42,7 @@ module Moov
|
|
|
42
42
|
sig { params(create_sweep_config: Models::Components::CreateSweepConfig, account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateSweepConfigResponse) }
|
|
43
43
|
def create_config(create_sweep_config:, account_id:, x_moov_version: nil, timeout_ms: nil)
|
|
44
44
|
# create_config - Create a sweep config for a wallet.
|
|
45
|
-
#
|
|
45
|
+
#
|
|
46
46
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
47
|
# you'll need to specify the `/accounts/{accountID}/wallets.write` scope.
|
|
48
48
|
request = Models::Operations::CreateSweepConfigRequest.new(
|
|
@@ -65,7 +65,7 @@ module Moov
|
|
|
65
65
|
headers['content-type'] = req_content_type
|
|
66
66
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
67
67
|
|
|
68
|
-
if form
|
|
68
|
+
if form && !form.empty?
|
|
69
69
|
body = Utils.encode_form(form)
|
|
70
70
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
71
71
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -206,7 +206,7 @@ module Moov
|
|
|
206
206
|
sig { params(account_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListSweepConfigsResponse) }
|
|
207
207
|
def list_configs(account_id:, x_moov_version: nil, timeout_ms: nil)
|
|
208
208
|
# list_configs - List sweep configs associated with an account.
|
|
209
|
-
#
|
|
209
|
+
#
|
|
210
210
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
211
211
|
# you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
|
|
212
212
|
request = Models::Operations::ListSweepConfigsRequest.new(
|
|
@@ -327,7 +327,7 @@ module Moov
|
|
|
327
327
|
sig { params(account_id: ::String, sweep_config_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetSweepConfigResponse) }
|
|
328
328
|
def get_config(account_id:, sweep_config_id:, x_moov_version: nil, timeout_ms: nil)
|
|
329
329
|
# get_config - Get a sweep config associated with a wallet.
|
|
330
|
-
#
|
|
330
|
+
#
|
|
331
331
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
332
332
|
# you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
|
|
333
333
|
request = Models::Operations::GetSweepConfigRequest.new(
|
|
@@ -449,7 +449,7 @@ module Moov
|
|
|
449
449
|
sig { params(patch_sweep_config: Models::Components::PatchSweepConfig, account_id: ::String, sweep_config_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::UpdateSweepConfigResponse) }
|
|
450
450
|
def update_config(patch_sweep_config:, account_id:, sweep_config_id:, x_moov_version: nil, timeout_ms: nil)
|
|
451
451
|
# update_config - Update settings on a sweep config.
|
|
452
|
-
#
|
|
452
|
+
#
|
|
453
453
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
454
454
|
# you'll need to specify the `/accounts/{accountID}/wallets.write` scope.
|
|
455
455
|
request = Models::Operations::UpdateSweepConfigRequest.new(
|
|
@@ -473,7 +473,7 @@ module Moov
|
|
|
473
473
|
headers['content-type'] = req_content_type
|
|
474
474
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
475
475
|
|
|
476
|
-
if form
|
|
476
|
+
if form && !form.empty?
|
|
477
477
|
body = Utils.encode_form(form)
|
|
478
478
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
479
479
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -614,7 +614,7 @@ module Moov
|
|
|
614
614
|
sig { params(request: Models::Operations::ListSweepsRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListSweepsResponse) }
|
|
615
615
|
def list(request:, timeout_ms: nil)
|
|
616
616
|
# list - List sweeps associated with a wallet.
|
|
617
|
-
#
|
|
617
|
+
#
|
|
618
618
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
619
619
|
# you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
|
|
620
620
|
url, params = @sdk_configuration.get_server_details
|
|
@@ -733,7 +733,7 @@ module Moov
|
|
|
733
733
|
sig { params(account_id: ::String, wallet_id: ::String, sweep_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetSweepResponse) }
|
|
734
734
|
def get(account_id:, wallet_id:, sweep_id:, x_moov_version: nil, timeout_ms: nil)
|
|
735
735
|
# get - Get details on a specific sweep.
|
|
736
|
-
#
|
|
736
|
+
#
|
|
737
737
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
738
738
|
# you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
|
|
739
739
|
request = Models::Operations::GetSweepRequest.new(
|
|
@@ -42,7 +42,7 @@ module Moov
|
|
|
42
42
|
sig { params(create_terminal_application: Models::Components::CreateTerminalApplication, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateTerminalApplicationResponse) }
|
|
43
43
|
def create(create_terminal_application:, x_moov_version: nil, timeout_ms: nil)
|
|
44
44
|
# create - Create a new terminal application.
|
|
45
|
-
#
|
|
45
|
+
#
|
|
46
46
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
47
47
|
# you'll need to specify the `/terminal-applications.write` scope.
|
|
48
48
|
request = Models::Operations::CreateTerminalApplicationRequest.new(
|
|
@@ -58,7 +58,7 @@ module Moov
|
|
|
58
58
|
headers['content-type'] = req_content_type
|
|
59
59
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
60
60
|
|
|
61
|
-
if form
|
|
61
|
+
if form && !form.empty?
|
|
62
62
|
body = Utils.encode_form(form)
|
|
63
63
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
64
64
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
@@ -199,7 +199,7 @@ module Moov
|
|
|
199
199
|
sig { params(x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::ListTerminalApplicationsResponse) }
|
|
200
200
|
def list(x_moov_version: nil, timeout_ms: nil)
|
|
201
201
|
# list - List all the terminal applications for a Moov Account.
|
|
202
|
-
#
|
|
202
|
+
#
|
|
203
203
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
204
204
|
# you'll need to specify the `/terminal-applications.read` scope.
|
|
205
205
|
request = Models::Operations::ListTerminalApplicationsRequest.new(
|
|
@@ -313,7 +313,7 @@ module Moov
|
|
|
313
313
|
sig { params(terminal_application_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetTerminalApplicationResponse) }
|
|
314
314
|
def get(terminal_application_id:, x_moov_version: nil, timeout_ms: nil)
|
|
315
315
|
# get - Fetch a specific terminal application.
|
|
316
|
-
#
|
|
316
|
+
#
|
|
317
317
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
318
318
|
# you'll need to specify the `/terminal-applications.read` scope.
|
|
319
319
|
request = Models::Operations::GetTerminalApplicationRequest.new(
|
|
@@ -434,7 +434,7 @@ module Moov
|
|
|
434
434
|
sig { params(terminal_application_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::DeleteTerminalApplicationResponse) }
|
|
435
435
|
def delete(terminal_application_id:, x_moov_version: nil, timeout_ms: nil)
|
|
436
436
|
# delete - Delete a specific terminal application.
|
|
437
|
-
#
|
|
437
|
+
#
|
|
438
438
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
439
439
|
# you'll need to specify the `/terminal-applications.write` scope.
|
|
440
440
|
request = Models::Operations::DeleteTerminalApplicationRequest.new(
|
|
@@ -561,7 +561,7 @@ module Moov
|
|
|
561
561
|
sig { params(terminal_application_version: Models::Components::TerminalApplicationVersion, terminal_application_id: ::String, x_moov_version: T.nilable(::String), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateTerminalApplicationVersionResponse) }
|
|
562
562
|
def create_version(terminal_application_version:, terminal_application_id:, x_moov_version: nil, timeout_ms: nil)
|
|
563
563
|
# create_version - Register a new version of a terminal application. For Android applications, this is used to register a new version code of the application.
|
|
564
|
-
#
|
|
564
|
+
#
|
|
565
565
|
# To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
566
566
|
# you'll need to specify the `/terminal-applications.write` scope.
|
|
567
567
|
request = Models::Operations::CreateTerminalApplicationVersionRequest.new(
|
|
@@ -584,7 +584,7 @@ module Moov
|
|
|
584
584
|
headers['content-type'] = req_content_type
|
|
585
585
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
586
586
|
|
|
587
|
-
if form
|
|
587
|
+
if form && !form.empty?
|
|
588
588
|
body = Utils.encode_form(form)
|
|
589
589
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
590
590
|
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
data/lib/moov/transfers.rb
CHANGED
|
@@ -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]))
|
data/lib/moov/underwriting.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
data/lib/moov/utils/security.rb
CHANGED
|
@@ -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)
|
data/lib/moov/utils/url.rb
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
75
|
+
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
|
|
76
76
|
else
|
|
77
|
-
path = path.
|
|
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|
|
data/lib/moov/utils/utils.rb
CHANGED
|
@@ -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
|
-
|
|
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]
|
|
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)
|