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
moovio_sdk/branding.py
ADDED
@@ -0,0 +1,1089 @@
|
|
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, Mapping, Optional, Union
|
10
|
+
|
11
|
+
|
12
|
+
class Branding(BaseSDK):
|
13
|
+
def create(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
account_id: str,
|
17
|
+
colors: Union[components.BrandColors, components.BrandColorsTypedDict],
|
18
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
19
|
+
server_url: Optional[str] = None,
|
20
|
+
timeout_ms: Optional[int] = None,
|
21
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
22
|
+
) -> operations.CreateBrandResponse:
|
23
|
+
r"""Create brand properties for the specified account.
|
24
|
+
|
25
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
26
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
27
|
+
|
28
|
+
:param account_id:
|
29
|
+
:param colors: Brand colors for light and dark modes.
|
30
|
+
:param retries: Override the default retry configuration for this method
|
31
|
+
:param server_url: Override the default server URL for this method
|
32
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
33
|
+
:param http_headers: Additional headers to set or replace on requests.
|
34
|
+
"""
|
35
|
+
base_url = None
|
36
|
+
url_variables = None
|
37
|
+
if timeout_ms is None:
|
38
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
39
|
+
|
40
|
+
if server_url is not None:
|
41
|
+
base_url = server_url
|
42
|
+
else:
|
43
|
+
base_url = self._get_url(base_url, url_variables)
|
44
|
+
|
45
|
+
request = operations.CreateBrandRequest(
|
46
|
+
account_id=account_id,
|
47
|
+
brand_properties=components.BrandProperties(
|
48
|
+
colors=utils.get_pydantic_model(colors, components.BrandColors),
|
49
|
+
),
|
50
|
+
)
|
51
|
+
|
52
|
+
req = self._build_request(
|
53
|
+
method="POST",
|
54
|
+
path="/accounts/{accountID}/branding",
|
55
|
+
base_url=base_url,
|
56
|
+
url_variables=url_variables,
|
57
|
+
request=request,
|
58
|
+
request_body_required=True,
|
59
|
+
request_has_path_params=True,
|
60
|
+
request_has_query_params=True,
|
61
|
+
user_agent_header="user-agent",
|
62
|
+
accept_header_value="application/json",
|
63
|
+
http_headers=http_headers,
|
64
|
+
_globals=operations.CreateBrandGlobals(
|
65
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
66
|
+
),
|
67
|
+
security=self.sdk_configuration.security,
|
68
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
69
|
+
request.brand_properties,
|
70
|
+
False,
|
71
|
+
False,
|
72
|
+
"json",
|
73
|
+
components.BrandProperties,
|
74
|
+
),
|
75
|
+
timeout_ms=timeout_ms,
|
76
|
+
)
|
77
|
+
|
78
|
+
if retries == UNSET:
|
79
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
80
|
+
retries = self.sdk_configuration.retry_config
|
81
|
+
|
82
|
+
retry_config = None
|
83
|
+
if isinstance(retries, utils.RetryConfig):
|
84
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
85
|
+
|
86
|
+
http_res = self.do_request(
|
87
|
+
hook_ctx=HookContext(
|
88
|
+
base_url=base_url or "",
|
89
|
+
operation_id="createBrand",
|
90
|
+
oauth2_scopes=[],
|
91
|
+
security_source=get_security_from_env(
|
92
|
+
self.sdk_configuration.security, components.Security
|
93
|
+
),
|
94
|
+
),
|
95
|
+
request=req,
|
96
|
+
error_status_codes=[
|
97
|
+
"400",
|
98
|
+
"401",
|
99
|
+
"403",
|
100
|
+
"404",
|
101
|
+
"409",
|
102
|
+
"422",
|
103
|
+
"429",
|
104
|
+
"4XX",
|
105
|
+
"500",
|
106
|
+
"504",
|
107
|
+
"5XX",
|
108
|
+
],
|
109
|
+
retry_config=retry_config,
|
110
|
+
)
|
111
|
+
|
112
|
+
response_data: Any = None
|
113
|
+
if utils.match_response(http_res, "200", "application/json"):
|
114
|
+
return operations.CreateBrandResponse(
|
115
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
116
|
+
headers=utils.get_response_headers(http_res.headers),
|
117
|
+
)
|
118
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
119
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
120
|
+
raise errors.GenericError(data=response_data)
|
121
|
+
if utils.match_response(http_res, "422", "application/json"):
|
122
|
+
response_data = utils.unmarshal_json(
|
123
|
+
http_res.text, errors.BrandValidationErrorData
|
124
|
+
)
|
125
|
+
raise errors.BrandValidationError(data=response_data)
|
126
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
127
|
+
http_res_text = utils.stream_to_text(http_res)
|
128
|
+
raise errors.APIError(
|
129
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
130
|
+
)
|
131
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
132
|
+
http_res_text = utils.stream_to_text(http_res)
|
133
|
+
raise errors.APIError(
|
134
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
135
|
+
)
|
136
|
+
if utils.match_response(http_res, "4XX", "*"):
|
137
|
+
http_res_text = utils.stream_to_text(http_res)
|
138
|
+
raise errors.APIError(
|
139
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
140
|
+
)
|
141
|
+
if utils.match_response(http_res, "5XX", "*"):
|
142
|
+
http_res_text = utils.stream_to_text(http_res)
|
143
|
+
raise errors.APIError(
|
144
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
145
|
+
)
|
146
|
+
|
147
|
+
content_type = http_res.headers.get("Content-Type")
|
148
|
+
http_res_text = utils.stream_to_text(http_res)
|
149
|
+
raise errors.APIError(
|
150
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
151
|
+
http_res.status_code,
|
152
|
+
http_res_text,
|
153
|
+
http_res,
|
154
|
+
)
|
155
|
+
|
156
|
+
async def create_async(
|
157
|
+
self,
|
158
|
+
*,
|
159
|
+
account_id: str,
|
160
|
+
colors: Union[components.BrandColors, components.BrandColorsTypedDict],
|
161
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
162
|
+
server_url: Optional[str] = None,
|
163
|
+
timeout_ms: Optional[int] = None,
|
164
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
165
|
+
) -> operations.CreateBrandResponse:
|
166
|
+
r"""Create brand properties for the specified account.
|
167
|
+
|
168
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
169
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
170
|
+
|
171
|
+
:param account_id:
|
172
|
+
:param colors: Brand colors for light and dark modes.
|
173
|
+
:param retries: Override the default retry configuration for this method
|
174
|
+
:param server_url: Override the default server URL for this method
|
175
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
176
|
+
:param http_headers: Additional headers to set or replace on requests.
|
177
|
+
"""
|
178
|
+
base_url = None
|
179
|
+
url_variables = None
|
180
|
+
if timeout_ms is None:
|
181
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
182
|
+
|
183
|
+
if server_url is not None:
|
184
|
+
base_url = server_url
|
185
|
+
else:
|
186
|
+
base_url = self._get_url(base_url, url_variables)
|
187
|
+
|
188
|
+
request = operations.CreateBrandRequest(
|
189
|
+
account_id=account_id,
|
190
|
+
brand_properties=components.BrandProperties(
|
191
|
+
colors=utils.get_pydantic_model(colors, components.BrandColors),
|
192
|
+
),
|
193
|
+
)
|
194
|
+
|
195
|
+
req = self._build_request_async(
|
196
|
+
method="POST",
|
197
|
+
path="/accounts/{accountID}/branding",
|
198
|
+
base_url=base_url,
|
199
|
+
url_variables=url_variables,
|
200
|
+
request=request,
|
201
|
+
request_body_required=True,
|
202
|
+
request_has_path_params=True,
|
203
|
+
request_has_query_params=True,
|
204
|
+
user_agent_header="user-agent",
|
205
|
+
accept_header_value="application/json",
|
206
|
+
http_headers=http_headers,
|
207
|
+
_globals=operations.CreateBrandGlobals(
|
208
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
209
|
+
),
|
210
|
+
security=self.sdk_configuration.security,
|
211
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
212
|
+
request.brand_properties,
|
213
|
+
False,
|
214
|
+
False,
|
215
|
+
"json",
|
216
|
+
components.BrandProperties,
|
217
|
+
),
|
218
|
+
timeout_ms=timeout_ms,
|
219
|
+
)
|
220
|
+
|
221
|
+
if retries == UNSET:
|
222
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
223
|
+
retries = self.sdk_configuration.retry_config
|
224
|
+
|
225
|
+
retry_config = None
|
226
|
+
if isinstance(retries, utils.RetryConfig):
|
227
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
228
|
+
|
229
|
+
http_res = await self.do_request_async(
|
230
|
+
hook_ctx=HookContext(
|
231
|
+
base_url=base_url or "",
|
232
|
+
operation_id="createBrand",
|
233
|
+
oauth2_scopes=[],
|
234
|
+
security_source=get_security_from_env(
|
235
|
+
self.sdk_configuration.security, components.Security
|
236
|
+
),
|
237
|
+
),
|
238
|
+
request=req,
|
239
|
+
error_status_codes=[
|
240
|
+
"400",
|
241
|
+
"401",
|
242
|
+
"403",
|
243
|
+
"404",
|
244
|
+
"409",
|
245
|
+
"422",
|
246
|
+
"429",
|
247
|
+
"4XX",
|
248
|
+
"500",
|
249
|
+
"504",
|
250
|
+
"5XX",
|
251
|
+
],
|
252
|
+
retry_config=retry_config,
|
253
|
+
)
|
254
|
+
|
255
|
+
response_data: Any = None
|
256
|
+
if utils.match_response(http_res, "200", "application/json"):
|
257
|
+
return operations.CreateBrandResponse(
|
258
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
259
|
+
headers=utils.get_response_headers(http_res.headers),
|
260
|
+
)
|
261
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
262
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
263
|
+
raise errors.GenericError(data=response_data)
|
264
|
+
if utils.match_response(http_res, "422", "application/json"):
|
265
|
+
response_data = utils.unmarshal_json(
|
266
|
+
http_res.text, errors.BrandValidationErrorData
|
267
|
+
)
|
268
|
+
raise errors.BrandValidationError(data=response_data)
|
269
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
270
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
271
|
+
raise errors.APIError(
|
272
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
273
|
+
)
|
274
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
275
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
276
|
+
raise errors.APIError(
|
277
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
278
|
+
)
|
279
|
+
if utils.match_response(http_res, "4XX", "*"):
|
280
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
281
|
+
raise errors.APIError(
|
282
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
283
|
+
)
|
284
|
+
if utils.match_response(http_res, "5XX", "*"):
|
285
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
286
|
+
raise errors.APIError(
|
287
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
288
|
+
)
|
289
|
+
|
290
|
+
content_type = http_res.headers.get("Content-Type")
|
291
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
292
|
+
raise errors.APIError(
|
293
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
294
|
+
http_res.status_code,
|
295
|
+
http_res_text,
|
296
|
+
http_res,
|
297
|
+
)
|
298
|
+
|
299
|
+
def upsert(
|
300
|
+
self,
|
301
|
+
*,
|
302
|
+
account_id: str,
|
303
|
+
colors: Union[components.BrandColors, components.BrandColorsTypedDict],
|
304
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
305
|
+
server_url: Optional[str] = None,
|
306
|
+
timeout_ms: Optional[int] = None,
|
307
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
308
|
+
) -> operations.UpsertBrandResponse:
|
309
|
+
r"""Create or replace brand properties for the specified account.
|
310
|
+
|
311
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
312
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
313
|
+
|
314
|
+
:param account_id:
|
315
|
+
:param colors: Brand colors for light and dark modes.
|
316
|
+
:param retries: Override the default retry configuration for this method
|
317
|
+
:param server_url: Override the default server URL for this method
|
318
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
319
|
+
:param http_headers: Additional headers to set or replace on requests.
|
320
|
+
"""
|
321
|
+
base_url = None
|
322
|
+
url_variables = None
|
323
|
+
if timeout_ms is None:
|
324
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
325
|
+
|
326
|
+
if server_url is not None:
|
327
|
+
base_url = server_url
|
328
|
+
else:
|
329
|
+
base_url = self._get_url(base_url, url_variables)
|
330
|
+
|
331
|
+
request = operations.UpsertBrandRequest(
|
332
|
+
account_id=account_id,
|
333
|
+
brand_properties=components.BrandProperties(
|
334
|
+
colors=utils.get_pydantic_model(colors, components.BrandColors),
|
335
|
+
),
|
336
|
+
)
|
337
|
+
|
338
|
+
req = self._build_request(
|
339
|
+
method="PUT",
|
340
|
+
path="/accounts/{accountID}/branding",
|
341
|
+
base_url=base_url,
|
342
|
+
url_variables=url_variables,
|
343
|
+
request=request,
|
344
|
+
request_body_required=True,
|
345
|
+
request_has_path_params=True,
|
346
|
+
request_has_query_params=True,
|
347
|
+
user_agent_header="user-agent",
|
348
|
+
accept_header_value="application/json",
|
349
|
+
http_headers=http_headers,
|
350
|
+
_globals=operations.UpsertBrandGlobals(
|
351
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
352
|
+
),
|
353
|
+
security=self.sdk_configuration.security,
|
354
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
355
|
+
request.brand_properties,
|
356
|
+
False,
|
357
|
+
False,
|
358
|
+
"json",
|
359
|
+
components.BrandProperties,
|
360
|
+
),
|
361
|
+
timeout_ms=timeout_ms,
|
362
|
+
)
|
363
|
+
|
364
|
+
if retries == UNSET:
|
365
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
366
|
+
retries = self.sdk_configuration.retry_config
|
367
|
+
|
368
|
+
retry_config = None
|
369
|
+
if isinstance(retries, utils.RetryConfig):
|
370
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
371
|
+
|
372
|
+
http_res = self.do_request(
|
373
|
+
hook_ctx=HookContext(
|
374
|
+
base_url=base_url or "",
|
375
|
+
operation_id="upsertBrand",
|
376
|
+
oauth2_scopes=[],
|
377
|
+
security_source=get_security_from_env(
|
378
|
+
self.sdk_configuration.security, components.Security
|
379
|
+
),
|
380
|
+
),
|
381
|
+
request=req,
|
382
|
+
error_status_codes=[
|
383
|
+
"400",
|
384
|
+
"401",
|
385
|
+
"403",
|
386
|
+
"404",
|
387
|
+
"409",
|
388
|
+
"422",
|
389
|
+
"429",
|
390
|
+
"4XX",
|
391
|
+
"500",
|
392
|
+
"504",
|
393
|
+
"5XX",
|
394
|
+
],
|
395
|
+
retry_config=retry_config,
|
396
|
+
)
|
397
|
+
|
398
|
+
response_data: Any = None
|
399
|
+
if utils.match_response(http_res, "200", "application/json"):
|
400
|
+
return operations.UpsertBrandResponse(
|
401
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
402
|
+
headers=utils.get_response_headers(http_res.headers),
|
403
|
+
)
|
404
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
405
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
406
|
+
raise errors.GenericError(data=response_data)
|
407
|
+
if utils.match_response(http_res, "422", "application/json"):
|
408
|
+
response_data = utils.unmarshal_json(
|
409
|
+
http_res.text, errors.BrandValidationErrorData
|
410
|
+
)
|
411
|
+
raise errors.BrandValidationError(data=response_data)
|
412
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
413
|
+
http_res_text = utils.stream_to_text(http_res)
|
414
|
+
raise errors.APIError(
|
415
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
416
|
+
)
|
417
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
418
|
+
http_res_text = utils.stream_to_text(http_res)
|
419
|
+
raise errors.APIError(
|
420
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
421
|
+
)
|
422
|
+
if utils.match_response(http_res, "4XX", "*"):
|
423
|
+
http_res_text = utils.stream_to_text(http_res)
|
424
|
+
raise errors.APIError(
|
425
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
426
|
+
)
|
427
|
+
if utils.match_response(http_res, "5XX", "*"):
|
428
|
+
http_res_text = utils.stream_to_text(http_res)
|
429
|
+
raise errors.APIError(
|
430
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
431
|
+
)
|
432
|
+
|
433
|
+
content_type = http_res.headers.get("Content-Type")
|
434
|
+
http_res_text = utils.stream_to_text(http_res)
|
435
|
+
raise errors.APIError(
|
436
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
437
|
+
http_res.status_code,
|
438
|
+
http_res_text,
|
439
|
+
http_res,
|
440
|
+
)
|
441
|
+
|
442
|
+
async def upsert_async(
|
443
|
+
self,
|
444
|
+
*,
|
445
|
+
account_id: str,
|
446
|
+
colors: Union[components.BrandColors, components.BrandColorsTypedDict],
|
447
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
448
|
+
server_url: Optional[str] = None,
|
449
|
+
timeout_ms: Optional[int] = None,
|
450
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
451
|
+
) -> operations.UpsertBrandResponse:
|
452
|
+
r"""Create or replace brand properties for the specified account.
|
453
|
+
|
454
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
455
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
456
|
+
|
457
|
+
:param account_id:
|
458
|
+
:param colors: Brand colors for light and dark modes.
|
459
|
+
:param retries: Override the default retry configuration for this method
|
460
|
+
:param server_url: Override the default server URL for this method
|
461
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
462
|
+
:param http_headers: Additional headers to set or replace on requests.
|
463
|
+
"""
|
464
|
+
base_url = None
|
465
|
+
url_variables = None
|
466
|
+
if timeout_ms is None:
|
467
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
468
|
+
|
469
|
+
if server_url is not None:
|
470
|
+
base_url = server_url
|
471
|
+
else:
|
472
|
+
base_url = self._get_url(base_url, url_variables)
|
473
|
+
|
474
|
+
request = operations.UpsertBrandRequest(
|
475
|
+
account_id=account_id,
|
476
|
+
brand_properties=components.BrandProperties(
|
477
|
+
colors=utils.get_pydantic_model(colors, components.BrandColors),
|
478
|
+
),
|
479
|
+
)
|
480
|
+
|
481
|
+
req = self._build_request_async(
|
482
|
+
method="PUT",
|
483
|
+
path="/accounts/{accountID}/branding",
|
484
|
+
base_url=base_url,
|
485
|
+
url_variables=url_variables,
|
486
|
+
request=request,
|
487
|
+
request_body_required=True,
|
488
|
+
request_has_path_params=True,
|
489
|
+
request_has_query_params=True,
|
490
|
+
user_agent_header="user-agent",
|
491
|
+
accept_header_value="application/json",
|
492
|
+
http_headers=http_headers,
|
493
|
+
_globals=operations.UpsertBrandGlobals(
|
494
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
495
|
+
),
|
496
|
+
security=self.sdk_configuration.security,
|
497
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
498
|
+
request.brand_properties,
|
499
|
+
False,
|
500
|
+
False,
|
501
|
+
"json",
|
502
|
+
components.BrandProperties,
|
503
|
+
),
|
504
|
+
timeout_ms=timeout_ms,
|
505
|
+
)
|
506
|
+
|
507
|
+
if retries == UNSET:
|
508
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
509
|
+
retries = self.sdk_configuration.retry_config
|
510
|
+
|
511
|
+
retry_config = None
|
512
|
+
if isinstance(retries, utils.RetryConfig):
|
513
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
514
|
+
|
515
|
+
http_res = await self.do_request_async(
|
516
|
+
hook_ctx=HookContext(
|
517
|
+
base_url=base_url or "",
|
518
|
+
operation_id="upsertBrand",
|
519
|
+
oauth2_scopes=[],
|
520
|
+
security_source=get_security_from_env(
|
521
|
+
self.sdk_configuration.security, components.Security
|
522
|
+
),
|
523
|
+
),
|
524
|
+
request=req,
|
525
|
+
error_status_codes=[
|
526
|
+
"400",
|
527
|
+
"401",
|
528
|
+
"403",
|
529
|
+
"404",
|
530
|
+
"409",
|
531
|
+
"422",
|
532
|
+
"429",
|
533
|
+
"4XX",
|
534
|
+
"500",
|
535
|
+
"504",
|
536
|
+
"5XX",
|
537
|
+
],
|
538
|
+
retry_config=retry_config,
|
539
|
+
)
|
540
|
+
|
541
|
+
response_data: Any = None
|
542
|
+
if utils.match_response(http_res, "200", "application/json"):
|
543
|
+
return operations.UpsertBrandResponse(
|
544
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
545
|
+
headers=utils.get_response_headers(http_res.headers),
|
546
|
+
)
|
547
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
548
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
549
|
+
raise errors.GenericError(data=response_data)
|
550
|
+
if utils.match_response(http_res, "422", "application/json"):
|
551
|
+
response_data = utils.unmarshal_json(
|
552
|
+
http_res.text, errors.BrandValidationErrorData
|
553
|
+
)
|
554
|
+
raise errors.BrandValidationError(data=response_data)
|
555
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
556
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
557
|
+
raise errors.APIError(
|
558
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
559
|
+
)
|
560
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
561
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
562
|
+
raise errors.APIError(
|
563
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
564
|
+
)
|
565
|
+
if utils.match_response(http_res, "4XX", "*"):
|
566
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
567
|
+
raise errors.APIError(
|
568
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
569
|
+
)
|
570
|
+
if utils.match_response(http_res, "5XX", "*"):
|
571
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
572
|
+
raise errors.APIError(
|
573
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
574
|
+
)
|
575
|
+
|
576
|
+
content_type = http_res.headers.get("Content-Type")
|
577
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
578
|
+
raise errors.APIError(
|
579
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
580
|
+
http_res.status_code,
|
581
|
+
http_res_text,
|
582
|
+
http_res,
|
583
|
+
)
|
584
|
+
|
585
|
+
def get(
|
586
|
+
self,
|
587
|
+
*,
|
588
|
+
account_id: str,
|
589
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
590
|
+
server_url: Optional[str] = None,
|
591
|
+
timeout_ms: Optional[int] = None,
|
592
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
593
|
+
) -> operations.GetBrandResponse:
|
594
|
+
r"""Get brand properties for the specified account.
|
595
|
+
|
596
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
597
|
+
you'll need to specify the `/accounts/{accountID}/branding.read` scope.
|
598
|
+
|
599
|
+
:param account_id:
|
600
|
+
:param retries: Override the default retry configuration for this method
|
601
|
+
:param server_url: Override the default server URL for this method
|
602
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
603
|
+
:param http_headers: Additional headers to set or replace on requests.
|
604
|
+
"""
|
605
|
+
base_url = None
|
606
|
+
url_variables = None
|
607
|
+
if timeout_ms is None:
|
608
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
609
|
+
|
610
|
+
if server_url is not None:
|
611
|
+
base_url = server_url
|
612
|
+
else:
|
613
|
+
base_url = self._get_url(base_url, url_variables)
|
614
|
+
|
615
|
+
request = operations.GetBrandRequest(
|
616
|
+
account_id=account_id,
|
617
|
+
)
|
618
|
+
|
619
|
+
req = self._build_request(
|
620
|
+
method="GET",
|
621
|
+
path="/accounts/{accountID}/branding",
|
622
|
+
base_url=base_url,
|
623
|
+
url_variables=url_variables,
|
624
|
+
request=request,
|
625
|
+
request_body_required=False,
|
626
|
+
request_has_path_params=True,
|
627
|
+
request_has_query_params=True,
|
628
|
+
user_agent_header="user-agent",
|
629
|
+
accept_header_value="application/json",
|
630
|
+
http_headers=http_headers,
|
631
|
+
_globals=operations.GetBrandGlobals(
|
632
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
633
|
+
),
|
634
|
+
security=self.sdk_configuration.security,
|
635
|
+
timeout_ms=timeout_ms,
|
636
|
+
)
|
637
|
+
|
638
|
+
if retries == UNSET:
|
639
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
640
|
+
retries = self.sdk_configuration.retry_config
|
641
|
+
|
642
|
+
retry_config = None
|
643
|
+
if isinstance(retries, utils.RetryConfig):
|
644
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
645
|
+
|
646
|
+
http_res = self.do_request(
|
647
|
+
hook_ctx=HookContext(
|
648
|
+
base_url=base_url or "",
|
649
|
+
operation_id="getBrand",
|
650
|
+
oauth2_scopes=[],
|
651
|
+
security_source=get_security_from_env(
|
652
|
+
self.sdk_configuration.security, components.Security
|
653
|
+
),
|
654
|
+
),
|
655
|
+
request=req,
|
656
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
657
|
+
retry_config=retry_config,
|
658
|
+
)
|
659
|
+
|
660
|
+
if utils.match_response(http_res, "200", "application/json"):
|
661
|
+
return operations.GetBrandResponse(
|
662
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
663
|
+
headers=utils.get_response_headers(http_res.headers),
|
664
|
+
)
|
665
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
666
|
+
http_res_text = utils.stream_to_text(http_res)
|
667
|
+
raise errors.APIError(
|
668
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
669
|
+
)
|
670
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
671
|
+
http_res_text = utils.stream_to_text(http_res)
|
672
|
+
raise errors.APIError(
|
673
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
674
|
+
)
|
675
|
+
if utils.match_response(http_res, "4XX", "*"):
|
676
|
+
http_res_text = utils.stream_to_text(http_res)
|
677
|
+
raise errors.APIError(
|
678
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
679
|
+
)
|
680
|
+
if utils.match_response(http_res, "5XX", "*"):
|
681
|
+
http_res_text = utils.stream_to_text(http_res)
|
682
|
+
raise errors.APIError(
|
683
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
684
|
+
)
|
685
|
+
|
686
|
+
content_type = http_res.headers.get("Content-Type")
|
687
|
+
http_res_text = utils.stream_to_text(http_res)
|
688
|
+
raise errors.APIError(
|
689
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
690
|
+
http_res.status_code,
|
691
|
+
http_res_text,
|
692
|
+
http_res,
|
693
|
+
)
|
694
|
+
|
695
|
+
async def get_async(
|
696
|
+
self,
|
697
|
+
*,
|
698
|
+
account_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.GetBrandResponse:
|
704
|
+
r"""Get brand properties for the specified 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}/branding.read` scope.
|
708
|
+
|
709
|
+
:param account_id:
|
710
|
+
:param retries: Override the default retry configuration for this method
|
711
|
+
:param server_url: Override the default server URL for this method
|
712
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
713
|
+
:param http_headers: Additional headers to set or replace on requests.
|
714
|
+
"""
|
715
|
+
base_url = None
|
716
|
+
url_variables = None
|
717
|
+
if timeout_ms is None:
|
718
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
719
|
+
|
720
|
+
if server_url is not None:
|
721
|
+
base_url = server_url
|
722
|
+
else:
|
723
|
+
base_url = self._get_url(base_url, url_variables)
|
724
|
+
|
725
|
+
request = operations.GetBrandRequest(
|
726
|
+
account_id=account_id,
|
727
|
+
)
|
728
|
+
|
729
|
+
req = self._build_request_async(
|
730
|
+
method="GET",
|
731
|
+
path="/accounts/{accountID}/branding",
|
732
|
+
base_url=base_url,
|
733
|
+
url_variables=url_variables,
|
734
|
+
request=request,
|
735
|
+
request_body_required=False,
|
736
|
+
request_has_path_params=True,
|
737
|
+
request_has_query_params=True,
|
738
|
+
user_agent_header="user-agent",
|
739
|
+
accept_header_value="application/json",
|
740
|
+
http_headers=http_headers,
|
741
|
+
_globals=operations.GetBrandGlobals(
|
742
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
743
|
+
),
|
744
|
+
security=self.sdk_configuration.security,
|
745
|
+
timeout_ms=timeout_ms,
|
746
|
+
)
|
747
|
+
|
748
|
+
if retries == UNSET:
|
749
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
750
|
+
retries = self.sdk_configuration.retry_config
|
751
|
+
|
752
|
+
retry_config = None
|
753
|
+
if isinstance(retries, utils.RetryConfig):
|
754
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
755
|
+
|
756
|
+
http_res = await self.do_request_async(
|
757
|
+
hook_ctx=HookContext(
|
758
|
+
base_url=base_url or "",
|
759
|
+
operation_id="getBrand",
|
760
|
+
oauth2_scopes=[],
|
761
|
+
security_source=get_security_from_env(
|
762
|
+
self.sdk_configuration.security, components.Security
|
763
|
+
),
|
764
|
+
),
|
765
|
+
request=req,
|
766
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
767
|
+
retry_config=retry_config,
|
768
|
+
)
|
769
|
+
|
770
|
+
if utils.match_response(http_res, "200", "application/json"):
|
771
|
+
return operations.GetBrandResponse(
|
772
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
773
|
+
headers=utils.get_response_headers(http_res.headers),
|
774
|
+
)
|
775
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
776
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
777
|
+
raise errors.APIError(
|
778
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
779
|
+
)
|
780
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
781
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
782
|
+
raise errors.APIError(
|
783
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
784
|
+
)
|
785
|
+
if utils.match_response(http_res, "4XX", "*"):
|
786
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
787
|
+
raise errors.APIError(
|
788
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
789
|
+
)
|
790
|
+
if utils.match_response(http_res, "5XX", "*"):
|
791
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
792
|
+
raise errors.APIError(
|
793
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
794
|
+
)
|
795
|
+
|
796
|
+
content_type = http_res.headers.get("Content-Type")
|
797
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
798
|
+
raise errors.APIError(
|
799
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
800
|
+
http_res.status_code,
|
801
|
+
http_res_text,
|
802
|
+
http_res,
|
803
|
+
)
|
804
|
+
|
805
|
+
def update(
|
806
|
+
self,
|
807
|
+
*,
|
808
|
+
account_id: str,
|
809
|
+
colors: Optional[
|
810
|
+
Union[components.UpdateColors, components.UpdateColorsTypedDict]
|
811
|
+
] = None,
|
812
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
813
|
+
server_url: Optional[str] = None,
|
814
|
+
timeout_ms: Optional[int] = None,
|
815
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
816
|
+
) -> operations.UpdateBrandResponse:
|
817
|
+
r"""Updates the brand properties for the specified account.
|
818
|
+
|
819
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
820
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
821
|
+
|
822
|
+
:param account_id:
|
823
|
+
:param colors:
|
824
|
+
:param retries: Override the default retry configuration for this method
|
825
|
+
:param server_url: Override the default server URL for this method
|
826
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
827
|
+
:param http_headers: Additional headers to set or replace on requests.
|
828
|
+
"""
|
829
|
+
base_url = None
|
830
|
+
url_variables = None
|
831
|
+
if timeout_ms is None:
|
832
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
833
|
+
|
834
|
+
if server_url is not None:
|
835
|
+
base_url = server_url
|
836
|
+
else:
|
837
|
+
base_url = self._get_url(base_url, url_variables)
|
838
|
+
|
839
|
+
request = operations.UpdateBrandRequest(
|
840
|
+
account_id=account_id,
|
841
|
+
update_brand=components.UpdateBrand(
|
842
|
+
colors=utils.get_pydantic_model(
|
843
|
+
colors, Optional[components.UpdateColors]
|
844
|
+
),
|
845
|
+
),
|
846
|
+
)
|
847
|
+
|
848
|
+
req = self._build_request(
|
849
|
+
method="PATCH",
|
850
|
+
path="/accounts/{accountID}/branding",
|
851
|
+
base_url=base_url,
|
852
|
+
url_variables=url_variables,
|
853
|
+
request=request,
|
854
|
+
request_body_required=True,
|
855
|
+
request_has_path_params=True,
|
856
|
+
request_has_query_params=True,
|
857
|
+
user_agent_header="user-agent",
|
858
|
+
accept_header_value="application/json",
|
859
|
+
http_headers=http_headers,
|
860
|
+
_globals=operations.UpdateBrandGlobals(
|
861
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
862
|
+
),
|
863
|
+
security=self.sdk_configuration.security,
|
864
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
865
|
+
request.update_brand, False, False, "json", components.UpdateBrand
|
866
|
+
),
|
867
|
+
timeout_ms=timeout_ms,
|
868
|
+
)
|
869
|
+
|
870
|
+
if retries == UNSET:
|
871
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
872
|
+
retries = self.sdk_configuration.retry_config
|
873
|
+
|
874
|
+
retry_config = None
|
875
|
+
if isinstance(retries, utils.RetryConfig):
|
876
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
877
|
+
|
878
|
+
http_res = self.do_request(
|
879
|
+
hook_ctx=HookContext(
|
880
|
+
base_url=base_url or "",
|
881
|
+
operation_id="updateBrand",
|
882
|
+
oauth2_scopes=[],
|
883
|
+
security_source=get_security_from_env(
|
884
|
+
self.sdk_configuration.security, components.Security
|
885
|
+
),
|
886
|
+
),
|
887
|
+
request=req,
|
888
|
+
error_status_codes=[
|
889
|
+
"400",
|
890
|
+
"401",
|
891
|
+
"403",
|
892
|
+
"404",
|
893
|
+
"409",
|
894
|
+
"422",
|
895
|
+
"429",
|
896
|
+
"4XX",
|
897
|
+
"500",
|
898
|
+
"504",
|
899
|
+
"5XX",
|
900
|
+
],
|
901
|
+
retry_config=retry_config,
|
902
|
+
)
|
903
|
+
|
904
|
+
response_data: Any = None
|
905
|
+
if utils.match_response(http_res, "200", "application/json"):
|
906
|
+
return operations.UpdateBrandResponse(
|
907
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
908
|
+
headers=utils.get_response_headers(http_res.headers),
|
909
|
+
)
|
910
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
911
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
912
|
+
raise errors.GenericError(data=response_data)
|
913
|
+
if utils.match_response(http_res, "422", "application/json"):
|
914
|
+
response_data = utils.unmarshal_json(
|
915
|
+
http_res.text, errors.BrandValidationErrorData
|
916
|
+
)
|
917
|
+
raise errors.BrandValidationError(data=response_data)
|
918
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
919
|
+
http_res_text = utils.stream_to_text(http_res)
|
920
|
+
raise errors.APIError(
|
921
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
922
|
+
)
|
923
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
924
|
+
http_res_text = utils.stream_to_text(http_res)
|
925
|
+
raise errors.APIError(
|
926
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
927
|
+
)
|
928
|
+
if utils.match_response(http_res, "4XX", "*"):
|
929
|
+
http_res_text = utils.stream_to_text(http_res)
|
930
|
+
raise errors.APIError(
|
931
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
932
|
+
)
|
933
|
+
if utils.match_response(http_res, "5XX", "*"):
|
934
|
+
http_res_text = utils.stream_to_text(http_res)
|
935
|
+
raise errors.APIError(
|
936
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
937
|
+
)
|
938
|
+
|
939
|
+
content_type = http_res.headers.get("Content-Type")
|
940
|
+
http_res_text = utils.stream_to_text(http_res)
|
941
|
+
raise errors.APIError(
|
942
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
943
|
+
http_res.status_code,
|
944
|
+
http_res_text,
|
945
|
+
http_res,
|
946
|
+
)
|
947
|
+
|
948
|
+
async def update_async(
|
949
|
+
self,
|
950
|
+
*,
|
951
|
+
account_id: str,
|
952
|
+
colors: Optional[
|
953
|
+
Union[components.UpdateColors, components.UpdateColorsTypedDict]
|
954
|
+
] = None,
|
955
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
956
|
+
server_url: Optional[str] = None,
|
957
|
+
timeout_ms: Optional[int] = None,
|
958
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
959
|
+
) -> operations.UpdateBrandResponse:
|
960
|
+
r"""Updates the brand properties for the specified account.
|
961
|
+
|
962
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
963
|
+
you'll need to specify the `/accounts/{accountID}/branding.write` scope.
|
964
|
+
|
965
|
+
:param account_id:
|
966
|
+
:param colors:
|
967
|
+
:param retries: Override the default retry configuration for this method
|
968
|
+
:param server_url: Override the default server URL for this method
|
969
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
970
|
+
:param http_headers: Additional headers to set or replace on requests.
|
971
|
+
"""
|
972
|
+
base_url = None
|
973
|
+
url_variables = None
|
974
|
+
if timeout_ms is None:
|
975
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
976
|
+
|
977
|
+
if server_url is not None:
|
978
|
+
base_url = server_url
|
979
|
+
else:
|
980
|
+
base_url = self._get_url(base_url, url_variables)
|
981
|
+
|
982
|
+
request = operations.UpdateBrandRequest(
|
983
|
+
account_id=account_id,
|
984
|
+
update_brand=components.UpdateBrand(
|
985
|
+
colors=utils.get_pydantic_model(
|
986
|
+
colors, Optional[components.UpdateColors]
|
987
|
+
),
|
988
|
+
),
|
989
|
+
)
|
990
|
+
|
991
|
+
req = self._build_request_async(
|
992
|
+
method="PATCH",
|
993
|
+
path="/accounts/{accountID}/branding",
|
994
|
+
base_url=base_url,
|
995
|
+
url_variables=url_variables,
|
996
|
+
request=request,
|
997
|
+
request_body_required=True,
|
998
|
+
request_has_path_params=True,
|
999
|
+
request_has_query_params=True,
|
1000
|
+
user_agent_header="user-agent",
|
1001
|
+
accept_header_value="application/json",
|
1002
|
+
http_headers=http_headers,
|
1003
|
+
_globals=operations.UpdateBrandGlobals(
|
1004
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
1005
|
+
),
|
1006
|
+
security=self.sdk_configuration.security,
|
1007
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1008
|
+
request.update_brand, False, False, "json", components.UpdateBrand
|
1009
|
+
),
|
1010
|
+
timeout_ms=timeout_ms,
|
1011
|
+
)
|
1012
|
+
|
1013
|
+
if retries == UNSET:
|
1014
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1015
|
+
retries = self.sdk_configuration.retry_config
|
1016
|
+
|
1017
|
+
retry_config = None
|
1018
|
+
if isinstance(retries, utils.RetryConfig):
|
1019
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1020
|
+
|
1021
|
+
http_res = await self.do_request_async(
|
1022
|
+
hook_ctx=HookContext(
|
1023
|
+
base_url=base_url or "",
|
1024
|
+
operation_id="updateBrand",
|
1025
|
+
oauth2_scopes=[],
|
1026
|
+
security_source=get_security_from_env(
|
1027
|
+
self.sdk_configuration.security, components.Security
|
1028
|
+
),
|
1029
|
+
),
|
1030
|
+
request=req,
|
1031
|
+
error_status_codes=[
|
1032
|
+
"400",
|
1033
|
+
"401",
|
1034
|
+
"403",
|
1035
|
+
"404",
|
1036
|
+
"409",
|
1037
|
+
"422",
|
1038
|
+
"429",
|
1039
|
+
"4XX",
|
1040
|
+
"500",
|
1041
|
+
"504",
|
1042
|
+
"5XX",
|
1043
|
+
],
|
1044
|
+
retry_config=retry_config,
|
1045
|
+
)
|
1046
|
+
|
1047
|
+
response_data: Any = None
|
1048
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1049
|
+
return operations.UpdateBrandResponse(
|
1050
|
+
result=utils.unmarshal_json(http_res.text, components.BrandProperties),
|
1051
|
+
headers=utils.get_response_headers(http_res.headers),
|
1052
|
+
)
|
1053
|
+
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
1054
|
+
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
1055
|
+
raise errors.GenericError(data=response_data)
|
1056
|
+
if utils.match_response(http_res, "422", "application/json"):
|
1057
|
+
response_data = utils.unmarshal_json(
|
1058
|
+
http_res.text, errors.BrandValidationErrorData
|
1059
|
+
)
|
1060
|
+
raise errors.BrandValidationError(data=response_data)
|
1061
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
1062
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1063
|
+
raise errors.APIError(
|
1064
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1065
|
+
)
|
1066
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
1067
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1068
|
+
raise errors.APIError(
|
1069
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1070
|
+
)
|
1071
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1072
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1073
|
+
raise errors.APIError(
|
1074
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1075
|
+
)
|
1076
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1077
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1078
|
+
raise errors.APIError(
|
1079
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1080
|
+
)
|
1081
|
+
|
1082
|
+
content_type = http_res.headers.get("Content-Type")
|
1083
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1084
|
+
raise errors.APIError(
|
1085
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1086
|
+
http_res.status_code,
|
1087
|
+
http_res_text,
|
1088
|
+
http_res,
|
1089
|
+
)
|