moov_ruby 26.4.20 → 26.4.22
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/moov/account_terminal_applications.rb +25 -25
- data/lib/moov/accounts.rb +70 -70
- data/lib/moov/adjustments.rb +11 -11
- data/lib/moov/apple_pay.rb +38 -38
- data/lib/moov/authentication.rb +18 -18
- data/lib/moov/avatars.rb +5 -5
- data/lib/moov/bank_accounts.rb +58 -58
- data/lib/moov/branding.rb +24 -24
- data/lib/moov/capabilities.rb +25 -25
- data/lib/moov/card_issuing.rb +35 -41
- data/lib/moov/cards.rb +35 -35
- data/lib/moov/client.rb +5 -5
- data/lib/moov/disputes.rb +68 -68
- data/lib/moov/end_to_end_encryption.rb +13 -13
- data/lib/moov/enriched_address.rb +6 -6
- data/lib/moov/enriched_profile.rb +6 -6
- data/lib/moov/fee_plans.rb +56 -56
- data/lib/moov/files.rb +20 -20
- data/lib/moov/google_pay.rb +10 -10
- data/lib/moov/images.rb +47 -47
- data/lib/moov/industries.rb +6 -6
- data/lib/moov/institutions.rb +12 -12
- data/lib/moov/invoices.rb +78 -60
- data/lib/moov/issuing_transactions.rb +26 -26
- data/lib/moov/models/components/account.rb +2 -2
- data/lib/moov/models/components/achfees.rb +6 -2
- data/lib/moov/models/components/achfees.rbi +2 -0
- data/lib/moov/models/components/billablefee.rb +2 -2
- data/lib/moov/models/components/capability.rb +2 -0
- data/lib/moov/models/components/capabilityid.rb +2 -0
- data/lib/moov/models/components/createaccount.rb +2 -2
- data/lib/moov/models/components/createdtransfer.rb +2 -2
- data/lib/moov/models/components/createinvoicelineitemsvalidationerror.rb +2 -2
- data/lib/moov/models/components/createinvoicelineitemvalidationerror.rb +2 -2
- data/lib/moov/models/components/createpaymentlinklineitemsvalidationerror.rb +2 -2
- data/lib/moov/models/components/createpaymentlinklineitemvalidationerror.rb +2 -2
- data/lib/moov/models/components/createreversal.rb +1 -1
- data/lib/moov/models/components/createsweepconfig.rb +6 -2
- data/lib/moov/models/components/createsweepconfig.rbi +2 -0
- data/lib/moov/models/components/createtransfer.rb +3 -3
- data/lib/moov/models/components/createtransferachaddendarecord.rb +1 -1
- data/lib/moov/models/components/createtransferlineitemsvalidationerror.rb +2 -2
- data/lib/moov/models/components/createtransferlineitemvalidationerror.rb +2 -2
- data/lib/moov/models/components/createtransfersource.rb +1 -1
- data/lib/moov/models/components/createwallet.rb +2 -2
- data/lib/moov/models/components/fullissuedcard.rb +8 -6
- data/lib/moov/models/components/invoicelineitemsvalidationerror.rb +2 -2
- data/lib/moov/models/components/invoicelineitemvalidationerror.rb +2 -2
- data/lib/moov/models/components/issuedcard.rb +8 -6
- data/lib/moov/models/components/issuedcardauthorization.rb +6 -2
- data/lib/moov/models/components/issuedcardauthorization.rbi +2 -0
- data/lib/moov/models/components/issuedcardstate.rb +6 -4
- data/lib/moov/models/components/issuedcardtransaction.rb +6 -2
- data/lib/moov/models/components/issuedcardtransaction.rbi +2 -0
- data/lib/moov/models/components/issuingcontrolserror.rb +2 -2
- data/lib/moov/models/components/patchaccount.rb +2 -2
- data/lib/moov/models/components/patchsweepconfig.rb +6 -2
- data/lib/moov/models/components/patchsweepconfig.rbi +2 -0
- data/lib/moov/models/components/patchtransfer.rb +2 -2
- data/lib/moov/models/components/patchwallet.rb +2 -2
- data/lib/moov/models/components/paymentlinkcustomeroptions.rb +2 -2
- data/lib/moov/models/components/paymentlinkpaymentdetails.rb +2 -2
- data/lib/moov/models/components/paymentlinkpaymentdetailsupdate.rb +2 -2
- data/lib/moov/models/components/paymentlinkpayoutdetails.rb +2 -2
- data/lib/moov/models/components/paymentlinkpayoutdetailsupdate.rb +2 -2
- data/lib/moov/models/components/pingresponse.rb +2 -2
- data/lib/moov/models/components/productoptiongroupvalidationerror.rb +2 -2
- data/lib/moov/models/components/productoptionvalidationerror.rb +2 -2
- data/lib/moov/models/components/requestcard.rb +2 -2
- data/lib/moov/models/components/schedule.rb +40 -0
- data/lib/moov/models/components/schedule.rbi +17 -0
- data/lib/moov/models/components/sweepconfig.rb +6 -2
- data/lib/moov/models/components/sweepconfig.rbi +2 -0
- data/lib/moov/models/components/sweepconfigschedule.rb +40 -0
- data/lib/moov/models/components/sweepconfigschedule.rbi +17 -0
- data/lib/moov/models/components/sweepconfigscheduleerror.rb +40 -0
- data/lib/moov/models/components/sweepconfigscheduleerror.rbi +17 -0
- data/lib/moov/models/components/sweepschedulefrequency.rb +18 -0
- data/lib/moov/models/components/sweepschedulefrequency.rbi +11 -0
- data/lib/moov/models/components/transfer.rb +2 -2
- data/lib/moov/models/components/updateissuedcard.rb +5 -5
- data/lib/moov/models/components/updateissuedcardstate.rb +3 -3
- data/lib/moov/models/components/upsertunderwriting.rb +1 -1
- data/lib/moov/models/components/wallet.rb +2 -2
- data/lib/moov/models/components/webhookdatacapabilityrequested.rb +2 -0
- data/lib/moov/models/components/webhookdatacapabilityupdated.rb +2 -0
- data/lib/moov/models/components.rb +4 -0
- data/lib/moov/models/errors/accountterminalapplicationerror.rb +1 -1
- data/lib/moov/models/errors/addcapabilitieserror.rb +3 -3
- data/lib/moov/models/errors/apierror.rb +1 -1
- data/lib/moov/models/errors/assigncountrieserror.rb +3 -3
- data/lib/moov/models/errors/authtokenrequesterror.rb +1 -1
- data/lib/moov/models/errors/bankaccountvalidationerror.rb +1 -1
- data/lib/moov/models/errors/brandvalidationerror.rb +1 -1
- data/lib/moov/models/errors/cardacquiringrefund_error.rb +1 -1
- data/lib/moov/models/errors/connectaccountrequestvalidationerror.rb +3 -3
- data/lib/moov/models/errors/createaccounterror.rb +3 -3
- data/lib/moov/models/errors/createinvoiceerror.rb +1 -1
- data/lib/moov/models/errors/createinvoicepaymenterror.rb +1 -1
- data/lib/moov/models/errors/createpaymentlinkerror.rb +1 -1
- data/lib/moov/models/errors/createresolutionlinkerror.rb +1 -1
- data/lib/moov/models/errors/createsweepconfigerror.rb +7 -3
- data/lib/moov/models/errors/createsweepconfigerror.rbi +2 -0
- data/lib/moov/models/errors/createticketerror.rb +1 -1
- data/lib/moov/models/errors/createwalletvalidationerror.rb +1 -1
- data/lib/moov/models/errors/createwebhookvalidationerror.rb +1 -1
- data/lib/moov/models/errors/duplicatecarderror.rb +1 -1
- data/lib/moov/models/errors/feeplanagreementerror.rb +1 -1
- data/lib/moov/models/errors/fileuploadvalidationerror.rb +1 -1
- data/lib/moov/models/errors/filevalidationerror.rb +1 -1
- data/lib/moov/models/errors/genericerror.rb +1 -1
- data/lib/moov/models/errors/imagemetadatavalidationerror.rb +1 -1
- data/lib/moov/models/errors/imagerequestvalidationerror.rb +1 -1
- data/lib/moov/models/errors/invoicenotificationerror.rb +1 -1
- data/lib/moov/models/errors/invoicenotificationratelimitederror.rb +1 -1
- data/lib/moov/models/errors/linkapplepayerror.rb +1 -1
- data/lib/moov/models/errors/linkcarderror.rb +1 -1
- data/lib/moov/models/errors/linkgooglepayerror.rb +1 -1
- data/lib/moov/models/errors/listinvoicesvalidationerror.rb +1 -1
- data/lib/moov/models/errors/listtransfersvalidationerror.rb +7 -3
- data/lib/moov/models/errors/listtransfersvalidationerror.rbi +2 -0
- data/lib/moov/models/errors/listwalletsvalidationerror.rb +1 -1
- data/lib/moov/models/errors/listwallettransactionsvalidationerror.rb +1 -1
- data/lib/moov/models/errors/microdepositvalidationerror.rb +1 -1
- data/lib/moov/models/errors/onboardinginviteerror.rb +5 -5
- data/lib/moov/models/errors/patchaccounterror.rb +1 -1
- data/lib/moov/models/errors/patchsweepconfigerror.rb +7 -3
- data/lib/moov/models/errors/patchsweepconfigerror.rbi +2 -0
- data/lib/moov/models/errors/patchtransfervalidationerror.rb +1 -1
- data/lib/moov/models/errors/patchwalletvalidationerror.rb +1 -1
- data/lib/moov/models/errors/productrequestvalidationerror.rb +4 -4
- data/lib/moov/models/errors/refundvalidationerror.rb +1 -1
- data/lib/moov/models/errors/representativevalidationerror.rb +1 -1
- data/lib/moov/models/errors/requestcarderror.rb +1 -1
- data/lib/moov/models/errors/reversalvalidationerror.rb +1 -1
- data/lib/moov/models/errors/revoketokenrequesterror.rb +1 -1
- data/lib/moov/models/errors/schedulevalidationerror.rb +3 -3
- data/lib/moov/models/errors/terminalapplicationerror.rb +1 -1
- data/lib/moov/models/errors/transfer_error.rb +3 -3
- data/lib/moov/models/errors/transferconfigvalidationerror.rb +4 -4
- data/lib/moov/models/errors/transferoptionsvalidationerror.rb +1 -1
- data/lib/moov/models/errors/transfervalidationerror.rb +1 -1
- data/lib/moov/models/errors/updatecarderror.rb +1 -1
- data/lib/moov/models/errors/updateinvoiceerror.rb +1 -1
- data/lib/moov/models/errors/updateissuedcarderror.rb +1 -1
- data/lib/moov/models/errors/updatepaymentlinkerror.rb +1 -1
- data/lib/moov/models/errors/updateticketerror.rb +1 -1
- data/lib/moov/models/errors/updateunderwritingerror.rb +1 -1
- data/lib/moov/models/errors/updatewebhookvalidationerror.rb +1 -1
- data/lib/moov/models/errors/upsertunderwritingerror.rb +1 -1
- data/lib/moov/models/operations/acceptdispute_response.rb +2 -2
- data/lib/moov/models/operations/assignaccountcountries_response.rb +2 -2
- data/lib/moov/models/operations/batchgettransfers_response.rb +3 -3
- data/lib/moov/models/operations/cancelschedule_response.rb +2 -2
- data/lib/moov/models/operations/completebankaccountverification_response.rb +2 -2
- data/lib/moov/models/operations/completemicrodeposits_response.rb +2 -2
- data/lib/moov/models/operations/connectaccount_response.rb +2 -2
- data/lib/moov/models/operations/createaccesstoken_response.rb +2 -2
- data/lib/moov/models/operations/createaccount_response.rb +2 -2
- data/lib/moov/models/operations/createapplepaysession_response.rb +2 -2
- data/lib/moov/models/operations/createbrand_response.rb +2 -2
- data/lib/moov/models/operations/createcancellation_response.rb +2 -2
- data/lib/moov/models/operations/createfeeplanagreements_response.rb +2 -2
- data/lib/moov/models/operations/createinvoice_response.rb +2 -2
- data/lib/moov/models/operations/createinvoicenotification_response.rb +2 -2
- data/lib/moov/models/operations/createinvoicepayment_response.rb +2 -2
- data/lib/moov/models/operations/createonboardinginvite_response.rb +2 -2
- data/lib/moov/models/operations/createpaymentlink_response.rb +2 -2
- data/lib/moov/models/operations/createproduct_response.rb +2 -2
- data/lib/moov/models/operations/createreceipts_response.rb +2 -2
- data/lib/moov/models/operations/createrepresentative_response.rb +2 -2
- data/lib/moov/models/operations/createresolutionlink_response.rb +2 -2
- data/lib/moov/models/operations/createreversal_response.rb +2 -2
- data/lib/moov/models/operations/createschedule_response.rb +2 -2
- data/lib/moov/models/operations/createsweepconfig_response.rb +2 -2
- data/lib/moov/models/operations/createterminalapplication_response.rb +2 -2
- data/lib/moov/models/operations/createterminalapplicationversion_response.rb +2 -2
- data/lib/moov/models/operations/createticket_response.rb +2 -2
- data/lib/moov/models/operations/createtransfer_response.rb +2 -2
- data/lib/moov/models/operations/createtransferconfig_response.rb +2 -2
- data/lib/moov/models/operations/createtransferoptions_response.rb +2 -2
- data/lib/moov/models/operations/createwallet_response.rb +2 -2
- data/lib/moov/models/operations/createwebhook_response.rb +2 -2
- data/lib/moov/models/operations/deletedisputeevidencefile_response.rb +2 -2
- data/lib/moov/models/operations/deleteimage_response.rb +2 -2
- data/lib/moov/models/operations/deleteinvoice_response.rb +2 -2
- data/lib/moov/models/operations/deleterepresentative_response.rb +2 -2
- data/lib/moov/models/operations/deleteterminalapplication_response.rb +2 -2
- data/lib/moov/models/operations/disablebankaccount_response.rb +2 -2
- data/lib/moov/models/operations/disablecapability_request.rb +2 -0
- data/lib/moov/models/operations/disablecapability_response.rb +2 -2
- data/lib/moov/models/operations/disablecard_response.rb +2 -2
- data/lib/moov/models/operations/disablepaymentlink_response.rb +2 -2
- data/lib/moov/models/operations/disableproduct_response.rb +2 -2
- data/lib/moov/models/operations/disableresolutionlink_response.rb +2 -2
- data/lib/moov/models/operations/disablewebhook_response.rb +2 -2
- data/lib/moov/models/operations/disconnectaccount_response.rb +2 -2
- data/lib/moov/models/operations/generateendtoendkey_response.rb +2 -2
- data/lib/moov/models/operations/getaccount_response.rb +2 -2
- data/lib/moov/models/operations/getaccountcountries_response.rb +2 -2
- data/lib/moov/models/operations/getaccountterminalapplication_response.rb +2 -2
- data/lib/moov/models/operations/getadjustment_response.rb +2 -2
- data/lib/moov/models/operations/getapplepaymerchantdomains_response.rb +2 -2
- data/lib/moov/models/operations/getavatar_response.rb +2 -2
- data/lib/moov/models/operations/getbankaccount_response.rb +2 -2
- data/lib/moov/models/operations/getbankaccountverification_response.rb +2 -2
- data/lib/moov/models/operations/getbrand_response.rb +2 -2
- data/lib/moov/models/operations/getcancellation_response.rb +2 -2
- data/lib/moov/models/operations/getcapability_request.rb +2 -0
- data/lib/moov/models/operations/getcapability_response.rb +2 -2
- data/lib/moov/models/operations/getcard_response.rb +2 -2
- data/lib/moov/models/operations/getdispute_response.rb +2 -2
- data/lib/moov/models/operations/getdisputeevidence_response.rb +2 -2
- data/lib/moov/models/operations/getdisputeevidencedata_response.rb +2 -2
- data/lib/moov/models/operations/getenrichmentaddress_response.rb +2 -2
- data/lib/moov/models/operations/getenrichmentprofile_response.rb +2 -2
- data/lib/moov/models/operations/getfiledetails_response.rb +2 -2
- data/lib/moov/models/operations/getfullissuedcard_response.rb +2 -2
- data/lib/moov/models/operations/getimagemetadata_response.rb +2 -2
- data/lib/moov/models/operations/getinvoice_response.rb +8 -4
- data/lib/moov/models/operations/getinvoice_response.rbi +2 -0
- data/lib/moov/models/operations/getissuedcard_response.rb +2 -2
- data/lib/moov/models/operations/getissuedcardauthorization_response.rb +2 -2
- data/lib/moov/models/operations/getissuedcardtransaction_response.rb +2 -2
- data/lib/moov/models/operations/getmerchantprocessingagreement_response.rb +2 -2
- data/lib/moov/models/operations/getonboardinginvite_response.rb +2 -2
- data/lib/moov/models/operations/getpaymentlink_response.rb +2 -2
- data/lib/moov/models/operations/getpaymentlinkqrcode_response.rb +2 -2
- data/lib/moov/models/operations/getpaymentmethod_response.rb +2 -2
- data/lib/moov/models/operations/getproduct_response.rb +2 -2
- data/lib/moov/models/operations/getpublicimage_response.rb +2 -2
- data/lib/moov/models/operations/getrefund_response.rb +2 -2
- data/lib/moov/models/operations/getrepresentative_response.rb +2 -2
- data/lib/moov/models/operations/getresidual_response.rb +2 -2
- data/lib/moov/models/operations/getresolutionlink_response.rb +2 -2
- data/lib/moov/models/operations/getscheduledoccurrence_response.rb +2 -2
- data/lib/moov/models/operations/getschedules_response.rb +2 -2
- data/lib/moov/models/operations/getstatement_response.rb +2 -2
- data/lib/moov/models/operations/getsweep_response.rb +2 -2
- data/lib/moov/models/operations/getsweepconfig_response.rb +2 -2
- data/lib/moov/models/operations/getterminalapplication_response.rb +2 -2
- data/lib/moov/models/operations/getterminalconfiguration_response.rb +2 -2
- data/lib/moov/models/operations/gettermsofservicetoken_response.rb +2 -2
- data/lib/moov/models/operations/getticket_response.rb +2 -2
- data/lib/moov/models/operations/gettransfer_response.rb +2 -2
- data/lib/moov/models/operations/gettransferconfig_response.rb +2 -2
- data/lib/moov/models/operations/getunderwriting_response.rb +2 -2
- data/lib/moov/models/operations/getwallet_response.rb +2 -2
- data/lib/moov/models/operations/getwallettransaction_response.rb +2 -2
- data/lib/moov/models/operations/getwebhook_response.rb +2 -2
- data/lib/moov/models/operations/getwebhooksecret_response.rb +2 -2
- data/lib/moov/models/operations/initiatebankaccountverification_response.rb +2 -2
- data/lib/moov/models/operations/initiatemicrodeposits_response.rb +2 -2
- data/lib/moov/models/operations/initiaterefund_response.rb +2 -2
- data/lib/moov/models/operations/linkaccountterminalapplication_response.rb +2 -2
- data/lib/moov/models/operations/linkapplepaytoken_response.rb +2 -2
- data/lib/moov/models/operations/linkbankaccount_response.rb +2 -2
- data/lib/moov/models/operations/linkcard_response.rb +2 -2
- data/lib/moov/models/operations/linkgooglepaytoken_response.rb +2 -2
- data/lib/moov/models/operations/listaccounts_response.rb +2 -2
- data/lib/moov/models/operations/listaccountterminalapplications_response.rb +2 -2
- data/lib/moov/models/operations/listadjustments_response.rb +2 -2
- data/lib/moov/models/operations/listbankaccounts_response.rb +2 -2
- data/lib/moov/models/operations/listcancellations_response.rb +2 -2
- data/lib/moov/models/operations/listcapabilities_response.rb +2 -2
- data/lib/moov/models/operations/listcards_response.rb +2 -2
- data/lib/moov/models/operations/listconnectedaccountsforaccount_response.rb +2 -2
- data/lib/moov/models/operations/listdisputeevidence_response.rb +2 -2
- data/lib/moov/models/operations/listdisputes_response.rb +2 -2
- data/lib/moov/models/operations/listeventtypes_response.rb +2 -2
- data/lib/moov/models/operations/listfeeplanagreements_response.rb +2 -2
- data/lib/moov/models/operations/listfeeplans_response.rb +2 -2
- data/lib/moov/models/operations/listfeerevenue_response.rb +2 -2
- data/lib/moov/models/operations/listfeesfetch_response.rb +2 -2
- data/lib/moov/models/operations/listfiles_response.rb +2 -2
- data/lib/moov/models/operations/listimagemetadata_response.rb +2 -2
- data/lib/moov/models/operations/listindustries_response.rb +2 -2
- data/lib/moov/models/operations/listinstitutions_response.rb +2 -2
- data/lib/moov/models/operations/listinvoicepayments_response.rb +2 -2
- data/lib/moov/models/operations/listinvoices_response.rb +2 -2
- data/lib/moov/models/operations/listissuedcardauthorizationevents_response.rb +2 -2
- data/lib/moov/models/operations/listissuedcardauthorizations_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcardauthorizations_request.rbi +2 -0
- data/lib/moov/models/operations/listissuedcardauthorizations_response.rb +2 -2
- data/lib/moov/models/operations/listissuedcards_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcards_request.rbi +2 -0
- data/lib/moov/models/operations/listissuedcards_response.rb +2 -2
- data/lib/moov/models/operations/listissuedcardtransactions_request.rb +6 -2
- data/lib/moov/models/operations/listissuedcardtransactions_request.rbi +2 -0
- data/lib/moov/models/operations/listissuedcardtransactions_response.rb +2 -2
- data/lib/moov/models/operations/listonboardinginvites_response.rb +2 -2
- data/lib/moov/models/operations/listpartnerpricingagreements_response.rb +2 -2
- data/lib/moov/models/operations/listpaymentlinks_response.rb +2 -2
- data/lib/moov/models/operations/listpaymentmethods_response.rb +2 -2
- data/lib/moov/models/operations/listproducts_response.rb +2 -2
- data/lib/moov/models/operations/listreceipts_response.rb +2 -2
- data/lib/moov/models/operations/listrefunds_response.rb +2 -2
- data/lib/moov/models/operations/listrepresentatives_response.rb +2 -2
- data/lib/moov/models/operations/listresidualfees_response.rb +2 -2
- data/lib/moov/models/operations/listresiduals_response.rb +2 -2
- data/lib/moov/models/operations/listresolutionlinks_response.rb +2 -2
- data/lib/moov/models/operations/listschedules_response.rb +2 -2
- data/lib/moov/models/operations/liststatements_response.rb +2 -2
- data/lib/moov/models/operations/listsweepconfigs_response.rb +2 -2
- data/lib/moov/models/operations/listsweeps_response.rb +2 -2
- data/lib/moov/models/operations/listterminalapplications_response.rb +2 -2
- data/lib/moov/models/operations/listticketmessages_response.rb +2 -2
- data/lib/moov/models/operations/listtickets_response.rb +2 -2
- data/lib/moov/models/operations/listtransfers_request.rb +7 -2
- data/lib/moov/models/operations/listtransfers_request.rbi +2 -0
- data/lib/moov/models/operations/listtransfers_response.rb +3 -3
- data/lib/moov/models/operations/listwallets_response.rb +2 -2
- data/lib/moov/models/operations/listwallettransactions_response.rb +2 -2
- data/lib/moov/models/operations/listwebhooks_response.rb +2 -2
- data/lib/moov/models/operations/ping_response.rb +2 -2
- data/lib/moov/models/operations/pingwebhook_response.rb +2 -2
- data/lib/moov/models/operations/registerapplepaymerchantdomains_response.rb +2 -2
- data/lib/moov/models/operations/requestcapabilities_response.rb +2 -2
- data/lib/moov/models/operations/requestcard_response.rb +2 -2
- data/lib/moov/models/operations/retrievefees_response.rb +2 -2
- data/lib/moov/models/operations/revokeaccesstoken_response.rb +2 -2
- data/lib/moov/models/operations/revokeonboardinginvite_response.rb +2 -2
- data/lib/moov/models/operations/saveunderwriting_response.rb +2 -2
- data/lib/moov/models/operations/searchinstitutions_response.rb +2 -2
- data/lib/moov/models/operations/submitdisputeevidence_response.rb +2 -2
- data/lib/moov/models/operations/testendtoendtoken_response.rb +2 -2
- data/lib/moov/models/operations/updateaccount_response.rb +2 -2
- data/lib/moov/models/operations/updateapplepaymerchantdomains_response.rb +2 -2
- data/lib/moov/models/operations/updatecard_response.rb +2 -2
- data/lib/moov/models/operations/updatedisputeevidence_response.rb +2 -2
- data/lib/moov/models/operations/updateimage_response.rb +2 -2
- data/lib/moov/models/operations/updateimagemetadata_response.rb +2 -2
- data/lib/moov/models/operations/updateinvoice_response.rb +2 -2
- data/lib/moov/models/operations/updateissuedcard_response.rb +2 -2
- data/lib/moov/models/operations/updatepaymentlink_response.rb +2 -2
- data/lib/moov/models/operations/updateproduct_response.rb +2 -2
- data/lib/moov/models/operations/updaterepresentative_response.rb +2 -2
- data/lib/moov/models/operations/updateschedule_response.rb +2 -2
- data/lib/moov/models/operations/updatesweepconfig_response.rb +2 -2
- data/lib/moov/models/operations/updateticket_response.rb +2 -2
- data/lib/moov/models/operations/updatetransfer_response.rb +2 -2
- data/lib/moov/models/operations/updatetransferconfig_response.rb +2 -2
- data/lib/moov/models/operations/updatewallet_response.rb +2 -2
- data/lib/moov/models/operations/updatewebhook_response.rb +2 -2
- data/lib/moov/models/operations/uploaddisputeevidencefile_response.rb +2 -2
- data/lib/moov/models/operations/uploaddisputeevidencetext_response.rb +2 -2
- data/lib/moov/models/operations/uploadfile_response.rb +2 -2
- data/lib/moov/models/operations/uploadimage_response.rb +2 -2
- data/lib/moov/models/operations/upsertbrand_response.rb +2 -2
- data/lib/moov/models/operations/upsertunderwriting_response.rb +2 -2
- data/lib/moov/onboarding.rb +24 -24
- data/lib/moov/payment_links.rb +38 -38
- data/lib/moov/payment_methods.rb +11 -11
- data/lib/moov/ping.rb +5 -5
- data/lib/moov/products.rb +34 -34
- data/lib/moov/receipts.rb +14 -14
- data/lib/moov/representatives.rb +33 -33
- data/lib/moov/resolution_links.rb +25 -25
- data/lib/moov/scheduling.rb +39 -39
- data/lib/moov/sdk_hooks/hooks.rb +1 -1
- data/lib/moov/sdk_hooks/types.rb +14 -14
- data/lib/moov/sdkconfiguration.rb +17 -17
- data/lib/moov/statements.rb +12 -12
- data/lib/moov/support.rb +34 -34
- data/lib/moov/sweeps.rb +39 -39
- data/lib/moov/terminal_applications.rb +34 -34
- data/lib/moov/transfer_config.rb +24 -24
- data/lib/moov/transfers.rb +98 -93
- data/lib/moov/underwriting.rb +24 -24
- data/lib/moov/utils/forms.rb +23 -23
- data/lib/moov/utils/headers.rb +4 -4
- data/lib/moov/utils/query_params.rb +14 -14
- data/lib/moov/utils/request_bodies.rb +7 -7
- data/lib/moov/utils/retries.rb +5 -5
- data/lib/moov/utils/security.rb +16 -16
- data/lib/moov/utils/url.rb +6 -6
- data/lib/moov/utils/utils.rb +31 -31
- data/lib/moov/wallet_transactions.rb +12 -12
- data/lib/moov/wallets.rb +30 -30
- data/lib/moov/webhooks.rb +49 -49
- metadata +10 -2
data/lib/moov/underwriting.rb
CHANGED
|
@@ -23,7 +23,7 @@ module Moov
|
|
|
23
23
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
26
|
+
sig { params(base_url: ::String, url_variables: T.nilable(T::Hash[::Symbol, T.any(::String, T::Enum)])).returns(::String) }
|
|
27
27
|
def get_url(base_url:, url_variables: nil)
|
|
28
28
|
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ module Moov
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
sig { params(account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetUnderwritingResponse) }
|
|
44
|
+
sig { params(account_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::GetUnderwritingResponse) }
|
|
45
45
|
def get(account_id:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# get - Retrieve underwriting associated with a given Moov account.
|
|
47
47
|
#
|
|
@@ -61,7 +61,7 @@ module Moov
|
|
|
61
61
|
request
|
|
62
62
|
)
|
|
63
63
|
headers = {}
|
|
64
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
64
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
65
65
|
headers['Accept'] = 'application/json'
|
|
66
66
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
67
67
|
|
|
@@ -81,7 +81,7 @@ module Moov
|
|
|
81
81
|
security_source: @sdk_configuration.security_source
|
|
82
82
|
)
|
|
83
83
|
|
|
84
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
84
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
85
85
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
86
86
|
|
|
87
87
|
|
|
@@ -101,7 +101,7 @@ module Moov
|
|
|
101
101
|
request: req
|
|
102
102
|
)
|
|
103
103
|
end
|
|
104
|
-
rescue StandardError => e
|
|
104
|
+
rescue ::StandardError => e
|
|
105
105
|
error = e
|
|
106
106
|
ensure
|
|
107
107
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -137,7 +137,7 @@ module Moov
|
|
|
137
137
|
response: http_response
|
|
138
138
|
)
|
|
139
139
|
response_data = http_response.env.response_body
|
|
140
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Underwriting)
|
|
140
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Underwriting)
|
|
141
141
|
response = Models::Operations::GetUnderwritingResponse.new(
|
|
142
142
|
status_code: http_response.status,
|
|
143
143
|
content_type: content_type,
|
|
@@ -165,7 +165,7 @@ module Moov
|
|
|
165
165
|
end
|
|
166
166
|
|
|
167
167
|
|
|
168
|
-
sig { params(upsert_underwriting: Models::Components::UpsertUnderwriting, account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::SaveUnderwritingResponse) }
|
|
168
|
+
sig { params(upsert_underwriting: Models::Components::UpsertUnderwriting, account_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::SaveUnderwritingResponse) }
|
|
169
169
|
def save(upsert_underwriting:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
170
170
|
# save - Create or update the account's underwriting.
|
|
171
171
|
#
|
|
@@ -186,15 +186,15 @@ module Moov
|
|
|
186
186
|
request
|
|
187
187
|
)
|
|
188
188
|
headers = {}
|
|
189
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
189
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
190
190
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :upsert_underwriting, :json)
|
|
191
191
|
headers['content-type'] = req_content_type
|
|
192
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
192
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
193
193
|
|
|
194
194
|
if form && !form.empty?
|
|
195
195
|
body = Utils.encode_form(form)
|
|
196
196
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
197
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
197
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
198
198
|
else
|
|
199
199
|
body = data
|
|
200
200
|
end
|
|
@@ -217,7 +217,7 @@ module Moov
|
|
|
217
217
|
security_source: @sdk_configuration.security_source
|
|
218
218
|
)
|
|
219
219
|
|
|
220
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
220
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
221
221
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
222
222
|
|
|
223
223
|
|
|
@@ -238,7 +238,7 @@ module Moov
|
|
|
238
238
|
request: req
|
|
239
239
|
)
|
|
240
240
|
end
|
|
241
|
-
rescue StandardError => e
|
|
241
|
+
rescue ::StandardError => e
|
|
242
242
|
error = e
|
|
243
243
|
ensure
|
|
244
244
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -274,7 +274,7 @@ module Moov
|
|
|
274
274
|
response: http_response
|
|
275
275
|
)
|
|
276
276
|
response_data = http_response.env.response_body
|
|
277
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Underwriting)
|
|
277
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Underwriting)
|
|
278
278
|
response = Models::Operations::SaveUnderwritingResponse.new(
|
|
279
279
|
status_code: http_response.status,
|
|
280
280
|
content_type: content_type,
|
|
@@ -296,7 +296,7 @@ module Moov
|
|
|
296
296
|
response: http_response
|
|
297
297
|
)
|
|
298
298
|
response_data = http_response.env.response_body
|
|
299
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
299
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::GenericError)
|
|
300
300
|
obj.raw_response = http_response
|
|
301
301
|
raise obj
|
|
302
302
|
else
|
|
@@ -311,7 +311,7 @@ module Moov
|
|
|
311
311
|
response: http_response
|
|
312
312
|
)
|
|
313
313
|
response_data = http_response.env.response_body
|
|
314
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UpsertUnderwritingError)
|
|
314
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::UpsertUnderwritingError)
|
|
315
315
|
obj.raw_response = http_response
|
|
316
316
|
raise obj
|
|
317
317
|
else
|
|
@@ -332,7 +332,7 @@ module Moov
|
|
|
332
332
|
end
|
|
333
333
|
|
|
334
334
|
|
|
335
|
-
sig { params(update_underwriting: Models::Components::UpdateUnderwriting, account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::UpsertUnderwritingResponse) }
|
|
335
|
+
sig { params(update_underwriting: Models::Components::UpdateUnderwriting, account_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::UpsertUnderwritingResponse) }
|
|
336
336
|
def upsert(update_underwriting:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
337
337
|
# upsert - Create or update the account's underwriting.
|
|
338
338
|
#
|
|
@@ -353,15 +353,15 @@ module Moov
|
|
|
353
353
|
request
|
|
354
354
|
)
|
|
355
355
|
headers = {}
|
|
356
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
356
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
357
357
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :update_underwriting, :json)
|
|
358
358
|
headers['content-type'] = req_content_type
|
|
359
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
359
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
360
360
|
|
|
361
361
|
if form && !form.empty?
|
|
362
362
|
body = Utils.encode_form(form)
|
|
363
363
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
364
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
364
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
365
365
|
else
|
|
366
366
|
body = data
|
|
367
367
|
end
|
|
@@ -384,7 +384,7 @@ module Moov
|
|
|
384
384
|
security_source: @sdk_configuration.security_source
|
|
385
385
|
)
|
|
386
386
|
|
|
387
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
387
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
388
388
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
389
389
|
|
|
390
390
|
|
|
@@ -405,7 +405,7 @@ module Moov
|
|
|
405
405
|
request: req
|
|
406
406
|
)
|
|
407
407
|
end
|
|
408
|
-
rescue StandardError => e
|
|
408
|
+
rescue ::StandardError => e
|
|
409
409
|
error = e
|
|
410
410
|
ensure
|
|
411
411
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -441,7 +441,7 @@ module Moov
|
|
|
441
441
|
response: http_response
|
|
442
442
|
)
|
|
443
443
|
response_data = http_response.env.response_body
|
|
444
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Underwriting)
|
|
444
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Underwriting)
|
|
445
445
|
response = Models::Operations::UpsertUnderwritingResponse.new(
|
|
446
446
|
status_code: http_response.status,
|
|
447
447
|
content_type: content_type,
|
|
@@ -463,7 +463,7 @@ module Moov
|
|
|
463
463
|
response: http_response
|
|
464
464
|
)
|
|
465
465
|
response_data = http_response.env.response_body
|
|
466
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
466
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::GenericError)
|
|
467
467
|
obj.raw_response = http_response
|
|
468
468
|
raise obj
|
|
469
469
|
else
|
|
@@ -478,7 +478,7 @@ module Moov
|
|
|
478
478
|
response: http_response
|
|
479
479
|
)
|
|
480
480
|
response_data = http_response.env.response_body
|
|
481
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UpdateUnderwritingError)
|
|
481
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::UpdateUnderwritingError)
|
|
482
482
|
obj.raw_response = http_response
|
|
483
483
|
raise obj
|
|
484
484
|
else
|
data/lib/moov/utils/forms.rb
CHANGED
|
@@ -13,9 +13,9 @@ module Moov
|
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
15
|
sig do
|
|
16
|
-
params(field_name: String, explode: T::Boolean, obj: Object, delimiter: String,
|
|
17
|
-
get_field_name_lambda: T.proc.params(obj_field: ::Crystalline::MetadataFields::Field).returns(String))
|
|
18
|
-
.returns(T::Hash[String, T::Array[String]])
|
|
16
|
+
params(field_name: ::String, explode: T::Boolean, obj: ::Object, delimiter: ::String,
|
|
17
|
+
get_field_name_lambda: T.proc.params(obj_field: ::Crystalline::MetadataFields::Field).returns(::String))
|
|
18
|
+
.returns(T::Hash[::String, T::Array[::String]])
|
|
19
19
|
end
|
|
20
20
|
def self._populate_form(field_name, explode, obj, delimiter, &get_field_name_lambda)
|
|
21
21
|
params = {}
|
|
@@ -39,7 +39,7 @@ module Moov
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
params[field_name] = [items.join(delimiter)] if !items.empty?
|
|
42
|
-
elsif obj.is_a? Hash
|
|
42
|
+
elsif obj.is_a? ::Hash
|
|
43
43
|
items = []
|
|
44
44
|
obj.each do |key, value|
|
|
45
45
|
next if value.nil?
|
|
@@ -52,7 +52,7 @@ module Moov
|
|
|
52
52
|
end
|
|
53
53
|
params[field_name] = [items.join(delimiter)] if !items.empty?
|
|
54
54
|
|
|
55
|
-
elsif obj.is_a? Array
|
|
55
|
+
elsif obj.is_a? ::Array
|
|
56
56
|
items = []
|
|
57
57
|
obj.each do |value|
|
|
58
58
|
next if value.nil?
|
|
@@ -73,7 +73,7 @@ module Moov
|
|
|
73
73
|
params
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
sig { params(media_type: String, request: Object).returns([String, Object, T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]]]) }
|
|
76
|
+
sig { params(media_type: ::String, request: ::Object).returns([::String, ::Object, T::Array[T::Array[T.any(T::Array[T.nilable(::String)], ::String)]]]) }
|
|
77
77
|
def self.serialize_multipart_form(media_type, request)
|
|
78
78
|
form = []
|
|
79
79
|
T.unsafe(request).fields.each do |field|
|
|
@@ -87,9 +87,9 @@ module Moov
|
|
|
87
87
|
field_name = field_metadata[:field_name]
|
|
88
88
|
|
|
89
89
|
# Handle arrays of files
|
|
90
|
-
if val.is_a? Array
|
|
90
|
+
if val.is_a? ::Array
|
|
91
91
|
val.each do |file_obj|
|
|
92
|
-
file_name = T.let('', String)
|
|
92
|
+
file_name = T.let('', ::String)
|
|
93
93
|
content = nil
|
|
94
94
|
|
|
95
95
|
T.must(file_obj).fields.each do |file_field|
|
|
@@ -97,18 +97,18 @@ module Moov
|
|
|
97
97
|
next if file_metadata.nil?
|
|
98
98
|
|
|
99
99
|
if file_metadata[:content] == true
|
|
100
|
-
content = T.let(file_obj.send(file_field.name), String)
|
|
100
|
+
content = T.let(file_obj.send(file_field.name), ::String)
|
|
101
101
|
else
|
|
102
|
-
file_name = T.let(file_obj.send(file_field.name), String)
|
|
102
|
+
file_name = T.let(file_obj.send(file_field.name), ::String)
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
|
-
raise StandardError, 'invalid multipart/form-data file' if T.unsafe(file_name) == '' || T.unsafe(content).nil?
|
|
105
|
+
raise ::StandardError, 'invalid multipart/form-data file' if T.unsafe(file_name) == '' || T.unsafe(content).nil?
|
|
106
106
|
|
|
107
107
|
form.append(["#{field_name}[]", [file_name, content]])
|
|
108
108
|
end
|
|
109
109
|
else
|
|
110
110
|
# Handle single file
|
|
111
|
-
file_name = T.let('', String)
|
|
111
|
+
file_name = T.let('', ::String)
|
|
112
112
|
content = nil
|
|
113
113
|
|
|
114
114
|
T.must(val).fields.each do |file_field|
|
|
@@ -116,12 +116,12 @@ module Moov
|
|
|
116
116
|
next if file_metadata.nil?
|
|
117
117
|
|
|
118
118
|
if file_metadata[:content] == true
|
|
119
|
-
content = T.let(val.send(file_field.name), String)
|
|
119
|
+
content = T.let(val.send(file_field.name), ::String)
|
|
120
120
|
else
|
|
121
|
-
file_name = T.let(val.send(file_field.name), String)
|
|
121
|
+
file_name = T.let(val.send(file_field.name), ::String)
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
|
-
raise StandardError, 'invalid multipart/form-data file' if T.unsafe(file_name) == '' || T.unsafe(content).nil?
|
|
124
|
+
raise ::StandardError, 'invalid multipart/form-data file' if T.unsafe(file_name) == '' || T.unsafe(content).nil?
|
|
125
125
|
|
|
126
126
|
form.append([field_name, [file_name, content]])
|
|
127
127
|
end
|
|
@@ -136,7 +136,7 @@ module Moov
|
|
|
136
136
|
field_name = field_metadata.fetch(
|
|
137
137
|
:field_name, field.name
|
|
138
138
|
)
|
|
139
|
-
if val.is_a? Array
|
|
139
|
+
if val.is_a? ::Array
|
|
140
140
|
val.each do |value|
|
|
141
141
|
next if value.nil?
|
|
142
142
|
|
|
@@ -154,19 +154,19 @@ module Moov
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
sig do
|
|
157
|
-
params(data: T.any(Object, T::Hash[String, String]))
|
|
158
|
-
.returns(T::Hash[T.any(String, Symbol), Object])
|
|
157
|
+
params(data: T.any(::Object, T::Hash[::String, ::String]))
|
|
158
|
+
.returns(T::Hash[T.any(::String, ::Symbol), ::Object])
|
|
159
159
|
end
|
|
160
160
|
def self.serialize_form_data(data)
|
|
161
161
|
get_form_field_name = lambda do |obj_field|
|
|
162
162
|
obj_param_metadata = obj_field.metadata[:form]
|
|
163
163
|
|
|
164
|
-
return T.let({}, T::Hash[T.any(String, Symbol), Object]) if obj_param_metadata.nil?
|
|
164
|
+
return T.let({}, T::Hash[T.any(::String, ::Symbol), ::Object]) if obj_param_metadata.nil?
|
|
165
165
|
|
|
166
166
|
return obj_param_metadata.fetch(:field_name, obj_field.name)
|
|
167
167
|
end
|
|
168
168
|
|
|
169
|
-
form = T.let({}, T::Hash[T.any(String, Symbol), Object])
|
|
169
|
+
form = T.let({}, T::Hash[T.any(::String, ::Symbol), ::Object])
|
|
170
170
|
if data.respond_to? :fields
|
|
171
171
|
T.unsafe(data).fields.each do |field|
|
|
172
172
|
val = data.send(field.name)
|
|
@@ -188,16 +188,16 @@ module Moov
|
|
|
188
188
|
)
|
|
189
189
|
)
|
|
190
190
|
else
|
|
191
|
-
raise StandardError, "Invalid form style for field #{field.name}"
|
|
191
|
+
raise ::StandardError, "Invalid form style for field #{field.name}"
|
|
192
192
|
end
|
|
193
193
|
end
|
|
194
194
|
end
|
|
195
|
-
elsif data.is_a? Hash
|
|
195
|
+
elsif data.is_a? ::Hash
|
|
196
196
|
data.each do |key, value|
|
|
197
197
|
form[key] = [val_to_string(value)]
|
|
198
198
|
end
|
|
199
199
|
else
|
|
200
|
-
raise StandardError, "Invalid request body type #{data.class}"
|
|
200
|
+
raise ::StandardError, "Invalid request body type #{data.class}"
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
form
|
data/lib/moov/utils/headers.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Moov
|
|
|
12
12
|
module Utils
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
|
-
sig { params(headers_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, String]) }
|
|
15
|
+
sig { params(headers_params: ::Object, gbls: T.nilable(T::Hash[::Symbol, T::Hash[::Symbol, T::Hash[::Symbol, ::Object]]])).returns(T::Hash[::Symbol, ::String]) }
|
|
16
16
|
def self.get_headers(headers_params, gbls = nil)
|
|
17
17
|
return {} if headers_params.nil?
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ module Moov
|
|
|
28
28
|
headers
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
sig { params(explode: T::Boolean, obj: Object).returns(T.nilable(String)) }
|
|
31
|
+
sig { params(explode: T::Boolean, obj: ::Object).returns(T.nilable(::String)) }
|
|
32
32
|
def self._serialize_header(explode, obj)
|
|
33
33
|
return '' if obj.nil?
|
|
34
34
|
|
|
@@ -53,7 +53,7 @@ module Moov
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
items.join(',') if !items.empty?
|
|
56
|
-
elsif obj.is_a? Hash
|
|
56
|
+
elsif obj.is_a? ::Hash
|
|
57
57
|
items = []
|
|
58
58
|
obj.each do |key, value|
|
|
59
59
|
next if value.nil?
|
|
@@ -67,7 +67,7 @@ module Moov
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
items.join(',') if !items.empty?
|
|
70
|
-
elsif obj.is_a? Array
|
|
70
|
+
elsif obj.is_a? ::Array
|
|
71
71
|
items = obj.filter { |v| !v.nil? }.map { |v| val_to_string(v) }.join(',')
|
|
72
72
|
else
|
|
73
73
|
val_to_string(obj)
|
|
@@ -11,17 +11,17 @@ module Moov
|
|
|
11
11
|
module Utils
|
|
12
12
|
extend T::Sig
|
|
13
13
|
|
|
14
|
-
sig { params(clazz: Object, query_params: Object, url_override: T.nilable(::String), gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[T.any(String, Symbol), T::Array[String]]) }
|
|
14
|
+
sig { params(clazz: ::Object, query_params: ::Object, url_override: T.nilable(::String), gbls: T.nilable(T::Hash[::Symbol, T::Hash[::Symbol, T::Hash[::Symbol, ::Object]]])).returns(T::Hash[T.any(::String, ::Symbol), T::Array[::String]]) }
|
|
15
15
|
def self.get_query_params(clazz, query_params, url_override = nil, gbls = nil)
|
|
16
|
-
parsed_params = T.let({}, T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
16
|
+
parsed_params = T.let({}, T::Hash[T.any(::String, ::Symbol), T::Array[::String]])
|
|
17
17
|
if !url_override.nil?
|
|
18
|
-
parsed_url = URI.parse url_override
|
|
19
|
-
URI.decode_www_form(parsed_url.query.to_s).each do |key, value|
|
|
18
|
+
parsed_url = ::URI.parse url_override
|
|
19
|
+
::URI.decode_www_form(parsed_url.query.to_s).each do |key, value|
|
|
20
20
|
parsed_params[key] ||= []
|
|
21
21
|
T.must(parsed_params[key]) << value
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
|
-
params = T.let({}, T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
24
|
+
params = T.let({}, T::Hash[T.any(::String, ::Symbol), T::Array[::String]])
|
|
25
25
|
T.unsafe(clazz).fields.each do |f|
|
|
26
26
|
request_metadata = f.metadata[:request]
|
|
27
27
|
next if !request_metadata.nil?
|
|
@@ -55,7 +55,7 @@ module Moov
|
|
|
55
55
|
metadata, f_name, value, '|'
|
|
56
56
|
)
|
|
57
57
|
else
|
|
58
|
-
raise StandardError, 'not yet implemented'
|
|
58
|
+
raise ::StandardError, 'not yet implemented'
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -63,11 +63,11 @@ module Moov
|
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
sig do
|
|
66
|
-
params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object)
|
|
67
|
-
.returns(T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
66
|
+
params(metadata: T::Hash[::Symbol, ::String], field_name: ::String, obj: ::Object)
|
|
67
|
+
.returns(T::Hash[T.any(::String, ::Symbol), T::Array[::String]])
|
|
68
68
|
end
|
|
69
69
|
def self._get_deep_object_query_params(metadata, field_name, obj)
|
|
70
|
-
params = T.let({}, T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
70
|
+
params = T.let({}, T::Hash[T.any(::String, ::Symbol), T::Array[::String]])
|
|
71
71
|
|
|
72
72
|
return params if obj.nil?
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ module Moov
|
|
|
80
80
|
next if val.nil?
|
|
81
81
|
|
|
82
82
|
key = "#{metadata.fetch(:field_name, field_name)}[#{obj_param_metadata.fetch(:field_name, obj_field.name)}]"
|
|
83
|
-
if val.is_a? Array
|
|
83
|
+
if val.is_a? ::Array
|
|
84
84
|
val.each do |v|
|
|
85
85
|
next if v.nil?
|
|
86
86
|
|
|
@@ -92,12 +92,12 @@ module Moov
|
|
|
92
92
|
params[key] = [val_to_string(val)]
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
|
-
elsif obj.is_a? Hash
|
|
95
|
+
elsif obj.is_a? ::Hash
|
|
96
96
|
obj.each do |key, value|
|
|
97
97
|
next if value.nil?
|
|
98
98
|
|
|
99
99
|
param_key = "#{metadata.fetch(:field_name, field_name)}[#{key}]"
|
|
100
|
-
if value.is_a? Array
|
|
100
|
+
if value.is_a? ::Array
|
|
101
101
|
value.each do |val|
|
|
102
102
|
next if val.nil?
|
|
103
103
|
|
|
@@ -115,8 +115,8 @@ module Moov
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
sig do
|
|
118
|
-
params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object, delimiter: String)
|
|
119
|
-
.returns(T::Hash[T.any(String, Symbol), T::Array[String]])
|
|
118
|
+
params(metadata: T::Hash[::Symbol, ::String], field_name: ::String, obj: ::Object, delimiter: ::String)
|
|
119
|
+
.returns(T::Hash[T.any(::String, ::Symbol), T::Array[::String]])
|
|
120
120
|
end
|
|
121
121
|
def self._get_delimited_query_params(metadata, field_name, obj, delimiter)
|
|
122
122
|
get_query_param_field_name = lambda do |obj_field|
|
|
@@ -21,15 +21,15 @@ module Moov
|
|
|
21
21
|
}.freeze
|
|
22
22
|
|
|
23
23
|
sig do
|
|
24
|
-
params(request: Object, nullable: T::Boolean, optional: T::Boolean, request_field_name: Symbol, serialization_method: Symbol)
|
|
25
|
-
.returns([String, Object, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]])])
|
|
24
|
+
params(request: ::Object, nullable: T::Boolean, optional: T::Boolean, request_field_name: ::Symbol, serialization_method: ::Symbol)
|
|
25
|
+
.returns([::String, ::Object, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(::String)], ::String)]])])
|
|
26
26
|
end
|
|
27
27
|
def self.serialize_request_body(request, nullable, optional, request_field_name, serialization_method)
|
|
28
28
|
return ['', nil, nil] if request.nil? && !nullable && optional
|
|
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_metadata = T.let(nil, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]]))
|
|
32
|
+
request_metadata = T.let(nil, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(::String)], ::String)]]))
|
|
33
33
|
T.unsafe(request).fields.each do |f|
|
|
34
34
|
if f.name == request_field_name
|
|
35
35
|
request_metadata = f.metadata[:request]
|
|
@@ -51,16 +51,16 @@ module Moov
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
sig do
|
|
54
|
-
params(media_type: String, request: Object)
|
|
55
|
-
.returns([String, Object, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(String)], String)]])])
|
|
54
|
+
params(media_type: ::String, request: ::Object)
|
|
55
|
+
.returns([::String, ::Object, T.nilable(T::Array[T::Array[T.any(T::Array[T.nilable(::String)], ::String)]])])
|
|
56
56
|
end
|
|
57
57
|
def self.serialize_content_type(media_type, request)
|
|
58
58
|
return media_type, ::Crystalline.to_json(request), nil if media_type.match('^(application|text)\/([^+]+\+)*json.*')
|
|
59
59
|
return serialize_multipart_form(media_type, request) if media_type.match('^multipart\/.*')
|
|
60
60
|
return media_type, serialize_form_data(request), nil if media_type.match('^application\/x-www-form-urlencoded.*')
|
|
61
|
-
return media_type, request, nil if request.is_a?(String) || request.is_a?(Array)
|
|
61
|
+
return media_type, request, nil if request.is_a?(::String) || request.is_a?(::Array)
|
|
62
62
|
|
|
63
|
-
raise StandardError, "invalid request body type #{request.class} for mediaType #{media_type}"
|
|
63
|
+
raise ::StandardError, "invalid request body type #{request.class} for mediaType #{media_type}"
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
data/lib/moov/utils/retries.rb
CHANGED
|
@@ -85,7 +85,7 @@ module Moov
|
|
|
85
85
|
|
|
86
86
|
unless @backoff.max_elapsed_time.nil?
|
|
87
87
|
stop_time = initial_time + (@backoff.max_elapsed_time.to_f / 1000)
|
|
88
|
-
retry_options[:retry_if] = ->(_env, _exc) { Time.now < stop_time }
|
|
88
|
+
retry_options[:retry_if] = ->(_env, _exc) { ::Time.now < stop_time }
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
end
|
|
@@ -123,11 +123,11 @@ module Moov
|
|
|
123
123
|
return value.to_f if value.match?(/\A\s*\d+\s*\z/)
|
|
124
124
|
|
|
125
125
|
begin
|
|
126
|
-
Time.httpdate(value) - Time.now
|
|
127
|
-
rescue ArgumentError
|
|
126
|
+
::Time.httpdate(value) - ::Time.now
|
|
127
|
+
rescue ::ArgumentError
|
|
128
128
|
begin
|
|
129
|
-
Time.iso8601(value) - Time.now
|
|
130
|
-
rescue ArgumentError
|
|
129
|
+
::Time.iso8601(value) - ::Time.now
|
|
130
|
+
rescue ::ArgumentError
|
|
131
131
|
nil
|
|
132
132
|
end
|
|
133
133
|
end
|
data/lib/moov/utils/security.rb
CHANGED
|
@@ -12,7 +12,7 @@ module Moov
|
|
|
12
12
|
module Utils
|
|
13
13
|
extend T::Sig
|
|
14
14
|
|
|
15
|
-
sig { params(req: Faraday::Request, security: Object, allowed_fields: T.nilable(T::Array[Symbol])).void }
|
|
15
|
+
sig { params(req: Faraday::Request, security: ::Object, allowed_fields: T.nilable(T::Array[::Symbol])).void }
|
|
16
16
|
def self.configure_request_security(req, security, allowed_fields = nil)
|
|
17
17
|
return if security.nil?
|
|
18
18
|
|
|
@@ -46,7 +46,7 @@ module Moov
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
sig { params(req: Faraday::Request, option: Object).void }
|
|
49
|
+
sig { params(req: Faraday::Request, option: ::Object).void }
|
|
50
50
|
def self._parse_security_option(req, option)
|
|
51
51
|
# Check if this option uses basic auth (needs the whole object, not individual fields)
|
|
52
52
|
first_field = T.unsafe(option).fields.first
|
|
@@ -66,7 +66,7 @@ module Moov
|
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
sig { params(req: Faraday::Request, scheme_metadata: T::Hash[Symbol, String], scheme: Object).void }
|
|
69
|
+
sig { params(req: Faraday::Request, scheme_metadata: T::Hash[::Symbol, ::String], scheme: ::Object).void }
|
|
70
70
|
def self._parse_security_scheme(req, scheme_metadata, scheme)
|
|
71
71
|
scheme_type = scheme_metadata[:type]
|
|
72
72
|
sub_type = scheme_metadata[:sub_type]
|
|
@@ -82,16 +82,16 @@ module Moov
|
|
|
82
82
|
next if metadata.nil? || metadata[:field_name].nil?
|
|
83
83
|
|
|
84
84
|
value = scheme.send(field.name)
|
|
85
|
-
_parse_security_scheme_value(req, scheme_metadata, metadata, T.cast(value, String))
|
|
85
|
+
_parse_security_scheme_value(req, scheme_metadata, metadata, T.cast(value, ::String))
|
|
86
86
|
end
|
|
87
87
|
else
|
|
88
|
-
_parse_security_scheme_value(req, scheme_metadata, scheme_metadata, T.cast(scheme, String))
|
|
88
|
+
_parse_security_scheme_value(req, scheme_metadata, scheme_metadata, T.cast(scheme, ::String))
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
sig do
|
|
93
|
-
params(req: Faraday::Request, scheme_metadata: T::Hash[Symbol, String],
|
|
94
|
-
security_metadata: T::Hash[Symbol, String], value: String).void
|
|
93
|
+
params(req: Faraday::Request, scheme_metadata: T::Hash[::Symbol, ::String],
|
|
94
|
+
security_metadata: T::Hash[::Symbol, ::String], value: ::String).void
|
|
95
95
|
end
|
|
96
96
|
def self._parse_security_scheme_value(req, scheme_metadata, security_metadata, value)
|
|
97
97
|
scheme_type = scheme_metadata[:type]
|
|
@@ -109,7 +109,7 @@ module Moov
|
|
|
109
109
|
when 'cookie'
|
|
110
110
|
req.headers['Cookie'][header_name] = value
|
|
111
111
|
else
|
|
112
|
-
raise StandardError, 'not supported'
|
|
112
|
+
raise ::StandardError, 'not supported'
|
|
113
113
|
end
|
|
114
114
|
when 'openIdConnect'
|
|
115
115
|
req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}"
|
|
@@ -119,17 +119,17 @@ module Moov
|
|
|
119
119
|
if sub_type == 'bearer'
|
|
120
120
|
req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}"
|
|
121
121
|
elsif sub_type != 'custom'
|
|
122
|
-
raise StandardError, 'not supported'
|
|
122
|
+
raise ::StandardError, 'not supported'
|
|
123
123
|
end
|
|
124
124
|
else
|
|
125
|
-
raise StandardError, 'not supported'
|
|
125
|
+
raise ::StandardError, 'not supported'
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
sig { params(req: Faraday::Request, scheme: Object).void }
|
|
129
|
+
sig { params(req: Faraday::Request, scheme: ::Object).void }
|
|
130
130
|
def self._parse_basic_auth_scheme(req, scheme)
|
|
131
|
-
username = T.let('', String)
|
|
132
|
-
password = T.let('', String)
|
|
131
|
+
username = T.let('', ::String)
|
|
132
|
+
password = T.let('', ::String)
|
|
133
133
|
|
|
134
134
|
T.unsafe(scheme).fields.each do |scheme_field|
|
|
135
135
|
metadata = scheme_field.metadata[:security]
|
|
@@ -138,14 +138,14 @@ module Moov
|
|
|
138
138
|
field_name = metadata[:field_name]
|
|
139
139
|
value = scheme.send(scheme_field.name)
|
|
140
140
|
|
|
141
|
-
username = T.let(value, String) if field_name == 'username'
|
|
142
|
-
password = T.let(value, String) if field_name == 'password'
|
|
141
|
+
username = T.let(value, ::String) if field_name == 'username'
|
|
142
|
+
password = T.let(value, ::String) if field_name == 'password'
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
data = "#{username}:#{password}".encode
|
|
146
146
|
# Use strict_encode, because encode adds newlines after 60 chars
|
|
147
147
|
# https://docs.ruby-lang.org/en/3.0/Base64.html#method-i-encode64
|
|
148
|
-
req.headers['Authorization'] = "Basic #{Base64.strict_encode64(data)}"
|
|
148
|
+
req.headers['Authorization'] = "Basic #{::Base64.strict_encode64(data)}"
|
|
149
149
|
end
|
|
150
150
|
end
|
|
151
151
|
end
|
data/lib/moov/utils/url.rb
CHANGED
|
@@ -8,7 +8,7 @@ require 'sorbet-runtime'
|
|
|
8
8
|
|
|
9
9
|
module Moov
|
|
10
10
|
module Utils
|
|
11
|
-
sig { params(clazz: Object, server_url: String, path: String, path_params: Object, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(String) }
|
|
11
|
+
sig { params(clazz: ::Object, server_url: ::String, path: ::String, path_params: ::Object, gbls: T.nilable(T::Hash[::Symbol, T::Hash[::Symbol, T::Hash[::Symbol, ::Object]]])).returns(::String) }
|
|
12
12
|
def self.generate_url(clazz, server_url, path, path_params, gbls = nil)
|
|
13
13
|
T.unsafe(clazz).fields.each do |f|
|
|
14
14
|
param_metadata = f.metadata[:path_param]
|
|
@@ -27,13 +27,13 @@ module Moov
|
|
|
27
27
|
path = path.gsub("{#{k}}", v.join(', '))
|
|
28
28
|
end
|
|
29
29
|
else
|
|
30
|
-
if param.is_a? Array
|
|
30
|
+
if param.is_a? ::Array
|
|
31
31
|
pp_vals = []
|
|
32
32
|
param.each do |pp_val|
|
|
33
33
|
pp_vals.append(pp_val.to_s)
|
|
34
34
|
end
|
|
35
35
|
path = path.gsub("{#{param_metadata.fetch(:field_name, f.name)}}", pp_vals.join(','))
|
|
36
|
-
elsif param.is_a? Hash
|
|
36
|
+
elsif param.is_a? ::Hash
|
|
37
37
|
pp_vals = []
|
|
38
38
|
param.each do |pp_key, pp_val|
|
|
39
39
|
value = val_to_string(pp_val)
|
|
@@ -61,7 +61,7 @@ module Moov
|
|
|
61
61
|
|
|
62
62
|
if param_field_val.class.respond_to?(:enums)
|
|
63
63
|
param_field_val = param_field_val.serialize
|
|
64
|
-
elsif param_field_val.is_a? DateTime
|
|
64
|
+
elsif param_field_val.is_a? ::DateTime
|
|
65
65
|
param_field_val = param_field_val.strftime('%Y-%m-%dT%H:%M:%S.%NZ')
|
|
66
66
|
end
|
|
67
67
|
if !field.nil? && ::Crystalline::Utils.nilable?(field.type) && param_field_val.nil?
|
|
@@ -83,12 +83,12 @@ module Moov
|
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# Percent-encode characters that are invalid in URI path segments
|
|
86
|
-
sig { params(value: String).returns(String) }
|
|
86
|
+
sig { params(value: ::String).returns(::String) }
|
|
87
87
|
def self._encode_path_param(value)
|
|
88
88
|
value.gsub(/[<>{}\[\]|\\^`\s?#%]/) { |c| format('%%%02X', c.ord) }
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
-
sig { params(url_with_params: String, params: T::Hash[Symbol, T.any(String, T::Enum)]).returns(String) }
|
|
91
|
+
sig { params(url_with_params: ::String, params: T::Hash[::Symbol, T.any(::String, T::Enum)]).returns(::String) }
|
|
92
92
|
def self.template_url(url_with_params, params)
|
|
93
93
|
params.each do |key, value|
|
|
94
94
|
if value.class.respond_to? :enums
|