moov_ruby 25.5.20 → 25.5.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/images.rb +47 -47
- data/lib/moov/industries.rb +6 -6
- data/lib/moov/institutions.rb +12 -12
- 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/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/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/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/createpaymentlinkerror.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/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/linkapplepayerror.rb +1 -1
- data/lib/moov/models/errors/linkcarderror.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/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/updateissuedcarderror.rb +1 -1
- data/lib/moov/models/errors/updatepaymentlinkerror.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/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/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/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/createtransfer_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/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/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/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/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/gettransfer_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/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/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/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/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/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/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/updatetransfer_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/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/sweeps.rb +39 -39
- data/lib/moov/terminal_applications.rb +34 -34
- data/lib/moov/transfers.rb +98 -93
- data/lib/moov/underwriting.rb +15 -15
- 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/utils/utils.rb
CHANGED
|
@@ -11,14 +11,14 @@ require 'sorbet-runtime'
|
|
|
11
11
|
|
|
12
12
|
module Moov
|
|
13
13
|
module Utils
|
|
14
|
-
include Kernel
|
|
14
|
+
include ::Kernel
|
|
15
15
|
extend T::Sig
|
|
16
16
|
|
|
17
|
-
sig { params(val: Object).returns(String) }
|
|
17
|
+
sig { params(val: ::Object).returns(::String) }
|
|
18
18
|
def self.val_to_string(val)
|
|
19
19
|
if val.class.respond_to?(:enums)
|
|
20
20
|
T.unsafe(val).serialize.to_s
|
|
21
|
-
elsif val.is_a? DateTime
|
|
21
|
+
elsif val.is_a? ::DateTime
|
|
22
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
|
|
@@ -50,15 +50,15 @@ module Moov
|
|
|
50
50
|
'.yml' => 'application/yaml',
|
|
51
51
|
}.freeze
|
|
52
52
|
|
|
53
|
-
sig { params(filename: String).returns(String) }
|
|
53
|
+
sig { params(filename: ::String).returns(::String) }
|
|
54
54
|
def self.mime_type_for_filename(filename)
|
|
55
|
-
ext = File.extname(filename).downcase
|
|
55
|
+
ext = ::File.extname(filename).downcase
|
|
56
56
|
MIME_TYPES.fetch(ext, 'application/octet-stream')
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
sig do
|
|
60
|
-
params(metadata: T::Hash[Symbol, String], field_name: String, obj: Object)
|
|
61
|
-
.returns(T::Hash[Symbol, T::Array[String]])
|
|
60
|
+
params(metadata: T::Hash[::Symbol, ::String], field_name: ::String, obj: ::Object)
|
|
61
|
+
.returns(T::Hash[::Symbol, T::Array[::String]])
|
|
62
62
|
end
|
|
63
63
|
def self._get_serialized_params(metadata, field_name, obj)
|
|
64
64
|
params = {}
|
|
@@ -70,7 +70,7 @@ module Moov
|
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
sig { params(status: Integer).returns(T::Boolean) }
|
|
73
|
+
sig { params(status: ::Integer).returns(T::Boolean) }
|
|
74
74
|
def self.error_status?(status)
|
|
75
75
|
status_major = status / 100
|
|
76
76
|
return true if status_major == 4
|
|
@@ -79,7 +79,7 @@ module Moov
|
|
|
79
79
|
false
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
sig { params(content_type: String, pattern: String).returns(T::Boolean) }
|
|
82
|
+
sig { params(content_type: ::String, pattern: ::String).returns(T::Boolean) }
|
|
83
83
|
def self.match_content_type(content_type, pattern)
|
|
84
84
|
return true if ['*', '*/*'].include?(pattern)
|
|
85
85
|
|
|
@@ -95,7 +95,7 @@ module Moov
|
|
|
95
95
|
false
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
sig { params(status_code: Integer, status_codes: T::Array[String]).returns(T::Boolean) }
|
|
98
|
+
sig { params(status_code: ::Integer, status_codes: T::Array[::String]).returns(T::Boolean) }
|
|
99
99
|
def self.match_status_code(status_code, status_codes)
|
|
100
100
|
return true if status_codes.include? 'default'
|
|
101
101
|
status_code = status_code.to_s
|
|
@@ -106,30 +106,30 @@ module Moov
|
|
|
106
106
|
false
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
sig { params(optional: T::Boolean).returns(T.proc.params(s: String).returns(T.nilable(DateTime))) }
|
|
109
|
+
sig { params(optional: T::Boolean).returns(T.proc.params(s: ::String).returns(T.nilable(::DateTime))) }
|
|
110
110
|
def self.datetime_from_iso_format(optional)
|
|
111
|
-
Kernel.lambda do |s|
|
|
111
|
+
::Kernel.lambda do |s|
|
|
112
112
|
return nil if optional && s.nil?
|
|
113
113
|
|
|
114
|
-
return DateTime.strptime(s, '%Y-%m-%dT%H:%M:%S.%NZ')
|
|
114
|
+
return ::DateTime.strptime(s, '%Y-%m-%dT%H:%M:%S.%NZ')
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
sig { params(optional: T::Boolean).returns(T.proc.params(s: String).returns(T.nilable(Date))) }
|
|
118
|
+
sig { params(optional: T::Boolean).returns(T.proc.params(s: ::String).returns(T.nilable(::Date))) }
|
|
119
119
|
def self.date_from_iso_format(optional)
|
|
120
|
-
Kernel.lambda do |s|
|
|
120
|
+
::Kernel.lambda do |s|
|
|
121
121
|
return nil if optional && s.nil?
|
|
122
122
|
|
|
123
|
-
return Date.iso8601(s)
|
|
123
|
+
return ::Date.iso8601(s)
|
|
124
124
|
end
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
sig do
|
|
128
128
|
params(enum_type: T.class_of(T::Enum), optional: T::Boolean)
|
|
129
|
-
.returns(T.nilable(T.proc.params(s: String).returns(T.nilable(T::Enum))))
|
|
129
|
+
.returns(T.nilable(T.proc.params(s: ::String).returns(T.nilable(T::Enum))))
|
|
130
130
|
end
|
|
131
131
|
def self.enum_from_string(enum_type, optional)
|
|
132
|
-
Kernel.lambda do |s|
|
|
132
|
+
::Kernel.lambda do |s|
|
|
133
133
|
return nil if optional && s.nil?
|
|
134
134
|
|
|
135
135
|
return enum_type.deserialize(s)
|
|
@@ -137,24 +137,24 @@ module Moov
|
|
|
137
137
|
end
|
|
138
138
|
|
|
139
139
|
sig do
|
|
140
|
-
params(enum_type: Module, optional: T::Boolean)
|
|
141
|
-
.returns(T.proc.params(s: String).returns(T.untyped))
|
|
140
|
+
params(enum_type: ::Module, optional: T::Boolean)
|
|
141
|
+
.returns(T.proc.params(s: ::String).returns(T.untyped))
|
|
142
142
|
end
|
|
143
143
|
def self.open_enum_from_string(enum_type, optional)
|
|
144
|
-
Kernel.lambda do |s|
|
|
144
|
+
::Kernel.lambda do |s|
|
|
145
145
|
return nil if optional && s.nil?
|
|
146
146
|
|
|
147
147
|
return T.unsafe(enum_type).deserialize(s)
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
-
sig { params(name: String).returns(T.proc.returns(String)) }
|
|
151
|
+
sig { params(name: ::String).returns(T.proc.returns(::String)) }
|
|
152
152
|
def self.field_name(name)
|
|
153
|
-
T.let(proc { name }, T.proc.returns(String))
|
|
153
|
+
T.let(proc { name }, T.proc.returns(::String))
|
|
154
154
|
end
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
sig { params(field: ::Crystalline::MetadataFields::Field, data_class: Object).returns(Object) }
|
|
157
|
+
sig { params(field: ::Crystalline::MetadataFields::Field, data_class: ::Object).returns(::Object) }
|
|
158
158
|
def self.parse_field(field, data_class)
|
|
159
159
|
field_metadata = field.metadata[:metadata_string]
|
|
160
160
|
return nil if field_metadata.nil?
|
|
@@ -166,8 +166,8 @@ module Moov
|
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
sig do
|
|
169
|
-
params(form: T::Array[T::Array[T.any(String, T::Array[T.nilable(String)])]])
|
|
170
|
-
.returns(T::Hash[Symbol, Object])
|
|
169
|
+
params(form: T::Array[T::Array[T.any(::String, T::Array[T.nilable(::String)])]])
|
|
170
|
+
.returns(T::Hash[::Symbol, ::Object])
|
|
171
171
|
end
|
|
172
172
|
def self.encode_form(form)
|
|
173
173
|
payload = {}
|
|
@@ -178,7 +178,7 @@ module Moov
|
|
|
178
178
|
# Handle multiple values for the same field name (arrays)
|
|
179
179
|
if payload.key?(field_name)
|
|
180
180
|
# Convert to array if not already
|
|
181
|
-
unless payload[field_name].is_a?(Array)
|
|
181
|
+
unless payload[field_name].is_a?(::Array)
|
|
182
182
|
payload[field_name] = [payload[field_name]]
|
|
183
183
|
end
|
|
184
184
|
payload[field_name] << field[1]
|
|
@@ -188,14 +188,14 @@ module Moov
|
|
|
188
188
|
else
|
|
189
189
|
# Handle file uploads
|
|
190
190
|
file_part = Faraday::Multipart::FilePart.new(
|
|
191
|
-
StringIO.new(T.must(field[1])),
|
|
191
|
+
::StringIO.new(T.must(field[1])),
|
|
192
192
|
mime_type_for_filename(T.must(field[0])),
|
|
193
193
|
field[0]
|
|
194
194
|
)
|
|
195
195
|
|
|
196
196
|
# Handle multiple files for the same field name (arrays)
|
|
197
197
|
if payload.key?(field_name)
|
|
198
|
-
unless payload[field_name].is_a?(Array)
|
|
198
|
+
unless payload[field_name].is_a?(::Array)
|
|
199
199
|
payload[field_name] = [payload[field_name]]
|
|
200
200
|
end
|
|
201
201
|
payload[field_name] << file_part
|
|
@@ -208,7 +208,7 @@ module Moov
|
|
|
208
208
|
|
|
209
209
|
# Handle multiple values for the same field name (arrays)
|
|
210
210
|
if payload.key?(field_name)
|
|
211
|
-
unless payload[field_name].is_a?(Array)
|
|
211
|
+
unless payload[field_name].is_a?(::Array)
|
|
212
212
|
payload[field_name] = [payload[field_name]]
|
|
213
213
|
end
|
|
214
214
|
payload[field_name] << param_part
|
|
@@ -220,7 +220,7 @@ module Moov
|
|
|
220
220
|
payload
|
|
221
221
|
end
|
|
222
222
|
|
|
223
|
-
sig { params(param_name: Symbol, value: Object, param_type: String, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(Object) }
|
|
223
|
+
sig { params(param_name: ::Symbol, value: ::Object, param_type: ::String, gbls: T.nilable(T::Hash[::Symbol, T::Hash[::Symbol, T::Hash[::Symbol, ::Object]]])).returns(::Object) }
|
|
224
224
|
def self._populate_from_globals(param_name, value, param_type, gbls)
|
|
225
225
|
if value.nil? && !gbls.nil?
|
|
226
226
|
global_value = gbls.dig(:parameters, param_type.to_sym, param_name.to_sym)
|
|
@@ -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(request: Models::Operations::ListWalletTransactionsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListWalletTransactionsResponse) }
|
|
44
|
+
sig { params(request: Models::Operations::ListWalletTransactionsRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::ListWalletTransactionsResponse) }
|
|
45
45
|
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# list - List all the transactions associated with a particular Moov wallet.
|
|
47
47
|
#
|
|
@@ -58,7 +58,7 @@ module Moov
|
|
|
58
58
|
request
|
|
59
59
|
)
|
|
60
60
|
headers = {}
|
|
61
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
61
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
62
62
|
query_params = Utils.get_query_params(Models::Operations::ListWalletTransactionsRequest, request, nil)
|
|
63
63
|
headers['Accept'] = 'application/json'
|
|
64
64
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
@@ -79,7 +79,7 @@ module Moov
|
|
|
79
79
|
security_source: @sdk_configuration.security_source
|
|
80
80
|
)
|
|
81
81
|
|
|
82
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
82
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
83
83
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
84
84
|
|
|
85
85
|
|
|
@@ -100,7 +100,7 @@ module Moov
|
|
|
100
100
|
request: req
|
|
101
101
|
)
|
|
102
102
|
end
|
|
103
|
-
rescue StandardError => e
|
|
103
|
+
rescue ::StandardError => e
|
|
104
104
|
error = e
|
|
105
105
|
ensure
|
|
106
106
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -136,7 +136,7 @@ module Moov
|
|
|
136
136
|
response: http_response
|
|
137
137
|
)
|
|
138
138
|
response_data = http_response.env.response_body
|
|
139
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::WalletTransaction))
|
|
139
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Array.new(Models::Components::WalletTransaction))
|
|
140
140
|
response = Models::Operations::ListWalletTransactionsResponse.new(
|
|
141
141
|
status_code: http_response.status,
|
|
142
142
|
content_type: content_type,
|
|
@@ -158,7 +158,7 @@ module Moov
|
|
|
158
158
|
response: http_response
|
|
159
159
|
)
|
|
160
160
|
response_data = http_response.env.response_body
|
|
161
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ListWalletTransactionsValidationError)
|
|
161
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ListWalletTransactionsValidationError)
|
|
162
162
|
obj.raw_response = http_response
|
|
163
163
|
raise obj
|
|
164
164
|
else
|
|
@@ -179,7 +179,7 @@ module Moov
|
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
sig { params(account_id: ::String, wallet_id: ::String, transaction_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetWalletTransactionResponse) }
|
|
182
|
+
sig { params(account_id: ::String, wallet_id: ::String, transaction_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::GetWalletTransactionResponse) }
|
|
183
183
|
def get(account_id:, wallet_id:, transaction_id:, timeout_ms: nil, http_headers: nil)
|
|
184
184
|
# get - Get details on a specific wallet transaction.
|
|
185
185
|
#
|
|
@@ -201,7 +201,7 @@ module Moov
|
|
|
201
201
|
request
|
|
202
202
|
)
|
|
203
203
|
headers = {}
|
|
204
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
204
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
205
205
|
headers['Accept'] = 'application/json'
|
|
206
206
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
207
207
|
|
|
@@ -221,7 +221,7 @@ module Moov
|
|
|
221
221
|
security_source: @sdk_configuration.security_source
|
|
222
222
|
)
|
|
223
223
|
|
|
224
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
224
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
225
225
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
226
226
|
|
|
227
227
|
|
|
@@ -241,7 +241,7 @@ module Moov
|
|
|
241
241
|
request: req
|
|
242
242
|
)
|
|
243
243
|
end
|
|
244
|
-
rescue StandardError => e
|
|
244
|
+
rescue ::StandardError => e
|
|
245
245
|
error = e
|
|
246
246
|
ensure
|
|
247
247
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -277,7 +277,7 @@ module Moov
|
|
|
277
277
|
response: http_response
|
|
278
278
|
)
|
|
279
279
|
response_data = http_response.env.response_body
|
|
280
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::WalletTransaction)
|
|
280
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::WalletTransaction)
|
|
281
281
|
response = Models::Operations::GetWalletTransactionResponse.new(
|
|
282
282
|
status_code: http_response.status,
|
|
283
283
|
content_type: content_type,
|
data/lib/moov/wallets.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(create_wallet: Models::Components::CreateWallet, account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::CreateWalletResponse) }
|
|
44
|
+
sig { params(create_wallet: Models::Components::CreateWallet, account_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::CreateWalletResponse) }
|
|
45
45
|
def create(create_wallet:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
46
46
|
# create - Create a new wallet for an account. You can specify optional attributes such as a display name and description to specify the intended use of the wallet. This will generate a new moov-wallet payment method.
|
|
47
47
|
#
|
|
@@ -62,15 +62,15 @@ module Moov
|
|
|
62
62
|
request
|
|
63
63
|
)
|
|
64
64
|
headers = {}
|
|
65
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
65
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
66
66
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :create_wallet, :json)
|
|
67
67
|
headers['content-type'] = req_content_type
|
|
68
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
68
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
69
69
|
|
|
70
70
|
if form && !form.empty?
|
|
71
71
|
body = Utils.encode_form(form)
|
|
72
72
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
73
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
73
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
74
74
|
else
|
|
75
75
|
body = data
|
|
76
76
|
end
|
|
@@ -93,7 +93,7 @@ module Moov
|
|
|
93
93
|
security_source: @sdk_configuration.security_source
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
96
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
97
97
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
98
98
|
|
|
99
99
|
|
|
@@ -114,7 +114,7 @@ module Moov
|
|
|
114
114
|
request: req
|
|
115
115
|
)
|
|
116
116
|
end
|
|
117
|
-
rescue StandardError => e
|
|
117
|
+
rescue ::StandardError => e
|
|
118
118
|
error = e
|
|
119
119
|
ensure
|
|
120
120
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -150,7 +150,7 @@ module Moov
|
|
|
150
150
|
response: http_response
|
|
151
151
|
)
|
|
152
152
|
response_data = http_response.env.response_body
|
|
153
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Wallet)
|
|
153
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Wallet)
|
|
154
154
|
response = Models::Operations::CreateWalletResponse.new(
|
|
155
155
|
status_code: http_response.status,
|
|
156
156
|
content_type: content_type,
|
|
@@ -172,7 +172,7 @@ module Moov
|
|
|
172
172
|
response: http_response
|
|
173
173
|
)
|
|
174
174
|
response_data = http_response.env.response_body
|
|
175
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
175
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::GenericError)
|
|
176
176
|
obj.raw_response = http_response
|
|
177
177
|
raise obj
|
|
178
178
|
else
|
|
@@ -187,7 +187,7 @@ module Moov
|
|
|
187
187
|
response: http_response
|
|
188
188
|
)
|
|
189
189
|
response_data = http_response.env.response_body
|
|
190
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::CreateWalletValidationError)
|
|
190
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::CreateWalletValidationError)
|
|
191
191
|
obj.raw_response = http_response
|
|
192
192
|
raise obj
|
|
193
193
|
else
|
|
@@ -208,7 +208,7 @@ module Moov
|
|
|
208
208
|
end
|
|
209
209
|
|
|
210
210
|
|
|
211
|
-
sig { params(request: Models::Operations::ListWalletsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::ListWalletsResponse) }
|
|
211
|
+
sig { params(request: Models::Operations::ListWalletsRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::ListWalletsResponse) }
|
|
212
212
|
def list(request:, timeout_ms: nil, http_headers: nil)
|
|
213
213
|
# list - List the wallets associated with a Moov account.
|
|
214
214
|
#
|
|
@@ -225,7 +225,7 @@ module Moov
|
|
|
225
225
|
request
|
|
226
226
|
)
|
|
227
227
|
headers = {}
|
|
228
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
228
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
229
229
|
query_params = Utils.get_query_params(Models::Operations::ListWalletsRequest, request, nil)
|
|
230
230
|
headers['Accept'] = 'application/json'
|
|
231
231
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
@@ -246,7 +246,7 @@ module Moov
|
|
|
246
246
|
security_source: @sdk_configuration.security_source
|
|
247
247
|
)
|
|
248
248
|
|
|
249
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
249
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
250
250
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
251
251
|
|
|
252
252
|
|
|
@@ -267,7 +267,7 @@ module Moov
|
|
|
267
267
|
request: req
|
|
268
268
|
)
|
|
269
269
|
end
|
|
270
|
-
rescue StandardError => e
|
|
270
|
+
rescue ::StandardError => e
|
|
271
271
|
error = e
|
|
272
272
|
ensure
|
|
273
273
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -303,7 +303,7 @@ module Moov
|
|
|
303
303
|
response: http_response
|
|
304
304
|
)
|
|
305
305
|
response_data = http_response.env.response_body
|
|
306
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Components::Wallet))
|
|
306
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Array.new(Models::Components::Wallet))
|
|
307
307
|
response = Models::Operations::ListWalletsResponse.new(
|
|
308
308
|
status_code: http_response.status,
|
|
309
309
|
content_type: content_type,
|
|
@@ -325,7 +325,7 @@ module Moov
|
|
|
325
325
|
response: http_response
|
|
326
326
|
)
|
|
327
327
|
response_data = http_response.env.response_body
|
|
328
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ListWalletsValidationError)
|
|
328
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ListWalletsValidationError)
|
|
329
329
|
obj.raw_response = http_response
|
|
330
330
|
raise obj
|
|
331
331
|
else
|
|
@@ -346,7 +346,7 @@ module Moov
|
|
|
346
346
|
end
|
|
347
347
|
|
|
348
348
|
|
|
349
|
-
sig { params(account_id: ::String, wallet_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::GetWalletResponse) }
|
|
349
|
+
sig { params(account_id: ::String, wallet_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::GetWalletResponse) }
|
|
350
350
|
def get(account_id:, wallet_id:, timeout_ms: nil, http_headers: nil)
|
|
351
351
|
# get - Get information on a specific wallet (e.g., the available balance).
|
|
352
352
|
#
|
|
@@ -367,7 +367,7 @@ module Moov
|
|
|
367
367
|
request
|
|
368
368
|
)
|
|
369
369
|
headers = {}
|
|
370
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
370
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
371
371
|
headers['Accept'] = 'application/json'
|
|
372
372
|
headers['user-agent'] = @sdk_configuration.user_agent
|
|
373
373
|
|
|
@@ -387,7 +387,7 @@ module Moov
|
|
|
387
387
|
security_source: @sdk_configuration.security_source
|
|
388
388
|
)
|
|
389
389
|
|
|
390
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
390
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
391
391
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
392
392
|
|
|
393
393
|
|
|
@@ -407,7 +407,7 @@ module Moov
|
|
|
407
407
|
request: req
|
|
408
408
|
)
|
|
409
409
|
end
|
|
410
|
-
rescue StandardError => e
|
|
410
|
+
rescue ::StandardError => e
|
|
411
411
|
error = e
|
|
412
412
|
ensure
|
|
413
413
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -443,7 +443,7 @@ module Moov
|
|
|
443
443
|
response: http_response
|
|
444
444
|
)
|
|
445
445
|
response_data = http_response.env.response_body
|
|
446
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Wallet)
|
|
446
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Wallet)
|
|
447
447
|
response = Models::Operations::GetWalletResponse.new(
|
|
448
448
|
status_code: http_response.status,
|
|
449
449
|
content_type: content_type,
|
|
@@ -471,7 +471,7 @@ module Moov
|
|
|
471
471
|
end
|
|
472
472
|
|
|
473
473
|
|
|
474
|
-
sig { params(patch_wallet: Models::Components::PatchWallet, wallet_id: ::String, account_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::UpdateWalletResponse) }
|
|
474
|
+
sig { params(patch_wallet: Models::Components::PatchWallet, wallet_id: ::String, account_id: ::String, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Operations::UpdateWalletResponse) }
|
|
475
475
|
def update(patch_wallet:, wallet_id:, account_id:, timeout_ms: nil, http_headers: nil)
|
|
476
476
|
# update - Update properties of an existing wallet such as name, description, status, or metadata.
|
|
477
477
|
#
|
|
@@ -493,15 +493,15 @@ module Moov
|
|
|
493
493
|
request
|
|
494
494
|
)
|
|
495
495
|
headers = {}
|
|
496
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
496
|
+
headers = T.cast(headers, T::Hash[::String, ::String])
|
|
497
497
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :patch_wallet, :json)
|
|
498
498
|
headers['content-type'] = req_content_type
|
|
499
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
499
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
500
500
|
|
|
501
501
|
if form && !form.empty?
|
|
502
502
|
body = Utils.encode_form(form)
|
|
503
503
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
504
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
504
|
+
body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
|
|
505
505
|
else
|
|
506
506
|
body = data
|
|
507
507
|
end
|
|
@@ -524,7 +524,7 @@ module Moov
|
|
|
524
524
|
security_source: @sdk_configuration.security_source
|
|
525
525
|
)
|
|
526
526
|
|
|
527
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
527
|
+
error = T.let(nil, T.nilable(::StandardError))
|
|
528
528
|
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
529
529
|
|
|
530
530
|
|
|
@@ -545,7 +545,7 @@ module Moov
|
|
|
545
545
|
request: req
|
|
546
546
|
)
|
|
547
547
|
end
|
|
548
|
-
rescue StandardError => e
|
|
548
|
+
rescue ::StandardError => e
|
|
549
549
|
error = e
|
|
550
550
|
ensure
|
|
551
551
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -581,7 +581,7 @@ module Moov
|
|
|
581
581
|
response: http_response
|
|
582
582
|
)
|
|
583
583
|
response_data = http_response.env.response_body
|
|
584
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Wallet)
|
|
584
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Wallet)
|
|
585
585
|
response = Models::Operations::UpdateWalletResponse.new(
|
|
586
586
|
status_code: http_response.status,
|
|
587
587
|
content_type: content_type,
|
|
@@ -603,7 +603,7 @@ module Moov
|
|
|
603
603
|
response: http_response
|
|
604
604
|
)
|
|
605
605
|
response_data = http_response.env.response_body
|
|
606
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::GenericError)
|
|
606
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::GenericError)
|
|
607
607
|
obj.raw_response = http_response
|
|
608
608
|
raise obj
|
|
609
609
|
else
|
|
@@ -618,7 +618,7 @@ module Moov
|
|
|
618
618
|
response: http_response
|
|
619
619
|
)
|
|
620
620
|
response_data = http_response.env.response_body
|
|
621
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PatchWalletValidationError)
|
|
621
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::PatchWalletValidationError)
|
|
622
622
|
obj.raw_response = http_response
|
|
623
623
|
raise obj
|
|
624
624
|
else
|