moovio_sdk 0.3.8__py3-none-any.whl
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.
- moovio_sdk/__init__.py +17 -0
- moovio_sdk/_hooks/__init__.py +5 -0
- moovio_sdk/_hooks/registration.py +13 -0
- moovio_sdk/_hooks/sdkhooks.py +76 -0
- moovio_sdk/_hooks/types.py +106 -0
- moovio_sdk/_version.py +15 -0
- moovio_sdk/accounts.py +2461 -0
- moovio_sdk/adjustments.py +463 -0
- moovio_sdk/apple_pay.py +1417 -0
- moovio_sdk/authentication.py +531 -0
- moovio_sdk/avatars.py +231 -0
- moovio_sdk/bank_accounts.py +2445 -0
- moovio_sdk/basesdk.py +363 -0
- moovio_sdk/branding.py +1089 -0
- moovio_sdk/capabilities.py +1001 -0
- moovio_sdk/card_issuing.py +1351 -0
- moovio_sdk/cards.py +1469 -0
- moovio_sdk/disputes.py +2985 -0
- moovio_sdk/end_to_end_encryption.py +453 -0
- moovio_sdk/enriched_address.py +307 -0
- moovio_sdk/enriched_profile.py +235 -0
- moovio_sdk/fee_plans.py +1759 -0
- moovio_sdk/files.py +775 -0
- moovio_sdk/httpclient.py +136 -0
- moovio_sdk/industries.py +239 -0
- moovio_sdk/institutions.py +261 -0
- moovio_sdk/issuing_transactions.py +1228 -0
- moovio_sdk/models/__init__.py +4 -0
- moovio_sdk/models/components/__init__.py +1411 -0
- moovio_sdk/models/components/account.py +96 -0
- moovio_sdk/models/components/accountcapability.py +20 -0
- moovio_sdk/models/components/accountcountries.py +18 -0
- moovio_sdk/models/components/accountnameverification.py +28 -0
- moovio_sdk/models/components/accounttype.py +11 -0
- moovio_sdk/models/components/accountverificationstatus.py +19 -0
- moovio_sdk/models/components/achcreditsamedaypaymentmethod.py +38 -0
- moovio_sdk/models/components/achcreditstandardpaymentmethod.py +38 -0
- moovio_sdk/models/components/achdebitcollectpaymentmethod.py +38 -0
- moovio_sdk/models/components/achdebitfundpaymentmethod.py +38 -0
- moovio_sdk/models/components/achexception.py +20 -0
- moovio_sdk/models/components/achlocation.py +26 -0
- moovio_sdk/models/components/achparticipant.py +93 -0
- moovio_sdk/models/components/achpaymentdetails.py +30 -0
- moovio_sdk/models/components/achpaymentdetailserror.py +22 -0
- moovio_sdk/models/components/achpaymentsettings.py +16 -0
- moovio_sdk/models/components/achreturncode.py +51 -0
- moovio_sdk/models/components/achtransactiondetails.py +94 -0
- moovio_sdk/models/components/achtransactionstatus.py +15 -0
- moovio_sdk/models/components/addcapabilities.py +15 -0
- moovio_sdk/models/components/address.py +30 -0
- moovio_sdk/models/components/addresserror.py +32 -0
- moovio_sdk/models/components/addresssuggestion.py +34 -0
- moovio_sdk/models/components/addressupdate.py +32 -0
- moovio_sdk/models/components/adjustment.py +29 -0
- moovio_sdk/models/components/amount.py +26 -0
- moovio_sdk/models/components/amountdecimal.py +27 -0
- moovio_sdk/models/components/amountupdate.py +27 -0
- moovio_sdk/models/components/amountvalidationerror.py +17 -0
- moovio_sdk/models/components/applebillingcontact.py +53 -0
- moovio_sdk/models/components/applepayheader.py +41 -0
- moovio_sdk/models/components/applepaymerchantdomains.py +32 -0
- moovio_sdk/models/components/applepaypaymentmethod.py +33 -0
- moovio_sdk/models/components/applepayresponse.py +70 -0
- moovio_sdk/models/components/applicationscope.py +41 -0
- moovio_sdk/models/components/asynccreatedrefund.py +26 -0
- moovio_sdk/models/components/asynctransfer.py +18 -0
- moovio_sdk/models/components/authorizeduser.py +21 -0
- moovio_sdk/models/components/authtoken.py +36 -0
- moovio_sdk/models/components/authtokenrequest.py +46 -0
- moovio_sdk/models/components/bankaccount.py +98 -0
- moovio_sdk/models/components/bankaccountexception.py +96 -0
- moovio_sdk/models/components/bankaccountholdertype.py +11 -0
- moovio_sdk/models/components/bankaccountintegration.py +34 -0
- moovio_sdk/models/components/bankaccountpayload.py +21 -0
- moovio_sdk/models/components/bankaccountstatus.py +12 -0
- moovio_sdk/models/components/bankaccountstatusreason.py +23 -0
- moovio_sdk/models/components/bankaccounttype.py +13 -0
- moovio_sdk/models/components/bankaccountverification.py +30 -0
- moovio_sdk/models/components/bankaccountverificationcreated.py +21 -0
- moovio_sdk/models/components/bankaccountverificationmethod.py +9 -0
- moovio_sdk/models/components/bankaccountverificationstatus.py +13 -0
- moovio_sdk/models/components/bankaccountwaitfor.py +9 -0
- moovio_sdk/models/components/basicpaymentmethod.py +24 -0
- moovio_sdk/models/components/billablefee.py +54 -0
- moovio_sdk/models/components/birthdate.py +19 -0
- moovio_sdk/models/components/birthdateerror.py +20 -0
- moovio_sdk/models/components/birthdateupdate.py +20 -0
- moovio_sdk/models/components/birthdatevalidationerror.py +20 -0
- moovio_sdk/models/components/brandcolor.py +15 -0
- moovio_sdk/models/components/brandcolors.py +21 -0
- moovio_sdk/models/components/brandcolorvalidationerror.py +14 -0
- moovio_sdk/models/components/brandproperties.py +16 -0
- moovio_sdk/models/components/businessprofile.py +81 -0
- moovio_sdk/models/components/businesstype.py +19 -0
- moovio_sdk/models/components/calltoaction.py +19 -0
- moovio_sdk/models/components/cancellation.py +22 -0
- moovio_sdk/models/components/cancellationstatus.py +10 -0
- moovio_sdk/models/components/capabilitieserror.py +14 -0
- moovio_sdk/models/components/capability.py +56 -0
- moovio_sdk/models/components/capabilityid.py +18 -0
- moovio_sdk/models/components/capabilityrequirement.py +26 -0
- moovio_sdk/models/components/capabilitystatus.py +13 -0
- moovio_sdk/models/components/card.py +164 -0
- moovio_sdk/models/components/cardaccountupdater.py +28 -0
- moovio_sdk/models/components/cardacquiringdispute.py +26 -0
- moovio_sdk/models/components/cardacquiringmodel.py +11 -0
- moovio_sdk/models/components/cardacquiringrefund.py +42 -0
- moovio_sdk/models/components/cardaddress.py +32 -0
- moovio_sdk/models/components/cardbrand.py +14 -0
- moovio_sdk/models/components/cardexpiration.py +20 -0
- moovio_sdk/models/components/cardexpirationerror.py +17 -0
- moovio_sdk/models/components/cardissuingnetwork.py +12 -0
- moovio_sdk/models/components/cardpaymentdetails.py +23 -0
- moovio_sdk/models/components/cardpaymentdetailserror.py +17 -0
- moovio_sdk/models/components/cardpaymentpaymentmethod.py +33 -0
- moovio_sdk/models/components/cardpaymentsettings.py +23 -0
- moovio_sdk/models/components/cardtransactiondetails.py +94 -0
- moovio_sdk/models/components/cardtransactionfailurecode.py +32 -0
- moovio_sdk/models/components/cardtransactionstatus.py +15 -0
- moovio_sdk/models/components/cardtype.py +13 -0
- moovio_sdk/models/components/cardupdatereason.py +16 -0
- moovio_sdk/models/components/cardverification.py +38 -0
- moovio_sdk/models/components/cardverificationresult.py +12 -0
- moovio_sdk/models/components/cardvolumedistribution.py +29 -0
- moovio_sdk/models/components/cardvolumedistributionerror.py +32 -0
- moovio_sdk/models/components/collectionpaymentmethodtype.py +12 -0
- moovio_sdk/models/components/colorsvalidationerror.py +21 -0
- moovio_sdk/models/components/completebankaccountverification.py +15 -0
- moovio_sdk/models/components/completedmicrodeposits.py +14 -0
- moovio_sdk/models/components/completemicrodeposits.py +20 -0
- moovio_sdk/models/components/countrieserrors.py +14 -0
- moovio_sdk/models/components/createaccount.py +78 -0
- moovio_sdk/models/components/createaccounterror.py +44 -0
- moovio_sdk/models/components/createaccountsettings.py +40 -0
- moovio_sdk/models/components/createapplepaysession.py +21 -0
- moovio_sdk/models/components/createauthorizeduser.py +26 -0
- moovio_sdk/models/components/createauthorizedusererror.py +24 -0
- moovio_sdk/models/components/createauthorizeduserupdate.py +28 -0
- moovio_sdk/models/components/createbusinesserror.py +88 -0
- moovio_sdk/models/components/createbusinessprofile.py +69 -0
- moovio_sdk/models/components/createevidencefilemultipart.py +63 -0
- moovio_sdk/models/components/createevidencetext.py +20 -0
- moovio_sdk/models/components/createfeeplanagreement.py +14 -0
- moovio_sdk/models/components/createindividualerror.py +72 -0
- moovio_sdk/models/components/createindividualprofile.py +37 -0
- moovio_sdk/models/components/createpaymentlink.py +95 -0
- moovio_sdk/models/components/createprofile.py +22 -0
- moovio_sdk/models/components/createprofileerror.py +19 -0
- moovio_sdk/models/components/createrefund.py +26 -0
- moovio_sdk/models/components/createrefundresponse.py +18 -0
- moovio_sdk/models/components/createrepresentative.py +50 -0
- moovio_sdk/models/components/createreversal.py +15 -0
- moovio_sdk/models/components/createsweepconfig.py +41 -0
- moovio_sdk/models/components/createterminalapplication.py +42 -0
- moovio_sdk/models/components/createtransfer.py +49 -0
- moovio_sdk/models/components/createtransferdestination.py +37 -0
- moovio_sdk/models/components/createtransferdestinationach.py +26 -0
- moovio_sdk/models/components/createtransferdestinationcard.py +19 -0
- moovio_sdk/models/components/createtransferoptions.py +24 -0
- moovio_sdk/models/components/createtransfersource.py +48 -0
- moovio_sdk/models/components/createtransfersourceach.py +40 -0
- moovio_sdk/models/components/createtransfersourcecard.py +35 -0
- moovio_sdk/models/components/customersupport.py +33 -0
- moovio_sdk/models/components/customersupporterror.py +25 -0
- moovio_sdk/models/components/debitholdperiod.py +12 -0
- moovio_sdk/models/components/disbursementpaymentmethodtype.py +13 -0
- moovio_sdk/models/components/displayoptionserror.py +23 -0
- moovio_sdk/models/components/dispute.py +76 -0
- moovio_sdk/models/components/disputeevidenceresponse.py +49 -0
- moovio_sdk/models/components/disputephase.py +13 -0
- moovio_sdk/models/components/disputestatus.py +20 -0
- moovio_sdk/models/components/disputetransferdetails.py +16 -0
- moovio_sdk/models/components/document.py +37 -0
- moovio_sdk/models/components/documenttype.py +13 -0
- moovio_sdk/models/components/domesticpullfromcard.py +12 -0
- moovio_sdk/models/components/domesticpushtocard.py +13 -0
- moovio_sdk/models/components/e2eetoken.py +25 -0
- moovio_sdk/models/components/e2eetokenupdate.py +26 -0
- moovio_sdk/models/components/end2endencryptionerror.py +14 -0
- moovio_sdk/models/components/enrichedaddressresponse.py +15 -0
- moovio_sdk/models/components/enrichedbusinessprofile.py +37 -0
- moovio_sdk/models/components/enrichedbusinessresponse.py +18 -0
- moovio_sdk/models/components/enrichedindustries.py +15 -0
- moovio_sdk/models/components/enrichedindustry.py +32 -0
- moovio_sdk/models/components/enrichedindustrycodes.py +17 -0
- moovio_sdk/models/components/evidencetextresponse.py +28 -0
- moovio_sdk/models/components/evidencetype.py +15 -0
- moovio_sdk/models/components/evidenceuploadresponse.py +50 -0
- moovio_sdk/models/components/facilitatorfee.py +48 -0
- moovio_sdk/models/components/feecategory.py +16 -0
- moovio_sdk/models/components/feemodel.py +12 -0
- moovio_sdk/models/components/feeplan.py +43 -0
- moovio_sdk/models/components/feeplanagreement.py +51 -0
- moovio_sdk/models/components/feeplanagreementstatus.py +9 -0
- moovio_sdk/models/components/feeproperties.py +49 -0
- moovio_sdk/models/components/filedetails.py +55 -0
- moovio_sdk/models/components/filepurpose.py +15 -0
- moovio_sdk/models/components/filestatus.py +12 -0
- moovio_sdk/models/components/fileuploadrequestmultipart.py +69 -0
- moovio_sdk/models/components/financialinstitutions.py +18 -0
- moovio_sdk/models/components/fulfillmentdetails.py +24 -0
- moovio_sdk/models/components/fulfillmentdetailserror.py +20 -0
- moovio_sdk/models/components/fullissuedcard.py +92 -0
- moovio_sdk/models/components/generatedby.py +39 -0
- moovio_sdk/models/components/generatedbyaccountid.py +15 -0
- moovio_sdk/models/components/generatedbybankaccountid.py +17 -0
- moovio_sdk/models/components/generatedbycardid.py +15 -0
- moovio_sdk/models/components/generatedbydisputeid.py +15 -0
- moovio_sdk/models/components/generatedbytransferid.py +15 -0
- moovio_sdk/models/components/governmentid.py +40 -0
- moovio_sdk/models/components/governmentiderror.py +40 -0
- moovio_sdk/models/components/granttype.py +15 -0
- moovio_sdk/models/components/incurredfee.py +44 -0
- moovio_sdk/models/components/individualname.py +32 -0
- moovio_sdk/models/components/individualnameerror.py +24 -0
- moovio_sdk/models/components/individualnameupdate.py +32 -0
- moovio_sdk/models/components/individualprofile.py +45 -0
- moovio_sdk/models/components/industrycodes.py +20 -0
- moovio_sdk/models/components/issuedcard.py +78 -0
- moovio_sdk/models/components/issuedcardauthorization.py +53 -0
- moovio_sdk/models/components/issuedcardauthorizationevent.py +37 -0
- moovio_sdk/models/components/issuedcardauthorizationeventresult.py +12 -0
- moovio_sdk/models/components/issuedcardeventtype.py +15 -0
- moovio_sdk/models/components/issuedcardformfactor.py +10 -0
- moovio_sdk/models/components/issuedcardstate.py +19 -0
- moovio_sdk/models/components/issuedcardtransaction.py +42 -0
- moovio_sdk/models/components/issuingauthorizationstatus.py +14 -0
- moovio_sdk/models/components/issuingcontrols.py +25 -0
- moovio_sdk/models/components/issuingcontrolserror.py +22 -0
- moovio_sdk/models/components/issuingintervallimit.py +10 -0
- moovio_sdk/models/components/issuingmerchantdata.py +47 -0
- moovio_sdk/models/components/issuingvelocitylimit.py +21 -0
- moovio_sdk/models/components/issuingvelocitylimiterror.py +17 -0
- moovio_sdk/models/components/jsonwebkey.py +103 -0
- moovio_sdk/models/components/linkapplepay.py +54 -0
- moovio_sdk/models/components/linkapplepaymentdata.py +51 -0
- moovio_sdk/models/components/linkapplepaymentmethod.py +38 -0
- moovio_sdk/models/components/linkapplepaytoken.py +63 -0
- moovio_sdk/models/components/linkbankaccount.py +26 -0
- moovio_sdk/models/components/linkcard.py +54 -0
- moovio_sdk/models/components/linkcardwaitfor.py +8 -0
- moovio_sdk/models/components/linkedapplepaypaymentmethod.py +30 -0
- moovio_sdk/models/components/listfeesfetchrequest.py +19 -0
- moovio_sdk/models/components/manualtermsofservice.py +34 -0
- moovio_sdk/models/components/manualtermsofserviceupdate.py +41 -0
- moovio_sdk/models/components/microdepositstatus.py +8 -0
- moovio_sdk/models/components/mode.py +11 -0
- moovio_sdk/models/components/moovfeedetails.py +36 -0
- moovio_sdk/models/components/moovwalletpaymentmethod.py +31 -0
- moovio_sdk/models/components/mxauthorizationcode.py +26 -0
- moovio_sdk/models/components/mxpayload.py +46 -0
- moovio_sdk/models/components/occurrence.py +44 -0
- moovio_sdk/models/components/occurrencesresponse.py +80 -0
- moovio_sdk/models/components/occurrencestatus.py +12 -0
- moovio_sdk/models/components/onboardinginvite.py +91 -0
- moovio_sdk/models/components/onboardinginviterequest.py +57 -0
- moovio_sdk/models/components/onboardingpartneraccount.py +31 -0
- moovio_sdk/models/components/partnerpricing.py +46 -0
- moovio_sdk/models/components/partnerpricingagreement.py +56 -0
- moovio_sdk/models/components/patchaccount.py +138 -0
- moovio_sdk/models/components/patchaccounterror.py +38 -0
- moovio_sdk/models/components/patchbusiness.py +72 -0
- moovio_sdk/models/components/patchindividual.py +43 -0
- moovio_sdk/models/components/patchprofile.py +29 -0
- moovio_sdk/models/components/patchsweepconfig.py +147 -0
- moovio_sdk/models/components/patchtransfer.py +51 -0
- moovio_sdk/models/components/paymentdetailserror.py +35 -0
- moovio_sdk/models/components/paymentlink.py +125 -0
- moovio_sdk/models/components/paymentlinkcustomeroptions.py +31 -0
- moovio_sdk/models/components/paymentlinkdisplayoptions.py +39 -0
- moovio_sdk/models/components/paymentlinkdisplayoptionsupdate.py +42 -0
- moovio_sdk/models/components/paymentlinkpaymentdetails.py +40 -0
- moovio_sdk/models/components/paymentlinkpaymentdetailsupdate.py +41 -0
- moovio_sdk/models/components/paymentlinkpayoutdetails.py +32 -0
- moovio_sdk/models/components/paymentlinkpayoutdetailsupdate.py +33 -0
- moovio_sdk/models/components/paymentlinkstatus.py +11 -0
- moovio_sdk/models/components/paymentmethod.py +82 -0
- moovio_sdk/models/components/paymentmethodsbankaccount.py +65 -0
- moovio_sdk/models/components/paymentmethodscard.py +121 -0
- moovio_sdk/models/components/paymentmethodswallet.py +14 -0
- moovio_sdk/models/components/paymentmethodtype.py +19 -0
- moovio_sdk/models/components/payoutdetailserror.py +21 -0
- moovio_sdk/models/components/payoutrecipient.py +23 -0
- moovio_sdk/models/components/payoutrecipienterror.py +14 -0
- moovio_sdk/models/components/payoutrecipientupdate.py +24 -0
- moovio_sdk/models/components/phonenumber.py +18 -0
- moovio_sdk/models/components/phonenumbererror.py +18 -0
- moovio_sdk/models/components/plaidintegration.py +39 -0
- moovio_sdk/models/components/plaidlinkintegration.py +36 -0
- moovio_sdk/models/components/plaidlinkpayload.py +45 -0
- moovio_sdk/models/components/plaidpayload.py +42 -0
- moovio_sdk/models/components/primaryregulator.py +13 -0
- moovio_sdk/models/components/profile.py +27 -0
- moovio_sdk/models/components/pullfromcardpaymentmethod.py +33 -0
- moovio_sdk/models/components/pushtocardpaymentmethod.py +33 -0
- moovio_sdk/models/components/qrcode.py +16 -0
- moovio_sdk/models/components/receiptkind.py +10 -0
- moovio_sdk/models/components/receiptrequest.py +75 -0
- moovio_sdk/models/components/receiptresponse.py +95 -0
- moovio_sdk/models/components/recur.py +40 -0
- moovio_sdk/models/components/refundcarddetails.py +44 -0
- moovio_sdk/models/components/refundcardstatus.py +12 -0
- moovio_sdk/models/components/refundstatus.py +11 -0
- moovio_sdk/models/components/registerapplepaymerchantdomains.py +22 -0
- moovio_sdk/models/components/representative.py +71 -0
- moovio_sdk/models/components/representativeresponsibilities.py +42 -0
- moovio_sdk/models/components/representativeresponsibilitieserror.py +26 -0
- moovio_sdk/models/components/requestcard.py +44 -0
- moovio_sdk/models/components/requirementerror.py +24 -0
- moovio_sdk/models/components/requirementerrorcode.py +25 -0
- moovio_sdk/models/components/requirementid.py +71 -0
- moovio_sdk/models/components/returnpolicytype.py +11 -0
- moovio_sdk/models/components/reversal.py +23 -0
- moovio_sdk/models/components/reversedwithcancellation.py +14 -0
- moovio_sdk/models/components/reversedwithrefund.py +16 -0
- moovio_sdk/models/components/revoketokenrequest.py +40 -0
- moovio_sdk/models/components/rtpcreditpaymentmethod.py +38 -0
- moovio_sdk/models/components/rtpfailurecode.py +19 -0
- moovio_sdk/models/components/rtprejectioncode.py +25 -0
- moovio_sdk/models/components/rtptransactiondetails.py +56 -0
- moovio_sdk/models/components/rtptransactionstatus.py +13 -0
- moovio_sdk/models/components/runtransfer.py +34 -0
- moovio_sdk/models/components/schedulepaymentmethod.py +56 -0
- moovio_sdk/models/components/scheduleresponse.py +60 -0
- moovio_sdk/models/components/seccode.py +13 -0
- moovio_sdk/models/components/security.py +32 -0
- moovio_sdk/models/components/sentreceipt.py +27 -0
- moovio_sdk/models/components/settings.py +30 -0
- moovio_sdk/models/components/sourcedestinationoptions.py +20 -0
- moovio_sdk/models/components/sweep.py +80 -0
- moovio_sdk/models/components/sweepconfig.py +81 -0
- moovio_sdk/models/components/sweepconfigpaymentmethod.py +31 -0
- moovio_sdk/models/components/sweepconfigstatus.py +9 -0
- moovio_sdk/models/components/sweepstatus.py +13 -0
- moovio_sdk/models/components/taxid.py +25 -0
- moovio_sdk/models/components/taxidupdate.py +26 -0
- moovio_sdk/models/components/terminalapplication.py +55 -0
- moovio_sdk/models/components/terminalapplicationplatform.py +12 -0
- moovio_sdk/models/components/terminalapplicationstatus.py +13 -0
- moovio_sdk/models/components/termsofservice.py +26 -0
- moovio_sdk/models/components/termsofserviceerror.py +39 -0
- moovio_sdk/models/components/termsofservicetoken.py +17 -0
- moovio_sdk/models/components/termsofservicetokenupdate.py +18 -0
- moovio_sdk/models/components/tokentype.py +10 -0
- moovio_sdk/models/components/transactionsource.py +16 -0
- moovio_sdk/models/components/transfer.py +126 -0
- moovio_sdk/models/components/transferaccount.py +20 -0
- moovio_sdk/models/components/transferdestination.py +83 -0
- moovio_sdk/models/components/transferfailurereason.py +14 -0
- moovio_sdk/models/components/transferoptions.py +23 -0
- moovio_sdk/models/components/transferresponse.py +15 -0
- moovio_sdk/models/components/transfersource.py +80 -0
- moovio_sdk/models/components/transferstatus.py +16 -0
- moovio_sdk/models/components/transferwaitfor.py +8 -0
- moovio_sdk/models/components/underwriting.py +56 -0
- moovio_sdk/models/components/underwritingstatus.py +16 -0
- moovio_sdk/models/components/updateapplepaymerchantdomains.py +26 -0
- moovio_sdk/models/components/updatebrand.py +15 -0
- moovio_sdk/models/components/updatecard.py +51 -0
- moovio_sdk/models/components/updatecardaddress.py +32 -0
- moovio_sdk/models/components/updatecardexpiration.py +17 -0
- moovio_sdk/models/components/updatecolor.py +14 -0
- moovio_sdk/models/components/updatecolors.py +18 -0
- moovio_sdk/models/components/updateevidence.py +23 -0
- moovio_sdk/models/components/updateissuedcard.py +44 -0
- moovio_sdk/models/components/updatepaymentlink.py +98 -0
- moovio_sdk/models/components/updaterepresentative.py +224 -0
- moovio_sdk/models/components/updateunderwriting.py +43 -0
- moovio_sdk/models/components/upsertschedule.py +26 -0
- moovio_sdk/models/components/verification.py +54 -0
- moovio_sdk/models/components/verificationstatus.py +17 -0
- moovio_sdk/models/components/verificationstatusdetail.py +23 -0
- moovio_sdk/models/components/volumebycustomertype.py +21 -0
- moovio_sdk/models/components/volumebycustomertypeerror.py +22 -0
- moovio_sdk/models/components/wallet.py +27 -0
- moovio_sdk/models/components/walletavailablebalance.py +30 -0
- moovio_sdk/models/components/wallettransaction.py +114 -0
- moovio_sdk/models/components/wallettransactionsourcetype.py +13 -0
- moovio_sdk/models/components/wallettransactionstatus.py +11 -0
- moovio_sdk/models/components/wallettransactiontype.py +32 -0
- moovio_sdk/models/errors/__init__.py +155 -0
- moovio_sdk/models/errors/addcapabilitieserror.py +23 -0
- moovio_sdk/models/errors/apierror.py +22 -0
- moovio_sdk/models/errors/assigncountrieserror.py +20 -0
- moovio_sdk/models/errors/authtokenrequesterror.py +22 -0
- moovio_sdk/models/errors/bankaccountvalidationerror.py +30 -0
- moovio_sdk/models/errors/brandvalidationerror.py +23 -0
- moovio_sdk/models/errors/cardacquiringrefund.py +44 -0
- moovio_sdk/models/errors/createaccount.py +24 -0
- moovio_sdk/models/errors/createpaymentlinkerror.py +46 -0
- moovio_sdk/models/errors/createsweepconfigerror.py +40 -0
- moovio_sdk/models/errors/feeplanagreementerror.py +22 -0
- moovio_sdk/models/errors/fileuploadvalidationerror.py +35 -0
- moovio_sdk/models/errors/filevalidationerror.py +28 -0
- moovio_sdk/models/errors/genericerror.py +19 -0
- moovio_sdk/models/errors/linkapplepayerror.py +36 -0
- moovio_sdk/models/errors/linkcarderror.py +47 -0
- moovio_sdk/models/errors/microdepositvalidationerror.py +20 -0
- moovio_sdk/models/errors/onboardinginviteerror.py +34 -0
- moovio_sdk/models/errors/patchsweepconfigerror.py +38 -0
- moovio_sdk/models/errors/receiptvalidationerror.py +40 -0
- moovio_sdk/models/errors/refundvalidationerror.py +23 -0
- moovio_sdk/models/errors/representativevalidationerror.py +68 -0
- moovio_sdk/models/errors/requestcarderror.py +42 -0
- moovio_sdk/models/errors/reversalvalidationerror.py +20 -0
- moovio_sdk/models/errors/revoketokenrequesterror.py +22 -0
- moovio_sdk/models/errors/schedulevalidationerror.py +24 -0
- moovio_sdk/models/errors/terminalapplicationerror.py +30 -0
- moovio_sdk/models/errors/transfer.py +108 -0
- moovio_sdk/models/errors/transferoptionsvalidationerror.py +24 -0
- moovio_sdk/models/errors/transfervalidationerror.py +49 -0
- moovio_sdk/models/errors/updateaccount.py +24 -0
- moovio_sdk/models/errors/updatecarderror.py +43 -0
- moovio_sdk/models/errors/updateissuedcarderror.py +32 -0
- moovio_sdk/models/errors/updatepaymentlinkerror.py +36 -0
- moovio_sdk/models/errors/updateunderwritingerror.py +70 -0
- moovio_sdk/models/internal/__init__.py +6 -0
- moovio_sdk/models/internal/globals.py +40 -0
- moovio_sdk/models/operations/__init__.py +1824 -0
- moovio_sdk/models/operations/acceptdispute.py +71 -0
- moovio_sdk/models/operations/assignaccountcountries.py +75 -0
- moovio_sdk/models/operations/cancelschedule.py +67 -0
- moovio_sdk/models/operations/completebankaccountverification.py +85 -0
- moovio_sdk/models/operations/completemicrodeposits.py +87 -0
- moovio_sdk/models/operations/createaccesstoken.py +52 -0
- moovio_sdk/models/operations/createaccount.py +52 -0
- moovio_sdk/models/operations/createapplepaysession.py +81 -0
- moovio_sdk/models/operations/createbrand.py +75 -0
- moovio_sdk/models/operations/createcancellation.py +75 -0
- moovio_sdk/models/operations/createfeeplanagreements.py +80 -0
- moovio_sdk/models/operations/createonboardinginvite.py +52 -0
- moovio_sdk/models/operations/createpaymentlink.py +78 -0
- moovio_sdk/models/operations/createreceipts.py +52 -0
- moovio_sdk/models/operations/createrepresentative.py +80 -0
- moovio_sdk/models/operations/createreversal.py +98 -0
- moovio_sdk/models/operations/createschedule.py +78 -0
- moovio_sdk/models/operations/createsweepconfig.py +78 -0
- moovio_sdk/models/operations/createterminalapplication.py +54 -0
- moovio_sdk/models/operations/createtransfer.py +125 -0
- moovio_sdk/models/operations/createtransferoptions.py +52 -0
- moovio_sdk/models/operations/deletedisputeevidencefile.py +74 -0
- moovio_sdk/models/operations/deleterepresentative.py +71 -0
- moovio_sdk/models/operations/deleteterminalapplication.py +60 -0
- moovio_sdk/models/operations/disablebankaccount.py +67 -0
- moovio_sdk/models/operations/disablecapability.py +76 -0
- moovio_sdk/models/operations/disablecard.py +67 -0
- moovio_sdk/models/operations/disablepaymentlink.py +67 -0
- moovio_sdk/models/operations/disconnectaccount.py +60 -0
- moovio_sdk/models/operations/generateendtoendkey.py +60 -0
- moovio_sdk/models/operations/getaccount.py +64 -0
- moovio_sdk/models/operations/getaccountcountries.py +64 -0
- moovio_sdk/models/operations/getadjustment.py +71 -0
- moovio_sdk/models/operations/getapplepaymerchantdomains.py +68 -0
- moovio_sdk/models/operations/getavatar.py +66 -0
- moovio_sdk/models/operations/getbankaccount.py +71 -0
- moovio_sdk/models/operations/getbankaccountverification.py +73 -0
- moovio_sdk/models/operations/getbrand.py +64 -0
- moovio_sdk/models/operations/getcancellation.py +84 -0
- moovio_sdk/models/operations/getcapability.py +82 -0
- moovio_sdk/models/operations/getcard.py +71 -0
- moovio_sdk/models/operations/getdispute.py +71 -0
- moovio_sdk/models/operations/getdisputeevidence.py +80 -0
- moovio_sdk/models/operations/getdisputeevidencedata.py +90 -0
- moovio_sdk/models/operations/getenrichmentaddress.py +178 -0
- moovio_sdk/models/operations/getenrichmentprofile.py +64 -0
- moovio_sdk/models/operations/getfiledetails.py +71 -0
- moovio_sdk/models/operations/getfullissuedcard.py +73 -0
- moovio_sdk/models/operations/getissuedcard.py +73 -0
- moovio_sdk/models/operations/getissuedcardauthorization.py +75 -0
- moovio_sdk/models/operations/getissuedcardtransaction.py +75 -0
- moovio_sdk/models/operations/getmerchantprocessingagreement.py +64 -0
- moovio_sdk/models/operations/getonboardinginvite.py +62 -0
- moovio_sdk/models/operations/getpaymentlink.py +71 -0
- moovio_sdk/models/operations/getpaymentlinkqrcode.py +84 -0
- moovio_sdk/models/operations/getpaymentmethod.py +71 -0
- moovio_sdk/models/operations/getrefund.py +84 -0
- moovio_sdk/models/operations/getrepresentative.py +75 -0
- moovio_sdk/models/operations/getscheduledoccurrence.py +92 -0
- moovio_sdk/models/operations/getschedules.py +71 -0
- moovio_sdk/models/operations/getsweep.py +78 -0
- moovio_sdk/models/operations/getsweepconfig.py +71 -0
- moovio_sdk/models/operations/getterminalapplication.py +66 -0
- moovio_sdk/models/operations/gettermsofservicetoken.py +75 -0
- moovio_sdk/models/operations/gettransfer.py +73 -0
- moovio_sdk/models/operations/getunderwriting.py +64 -0
- moovio_sdk/models/operations/getwallet.py +71 -0
- moovio_sdk/models/operations/getwallettransaction.py +80 -0
- moovio_sdk/models/operations/initiatebankaccountverification.py +89 -0
- moovio_sdk/models/operations/initiatemicrodeposits.py +67 -0
- moovio_sdk/models/operations/initiaterefund.py +131 -0
- moovio_sdk/models/operations/linkapplepaytoken.py +80 -0
- moovio_sdk/models/operations/linkbankaccount.py +96 -0
- moovio_sdk/models/operations/linkcard.py +96 -0
- moovio_sdk/models/operations/listaccounts.py +171 -0
- moovio_sdk/models/operations/listadjustments.py +78 -0
- moovio_sdk/models/operations/listbankaccounts.py +64 -0
- moovio_sdk/models/operations/listcapabilities.py +64 -0
- moovio_sdk/models/operations/listcards.py +64 -0
- moovio_sdk/models/operations/listdisputeevidence.py +73 -0
- moovio_sdk/models/operations/listdisputes.py +172 -0
- moovio_sdk/models/operations/listfeeplanagreements.py +101 -0
- moovio_sdk/models/operations/listfeeplans.py +78 -0
- moovio_sdk/models/operations/listfeesfetch.py +80 -0
- moovio_sdk/models/operations/listfiles.py +64 -0
- moovio_sdk/models/operations/listindustries.py +62 -0
- moovio_sdk/models/operations/listinstitutions.py +92 -0
- moovio_sdk/models/operations/listissuedcardauthorizationevents.py +94 -0
- moovio_sdk/models/operations/listissuedcardauthorizations.py +126 -0
- moovio_sdk/models/operations/listissuedcards.py +94 -0
- moovio_sdk/models/operations/listissuedcardtransactions.py +113 -0
- moovio_sdk/models/operations/listonboardinginvites.py +60 -0
- moovio_sdk/models/operations/listpartnerpricing.py +78 -0
- moovio_sdk/models/operations/listpartnerpricingagreements.py +101 -0
- moovio_sdk/models/operations/listpaymentlinks.py +64 -0
- moovio_sdk/models/operations/listpaymentmethods.py +98 -0
- moovio_sdk/models/operations/listreceipts.py +65 -0
- moovio_sdk/models/operations/listrefunds.py +75 -0
- moovio_sdk/models/operations/listrepresentatives.py +66 -0
- moovio_sdk/models/operations/listschedules.py +81 -0
- moovio_sdk/models/operations/listsweepconfigs.py +64 -0
- moovio_sdk/models/operations/listsweeps.py +108 -0
- moovio_sdk/models/operations/listterminalapplications.py +62 -0
- moovio_sdk/models/operations/listtransfers.py +145 -0
- moovio_sdk/models/operations/listwallets.py +64 -0
- moovio_sdk/models/operations/listwallettransactions.py +189 -0
- moovio_sdk/models/operations/ping.py +56 -0
- moovio_sdk/models/operations/registerapplepaymerchantdomains.py +80 -0
- moovio_sdk/models/operations/requestcapabilities.py +78 -0
- moovio_sdk/models/operations/requestcard.py +80 -0
- moovio_sdk/models/operations/retrievefees.py +117 -0
- moovio_sdk/models/operations/revokeaccesstoken.py +48 -0
- moovio_sdk/models/operations/revokeonboardinginvite.py +58 -0
- moovio_sdk/models/operations/submitdisputeevidence.py +71 -0
- moovio_sdk/models/operations/testendtoendtoken.py +56 -0
- moovio_sdk/models/operations/updateaccount.py +78 -0
- moovio_sdk/models/operations/updateapplepaymerchantdomains.py +78 -0
- moovio_sdk/models/operations/updatebrand.py +78 -0
- moovio_sdk/models/operations/updatecard.py +85 -0
- moovio_sdk/models/operations/updatedisputeevidence.py +92 -0
- moovio_sdk/models/operations/updateissuedcard.py +81 -0
- moovio_sdk/models/operations/updatepaymentlink.py +85 -0
- moovio_sdk/models/operations/updaterepresentative.py +89 -0
- moovio_sdk/models/operations/updateschedule.py +85 -0
- moovio_sdk/models/operations/updatesweepconfig.py +85 -0
- moovio_sdk/models/operations/updatetransfer.py +87 -0
- moovio_sdk/models/operations/uploaddisputeevidencefile.py +87 -0
- moovio_sdk/models/operations/uploaddisputeevidencetext.py +85 -0
- moovio_sdk/models/operations/uploadfile.py +80 -0
- moovio_sdk/models/operations/upsertbrand.py +75 -0
- moovio_sdk/models/operations/upsertunderwriting.py +78 -0
- moovio_sdk/onboarding.py +965 -0
- moovio_sdk/payment_links.py +1694 -0
- moovio_sdk/payment_methods.py +475 -0
- moovio_sdk/ping.py +233 -0
- moovio_sdk/py.typed +1 -0
- moovio_sdk/receipts.py +507 -0
- moovio_sdk/representatives.py +1513 -0
- moovio_sdk/scheduling.py +1565 -0
- moovio_sdk/sdk.py +242 -0
- moovio_sdk/sdkconfiguration.py +59 -0
- moovio_sdk/sweeps.py +1617 -0
- moovio_sdk/terminal_applications.py +1013 -0
- moovio_sdk/transfers.py +3040 -0
- moovio_sdk/types/__init__.py +21 -0
- moovio_sdk/types/basemodel.py +39 -0
- moovio_sdk/underwriting.py +581 -0
- moovio_sdk/utils/__init__.py +101 -0
- moovio_sdk/utils/annotations.py +55 -0
- moovio_sdk/utils/enums.py +34 -0
- moovio_sdk/utils/eventstreaming.py +238 -0
- moovio_sdk/utils/forms.py +202 -0
- moovio_sdk/utils/headers.py +136 -0
- moovio_sdk/utils/logger.py +27 -0
- moovio_sdk/utils/metadata.py +118 -0
- moovio_sdk/utils/queryparams.py +205 -0
- moovio_sdk/utils/requestbodies.py +66 -0
- moovio_sdk/utils/retries.py +217 -0
- moovio_sdk/utils/security.py +195 -0
- moovio_sdk/utils/serializers.py +215 -0
- moovio_sdk/utils/url.py +155 -0
- moovio_sdk/utils/values.py +137 -0
- moovio_sdk/wallet_transactions.py +558 -0
- moovio_sdk/wallets.py +465 -0
- moovio_sdk-0.3.8.dist-info/METADATA +1920 -0
- moovio_sdk-0.3.8.dist-info/RECORD +586 -0
- moovio_sdk-0.3.8.dist-info/WHEEL +4 -0
@@ -0,0 +1,1351 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from moovio_sdk import utils
|
5
|
+
from moovio_sdk._hooks import HookContext
|
6
|
+
from moovio_sdk.models import components, errors, operations
|
7
|
+
from moovio_sdk.types import OptionalNullable, UNSET
|
8
|
+
from moovio_sdk.utils import get_security_from_env
|
9
|
+
from typing import Any, List, Mapping, Optional, Union
|
10
|
+
|
11
|
+
|
12
|
+
class CardIssuing(BaseSDK):
|
13
|
+
def request(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
account_id: str,
|
17
|
+
funding_wallet_id: str,
|
18
|
+
authorized_user: Union[
|
19
|
+
components.CreateAuthorizedUser, components.CreateAuthorizedUserTypedDict
|
20
|
+
],
|
21
|
+
form_factor: components.IssuedCardFormFactor,
|
22
|
+
memo: Optional[str] = None,
|
23
|
+
expiration: Optional[
|
24
|
+
Union[components.CardExpiration, components.CardExpirationTypedDict]
|
25
|
+
] = None,
|
26
|
+
controls: Optional[
|
27
|
+
Union[components.IssuingControls, components.IssuingControlsTypedDict]
|
28
|
+
] = None,
|
29
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
30
|
+
server_url: Optional[str] = None,
|
31
|
+
timeout_ms: Optional[int] = None,
|
32
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
33
|
+
) -> operations.RequestCardResponse:
|
34
|
+
r"""Request a virtual card be issued.
|
35
|
+
|
36
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
37
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.write` scope.
|
38
|
+
|
39
|
+
:param account_id: The Moov business account for which the card is to be issued.
|
40
|
+
:param funding_wallet_id:
|
41
|
+
:param authorized_user: Fields for identifying an authorized individual.
|
42
|
+
:param form_factor: Specifies the type of spend card to be issued. Presently supports virtual only, providing a digital number without a physical card.
|
43
|
+
:param memo: An optional descriptive name for the card.
|
44
|
+
:param expiration: The expiration date of the card or token.
|
45
|
+
:param controls:
|
46
|
+
:param retries: Override the default retry configuration for this method
|
47
|
+
:param server_url: Override the default server URL for this method
|
48
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
49
|
+
:param http_headers: Additional headers to set or replace on requests.
|
50
|
+
"""
|
51
|
+
base_url = None
|
52
|
+
url_variables = None
|
53
|
+
if timeout_ms is None:
|
54
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
55
|
+
|
56
|
+
if server_url is not None:
|
57
|
+
base_url = server_url
|
58
|
+
else:
|
59
|
+
base_url = self._get_url(base_url, url_variables)
|
60
|
+
|
61
|
+
request = operations.RequestCardRequest(
|
62
|
+
account_id=account_id,
|
63
|
+
request_card=components.RequestCard(
|
64
|
+
funding_wallet_id=funding_wallet_id,
|
65
|
+
authorized_user=utils.get_pydantic_model(
|
66
|
+
authorized_user, components.CreateAuthorizedUser
|
67
|
+
),
|
68
|
+
form_factor=form_factor,
|
69
|
+
memo=memo,
|
70
|
+
expiration=utils.get_pydantic_model(
|
71
|
+
expiration, Optional[components.CardExpiration]
|
72
|
+
),
|
73
|
+
controls=utils.get_pydantic_model(
|
74
|
+
controls, Optional[components.IssuingControls]
|
75
|
+
),
|
76
|
+
),
|
77
|
+
)
|
78
|
+
|
79
|
+
req = self._build_request(
|
80
|
+
method="POST",
|
81
|
+
path="/issuing/{accountID}/issued-cards",
|
82
|
+
base_url=base_url,
|
83
|
+
url_variables=url_variables,
|
84
|
+
request=request,
|
85
|
+
request_body_required=True,
|
86
|
+
request_has_path_params=True,
|
87
|
+
request_has_query_params=True,
|
88
|
+
user_agent_header="user-agent",
|
89
|
+
accept_header_value="application/json",
|
90
|
+
http_headers=http_headers,
|
91
|
+
_globals=operations.RequestCardGlobals(
|
92
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
93
|
+
),
|
94
|
+
security=self.sdk_configuration.security,
|
95
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
96
|
+
request.request_card, False, False, "json", components.RequestCard
|
97
|
+
),
|
98
|
+
timeout_ms=timeout_ms,
|
99
|
+
)
|
100
|
+
|
101
|
+
if retries == UNSET:
|
102
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
103
|
+
retries = self.sdk_configuration.retry_config
|
104
|
+
|
105
|
+
retry_config = None
|
106
|
+
if isinstance(retries, utils.RetryConfig):
|
107
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
108
|
+
|
109
|
+
http_res = self.do_request(
|
110
|
+
hook_ctx=HookContext(
|
111
|
+
base_url=base_url or "",
|
112
|
+
operation_id="requestCard",
|
113
|
+
oauth2_scopes=[],
|
114
|
+
security_source=get_security_from_env(
|
115
|
+
self.sdk_configuration.security, components.Security
|
116
|
+
),
|
117
|
+
),
|
118
|
+
request=req,
|
119
|
+
error_status_codes=[
|
120
|
+
"400",
|
121
|
+
"401",
|
122
|
+
"403",
|
123
|
+
"404",
|
124
|
+
"422",
|
125
|
+
"429",
|
126
|
+
"4XX",
|
127
|
+
"500",
|
128
|
+
"504",
|
129
|
+
"5XX",
|
130
|
+
],
|
131
|
+
retry_config=retry_config,
|
132
|
+
)
|
133
|
+
|
134
|
+
response_data: Any = None
|
135
|
+
if utils.match_response(http_res, "200", "application/json"):
|
136
|
+
return operations.RequestCardResponse(
|
137
|
+
result=utils.unmarshal_json(http_res.text, components.IssuedCard),
|
138
|
+
headers=utils.get_response_headers(http_res.headers),
|
139
|
+
)
|
140
|
+
if utils.match_response(http_res, "400", "application/json"):
|
141
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
142
|
+
raise errors.GenericError(data=response_data)
|
143
|
+
if utils.match_response(http_res, "422", "application/json"):
|
144
|
+
response_data = utils.unmarshal_json(
|
145
|
+
http_res.text, errors.RequestCardErrorData
|
146
|
+
)
|
147
|
+
raise errors.RequestCardError(data=response_data)
|
148
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
149
|
+
http_res_text = utils.stream_to_text(http_res)
|
150
|
+
raise errors.APIError(
|
151
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
152
|
+
)
|
153
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
154
|
+
http_res_text = utils.stream_to_text(http_res)
|
155
|
+
raise errors.APIError(
|
156
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
157
|
+
)
|
158
|
+
if utils.match_response(http_res, "4XX", "*"):
|
159
|
+
http_res_text = utils.stream_to_text(http_res)
|
160
|
+
raise errors.APIError(
|
161
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
162
|
+
)
|
163
|
+
if utils.match_response(http_res, "5XX", "*"):
|
164
|
+
http_res_text = utils.stream_to_text(http_res)
|
165
|
+
raise errors.APIError(
|
166
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
167
|
+
)
|
168
|
+
|
169
|
+
content_type = http_res.headers.get("Content-Type")
|
170
|
+
http_res_text = utils.stream_to_text(http_res)
|
171
|
+
raise errors.APIError(
|
172
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
173
|
+
http_res.status_code,
|
174
|
+
http_res_text,
|
175
|
+
http_res,
|
176
|
+
)
|
177
|
+
|
178
|
+
async def request_async(
|
179
|
+
self,
|
180
|
+
*,
|
181
|
+
account_id: str,
|
182
|
+
funding_wallet_id: str,
|
183
|
+
authorized_user: Union[
|
184
|
+
components.CreateAuthorizedUser, components.CreateAuthorizedUserTypedDict
|
185
|
+
],
|
186
|
+
form_factor: components.IssuedCardFormFactor,
|
187
|
+
memo: Optional[str] = None,
|
188
|
+
expiration: Optional[
|
189
|
+
Union[components.CardExpiration, components.CardExpirationTypedDict]
|
190
|
+
] = None,
|
191
|
+
controls: Optional[
|
192
|
+
Union[components.IssuingControls, components.IssuingControlsTypedDict]
|
193
|
+
] = None,
|
194
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
195
|
+
server_url: Optional[str] = None,
|
196
|
+
timeout_ms: Optional[int] = None,
|
197
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
198
|
+
) -> operations.RequestCardResponse:
|
199
|
+
r"""Request a virtual card be issued.
|
200
|
+
|
201
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
202
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.write` scope.
|
203
|
+
|
204
|
+
:param account_id: The Moov business account for which the card is to be issued.
|
205
|
+
:param funding_wallet_id:
|
206
|
+
:param authorized_user: Fields for identifying an authorized individual.
|
207
|
+
:param form_factor: Specifies the type of spend card to be issued. Presently supports virtual only, providing a digital number without a physical card.
|
208
|
+
:param memo: An optional descriptive name for the card.
|
209
|
+
:param expiration: The expiration date of the card or token.
|
210
|
+
:param controls:
|
211
|
+
:param retries: Override the default retry configuration for this method
|
212
|
+
:param server_url: Override the default server URL for this method
|
213
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
214
|
+
:param http_headers: Additional headers to set or replace on requests.
|
215
|
+
"""
|
216
|
+
base_url = None
|
217
|
+
url_variables = None
|
218
|
+
if timeout_ms is None:
|
219
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
220
|
+
|
221
|
+
if server_url is not None:
|
222
|
+
base_url = server_url
|
223
|
+
else:
|
224
|
+
base_url = self._get_url(base_url, url_variables)
|
225
|
+
|
226
|
+
request = operations.RequestCardRequest(
|
227
|
+
account_id=account_id,
|
228
|
+
request_card=components.RequestCard(
|
229
|
+
funding_wallet_id=funding_wallet_id,
|
230
|
+
authorized_user=utils.get_pydantic_model(
|
231
|
+
authorized_user, components.CreateAuthorizedUser
|
232
|
+
),
|
233
|
+
form_factor=form_factor,
|
234
|
+
memo=memo,
|
235
|
+
expiration=utils.get_pydantic_model(
|
236
|
+
expiration, Optional[components.CardExpiration]
|
237
|
+
),
|
238
|
+
controls=utils.get_pydantic_model(
|
239
|
+
controls, Optional[components.IssuingControls]
|
240
|
+
),
|
241
|
+
),
|
242
|
+
)
|
243
|
+
|
244
|
+
req = self._build_request_async(
|
245
|
+
method="POST",
|
246
|
+
path="/issuing/{accountID}/issued-cards",
|
247
|
+
base_url=base_url,
|
248
|
+
url_variables=url_variables,
|
249
|
+
request=request,
|
250
|
+
request_body_required=True,
|
251
|
+
request_has_path_params=True,
|
252
|
+
request_has_query_params=True,
|
253
|
+
user_agent_header="user-agent",
|
254
|
+
accept_header_value="application/json",
|
255
|
+
http_headers=http_headers,
|
256
|
+
_globals=operations.RequestCardGlobals(
|
257
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
258
|
+
),
|
259
|
+
security=self.sdk_configuration.security,
|
260
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
261
|
+
request.request_card, False, False, "json", components.RequestCard
|
262
|
+
),
|
263
|
+
timeout_ms=timeout_ms,
|
264
|
+
)
|
265
|
+
|
266
|
+
if retries == UNSET:
|
267
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
268
|
+
retries = self.sdk_configuration.retry_config
|
269
|
+
|
270
|
+
retry_config = None
|
271
|
+
if isinstance(retries, utils.RetryConfig):
|
272
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
273
|
+
|
274
|
+
http_res = await self.do_request_async(
|
275
|
+
hook_ctx=HookContext(
|
276
|
+
base_url=base_url or "",
|
277
|
+
operation_id="requestCard",
|
278
|
+
oauth2_scopes=[],
|
279
|
+
security_source=get_security_from_env(
|
280
|
+
self.sdk_configuration.security, components.Security
|
281
|
+
),
|
282
|
+
),
|
283
|
+
request=req,
|
284
|
+
error_status_codes=[
|
285
|
+
"400",
|
286
|
+
"401",
|
287
|
+
"403",
|
288
|
+
"404",
|
289
|
+
"422",
|
290
|
+
"429",
|
291
|
+
"4XX",
|
292
|
+
"500",
|
293
|
+
"504",
|
294
|
+
"5XX",
|
295
|
+
],
|
296
|
+
retry_config=retry_config,
|
297
|
+
)
|
298
|
+
|
299
|
+
response_data: Any = None
|
300
|
+
if utils.match_response(http_res, "200", "application/json"):
|
301
|
+
return operations.RequestCardResponse(
|
302
|
+
result=utils.unmarshal_json(http_res.text, components.IssuedCard),
|
303
|
+
headers=utils.get_response_headers(http_res.headers),
|
304
|
+
)
|
305
|
+
if utils.match_response(http_res, "400", "application/json"):
|
306
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
307
|
+
raise errors.GenericError(data=response_data)
|
308
|
+
if utils.match_response(http_res, "422", "application/json"):
|
309
|
+
response_data = utils.unmarshal_json(
|
310
|
+
http_res.text, errors.RequestCardErrorData
|
311
|
+
)
|
312
|
+
raise errors.RequestCardError(data=response_data)
|
313
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
314
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
315
|
+
raise errors.APIError(
|
316
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
317
|
+
)
|
318
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
319
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
320
|
+
raise errors.APIError(
|
321
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
322
|
+
)
|
323
|
+
if utils.match_response(http_res, "4XX", "*"):
|
324
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
325
|
+
raise errors.APIError(
|
326
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
327
|
+
)
|
328
|
+
if utils.match_response(http_res, "5XX", "*"):
|
329
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
330
|
+
raise errors.APIError(
|
331
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
332
|
+
)
|
333
|
+
|
334
|
+
content_type = http_res.headers.get("Content-Type")
|
335
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
336
|
+
raise errors.APIError(
|
337
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
338
|
+
http_res.status_code,
|
339
|
+
http_res_text,
|
340
|
+
http_res,
|
341
|
+
)
|
342
|
+
|
343
|
+
def list(
|
344
|
+
self,
|
345
|
+
*,
|
346
|
+
account_id: str,
|
347
|
+
skip: Optional[int] = None,
|
348
|
+
count: Optional[int] = None,
|
349
|
+
states: Optional[List[components.IssuedCardState]] = None,
|
350
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
351
|
+
server_url: Optional[str] = None,
|
352
|
+
timeout_ms: Optional[int] = None,
|
353
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
354
|
+
) -> operations.ListIssuedCardsResponse:
|
355
|
+
r"""List Moov issued cards existing for the account.
|
356
|
+
|
357
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
358
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
359
|
+
|
360
|
+
:param account_id: The Moov business account for which the cards have been issued.
|
361
|
+
:param skip:
|
362
|
+
:param count:
|
363
|
+
:param states: Optional, comma-separated states to filter the Moov list issued cards response. For example `active,pending-verification`
|
364
|
+
:param retries: Override the default retry configuration for this method
|
365
|
+
:param server_url: Override the default server URL for this method
|
366
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
367
|
+
:param http_headers: Additional headers to set or replace on requests.
|
368
|
+
"""
|
369
|
+
base_url = None
|
370
|
+
url_variables = None
|
371
|
+
if timeout_ms is None:
|
372
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
373
|
+
|
374
|
+
if server_url is not None:
|
375
|
+
base_url = server_url
|
376
|
+
else:
|
377
|
+
base_url = self._get_url(base_url, url_variables)
|
378
|
+
|
379
|
+
request = operations.ListIssuedCardsRequest(
|
380
|
+
account_id=account_id,
|
381
|
+
skip=skip,
|
382
|
+
count=count,
|
383
|
+
states=states,
|
384
|
+
)
|
385
|
+
|
386
|
+
req = self._build_request(
|
387
|
+
method="GET",
|
388
|
+
path="/issuing/{accountID}/issued-cards",
|
389
|
+
base_url=base_url,
|
390
|
+
url_variables=url_variables,
|
391
|
+
request=request,
|
392
|
+
request_body_required=False,
|
393
|
+
request_has_path_params=True,
|
394
|
+
request_has_query_params=True,
|
395
|
+
user_agent_header="user-agent",
|
396
|
+
accept_header_value="application/json",
|
397
|
+
http_headers=http_headers,
|
398
|
+
_globals=operations.ListIssuedCardsGlobals(
|
399
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
400
|
+
),
|
401
|
+
security=self.sdk_configuration.security,
|
402
|
+
timeout_ms=timeout_ms,
|
403
|
+
)
|
404
|
+
|
405
|
+
if retries == UNSET:
|
406
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
407
|
+
retries = self.sdk_configuration.retry_config
|
408
|
+
|
409
|
+
retry_config = None
|
410
|
+
if isinstance(retries, utils.RetryConfig):
|
411
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
412
|
+
|
413
|
+
http_res = self.do_request(
|
414
|
+
hook_ctx=HookContext(
|
415
|
+
base_url=base_url or "",
|
416
|
+
operation_id="listIssuedCards",
|
417
|
+
oauth2_scopes=[],
|
418
|
+
security_source=get_security_from_env(
|
419
|
+
self.sdk_configuration.security, components.Security
|
420
|
+
),
|
421
|
+
),
|
422
|
+
request=req,
|
423
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
424
|
+
retry_config=retry_config,
|
425
|
+
)
|
426
|
+
|
427
|
+
if utils.match_response(http_res, "200", "application/json"):
|
428
|
+
return operations.ListIssuedCardsResponse(
|
429
|
+
result=utils.unmarshal_json(http_res.text, List[components.IssuedCard]),
|
430
|
+
headers=utils.get_response_headers(http_res.headers),
|
431
|
+
)
|
432
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
433
|
+
http_res_text = utils.stream_to_text(http_res)
|
434
|
+
raise errors.APIError(
|
435
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
436
|
+
)
|
437
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
438
|
+
http_res_text = utils.stream_to_text(http_res)
|
439
|
+
raise errors.APIError(
|
440
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
441
|
+
)
|
442
|
+
if utils.match_response(http_res, "4XX", "*"):
|
443
|
+
http_res_text = utils.stream_to_text(http_res)
|
444
|
+
raise errors.APIError(
|
445
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
446
|
+
)
|
447
|
+
if utils.match_response(http_res, "5XX", "*"):
|
448
|
+
http_res_text = utils.stream_to_text(http_res)
|
449
|
+
raise errors.APIError(
|
450
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
451
|
+
)
|
452
|
+
|
453
|
+
content_type = http_res.headers.get("Content-Type")
|
454
|
+
http_res_text = utils.stream_to_text(http_res)
|
455
|
+
raise errors.APIError(
|
456
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
457
|
+
http_res.status_code,
|
458
|
+
http_res_text,
|
459
|
+
http_res,
|
460
|
+
)
|
461
|
+
|
462
|
+
async def list_async(
|
463
|
+
self,
|
464
|
+
*,
|
465
|
+
account_id: str,
|
466
|
+
skip: Optional[int] = None,
|
467
|
+
count: Optional[int] = None,
|
468
|
+
states: Optional[List[components.IssuedCardState]] = None,
|
469
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
470
|
+
server_url: Optional[str] = None,
|
471
|
+
timeout_ms: Optional[int] = None,
|
472
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
473
|
+
) -> operations.ListIssuedCardsResponse:
|
474
|
+
r"""List Moov issued cards existing for the account.
|
475
|
+
|
476
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
477
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
478
|
+
|
479
|
+
:param account_id: The Moov business account for which the cards have been issued.
|
480
|
+
:param skip:
|
481
|
+
:param count:
|
482
|
+
:param states: Optional, comma-separated states to filter the Moov list issued cards response. For example `active,pending-verification`
|
483
|
+
:param retries: Override the default retry configuration for this method
|
484
|
+
:param server_url: Override the default server URL for this method
|
485
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
486
|
+
:param http_headers: Additional headers to set or replace on requests.
|
487
|
+
"""
|
488
|
+
base_url = None
|
489
|
+
url_variables = None
|
490
|
+
if timeout_ms is None:
|
491
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
492
|
+
|
493
|
+
if server_url is not None:
|
494
|
+
base_url = server_url
|
495
|
+
else:
|
496
|
+
base_url = self._get_url(base_url, url_variables)
|
497
|
+
|
498
|
+
request = operations.ListIssuedCardsRequest(
|
499
|
+
account_id=account_id,
|
500
|
+
skip=skip,
|
501
|
+
count=count,
|
502
|
+
states=states,
|
503
|
+
)
|
504
|
+
|
505
|
+
req = self._build_request_async(
|
506
|
+
method="GET",
|
507
|
+
path="/issuing/{accountID}/issued-cards",
|
508
|
+
base_url=base_url,
|
509
|
+
url_variables=url_variables,
|
510
|
+
request=request,
|
511
|
+
request_body_required=False,
|
512
|
+
request_has_path_params=True,
|
513
|
+
request_has_query_params=True,
|
514
|
+
user_agent_header="user-agent",
|
515
|
+
accept_header_value="application/json",
|
516
|
+
http_headers=http_headers,
|
517
|
+
_globals=operations.ListIssuedCardsGlobals(
|
518
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
519
|
+
),
|
520
|
+
security=self.sdk_configuration.security,
|
521
|
+
timeout_ms=timeout_ms,
|
522
|
+
)
|
523
|
+
|
524
|
+
if retries == UNSET:
|
525
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
526
|
+
retries = self.sdk_configuration.retry_config
|
527
|
+
|
528
|
+
retry_config = None
|
529
|
+
if isinstance(retries, utils.RetryConfig):
|
530
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
531
|
+
|
532
|
+
http_res = await self.do_request_async(
|
533
|
+
hook_ctx=HookContext(
|
534
|
+
base_url=base_url or "",
|
535
|
+
operation_id="listIssuedCards",
|
536
|
+
oauth2_scopes=[],
|
537
|
+
security_source=get_security_from_env(
|
538
|
+
self.sdk_configuration.security, components.Security
|
539
|
+
),
|
540
|
+
),
|
541
|
+
request=req,
|
542
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
543
|
+
retry_config=retry_config,
|
544
|
+
)
|
545
|
+
|
546
|
+
if utils.match_response(http_res, "200", "application/json"):
|
547
|
+
return operations.ListIssuedCardsResponse(
|
548
|
+
result=utils.unmarshal_json(http_res.text, List[components.IssuedCard]),
|
549
|
+
headers=utils.get_response_headers(http_res.headers),
|
550
|
+
)
|
551
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
552
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
553
|
+
raise errors.APIError(
|
554
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
555
|
+
)
|
556
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
557
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
558
|
+
raise errors.APIError(
|
559
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
560
|
+
)
|
561
|
+
if utils.match_response(http_res, "4XX", "*"):
|
562
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
563
|
+
raise errors.APIError(
|
564
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
565
|
+
)
|
566
|
+
if utils.match_response(http_res, "5XX", "*"):
|
567
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
568
|
+
raise errors.APIError(
|
569
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
570
|
+
)
|
571
|
+
|
572
|
+
content_type = http_res.headers.get("Content-Type")
|
573
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
574
|
+
raise errors.APIError(
|
575
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
576
|
+
http_res.status_code,
|
577
|
+
http_res_text,
|
578
|
+
http_res,
|
579
|
+
)
|
580
|
+
|
581
|
+
def get(
|
582
|
+
self,
|
583
|
+
*,
|
584
|
+
account_id: str,
|
585
|
+
issued_card_id: str,
|
586
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
587
|
+
server_url: Optional[str] = None,
|
588
|
+
timeout_ms: Optional[int] = None,
|
589
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
590
|
+
) -> operations.GetIssuedCardResponse:
|
591
|
+
r"""Retrieve a single issued card associated with a Moov account.
|
592
|
+
|
593
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
594
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
595
|
+
|
596
|
+
:param account_id: The Moov business account for which the card was issued.
|
597
|
+
:param issued_card_id:
|
598
|
+
:param retries: Override the default retry configuration for this method
|
599
|
+
:param server_url: Override the default server URL for this method
|
600
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
601
|
+
:param http_headers: Additional headers to set or replace on requests.
|
602
|
+
"""
|
603
|
+
base_url = None
|
604
|
+
url_variables = None
|
605
|
+
if timeout_ms is None:
|
606
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
607
|
+
|
608
|
+
if server_url is not None:
|
609
|
+
base_url = server_url
|
610
|
+
else:
|
611
|
+
base_url = self._get_url(base_url, url_variables)
|
612
|
+
|
613
|
+
request = operations.GetIssuedCardRequest(
|
614
|
+
account_id=account_id,
|
615
|
+
issued_card_id=issued_card_id,
|
616
|
+
)
|
617
|
+
|
618
|
+
req = self._build_request(
|
619
|
+
method="GET",
|
620
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}",
|
621
|
+
base_url=base_url,
|
622
|
+
url_variables=url_variables,
|
623
|
+
request=request,
|
624
|
+
request_body_required=False,
|
625
|
+
request_has_path_params=True,
|
626
|
+
request_has_query_params=True,
|
627
|
+
user_agent_header="user-agent",
|
628
|
+
accept_header_value="application/json",
|
629
|
+
http_headers=http_headers,
|
630
|
+
_globals=operations.GetIssuedCardGlobals(
|
631
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
632
|
+
),
|
633
|
+
security=self.sdk_configuration.security,
|
634
|
+
timeout_ms=timeout_ms,
|
635
|
+
)
|
636
|
+
|
637
|
+
if retries == UNSET:
|
638
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
639
|
+
retries = self.sdk_configuration.retry_config
|
640
|
+
|
641
|
+
retry_config = None
|
642
|
+
if isinstance(retries, utils.RetryConfig):
|
643
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
644
|
+
|
645
|
+
http_res = self.do_request(
|
646
|
+
hook_ctx=HookContext(
|
647
|
+
base_url=base_url or "",
|
648
|
+
operation_id="getIssuedCard",
|
649
|
+
oauth2_scopes=[],
|
650
|
+
security_source=get_security_from_env(
|
651
|
+
self.sdk_configuration.security, components.Security
|
652
|
+
),
|
653
|
+
),
|
654
|
+
request=req,
|
655
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
656
|
+
retry_config=retry_config,
|
657
|
+
)
|
658
|
+
|
659
|
+
if utils.match_response(http_res, "200", "application/json"):
|
660
|
+
return operations.GetIssuedCardResponse(
|
661
|
+
result=utils.unmarshal_json(http_res.text, components.IssuedCard),
|
662
|
+
headers=utils.get_response_headers(http_res.headers),
|
663
|
+
)
|
664
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
665
|
+
http_res_text = utils.stream_to_text(http_res)
|
666
|
+
raise errors.APIError(
|
667
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
668
|
+
)
|
669
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
670
|
+
http_res_text = utils.stream_to_text(http_res)
|
671
|
+
raise errors.APIError(
|
672
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
673
|
+
)
|
674
|
+
if utils.match_response(http_res, "4XX", "*"):
|
675
|
+
http_res_text = utils.stream_to_text(http_res)
|
676
|
+
raise errors.APIError(
|
677
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
678
|
+
)
|
679
|
+
if utils.match_response(http_res, "5XX", "*"):
|
680
|
+
http_res_text = utils.stream_to_text(http_res)
|
681
|
+
raise errors.APIError(
|
682
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
683
|
+
)
|
684
|
+
|
685
|
+
content_type = http_res.headers.get("Content-Type")
|
686
|
+
http_res_text = utils.stream_to_text(http_res)
|
687
|
+
raise errors.APIError(
|
688
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
689
|
+
http_res.status_code,
|
690
|
+
http_res_text,
|
691
|
+
http_res,
|
692
|
+
)
|
693
|
+
|
694
|
+
async def get_async(
|
695
|
+
self,
|
696
|
+
*,
|
697
|
+
account_id: str,
|
698
|
+
issued_card_id: str,
|
699
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
700
|
+
server_url: Optional[str] = None,
|
701
|
+
timeout_ms: Optional[int] = None,
|
702
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
703
|
+
) -> operations.GetIssuedCardResponse:
|
704
|
+
r"""Retrieve a single issued card associated with a Moov account.
|
705
|
+
|
706
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
707
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read` scope.
|
708
|
+
|
709
|
+
:param account_id: The Moov business account for which the card was issued.
|
710
|
+
:param issued_card_id:
|
711
|
+
:param retries: Override the default retry configuration for this method
|
712
|
+
:param server_url: Override the default server URL for this method
|
713
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
714
|
+
:param http_headers: Additional headers to set or replace on requests.
|
715
|
+
"""
|
716
|
+
base_url = None
|
717
|
+
url_variables = None
|
718
|
+
if timeout_ms is None:
|
719
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
720
|
+
|
721
|
+
if server_url is not None:
|
722
|
+
base_url = server_url
|
723
|
+
else:
|
724
|
+
base_url = self._get_url(base_url, url_variables)
|
725
|
+
|
726
|
+
request = operations.GetIssuedCardRequest(
|
727
|
+
account_id=account_id,
|
728
|
+
issued_card_id=issued_card_id,
|
729
|
+
)
|
730
|
+
|
731
|
+
req = self._build_request_async(
|
732
|
+
method="GET",
|
733
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}",
|
734
|
+
base_url=base_url,
|
735
|
+
url_variables=url_variables,
|
736
|
+
request=request,
|
737
|
+
request_body_required=False,
|
738
|
+
request_has_path_params=True,
|
739
|
+
request_has_query_params=True,
|
740
|
+
user_agent_header="user-agent",
|
741
|
+
accept_header_value="application/json",
|
742
|
+
http_headers=http_headers,
|
743
|
+
_globals=operations.GetIssuedCardGlobals(
|
744
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
745
|
+
),
|
746
|
+
security=self.sdk_configuration.security,
|
747
|
+
timeout_ms=timeout_ms,
|
748
|
+
)
|
749
|
+
|
750
|
+
if retries == UNSET:
|
751
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
752
|
+
retries = self.sdk_configuration.retry_config
|
753
|
+
|
754
|
+
retry_config = None
|
755
|
+
if isinstance(retries, utils.RetryConfig):
|
756
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
757
|
+
|
758
|
+
http_res = await self.do_request_async(
|
759
|
+
hook_ctx=HookContext(
|
760
|
+
base_url=base_url or "",
|
761
|
+
operation_id="getIssuedCard",
|
762
|
+
oauth2_scopes=[],
|
763
|
+
security_source=get_security_from_env(
|
764
|
+
self.sdk_configuration.security, components.Security
|
765
|
+
),
|
766
|
+
),
|
767
|
+
request=req,
|
768
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
769
|
+
retry_config=retry_config,
|
770
|
+
)
|
771
|
+
|
772
|
+
if utils.match_response(http_res, "200", "application/json"):
|
773
|
+
return operations.GetIssuedCardResponse(
|
774
|
+
result=utils.unmarshal_json(http_res.text, components.IssuedCard),
|
775
|
+
headers=utils.get_response_headers(http_res.headers),
|
776
|
+
)
|
777
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
778
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
779
|
+
raise errors.APIError(
|
780
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
781
|
+
)
|
782
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
783
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
784
|
+
raise errors.APIError(
|
785
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
786
|
+
)
|
787
|
+
if utils.match_response(http_res, "4XX", "*"):
|
788
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
789
|
+
raise errors.APIError(
|
790
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
791
|
+
)
|
792
|
+
if utils.match_response(http_res, "5XX", "*"):
|
793
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
794
|
+
raise errors.APIError(
|
795
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
796
|
+
)
|
797
|
+
|
798
|
+
content_type = http_res.headers.get("Content-Type")
|
799
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
800
|
+
raise errors.APIError(
|
801
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
802
|
+
http_res.status_code,
|
803
|
+
http_res_text,
|
804
|
+
http_res,
|
805
|
+
)
|
806
|
+
|
807
|
+
def update(
|
808
|
+
self,
|
809
|
+
*,
|
810
|
+
account_id: str,
|
811
|
+
issued_card_id: str,
|
812
|
+
state: Optional[components.IssuedCardState] = None,
|
813
|
+
memo: Optional[str] = None,
|
814
|
+
authorized_user: Optional[
|
815
|
+
Union[
|
816
|
+
components.CreateAuthorizedUserUpdate,
|
817
|
+
components.CreateAuthorizedUserUpdateTypedDict,
|
818
|
+
]
|
819
|
+
] = None,
|
820
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
821
|
+
server_url: Optional[str] = None,
|
822
|
+
timeout_ms: Optional[int] = None,
|
823
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
824
|
+
) -> operations.UpdateIssuedCardResponse:
|
825
|
+
r"""Update a Moov issued card.
|
826
|
+
|
827
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
828
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.write` scope.
|
829
|
+
|
830
|
+
:param account_id: The Moov business account for which the card was issued.
|
831
|
+
:param issued_card_id:
|
832
|
+
:param state: The `state` represents the operational status of an issued card. A card can only approve incoming authorizations if it is in an active state. - `active`: The card is operational and approves authorizations. Generally becomes active shortly after card creation. - `inactive`: The card cannot approve authorizations. This is currently a temporary state assigned post-creation during the activation process. - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires. - `pending-verification`: Awaiting additional authorized user verification before the card can be activated.
|
833
|
+
:param memo:
|
834
|
+
:param authorized_user: Fields for identifying an authorized individual.
|
835
|
+
:param retries: Override the default retry configuration for this method
|
836
|
+
:param server_url: Override the default server URL for this method
|
837
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
838
|
+
:param http_headers: Additional headers to set or replace on requests.
|
839
|
+
"""
|
840
|
+
base_url = None
|
841
|
+
url_variables = None
|
842
|
+
if timeout_ms is None:
|
843
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
844
|
+
|
845
|
+
if server_url is not None:
|
846
|
+
base_url = server_url
|
847
|
+
else:
|
848
|
+
base_url = self._get_url(base_url, url_variables)
|
849
|
+
|
850
|
+
request = operations.UpdateIssuedCardRequest(
|
851
|
+
account_id=account_id,
|
852
|
+
issued_card_id=issued_card_id,
|
853
|
+
update_issued_card=components.UpdateIssuedCard(
|
854
|
+
state=state,
|
855
|
+
memo=memo,
|
856
|
+
authorized_user=utils.get_pydantic_model(
|
857
|
+
authorized_user, Optional[components.CreateAuthorizedUserUpdate]
|
858
|
+
),
|
859
|
+
),
|
860
|
+
)
|
861
|
+
|
862
|
+
req = self._build_request(
|
863
|
+
method="PATCH",
|
864
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}",
|
865
|
+
base_url=base_url,
|
866
|
+
url_variables=url_variables,
|
867
|
+
request=request,
|
868
|
+
request_body_required=True,
|
869
|
+
request_has_path_params=True,
|
870
|
+
request_has_query_params=True,
|
871
|
+
user_agent_header="user-agent",
|
872
|
+
accept_header_value="application/json",
|
873
|
+
http_headers=http_headers,
|
874
|
+
_globals=operations.UpdateIssuedCardGlobals(
|
875
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
876
|
+
),
|
877
|
+
security=self.sdk_configuration.security,
|
878
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
879
|
+
request.update_issued_card,
|
880
|
+
False,
|
881
|
+
False,
|
882
|
+
"json",
|
883
|
+
components.UpdateIssuedCard,
|
884
|
+
),
|
885
|
+
timeout_ms=timeout_ms,
|
886
|
+
)
|
887
|
+
|
888
|
+
if retries == UNSET:
|
889
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
890
|
+
retries = self.sdk_configuration.retry_config
|
891
|
+
|
892
|
+
retry_config = None
|
893
|
+
if isinstance(retries, utils.RetryConfig):
|
894
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
895
|
+
|
896
|
+
http_res = self.do_request(
|
897
|
+
hook_ctx=HookContext(
|
898
|
+
base_url=base_url or "",
|
899
|
+
operation_id="updateIssuedCard",
|
900
|
+
oauth2_scopes=[],
|
901
|
+
security_source=get_security_from_env(
|
902
|
+
self.sdk_configuration.security, components.Security
|
903
|
+
),
|
904
|
+
),
|
905
|
+
request=req,
|
906
|
+
error_status_codes=[
|
907
|
+
"400",
|
908
|
+
"401",
|
909
|
+
"403",
|
910
|
+
"404",
|
911
|
+
"409",
|
912
|
+
"422",
|
913
|
+
"429",
|
914
|
+
"4XX",
|
915
|
+
"500",
|
916
|
+
"504",
|
917
|
+
"5XX",
|
918
|
+
],
|
919
|
+
retry_config=retry_config,
|
920
|
+
)
|
921
|
+
|
922
|
+
response_data: Any = None
|
923
|
+
if utils.match_response(http_res, "204", "*"):
|
924
|
+
return operations.UpdateIssuedCardResponse(
|
925
|
+
headers=utils.get_response_headers(http_res.headers)
|
926
|
+
)
|
927
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
928
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
929
|
+
raise errors.GenericError(data=response_data)
|
930
|
+
if utils.match_response(http_res, "422", "application/json"):
|
931
|
+
response_data = utils.unmarshal_json(
|
932
|
+
http_res.text, errors.UpdateIssuedCardErrorData
|
933
|
+
)
|
934
|
+
raise errors.UpdateIssuedCardError(data=response_data)
|
935
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
936
|
+
http_res_text = utils.stream_to_text(http_res)
|
937
|
+
raise errors.APIError(
|
938
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
939
|
+
)
|
940
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
941
|
+
http_res_text = utils.stream_to_text(http_res)
|
942
|
+
raise errors.APIError(
|
943
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
944
|
+
)
|
945
|
+
if utils.match_response(http_res, "4XX", "*"):
|
946
|
+
http_res_text = utils.stream_to_text(http_res)
|
947
|
+
raise errors.APIError(
|
948
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
949
|
+
)
|
950
|
+
if utils.match_response(http_res, "5XX", "*"):
|
951
|
+
http_res_text = utils.stream_to_text(http_res)
|
952
|
+
raise errors.APIError(
|
953
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
954
|
+
)
|
955
|
+
|
956
|
+
content_type = http_res.headers.get("Content-Type")
|
957
|
+
http_res_text = utils.stream_to_text(http_res)
|
958
|
+
raise errors.APIError(
|
959
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
960
|
+
http_res.status_code,
|
961
|
+
http_res_text,
|
962
|
+
http_res,
|
963
|
+
)
|
964
|
+
|
965
|
+
async def update_async(
|
966
|
+
self,
|
967
|
+
*,
|
968
|
+
account_id: str,
|
969
|
+
issued_card_id: str,
|
970
|
+
state: Optional[components.IssuedCardState] = None,
|
971
|
+
memo: Optional[str] = None,
|
972
|
+
authorized_user: Optional[
|
973
|
+
Union[
|
974
|
+
components.CreateAuthorizedUserUpdate,
|
975
|
+
components.CreateAuthorizedUserUpdateTypedDict,
|
976
|
+
]
|
977
|
+
] = None,
|
978
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
979
|
+
server_url: Optional[str] = None,
|
980
|
+
timeout_ms: Optional[int] = None,
|
981
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
982
|
+
) -> operations.UpdateIssuedCardResponse:
|
983
|
+
r"""Update a Moov issued card.
|
984
|
+
|
985
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
986
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.write` scope.
|
987
|
+
|
988
|
+
:param account_id: The Moov business account for which the card was issued.
|
989
|
+
:param issued_card_id:
|
990
|
+
:param state: The `state` represents the operational status of an issued card. A card can only approve incoming authorizations if it is in an active state. - `active`: The card is operational and approves authorizations. Generally becomes active shortly after card creation. - `inactive`: The card cannot approve authorizations. This is currently a temporary state assigned post-creation during the activation process. - `closed`: The card is permanently deactivated and cannot approve authorizations. A card can be closed by request or when it expires. - `pending-verification`: Awaiting additional authorized user verification before the card can be activated.
|
991
|
+
:param memo:
|
992
|
+
:param authorized_user: Fields for identifying an authorized individual.
|
993
|
+
:param retries: Override the default retry configuration for this method
|
994
|
+
:param server_url: Override the default server URL for this method
|
995
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
996
|
+
:param http_headers: Additional headers to set or replace on requests.
|
997
|
+
"""
|
998
|
+
base_url = None
|
999
|
+
url_variables = None
|
1000
|
+
if timeout_ms is None:
|
1001
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1002
|
+
|
1003
|
+
if server_url is not None:
|
1004
|
+
base_url = server_url
|
1005
|
+
else:
|
1006
|
+
base_url = self._get_url(base_url, url_variables)
|
1007
|
+
|
1008
|
+
request = operations.UpdateIssuedCardRequest(
|
1009
|
+
account_id=account_id,
|
1010
|
+
issued_card_id=issued_card_id,
|
1011
|
+
update_issued_card=components.UpdateIssuedCard(
|
1012
|
+
state=state,
|
1013
|
+
memo=memo,
|
1014
|
+
authorized_user=utils.get_pydantic_model(
|
1015
|
+
authorized_user, Optional[components.CreateAuthorizedUserUpdate]
|
1016
|
+
),
|
1017
|
+
),
|
1018
|
+
)
|
1019
|
+
|
1020
|
+
req = self._build_request_async(
|
1021
|
+
method="PATCH",
|
1022
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}",
|
1023
|
+
base_url=base_url,
|
1024
|
+
url_variables=url_variables,
|
1025
|
+
request=request,
|
1026
|
+
request_body_required=True,
|
1027
|
+
request_has_path_params=True,
|
1028
|
+
request_has_query_params=True,
|
1029
|
+
user_agent_header="user-agent",
|
1030
|
+
accept_header_value="application/json",
|
1031
|
+
http_headers=http_headers,
|
1032
|
+
_globals=operations.UpdateIssuedCardGlobals(
|
1033
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
1034
|
+
),
|
1035
|
+
security=self.sdk_configuration.security,
|
1036
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1037
|
+
request.update_issued_card,
|
1038
|
+
False,
|
1039
|
+
False,
|
1040
|
+
"json",
|
1041
|
+
components.UpdateIssuedCard,
|
1042
|
+
),
|
1043
|
+
timeout_ms=timeout_ms,
|
1044
|
+
)
|
1045
|
+
|
1046
|
+
if retries == UNSET:
|
1047
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1048
|
+
retries = self.sdk_configuration.retry_config
|
1049
|
+
|
1050
|
+
retry_config = None
|
1051
|
+
if isinstance(retries, utils.RetryConfig):
|
1052
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1053
|
+
|
1054
|
+
http_res = await self.do_request_async(
|
1055
|
+
hook_ctx=HookContext(
|
1056
|
+
base_url=base_url or "",
|
1057
|
+
operation_id="updateIssuedCard",
|
1058
|
+
oauth2_scopes=[],
|
1059
|
+
security_source=get_security_from_env(
|
1060
|
+
self.sdk_configuration.security, components.Security
|
1061
|
+
),
|
1062
|
+
),
|
1063
|
+
request=req,
|
1064
|
+
error_status_codes=[
|
1065
|
+
"400",
|
1066
|
+
"401",
|
1067
|
+
"403",
|
1068
|
+
"404",
|
1069
|
+
"409",
|
1070
|
+
"422",
|
1071
|
+
"429",
|
1072
|
+
"4XX",
|
1073
|
+
"500",
|
1074
|
+
"504",
|
1075
|
+
"5XX",
|
1076
|
+
],
|
1077
|
+
retry_config=retry_config,
|
1078
|
+
)
|
1079
|
+
|
1080
|
+
response_data: Any = None
|
1081
|
+
if utils.match_response(http_res, "204", "*"):
|
1082
|
+
return operations.UpdateIssuedCardResponse(
|
1083
|
+
headers=utils.get_response_headers(http_res.headers)
|
1084
|
+
)
|
1085
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
1086
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
1087
|
+
raise errors.GenericError(data=response_data)
|
1088
|
+
if utils.match_response(http_res, "422", "application/json"):
|
1089
|
+
response_data = utils.unmarshal_json(
|
1090
|
+
http_res.text, errors.UpdateIssuedCardErrorData
|
1091
|
+
)
|
1092
|
+
raise errors.UpdateIssuedCardError(data=response_data)
|
1093
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
1094
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1095
|
+
raise errors.APIError(
|
1096
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1097
|
+
)
|
1098
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
1099
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1100
|
+
raise errors.APIError(
|
1101
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1102
|
+
)
|
1103
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1104
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1105
|
+
raise errors.APIError(
|
1106
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1107
|
+
)
|
1108
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1109
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1110
|
+
raise errors.APIError(
|
1111
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1112
|
+
)
|
1113
|
+
|
1114
|
+
content_type = http_res.headers.get("Content-Type")
|
1115
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1116
|
+
raise errors.APIError(
|
1117
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1118
|
+
http_res.status_code,
|
1119
|
+
http_res_text,
|
1120
|
+
http_res,
|
1121
|
+
)
|
1122
|
+
|
1123
|
+
def get_full(
|
1124
|
+
self,
|
1125
|
+
*,
|
1126
|
+
account_id: str,
|
1127
|
+
issued_card_id: str,
|
1128
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1129
|
+
server_url: Optional[str] = None,
|
1130
|
+
timeout_ms: Optional[int] = None,
|
1131
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1132
|
+
) -> operations.GetFullIssuedCardResponse:
|
1133
|
+
r"""Get issued card with PAN, CVV, and expiration.
|
1134
|
+
|
1135
|
+
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
1136
|
+
|
1137
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
1138
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read-secure` scope.
|
1139
|
+
|
1140
|
+
:param account_id: The Moov business account for which the card was issued.
|
1141
|
+
:param issued_card_id:
|
1142
|
+
:param retries: Override the default retry configuration for this method
|
1143
|
+
:param server_url: Override the default server URL for this method
|
1144
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1145
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1146
|
+
"""
|
1147
|
+
base_url = None
|
1148
|
+
url_variables = None
|
1149
|
+
if timeout_ms is None:
|
1150
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1151
|
+
|
1152
|
+
if server_url is not None:
|
1153
|
+
base_url = server_url
|
1154
|
+
else:
|
1155
|
+
base_url = self._get_url(base_url, url_variables)
|
1156
|
+
|
1157
|
+
request = operations.GetFullIssuedCardRequest(
|
1158
|
+
account_id=account_id,
|
1159
|
+
issued_card_id=issued_card_id,
|
1160
|
+
)
|
1161
|
+
|
1162
|
+
req = self._build_request(
|
1163
|
+
method="GET",
|
1164
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}/details",
|
1165
|
+
base_url=base_url,
|
1166
|
+
url_variables=url_variables,
|
1167
|
+
request=request,
|
1168
|
+
request_body_required=False,
|
1169
|
+
request_has_path_params=True,
|
1170
|
+
request_has_query_params=True,
|
1171
|
+
user_agent_header="user-agent",
|
1172
|
+
accept_header_value="application/json",
|
1173
|
+
http_headers=http_headers,
|
1174
|
+
_globals=operations.GetFullIssuedCardGlobals(
|
1175
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
1176
|
+
),
|
1177
|
+
security=self.sdk_configuration.security,
|
1178
|
+
timeout_ms=timeout_ms,
|
1179
|
+
)
|
1180
|
+
|
1181
|
+
if retries == UNSET:
|
1182
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1183
|
+
retries = self.sdk_configuration.retry_config
|
1184
|
+
|
1185
|
+
retry_config = None
|
1186
|
+
if isinstance(retries, utils.RetryConfig):
|
1187
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1188
|
+
|
1189
|
+
http_res = self.do_request(
|
1190
|
+
hook_ctx=HookContext(
|
1191
|
+
base_url=base_url or "",
|
1192
|
+
operation_id="getFullIssuedCard",
|
1193
|
+
oauth2_scopes=[],
|
1194
|
+
security_source=get_security_from_env(
|
1195
|
+
self.sdk_configuration.security, components.Security
|
1196
|
+
),
|
1197
|
+
),
|
1198
|
+
request=req,
|
1199
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
1200
|
+
retry_config=retry_config,
|
1201
|
+
)
|
1202
|
+
|
1203
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1204
|
+
return operations.GetFullIssuedCardResponse(
|
1205
|
+
result=utils.unmarshal_json(http_res.text, components.FullIssuedCard),
|
1206
|
+
headers=utils.get_response_headers(http_res.headers),
|
1207
|
+
)
|
1208
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
1209
|
+
http_res_text = utils.stream_to_text(http_res)
|
1210
|
+
raise errors.APIError(
|
1211
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1212
|
+
)
|
1213
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
1214
|
+
http_res_text = utils.stream_to_text(http_res)
|
1215
|
+
raise errors.APIError(
|
1216
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1217
|
+
)
|
1218
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1219
|
+
http_res_text = utils.stream_to_text(http_res)
|
1220
|
+
raise errors.APIError(
|
1221
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1222
|
+
)
|
1223
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1224
|
+
http_res_text = utils.stream_to_text(http_res)
|
1225
|
+
raise errors.APIError(
|
1226
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1227
|
+
)
|
1228
|
+
|
1229
|
+
content_type = http_res.headers.get("Content-Type")
|
1230
|
+
http_res_text = utils.stream_to_text(http_res)
|
1231
|
+
raise errors.APIError(
|
1232
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1233
|
+
http_res.status_code,
|
1234
|
+
http_res_text,
|
1235
|
+
http_res,
|
1236
|
+
)
|
1237
|
+
|
1238
|
+
async def get_full_async(
|
1239
|
+
self,
|
1240
|
+
*,
|
1241
|
+
account_id: str,
|
1242
|
+
issued_card_id: str,
|
1243
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1244
|
+
server_url: Optional[str] = None,
|
1245
|
+
timeout_ms: Optional[int] = None,
|
1246
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1247
|
+
) -> operations.GetFullIssuedCardResponse:
|
1248
|
+
r"""Get issued card with PAN, CVV, and expiration.
|
1249
|
+
|
1250
|
+
Only use this endpoint if you have provided Moov with a copy of your PCI attestation of compliance.
|
1251
|
+
|
1252
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
1253
|
+
you'll need to specify the `/accounts/{accountID}/issued-cards.read-secure` scope.
|
1254
|
+
|
1255
|
+
:param account_id: The Moov business account for which the card was issued.
|
1256
|
+
:param issued_card_id:
|
1257
|
+
:param retries: Override the default retry configuration for this method
|
1258
|
+
:param server_url: Override the default server URL for this method
|
1259
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1260
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1261
|
+
"""
|
1262
|
+
base_url = None
|
1263
|
+
url_variables = None
|
1264
|
+
if timeout_ms is None:
|
1265
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1266
|
+
|
1267
|
+
if server_url is not None:
|
1268
|
+
base_url = server_url
|
1269
|
+
else:
|
1270
|
+
base_url = self._get_url(base_url, url_variables)
|
1271
|
+
|
1272
|
+
request = operations.GetFullIssuedCardRequest(
|
1273
|
+
account_id=account_id,
|
1274
|
+
issued_card_id=issued_card_id,
|
1275
|
+
)
|
1276
|
+
|
1277
|
+
req = self._build_request_async(
|
1278
|
+
method="GET",
|
1279
|
+
path="/issuing/{accountID}/issued-cards/{issuedCardID}/details",
|
1280
|
+
base_url=base_url,
|
1281
|
+
url_variables=url_variables,
|
1282
|
+
request=request,
|
1283
|
+
request_body_required=False,
|
1284
|
+
request_has_path_params=True,
|
1285
|
+
request_has_query_params=True,
|
1286
|
+
user_agent_header="user-agent",
|
1287
|
+
accept_header_value="application/json",
|
1288
|
+
http_headers=http_headers,
|
1289
|
+
_globals=operations.GetFullIssuedCardGlobals(
|
1290
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
1291
|
+
),
|
1292
|
+
security=self.sdk_configuration.security,
|
1293
|
+
timeout_ms=timeout_ms,
|
1294
|
+
)
|
1295
|
+
|
1296
|
+
if retries == UNSET:
|
1297
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1298
|
+
retries = self.sdk_configuration.retry_config
|
1299
|
+
|
1300
|
+
retry_config = None
|
1301
|
+
if isinstance(retries, utils.RetryConfig):
|
1302
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1303
|
+
|
1304
|
+
http_res = await self.do_request_async(
|
1305
|
+
hook_ctx=HookContext(
|
1306
|
+
base_url=base_url or "",
|
1307
|
+
operation_id="getFullIssuedCard",
|
1308
|
+
oauth2_scopes=[],
|
1309
|
+
security_source=get_security_from_env(
|
1310
|
+
self.sdk_configuration.security, components.Security
|
1311
|
+
),
|
1312
|
+
),
|
1313
|
+
request=req,
|
1314
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
1315
|
+
retry_config=retry_config,
|
1316
|
+
)
|
1317
|
+
|
1318
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1319
|
+
return operations.GetFullIssuedCardResponse(
|
1320
|
+
result=utils.unmarshal_json(http_res.text, components.FullIssuedCard),
|
1321
|
+
headers=utils.get_response_headers(http_res.headers),
|
1322
|
+
)
|
1323
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
1324
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1325
|
+
raise errors.APIError(
|
1326
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1327
|
+
)
|
1328
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
1329
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1330
|
+
raise errors.APIError(
|
1331
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1332
|
+
)
|
1333
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1334
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1335
|
+
raise errors.APIError(
|
1336
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1337
|
+
)
|
1338
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1339
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1340
|
+
raise errors.APIError(
|
1341
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1342
|
+
)
|
1343
|
+
|
1344
|
+
content_type = http_res.headers.get("Content-Type")
|
1345
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1346
|
+
raise errors.APIError(
|
1347
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1348
|
+
http_res.status_code,
|
1349
|
+
http_res_text,
|
1350
|
+
http_res,
|
1351
|
+
)
|