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.
Files changed (586) hide show
  1. moovio_sdk/__init__.py +17 -0
  2. moovio_sdk/_hooks/__init__.py +5 -0
  3. moovio_sdk/_hooks/registration.py +13 -0
  4. moovio_sdk/_hooks/sdkhooks.py +76 -0
  5. moovio_sdk/_hooks/types.py +106 -0
  6. moovio_sdk/_version.py +15 -0
  7. moovio_sdk/accounts.py +2461 -0
  8. moovio_sdk/adjustments.py +463 -0
  9. moovio_sdk/apple_pay.py +1417 -0
  10. moovio_sdk/authentication.py +531 -0
  11. moovio_sdk/avatars.py +231 -0
  12. moovio_sdk/bank_accounts.py +2445 -0
  13. moovio_sdk/basesdk.py +363 -0
  14. moovio_sdk/branding.py +1089 -0
  15. moovio_sdk/capabilities.py +1001 -0
  16. moovio_sdk/card_issuing.py +1351 -0
  17. moovio_sdk/cards.py +1469 -0
  18. moovio_sdk/disputes.py +2985 -0
  19. moovio_sdk/end_to_end_encryption.py +453 -0
  20. moovio_sdk/enriched_address.py +307 -0
  21. moovio_sdk/enriched_profile.py +235 -0
  22. moovio_sdk/fee_plans.py +1759 -0
  23. moovio_sdk/files.py +775 -0
  24. moovio_sdk/httpclient.py +136 -0
  25. moovio_sdk/industries.py +239 -0
  26. moovio_sdk/institutions.py +261 -0
  27. moovio_sdk/issuing_transactions.py +1228 -0
  28. moovio_sdk/models/__init__.py +4 -0
  29. moovio_sdk/models/components/__init__.py +1411 -0
  30. moovio_sdk/models/components/account.py +96 -0
  31. moovio_sdk/models/components/accountcapability.py +20 -0
  32. moovio_sdk/models/components/accountcountries.py +18 -0
  33. moovio_sdk/models/components/accountnameverification.py +28 -0
  34. moovio_sdk/models/components/accounttype.py +11 -0
  35. moovio_sdk/models/components/accountverificationstatus.py +19 -0
  36. moovio_sdk/models/components/achcreditsamedaypaymentmethod.py +38 -0
  37. moovio_sdk/models/components/achcreditstandardpaymentmethod.py +38 -0
  38. moovio_sdk/models/components/achdebitcollectpaymentmethod.py +38 -0
  39. moovio_sdk/models/components/achdebitfundpaymentmethod.py +38 -0
  40. moovio_sdk/models/components/achexception.py +20 -0
  41. moovio_sdk/models/components/achlocation.py +26 -0
  42. moovio_sdk/models/components/achparticipant.py +93 -0
  43. moovio_sdk/models/components/achpaymentdetails.py +30 -0
  44. moovio_sdk/models/components/achpaymentdetailserror.py +22 -0
  45. moovio_sdk/models/components/achpaymentsettings.py +16 -0
  46. moovio_sdk/models/components/achreturncode.py +51 -0
  47. moovio_sdk/models/components/achtransactiondetails.py +94 -0
  48. moovio_sdk/models/components/achtransactionstatus.py +15 -0
  49. moovio_sdk/models/components/addcapabilities.py +15 -0
  50. moovio_sdk/models/components/address.py +30 -0
  51. moovio_sdk/models/components/addresserror.py +32 -0
  52. moovio_sdk/models/components/addresssuggestion.py +34 -0
  53. moovio_sdk/models/components/addressupdate.py +32 -0
  54. moovio_sdk/models/components/adjustment.py +29 -0
  55. moovio_sdk/models/components/amount.py +26 -0
  56. moovio_sdk/models/components/amountdecimal.py +27 -0
  57. moovio_sdk/models/components/amountupdate.py +27 -0
  58. moovio_sdk/models/components/amountvalidationerror.py +17 -0
  59. moovio_sdk/models/components/applebillingcontact.py +53 -0
  60. moovio_sdk/models/components/applepayheader.py +41 -0
  61. moovio_sdk/models/components/applepaymerchantdomains.py +32 -0
  62. moovio_sdk/models/components/applepaypaymentmethod.py +33 -0
  63. moovio_sdk/models/components/applepayresponse.py +70 -0
  64. moovio_sdk/models/components/applicationscope.py +41 -0
  65. moovio_sdk/models/components/asynccreatedrefund.py +26 -0
  66. moovio_sdk/models/components/asynctransfer.py +18 -0
  67. moovio_sdk/models/components/authorizeduser.py +21 -0
  68. moovio_sdk/models/components/authtoken.py +36 -0
  69. moovio_sdk/models/components/authtokenrequest.py +46 -0
  70. moovio_sdk/models/components/bankaccount.py +98 -0
  71. moovio_sdk/models/components/bankaccountexception.py +96 -0
  72. moovio_sdk/models/components/bankaccountholdertype.py +11 -0
  73. moovio_sdk/models/components/bankaccountintegration.py +34 -0
  74. moovio_sdk/models/components/bankaccountpayload.py +21 -0
  75. moovio_sdk/models/components/bankaccountstatus.py +12 -0
  76. moovio_sdk/models/components/bankaccountstatusreason.py +23 -0
  77. moovio_sdk/models/components/bankaccounttype.py +13 -0
  78. moovio_sdk/models/components/bankaccountverification.py +30 -0
  79. moovio_sdk/models/components/bankaccountverificationcreated.py +21 -0
  80. moovio_sdk/models/components/bankaccountverificationmethod.py +9 -0
  81. moovio_sdk/models/components/bankaccountverificationstatus.py +13 -0
  82. moovio_sdk/models/components/bankaccountwaitfor.py +9 -0
  83. moovio_sdk/models/components/basicpaymentmethod.py +24 -0
  84. moovio_sdk/models/components/billablefee.py +54 -0
  85. moovio_sdk/models/components/birthdate.py +19 -0
  86. moovio_sdk/models/components/birthdateerror.py +20 -0
  87. moovio_sdk/models/components/birthdateupdate.py +20 -0
  88. moovio_sdk/models/components/birthdatevalidationerror.py +20 -0
  89. moovio_sdk/models/components/brandcolor.py +15 -0
  90. moovio_sdk/models/components/brandcolors.py +21 -0
  91. moovio_sdk/models/components/brandcolorvalidationerror.py +14 -0
  92. moovio_sdk/models/components/brandproperties.py +16 -0
  93. moovio_sdk/models/components/businessprofile.py +81 -0
  94. moovio_sdk/models/components/businesstype.py +19 -0
  95. moovio_sdk/models/components/calltoaction.py +19 -0
  96. moovio_sdk/models/components/cancellation.py +22 -0
  97. moovio_sdk/models/components/cancellationstatus.py +10 -0
  98. moovio_sdk/models/components/capabilitieserror.py +14 -0
  99. moovio_sdk/models/components/capability.py +56 -0
  100. moovio_sdk/models/components/capabilityid.py +18 -0
  101. moovio_sdk/models/components/capabilityrequirement.py +26 -0
  102. moovio_sdk/models/components/capabilitystatus.py +13 -0
  103. moovio_sdk/models/components/card.py +164 -0
  104. moovio_sdk/models/components/cardaccountupdater.py +28 -0
  105. moovio_sdk/models/components/cardacquiringdispute.py +26 -0
  106. moovio_sdk/models/components/cardacquiringmodel.py +11 -0
  107. moovio_sdk/models/components/cardacquiringrefund.py +42 -0
  108. moovio_sdk/models/components/cardaddress.py +32 -0
  109. moovio_sdk/models/components/cardbrand.py +14 -0
  110. moovio_sdk/models/components/cardexpiration.py +20 -0
  111. moovio_sdk/models/components/cardexpirationerror.py +17 -0
  112. moovio_sdk/models/components/cardissuingnetwork.py +12 -0
  113. moovio_sdk/models/components/cardpaymentdetails.py +23 -0
  114. moovio_sdk/models/components/cardpaymentdetailserror.py +17 -0
  115. moovio_sdk/models/components/cardpaymentpaymentmethod.py +33 -0
  116. moovio_sdk/models/components/cardpaymentsettings.py +23 -0
  117. moovio_sdk/models/components/cardtransactiondetails.py +94 -0
  118. moovio_sdk/models/components/cardtransactionfailurecode.py +32 -0
  119. moovio_sdk/models/components/cardtransactionstatus.py +15 -0
  120. moovio_sdk/models/components/cardtype.py +13 -0
  121. moovio_sdk/models/components/cardupdatereason.py +16 -0
  122. moovio_sdk/models/components/cardverification.py +38 -0
  123. moovio_sdk/models/components/cardverificationresult.py +12 -0
  124. moovio_sdk/models/components/cardvolumedistribution.py +29 -0
  125. moovio_sdk/models/components/cardvolumedistributionerror.py +32 -0
  126. moovio_sdk/models/components/collectionpaymentmethodtype.py +12 -0
  127. moovio_sdk/models/components/colorsvalidationerror.py +21 -0
  128. moovio_sdk/models/components/completebankaccountverification.py +15 -0
  129. moovio_sdk/models/components/completedmicrodeposits.py +14 -0
  130. moovio_sdk/models/components/completemicrodeposits.py +20 -0
  131. moovio_sdk/models/components/countrieserrors.py +14 -0
  132. moovio_sdk/models/components/createaccount.py +78 -0
  133. moovio_sdk/models/components/createaccounterror.py +44 -0
  134. moovio_sdk/models/components/createaccountsettings.py +40 -0
  135. moovio_sdk/models/components/createapplepaysession.py +21 -0
  136. moovio_sdk/models/components/createauthorizeduser.py +26 -0
  137. moovio_sdk/models/components/createauthorizedusererror.py +24 -0
  138. moovio_sdk/models/components/createauthorizeduserupdate.py +28 -0
  139. moovio_sdk/models/components/createbusinesserror.py +88 -0
  140. moovio_sdk/models/components/createbusinessprofile.py +69 -0
  141. moovio_sdk/models/components/createevidencefilemultipart.py +63 -0
  142. moovio_sdk/models/components/createevidencetext.py +20 -0
  143. moovio_sdk/models/components/createfeeplanagreement.py +14 -0
  144. moovio_sdk/models/components/createindividualerror.py +72 -0
  145. moovio_sdk/models/components/createindividualprofile.py +37 -0
  146. moovio_sdk/models/components/createpaymentlink.py +95 -0
  147. moovio_sdk/models/components/createprofile.py +22 -0
  148. moovio_sdk/models/components/createprofileerror.py +19 -0
  149. moovio_sdk/models/components/createrefund.py +26 -0
  150. moovio_sdk/models/components/createrefundresponse.py +18 -0
  151. moovio_sdk/models/components/createrepresentative.py +50 -0
  152. moovio_sdk/models/components/createreversal.py +15 -0
  153. moovio_sdk/models/components/createsweepconfig.py +41 -0
  154. moovio_sdk/models/components/createterminalapplication.py +42 -0
  155. moovio_sdk/models/components/createtransfer.py +49 -0
  156. moovio_sdk/models/components/createtransferdestination.py +37 -0
  157. moovio_sdk/models/components/createtransferdestinationach.py +26 -0
  158. moovio_sdk/models/components/createtransferdestinationcard.py +19 -0
  159. moovio_sdk/models/components/createtransferoptions.py +24 -0
  160. moovio_sdk/models/components/createtransfersource.py +48 -0
  161. moovio_sdk/models/components/createtransfersourceach.py +40 -0
  162. moovio_sdk/models/components/createtransfersourcecard.py +35 -0
  163. moovio_sdk/models/components/customersupport.py +33 -0
  164. moovio_sdk/models/components/customersupporterror.py +25 -0
  165. moovio_sdk/models/components/debitholdperiod.py +12 -0
  166. moovio_sdk/models/components/disbursementpaymentmethodtype.py +13 -0
  167. moovio_sdk/models/components/displayoptionserror.py +23 -0
  168. moovio_sdk/models/components/dispute.py +76 -0
  169. moovio_sdk/models/components/disputeevidenceresponse.py +49 -0
  170. moovio_sdk/models/components/disputephase.py +13 -0
  171. moovio_sdk/models/components/disputestatus.py +20 -0
  172. moovio_sdk/models/components/disputetransferdetails.py +16 -0
  173. moovio_sdk/models/components/document.py +37 -0
  174. moovio_sdk/models/components/documenttype.py +13 -0
  175. moovio_sdk/models/components/domesticpullfromcard.py +12 -0
  176. moovio_sdk/models/components/domesticpushtocard.py +13 -0
  177. moovio_sdk/models/components/e2eetoken.py +25 -0
  178. moovio_sdk/models/components/e2eetokenupdate.py +26 -0
  179. moovio_sdk/models/components/end2endencryptionerror.py +14 -0
  180. moovio_sdk/models/components/enrichedaddressresponse.py +15 -0
  181. moovio_sdk/models/components/enrichedbusinessprofile.py +37 -0
  182. moovio_sdk/models/components/enrichedbusinessresponse.py +18 -0
  183. moovio_sdk/models/components/enrichedindustries.py +15 -0
  184. moovio_sdk/models/components/enrichedindustry.py +32 -0
  185. moovio_sdk/models/components/enrichedindustrycodes.py +17 -0
  186. moovio_sdk/models/components/evidencetextresponse.py +28 -0
  187. moovio_sdk/models/components/evidencetype.py +15 -0
  188. moovio_sdk/models/components/evidenceuploadresponse.py +50 -0
  189. moovio_sdk/models/components/facilitatorfee.py +48 -0
  190. moovio_sdk/models/components/feecategory.py +16 -0
  191. moovio_sdk/models/components/feemodel.py +12 -0
  192. moovio_sdk/models/components/feeplan.py +43 -0
  193. moovio_sdk/models/components/feeplanagreement.py +51 -0
  194. moovio_sdk/models/components/feeplanagreementstatus.py +9 -0
  195. moovio_sdk/models/components/feeproperties.py +49 -0
  196. moovio_sdk/models/components/filedetails.py +55 -0
  197. moovio_sdk/models/components/filepurpose.py +15 -0
  198. moovio_sdk/models/components/filestatus.py +12 -0
  199. moovio_sdk/models/components/fileuploadrequestmultipart.py +69 -0
  200. moovio_sdk/models/components/financialinstitutions.py +18 -0
  201. moovio_sdk/models/components/fulfillmentdetails.py +24 -0
  202. moovio_sdk/models/components/fulfillmentdetailserror.py +20 -0
  203. moovio_sdk/models/components/fullissuedcard.py +92 -0
  204. moovio_sdk/models/components/generatedby.py +39 -0
  205. moovio_sdk/models/components/generatedbyaccountid.py +15 -0
  206. moovio_sdk/models/components/generatedbybankaccountid.py +17 -0
  207. moovio_sdk/models/components/generatedbycardid.py +15 -0
  208. moovio_sdk/models/components/generatedbydisputeid.py +15 -0
  209. moovio_sdk/models/components/generatedbytransferid.py +15 -0
  210. moovio_sdk/models/components/governmentid.py +40 -0
  211. moovio_sdk/models/components/governmentiderror.py +40 -0
  212. moovio_sdk/models/components/granttype.py +15 -0
  213. moovio_sdk/models/components/incurredfee.py +44 -0
  214. moovio_sdk/models/components/individualname.py +32 -0
  215. moovio_sdk/models/components/individualnameerror.py +24 -0
  216. moovio_sdk/models/components/individualnameupdate.py +32 -0
  217. moovio_sdk/models/components/individualprofile.py +45 -0
  218. moovio_sdk/models/components/industrycodes.py +20 -0
  219. moovio_sdk/models/components/issuedcard.py +78 -0
  220. moovio_sdk/models/components/issuedcardauthorization.py +53 -0
  221. moovio_sdk/models/components/issuedcardauthorizationevent.py +37 -0
  222. moovio_sdk/models/components/issuedcardauthorizationeventresult.py +12 -0
  223. moovio_sdk/models/components/issuedcardeventtype.py +15 -0
  224. moovio_sdk/models/components/issuedcardformfactor.py +10 -0
  225. moovio_sdk/models/components/issuedcardstate.py +19 -0
  226. moovio_sdk/models/components/issuedcardtransaction.py +42 -0
  227. moovio_sdk/models/components/issuingauthorizationstatus.py +14 -0
  228. moovio_sdk/models/components/issuingcontrols.py +25 -0
  229. moovio_sdk/models/components/issuingcontrolserror.py +22 -0
  230. moovio_sdk/models/components/issuingintervallimit.py +10 -0
  231. moovio_sdk/models/components/issuingmerchantdata.py +47 -0
  232. moovio_sdk/models/components/issuingvelocitylimit.py +21 -0
  233. moovio_sdk/models/components/issuingvelocitylimiterror.py +17 -0
  234. moovio_sdk/models/components/jsonwebkey.py +103 -0
  235. moovio_sdk/models/components/linkapplepay.py +54 -0
  236. moovio_sdk/models/components/linkapplepaymentdata.py +51 -0
  237. moovio_sdk/models/components/linkapplepaymentmethod.py +38 -0
  238. moovio_sdk/models/components/linkapplepaytoken.py +63 -0
  239. moovio_sdk/models/components/linkbankaccount.py +26 -0
  240. moovio_sdk/models/components/linkcard.py +54 -0
  241. moovio_sdk/models/components/linkcardwaitfor.py +8 -0
  242. moovio_sdk/models/components/linkedapplepaypaymentmethod.py +30 -0
  243. moovio_sdk/models/components/listfeesfetchrequest.py +19 -0
  244. moovio_sdk/models/components/manualtermsofservice.py +34 -0
  245. moovio_sdk/models/components/manualtermsofserviceupdate.py +41 -0
  246. moovio_sdk/models/components/microdepositstatus.py +8 -0
  247. moovio_sdk/models/components/mode.py +11 -0
  248. moovio_sdk/models/components/moovfeedetails.py +36 -0
  249. moovio_sdk/models/components/moovwalletpaymentmethod.py +31 -0
  250. moovio_sdk/models/components/mxauthorizationcode.py +26 -0
  251. moovio_sdk/models/components/mxpayload.py +46 -0
  252. moovio_sdk/models/components/occurrence.py +44 -0
  253. moovio_sdk/models/components/occurrencesresponse.py +80 -0
  254. moovio_sdk/models/components/occurrencestatus.py +12 -0
  255. moovio_sdk/models/components/onboardinginvite.py +91 -0
  256. moovio_sdk/models/components/onboardinginviterequest.py +57 -0
  257. moovio_sdk/models/components/onboardingpartneraccount.py +31 -0
  258. moovio_sdk/models/components/partnerpricing.py +46 -0
  259. moovio_sdk/models/components/partnerpricingagreement.py +56 -0
  260. moovio_sdk/models/components/patchaccount.py +138 -0
  261. moovio_sdk/models/components/patchaccounterror.py +38 -0
  262. moovio_sdk/models/components/patchbusiness.py +72 -0
  263. moovio_sdk/models/components/patchindividual.py +43 -0
  264. moovio_sdk/models/components/patchprofile.py +29 -0
  265. moovio_sdk/models/components/patchsweepconfig.py +147 -0
  266. moovio_sdk/models/components/patchtransfer.py +51 -0
  267. moovio_sdk/models/components/paymentdetailserror.py +35 -0
  268. moovio_sdk/models/components/paymentlink.py +125 -0
  269. moovio_sdk/models/components/paymentlinkcustomeroptions.py +31 -0
  270. moovio_sdk/models/components/paymentlinkdisplayoptions.py +39 -0
  271. moovio_sdk/models/components/paymentlinkdisplayoptionsupdate.py +42 -0
  272. moovio_sdk/models/components/paymentlinkpaymentdetails.py +40 -0
  273. moovio_sdk/models/components/paymentlinkpaymentdetailsupdate.py +41 -0
  274. moovio_sdk/models/components/paymentlinkpayoutdetails.py +32 -0
  275. moovio_sdk/models/components/paymentlinkpayoutdetailsupdate.py +33 -0
  276. moovio_sdk/models/components/paymentlinkstatus.py +11 -0
  277. moovio_sdk/models/components/paymentmethod.py +82 -0
  278. moovio_sdk/models/components/paymentmethodsbankaccount.py +65 -0
  279. moovio_sdk/models/components/paymentmethodscard.py +121 -0
  280. moovio_sdk/models/components/paymentmethodswallet.py +14 -0
  281. moovio_sdk/models/components/paymentmethodtype.py +19 -0
  282. moovio_sdk/models/components/payoutdetailserror.py +21 -0
  283. moovio_sdk/models/components/payoutrecipient.py +23 -0
  284. moovio_sdk/models/components/payoutrecipienterror.py +14 -0
  285. moovio_sdk/models/components/payoutrecipientupdate.py +24 -0
  286. moovio_sdk/models/components/phonenumber.py +18 -0
  287. moovio_sdk/models/components/phonenumbererror.py +18 -0
  288. moovio_sdk/models/components/plaidintegration.py +39 -0
  289. moovio_sdk/models/components/plaidlinkintegration.py +36 -0
  290. moovio_sdk/models/components/plaidlinkpayload.py +45 -0
  291. moovio_sdk/models/components/plaidpayload.py +42 -0
  292. moovio_sdk/models/components/primaryregulator.py +13 -0
  293. moovio_sdk/models/components/profile.py +27 -0
  294. moovio_sdk/models/components/pullfromcardpaymentmethod.py +33 -0
  295. moovio_sdk/models/components/pushtocardpaymentmethod.py +33 -0
  296. moovio_sdk/models/components/qrcode.py +16 -0
  297. moovio_sdk/models/components/receiptkind.py +10 -0
  298. moovio_sdk/models/components/receiptrequest.py +75 -0
  299. moovio_sdk/models/components/receiptresponse.py +95 -0
  300. moovio_sdk/models/components/recur.py +40 -0
  301. moovio_sdk/models/components/refundcarddetails.py +44 -0
  302. moovio_sdk/models/components/refundcardstatus.py +12 -0
  303. moovio_sdk/models/components/refundstatus.py +11 -0
  304. moovio_sdk/models/components/registerapplepaymerchantdomains.py +22 -0
  305. moovio_sdk/models/components/representative.py +71 -0
  306. moovio_sdk/models/components/representativeresponsibilities.py +42 -0
  307. moovio_sdk/models/components/representativeresponsibilitieserror.py +26 -0
  308. moovio_sdk/models/components/requestcard.py +44 -0
  309. moovio_sdk/models/components/requirementerror.py +24 -0
  310. moovio_sdk/models/components/requirementerrorcode.py +25 -0
  311. moovio_sdk/models/components/requirementid.py +71 -0
  312. moovio_sdk/models/components/returnpolicytype.py +11 -0
  313. moovio_sdk/models/components/reversal.py +23 -0
  314. moovio_sdk/models/components/reversedwithcancellation.py +14 -0
  315. moovio_sdk/models/components/reversedwithrefund.py +16 -0
  316. moovio_sdk/models/components/revoketokenrequest.py +40 -0
  317. moovio_sdk/models/components/rtpcreditpaymentmethod.py +38 -0
  318. moovio_sdk/models/components/rtpfailurecode.py +19 -0
  319. moovio_sdk/models/components/rtprejectioncode.py +25 -0
  320. moovio_sdk/models/components/rtptransactiondetails.py +56 -0
  321. moovio_sdk/models/components/rtptransactionstatus.py +13 -0
  322. moovio_sdk/models/components/runtransfer.py +34 -0
  323. moovio_sdk/models/components/schedulepaymentmethod.py +56 -0
  324. moovio_sdk/models/components/scheduleresponse.py +60 -0
  325. moovio_sdk/models/components/seccode.py +13 -0
  326. moovio_sdk/models/components/security.py +32 -0
  327. moovio_sdk/models/components/sentreceipt.py +27 -0
  328. moovio_sdk/models/components/settings.py +30 -0
  329. moovio_sdk/models/components/sourcedestinationoptions.py +20 -0
  330. moovio_sdk/models/components/sweep.py +80 -0
  331. moovio_sdk/models/components/sweepconfig.py +81 -0
  332. moovio_sdk/models/components/sweepconfigpaymentmethod.py +31 -0
  333. moovio_sdk/models/components/sweepconfigstatus.py +9 -0
  334. moovio_sdk/models/components/sweepstatus.py +13 -0
  335. moovio_sdk/models/components/taxid.py +25 -0
  336. moovio_sdk/models/components/taxidupdate.py +26 -0
  337. moovio_sdk/models/components/terminalapplication.py +55 -0
  338. moovio_sdk/models/components/terminalapplicationplatform.py +12 -0
  339. moovio_sdk/models/components/terminalapplicationstatus.py +13 -0
  340. moovio_sdk/models/components/termsofservice.py +26 -0
  341. moovio_sdk/models/components/termsofserviceerror.py +39 -0
  342. moovio_sdk/models/components/termsofservicetoken.py +17 -0
  343. moovio_sdk/models/components/termsofservicetokenupdate.py +18 -0
  344. moovio_sdk/models/components/tokentype.py +10 -0
  345. moovio_sdk/models/components/transactionsource.py +16 -0
  346. moovio_sdk/models/components/transfer.py +126 -0
  347. moovio_sdk/models/components/transferaccount.py +20 -0
  348. moovio_sdk/models/components/transferdestination.py +83 -0
  349. moovio_sdk/models/components/transferfailurereason.py +14 -0
  350. moovio_sdk/models/components/transferoptions.py +23 -0
  351. moovio_sdk/models/components/transferresponse.py +15 -0
  352. moovio_sdk/models/components/transfersource.py +80 -0
  353. moovio_sdk/models/components/transferstatus.py +16 -0
  354. moovio_sdk/models/components/transferwaitfor.py +8 -0
  355. moovio_sdk/models/components/underwriting.py +56 -0
  356. moovio_sdk/models/components/underwritingstatus.py +16 -0
  357. moovio_sdk/models/components/updateapplepaymerchantdomains.py +26 -0
  358. moovio_sdk/models/components/updatebrand.py +15 -0
  359. moovio_sdk/models/components/updatecard.py +51 -0
  360. moovio_sdk/models/components/updatecardaddress.py +32 -0
  361. moovio_sdk/models/components/updatecardexpiration.py +17 -0
  362. moovio_sdk/models/components/updatecolor.py +14 -0
  363. moovio_sdk/models/components/updatecolors.py +18 -0
  364. moovio_sdk/models/components/updateevidence.py +23 -0
  365. moovio_sdk/models/components/updateissuedcard.py +44 -0
  366. moovio_sdk/models/components/updatepaymentlink.py +98 -0
  367. moovio_sdk/models/components/updaterepresentative.py +224 -0
  368. moovio_sdk/models/components/updateunderwriting.py +43 -0
  369. moovio_sdk/models/components/upsertschedule.py +26 -0
  370. moovio_sdk/models/components/verification.py +54 -0
  371. moovio_sdk/models/components/verificationstatus.py +17 -0
  372. moovio_sdk/models/components/verificationstatusdetail.py +23 -0
  373. moovio_sdk/models/components/volumebycustomertype.py +21 -0
  374. moovio_sdk/models/components/volumebycustomertypeerror.py +22 -0
  375. moovio_sdk/models/components/wallet.py +27 -0
  376. moovio_sdk/models/components/walletavailablebalance.py +30 -0
  377. moovio_sdk/models/components/wallettransaction.py +114 -0
  378. moovio_sdk/models/components/wallettransactionsourcetype.py +13 -0
  379. moovio_sdk/models/components/wallettransactionstatus.py +11 -0
  380. moovio_sdk/models/components/wallettransactiontype.py +32 -0
  381. moovio_sdk/models/errors/__init__.py +155 -0
  382. moovio_sdk/models/errors/addcapabilitieserror.py +23 -0
  383. moovio_sdk/models/errors/apierror.py +22 -0
  384. moovio_sdk/models/errors/assigncountrieserror.py +20 -0
  385. moovio_sdk/models/errors/authtokenrequesterror.py +22 -0
  386. moovio_sdk/models/errors/bankaccountvalidationerror.py +30 -0
  387. moovio_sdk/models/errors/brandvalidationerror.py +23 -0
  388. moovio_sdk/models/errors/cardacquiringrefund.py +44 -0
  389. moovio_sdk/models/errors/createaccount.py +24 -0
  390. moovio_sdk/models/errors/createpaymentlinkerror.py +46 -0
  391. moovio_sdk/models/errors/createsweepconfigerror.py +40 -0
  392. moovio_sdk/models/errors/feeplanagreementerror.py +22 -0
  393. moovio_sdk/models/errors/fileuploadvalidationerror.py +35 -0
  394. moovio_sdk/models/errors/filevalidationerror.py +28 -0
  395. moovio_sdk/models/errors/genericerror.py +19 -0
  396. moovio_sdk/models/errors/linkapplepayerror.py +36 -0
  397. moovio_sdk/models/errors/linkcarderror.py +47 -0
  398. moovio_sdk/models/errors/microdepositvalidationerror.py +20 -0
  399. moovio_sdk/models/errors/onboardinginviteerror.py +34 -0
  400. moovio_sdk/models/errors/patchsweepconfigerror.py +38 -0
  401. moovio_sdk/models/errors/receiptvalidationerror.py +40 -0
  402. moovio_sdk/models/errors/refundvalidationerror.py +23 -0
  403. moovio_sdk/models/errors/representativevalidationerror.py +68 -0
  404. moovio_sdk/models/errors/requestcarderror.py +42 -0
  405. moovio_sdk/models/errors/reversalvalidationerror.py +20 -0
  406. moovio_sdk/models/errors/revoketokenrequesterror.py +22 -0
  407. moovio_sdk/models/errors/schedulevalidationerror.py +24 -0
  408. moovio_sdk/models/errors/terminalapplicationerror.py +30 -0
  409. moovio_sdk/models/errors/transfer.py +108 -0
  410. moovio_sdk/models/errors/transferoptionsvalidationerror.py +24 -0
  411. moovio_sdk/models/errors/transfervalidationerror.py +49 -0
  412. moovio_sdk/models/errors/updateaccount.py +24 -0
  413. moovio_sdk/models/errors/updatecarderror.py +43 -0
  414. moovio_sdk/models/errors/updateissuedcarderror.py +32 -0
  415. moovio_sdk/models/errors/updatepaymentlinkerror.py +36 -0
  416. moovio_sdk/models/errors/updateunderwritingerror.py +70 -0
  417. moovio_sdk/models/internal/__init__.py +6 -0
  418. moovio_sdk/models/internal/globals.py +40 -0
  419. moovio_sdk/models/operations/__init__.py +1824 -0
  420. moovio_sdk/models/operations/acceptdispute.py +71 -0
  421. moovio_sdk/models/operations/assignaccountcountries.py +75 -0
  422. moovio_sdk/models/operations/cancelschedule.py +67 -0
  423. moovio_sdk/models/operations/completebankaccountverification.py +85 -0
  424. moovio_sdk/models/operations/completemicrodeposits.py +87 -0
  425. moovio_sdk/models/operations/createaccesstoken.py +52 -0
  426. moovio_sdk/models/operations/createaccount.py +52 -0
  427. moovio_sdk/models/operations/createapplepaysession.py +81 -0
  428. moovio_sdk/models/operations/createbrand.py +75 -0
  429. moovio_sdk/models/operations/createcancellation.py +75 -0
  430. moovio_sdk/models/operations/createfeeplanagreements.py +80 -0
  431. moovio_sdk/models/operations/createonboardinginvite.py +52 -0
  432. moovio_sdk/models/operations/createpaymentlink.py +78 -0
  433. moovio_sdk/models/operations/createreceipts.py +52 -0
  434. moovio_sdk/models/operations/createrepresentative.py +80 -0
  435. moovio_sdk/models/operations/createreversal.py +98 -0
  436. moovio_sdk/models/operations/createschedule.py +78 -0
  437. moovio_sdk/models/operations/createsweepconfig.py +78 -0
  438. moovio_sdk/models/operations/createterminalapplication.py +54 -0
  439. moovio_sdk/models/operations/createtransfer.py +125 -0
  440. moovio_sdk/models/operations/createtransferoptions.py +52 -0
  441. moovio_sdk/models/operations/deletedisputeevidencefile.py +74 -0
  442. moovio_sdk/models/operations/deleterepresentative.py +71 -0
  443. moovio_sdk/models/operations/deleteterminalapplication.py +60 -0
  444. moovio_sdk/models/operations/disablebankaccount.py +67 -0
  445. moovio_sdk/models/operations/disablecapability.py +76 -0
  446. moovio_sdk/models/operations/disablecard.py +67 -0
  447. moovio_sdk/models/operations/disablepaymentlink.py +67 -0
  448. moovio_sdk/models/operations/disconnectaccount.py +60 -0
  449. moovio_sdk/models/operations/generateendtoendkey.py +60 -0
  450. moovio_sdk/models/operations/getaccount.py +64 -0
  451. moovio_sdk/models/operations/getaccountcountries.py +64 -0
  452. moovio_sdk/models/operations/getadjustment.py +71 -0
  453. moovio_sdk/models/operations/getapplepaymerchantdomains.py +68 -0
  454. moovio_sdk/models/operations/getavatar.py +66 -0
  455. moovio_sdk/models/operations/getbankaccount.py +71 -0
  456. moovio_sdk/models/operations/getbankaccountverification.py +73 -0
  457. moovio_sdk/models/operations/getbrand.py +64 -0
  458. moovio_sdk/models/operations/getcancellation.py +84 -0
  459. moovio_sdk/models/operations/getcapability.py +82 -0
  460. moovio_sdk/models/operations/getcard.py +71 -0
  461. moovio_sdk/models/operations/getdispute.py +71 -0
  462. moovio_sdk/models/operations/getdisputeevidence.py +80 -0
  463. moovio_sdk/models/operations/getdisputeevidencedata.py +90 -0
  464. moovio_sdk/models/operations/getenrichmentaddress.py +178 -0
  465. moovio_sdk/models/operations/getenrichmentprofile.py +64 -0
  466. moovio_sdk/models/operations/getfiledetails.py +71 -0
  467. moovio_sdk/models/operations/getfullissuedcard.py +73 -0
  468. moovio_sdk/models/operations/getissuedcard.py +73 -0
  469. moovio_sdk/models/operations/getissuedcardauthorization.py +75 -0
  470. moovio_sdk/models/operations/getissuedcardtransaction.py +75 -0
  471. moovio_sdk/models/operations/getmerchantprocessingagreement.py +64 -0
  472. moovio_sdk/models/operations/getonboardinginvite.py +62 -0
  473. moovio_sdk/models/operations/getpaymentlink.py +71 -0
  474. moovio_sdk/models/operations/getpaymentlinkqrcode.py +84 -0
  475. moovio_sdk/models/operations/getpaymentmethod.py +71 -0
  476. moovio_sdk/models/operations/getrefund.py +84 -0
  477. moovio_sdk/models/operations/getrepresentative.py +75 -0
  478. moovio_sdk/models/operations/getscheduledoccurrence.py +92 -0
  479. moovio_sdk/models/operations/getschedules.py +71 -0
  480. moovio_sdk/models/operations/getsweep.py +78 -0
  481. moovio_sdk/models/operations/getsweepconfig.py +71 -0
  482. moovio_sdk/models/operations/getterminalapplication.py +66 -0
  483. moovio_sdk/models/operations/gettermsofservicetoken.py +75 -0
  484. moovio_sdk/models/operations/gettransfer.py +73 -0
  485. moovio_sdk/models/operations/getunderwriting.py +64 -0
  486. moovio_sdk/models/operations/getwallet.py +71 -0
  487. moovio_sdk/models/operations/getwallettransaction.py +80 -0
  488. moovio_sdk/models/operations/initiatebankaccountverification.py +89 -0
  489. moovio_sdk/models/operations/initiatemicrodeposits.py +67 -0
  490. moovio_sdk/models/operations/initiaterefund.py +131 -0
  491. moovio_sdk/models/operations/linkapplepaytoken.py +80 -0
  492. moovio_sdk/models/operations/linkbankaccount.py +96 -0
  493. moovio_sdk/models/operations/linkcard.py +96 -0
  494. moovio_sdk/models/operations/listaccounts.py +171 -0
  495. moovio_sdk/models/operations/listadjustments.py +78 -0
  496. moovio_sdk/models/operations/listbankaccounts.py +64 -0
  497. moovio_sdk/models/operations/listcapabilities.py +64 -0
  498. moovio_sdk/models/operations/listcards.py +64 -0
  499. moovio_sdk/models/operations/listdisputeevidence.py +73 -0
  500. moovio_sdk/models/operations/listdisputes.py +172 -0
  501. moovio_sdk/models/operations/listfeeplanagreements.py +101 -0
  502. moovio_sdk/models/operations/listfeeplans.py +78 -0
  503. moovio_sdk/models/operations/listfeesfetch.py +80 -0
  504. moovio_sdk/models/operations/listfiles.py +64 -0
  505. moovio_sdk/models/operations/listindustries.py +62 -0
  506. moovio_sdk/models/operations/listinstitutions.py +92 -0
  507. moovio_sdk/models/operations/listissuedcardauthorizationevents.py +94 -0
  508. moovio_sdk/models/operations/listissuedcardauthorizations.py +126 -0
  509. moovio_sdk/models/operations/listissuedcards.py +94 -0
  510. moovio_sdk/models/operations/listissuedcardtransactions.py +113 -0
  511. moovio_sdk/models/operations/listonboardinginvites.py +60 -0
  512. moovio_sdk/models/operations/listpartnerpricing.py +78 -0
  513. moovio_sdk/models/operations/listpartnerpricingagreements.py +101 -0
  514. moovio_sdk/models/operations/listpaymentlinks.py +64 -0
  515. moovio_sdk/models/operations/listpaymentmethods.py +98 -0
  516. moovio_sdk/models/operations/listreceipts.py +65 -0
  517. moovio_sdk/models/operations/listrefunds.py +75 -0
  518. moovio_sdk/models/operations/listrepresentatives.py +66 -0
  519. moovio_sdk/models/operations/listschedules.py +81 -0
  520. moovio_sdk/models/operations/listsweepconfigs.py +64 -0
  521. moovio_sdk/models/operations/listsweeps.py +108 -0
  522. moovio_sdk/models/operations/listterminalapplications.py +62 -0
  523. moovio_sdk/models/operations/listtransfers.py +145 -0
  524. moovio_sdk/models/operations/listwallets.py +64 -0
  525. moovio_sdk/models/operations/listwallettransactions.py +189 -0
  526. moovio_sdk/models/operations/ping.py +56 -0
  527. moovio_sdk/models/operations/registerapplepaymerchantdomains.py +80 -0
  528. moovio_sdk/models/operations/requestcapabilities.py +78 -0
  529. moovio_sdk/models/operations/requestcard.py +80 -0
  530. moovio_sdk/models/operations/retrievefees.py +117 -0
  531. moovio_sdk/models/operations/revokeaccesstoken.py +48 -0
  532. moovio_sdk/models/operations/revokeonboardinginvite.py +58 -0
  533. moovio_sdk/models/operations/submitdisputeevidence.py +71 -0
  534. moovio_sdk/models/operations/testendtoendtoken.py +56 -0
  535. moovio_sdk/models/operations/updateaccount.py +78 -0
  536. moovio_sdk/models/operations/updateapplepaymerchantdomains.py +78 -0
  537. moovio_sdk/models/operations/updatebrand.py +78 -0
  538. moovio_sdk/models/operations/updatecard.py +85 -0
  539. moovio_sdk/models/operations/updatedisputeevidence.py +92 -0
  540. moovio_sdk/models/operations/updateissuedcard.py +81 -0
  541. moovio_sdk/models/operations/updatepaymentlink.py +85 -0
  542. moovio_sdk/models/operations/updaterepresentative.py +89 -0
  543. moovio_sdk/models/operations/updateschedule.py +85 -0
  544. moovio_sdk/models/operations/updatesweepconfig.py +85 -0
  545. moovio_sdk/models/operations/updatetransfer.py +87 -0
  546. moovio_sdk/models/operations/uploaddisputeevidencefile.py +87 -0
  547. moovio_sdk/models/operations/uploaddisputeevidencetext.py +85 -0
  548. moovio_sdk/models/operations/uploadfile.py +80 -0
  549. moovio_sdk/models/operations/upsertbrand.py +75 -0
  550. moovio_sdk/models/operations/upsertunderwriting.py +78 -0
  551. moovio_sdk/onboarding.py +965 -0
  552. moovio_sdk/payment_links.py +1694 -0
  553. moovio_sdk/payment_methods.py +475 -0
  554. moovio_sdk/ping.py +233 -0
  555. moovio_sdk/py.typed +1 -0
  556. moovio_sdk/receipts.py +507 -0
  557. moovio_sdk/representatives.py +1513 -0
  558. moovio_sdk/scheduling.py +1565 -0
  559. moovio_sdk/sdk.py +242 -0
  560. moovio_sdk/sdkconfiguration.py +59 -0
  561. moovio_sdk/sweeps.py +1617 -0
  562. moovio_sdk/terminal_applications.py +1013 -0
  563. moovio_sdk/transfers.py +3040 -0
  564. moovio_sdk/types/__init__.py +21 -0
  565. moovio_sdk/types/basemodel.py +39 -0
  566. moovio_sdk/underwriting.py +581 -0
  567. moovio_sdk/utils/__init__.py +101 -0
  568. moovio_sdk/utils/annotations.py +55 -0
  569. moovio_sdk/utils/enums.py +34 -0
  570. moovio_sdk/utils/eventstreaming.py +238 -0
  571. moovio_sdk/utils/forms.py +202 -0
  572. moovio_sdk/utils/headers.py +136 -0
  573. moovio_sdk/utils/logger.py +27 -0
  574. moovio_sdk/utils/metadata.py +118 -0
  575. moovio_sdk/utils/queryparams.py +205 -0
  576. moovio_sdk/utils/requestbodies.py +66 -0
  577. moovio_sdk/utils/retries.py +217 -0
  578. moovio_sdk/utils/security.py +195 -0
  579. moovio_sdk/utils/serializers.py +215 -0
  580. moovio_sdk/utils/url.py +155 -0
  581. moovio_sdk/utils/values.py +137 -0
  582. moovio_sdk/wallet_transactions.py +558 -0
  583. moovio_sdk/wallets.py +465 -0
  584. moovio_sdk-0.3.8.dist-info/METADATA +1920 -0
  585. moovio_sdk-0.3.8.dist-info/RECORD +586 -0
  586. moovio_sdk-0.3.8.dist-info/WHEEL +4 -0
@@ -0,0 +1,1759 @@
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
10
+
11
+
12
+ class FeePlans(BaseSDK):
13
+ def list_fee_plan_agreements(
14
+ self,
15
+ *,
16
+ account_id: str,
17
+ skip: Optional[int] = None,
18
+ count: Optional[int] = None,
19
+ agreement_id: Optional[List[str]] = None,
20
+ status: Optional[List[components.FeePlanAgreementStatus]] = None,
21
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
22
+ server_url: Optional[str] = None,
23
+ timeout_ms: Optional[int] = None,
24
+ http_headers: Optional[Mapping[str, str]] = None,
25
+ ) -> operations.ListFeePlanAgreementsResponse:
26
+ r"""List all fee plan agreements associated with an account.
27
+
28
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
29
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
30
+
31
+ :param account_id:
32
+ :param skip:
33
+ :param count:
34
+ :param agreement_id: A comma-separated list of agreement IDs to filter the results by.
35
+ :param status: A comma-separated list of statuses to filter the results by.
36
+ :param retries: Override the default retry configuration for this method
37
+ :param server_url: Override the default server URL for this method
38
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
39
+ :param http_headers: Additional headers to set or replace on requests.
40
+ """
41
+ base_url = None
42
+ url_variables = None
43
+ if timeout_ms is None:
44
+ timeout_ms = self.sdk_configuration.timeout_ms
45
+
46
+ if server_url is not None:
47
+ base_url = server_url
48
+ else:
49
+ base_url = self._get_url(base_url, url_variables)
50
+
51
+ request = operations.ListFeePlanAgreementsRequest(
52
+ skip=skip,
53
+ count=count,
54
+ account_id=account_id,
55
+ agreement_id=agreement_id,
56
+ status=status,
57
+ )
58
+
59
+ req = self._build_request(
60
+ method="GET",
61
+ path="/accounts/{accountID}/fee-plan-agreements",
62
+ base_url=base_url,
63
+ url_variables=url_variables,
64
+ request=request,
65
+ request_body_required=False,
66
+ request_has_path_params=True,
67
+ request_has_query_params=True,
68
+ user_agent_header="user-agent",
69
+ accept_header_value="application/json",
70
+ http_headers=http_headers,
71
+ _globals=operations.ListFeePlanAgreementsGlobals(
72
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
73
+ ),
74
+ security=self.sdk_configuration.security,
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="listFeePlanAgreements",
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=["401", "403", "429", "4XX", "500", "504", "5XX"],
97
+ retry_config=retry_config,
98
+ )
99
+
100
+ if utils.match_response(http_res, "200", "application/json"):
101
+ return operations.ListFeePlanAgreementsResponse(
102
+ result=utils.unmarshal_json(
103
+ http_res.text, List[components.FeePlanAgreement]
104
+ ),
105
+ headers=utils.get_response_headers(http_res.headers),
106
+ )
107
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
108
+ http_res_text = utils.stream_to_text(http_res)
109
+ raise errors.APIError(
110
+ "API error occurred", http_res.status_code, http_res_text, http_res
111
+ )
112
+ if utils.match_response(http_res, ["500", "504"], "*"):
113
+ http_res_text = utils.stream_to_text(http_res)
114
+ raise errors.APIError(
115
+ "API error occurred", http_res.status_code, http_res_text, http_res
116
+ )
117
+ if utils.match_response(http_res, "4XX", "*"):
118
+ http_res_text = utils.stream_to_text(http_res)
119
+ raise errors.APIError(
120
+ "API error occurred", http_res.status_code, http_res_text, http_res
121
+ )
122
+ if utils.match_response(http_res, "5XX", "*"):
123
+ http_res_text = utils.stream_to_text(http_res)
124
+ raise errors.APIError(
125
+ "API error occurred", http_res.status_code, http_res_text, http_res
126
+ )
127
+
128
+ content_type = http_res.headers.get("Content-Type")
129
+ http_res_text = utils.stream_to_text(http_res)
130
+ raise errors.APIError(
131
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
132
+ http_res.status_code,
133
+ http_res_text,
134
+ http_res,
135
+ )
136
+
137
+ async def list_fee_plan_agreements_async(
138
+ self,
139
+ *,
140
+ account_id: str,
141
+ skip: Optional[int] = None,
142
+ count: Optional[int] = None,
143
+ agreement_id: Optional[List[str]] = None,
144
+ status: Optional[List[components.FeePlanAgreementStatus]] = None,
145
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
146
+ server_url: Optional[str] = None,
147
+ timeout_ms: Optional[int] = None,
148
+ http_headers: Optional[Mapping[str, str]] = None,
149
+ ) -> operations.ListFeePlanAgreementsResponse:
150
+ r"""List all fee plan agreements associated with an account.
151
+
152
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
153
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
154
+
155
+ :param account_id:
156
+ :param skip:
157
+ :param count:
158
+ :param agreement_id: A comma-separated list of agreement IDs to filter the results by.
159
+ :param status: A comma-separated list of statuses to filter the results by.
160
+ :param retries: Override the default retry configuration for this method
161
+ :param server_url: Override the default server URL for this method
162
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
163
+ :param http_headers: Additional headers to set or replace on requests.
164
+ """
165
+ base_url = None
166
+ url_variables = None
167
+ if timeout_ms is None:
168
+ timeout_ms = self.sdk_configuration.timeout_ms
169
+
170
+ if server_url is not None:
171
+ base_url = server_url
172
+ else:
173
+ base_url = self._get_url(base_url, url_variables)
174
+
175
+ request = operations.ListFeePlanAgreementsRequest(
176
+ skip=skip,
177
+ count=count,
178
+ account_id=account_id,
179
+ agreement_id=agreement_id,
180
+ status=status,
181
+ )
182
+
183
+ req = self._build_request_async(
184
+ method="GET",
185
+ path="/accounts/{accountID}/fee-plan-agreements",
186
+ base_url=base_url,
187
+ url_variables=url_variables,
188
+ request=request,
189
+ request_body_required=False,
190
+ request_has_path_params=True,
191
+ request_has_query_params=True,
192
+ user_agent_header="user-agent",
193
+ accept_header_value="application/json",
194
+ http_headers=http_headers,
195
+ _globals=operations.ListFeePlanAgreementsGlobals(
196
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
197
+ ),
198
+ security=self.sdk_configuration.security,
199
+ timeout_ms=timeout_ms,
200
+ )
201
+
202
+ if retries == UNSET:
203
+ if self.sdk_configuration.retry_config is not UNSET:
204
+ retries = self.sdk_configuration.retry_config
205
+
206
+ retry_config = None
207
+ if isinstance(retries, utils.RetryConfig):
208
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
209
+
210
+ http_res = await self.do_request_async(
211
+ hook_ctx=HookContext(
212
+ base_url=base_url or "",
213
+ operation_id="listFeePlanAgreements",
214
+ oauth2_scopes=[],
215
+ security_source=get_security_from_env(
216
+ self.sdk_configuration.security, components.Security
217
+ ),
218
+ ),
219
+ request=req,
220
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
221
+ retry_config=retry_config,
222
+ )
223
+
224
+ if utils.match_response(http_res, "200", "application/json"):
225
+ return operations.ListFeePlanAgreementsResponse(
226
+ result=utils.unmarshal_json(
227
+ http_res.text, List[components.FeePlanAgreement]
228
+ ),
229
+ headers=utils.get_response_headers(http_res.headers),
230
+ )
231
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
232
+ http_res_text = await utils.stream_to_text_async(http_res)
233
+ raise errors.APIError(
234
+ "API error occurred", http_res.status_code, http_res_text, http_res
235
+ )
236
+ if utils.match_response(http_res, ["500", "504"], "*"):
237
+ http_res_text = await utils.stream_to_text_async(http_res)
238
+ raise errors.APIError(
239
+ "API error occurred", http_res.status_code, http_res_text, http_res
240
+ )
241
+ if utils.match_response(http_res, "4XX", "*"):
242
+ http_res_text = await utils.stream_to_text_async(http_res)
243
+ raise errors.APIError(
244
+ "API error occurred", http_res.status_code, http_res_text, http_res
245
+ )
246
+ if utils.match_response(http_res, "5XX", "*"):
247
+ http_res_text = await utils.stream_to_text_async(http_res)
248
+ raise errors.APIError(
249
+ "API error occurred", http_res.status_code, http_res_text, http_res
250
+ )
251
+
252
+ content_type = http_res.headers.get("Content-Type")
253
+ http_res_text = await utils.stream_to_text_async(http_res)
254
+ raise errors.APIError(
255
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
256
+ http_res.status_code,
257
+ http_res_text,
258
+ http_res,
259
+ )
260
+
261
+ def create_fee_plan_agreements(
262
+ self,
263
+ *,
264
+ account_id: str,
265
+ plan_id: str,
266
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
267
+ server_url: Optional[str] = None,
268
+ timeout_ms: Optional[int] = None,
269
+ http_headers: Optional[Mapping[str, str]] = None,
270
+ ) -> operations.CreateFeePlanAgreementsResponse:
271
+ r"""Creates the subscription of a fee plan to a merchant account. Merchants are required to accept the fee plan terms prior to activation.
272
+
273
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
274
+ you'll need to specify the `/accounts/{accountID}/profile.write` scope.
275
+
276
+ :param account_id:
277
+ :param plan_id:
278
+ :param retries: Override the default retry configuration for this method
279
+ :param server_url: Override the default server URL for this method
280
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
281
+ :param http_headers: Additional headers to set or replace on requests.
282
+ """
283
+ base_url = None
284
+ url_variables = None
285
+ if timeout_ms is None:
286
+ timeout_ms = self.sdk_configuration.timeout_ms
287
+
288
+ if server_url is not None:
289
+ base_url = server_url
290
+ else:
291
+ base_url = self._get_url(base_url, url_variables)
292
+
293
+ request = operations.CreateFeePlanAgreementsRequest(
294
+ account_id=account_id,
295
+ create_fee_plan_agreement=components.CreateFeePlanAgreement(
296
+ plan_id=plan_id,
297
+ ),
298
+ )
299
+
300
+ req = self._build_request(
301
+ method="POST",
302
+ path="/accounts/{accountID}/fee-plan-agreements",
303
+ base_url=base_url,
304
+ url_variables=url_variables,
305
+ request=request,
306
+ request_body_required=True,
307
+ request_has_path_params=True,
308
+ request_has_query_params=True,
309
+ user_agent_header="user-agent",
310
+ accept_header_value="application/json",
311
+ http_headers=http_headers,
312
+ _globals=operations.CreateFeePlanAgreementsGlobals(
313
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
314
+ ),
315
+ security=self.sdk_configuration.security,
316
+ get_serialized_body=lambda: utils.serialize_request_body(
317
+ request.create_fee_plan_agreement,
318
+ False,
319
+ False,
320
+ "json",
321
+ components.CreateFeePlanAgreement,
322
+ ),
323
+ timeout_ms=timeout_ms,
324
+ )
325
+
326
+ if retries == UNSET:
327
+ if self.sdk_configuration.retry_config is not UNSET:
328
+ retries = self.sdk_configuration.retry_config
329
+
330
+ retry_config = None
331
+ if isinstance(retries, utils.RetryConfig):
332
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
333
+
334
+ http_res = self.do_request(
335
+ hook_ctx=HookContext(
336
+ base_url=base_url or "",
337
+ operation_id="createFeePlanAgreements",
338
+ oauth2_scopes=[],
339
+ security_source=get_security_from_env(
340
+ self.sdk_configuration.security, components.Security
341
+ ),
342
+ ),
343
+ request=req,
344
+ error_status_codes=[
345
+ "400",
346
+ "401",
347
+ "403",
348
+ "404",
349
+ "409",
350
+ "422",
351
+ "429",
352
+ "4XX",
353
+ "500",
354
+ "504",
355
+ "5XX",
356
+ ],
357
+ retry_config=retry_config,
358
+ )
359
+
360
+ response_data: Any = None
361
+ if utils.match_response(http_res, "201", "application/json"):
362
+ return operations.CreateFeePlanAgreementsResponse(
363
+ result=utils.unmarshal_json(http_res.text, components.FeePlanAgreement),
364
+ headers=utils.get_response_headers(http_res.headers),
365
+ )
366
+ if utils.match_response(http_res, ["400", "409"], "application/json"):
367
+ response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
368
+ raise errors.GenericError(data=response_data)
369
+ if utils.match_response(http_res, "422", "application/json"):
370
+ response_data = utils.unmarshal_json(
371
+ http_res.text, errors.FeePlanAgreementErrorData
372
+ )
373
+ raise errors.FeePlanAgreementError(data=response_data)
374
+ if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
375
+ http_res_text = utils.stream_to_text(http_res)
376
+ raise errors.APIError(
377
+ "API error occurred", http_res.status_code, http_res_text, http_res
378
+ )
379
+ if utils.match_response(http_res, ["500", "504"], "*"):
380
+ http_res_text = utils.stream_to_text(http_res)
381
+ raise errors.APIError(
382
+ "API error occurred", http_res.status_code, http_res_text, http_res
383
+ )
384
+ if utils.match_response(http_res, "4XX", "*"):
385
+ http_res_text = utils.stream_to_text(http_res)
386
+ raise errors.APIError(
387
+ "API error occurred", http_res.status_code, http_res_text, http_res
388
+ )
389
+ if utils.match_response(http_res, "5XX", "*"):
390
+ http_res_text = utils.stream_to_text(http_res)
391
+ raise errors.APIError(
392
+ "API error occurred", http_res.status_code, http_res_text, http_res
393
+ )
394
+
395
+ content_type = http_res.headers.get("Content-Type")
396
+ http_res_text = utils.stream_to_text(http_res)
397
+ raise errors.APIError(
398
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
399
+ http_res.status_code,
400
+ http_res_text,
401
+ http_res,
402
+ )
403
+
404
+ async def create_fee_plan_agreements_async(
405
+ self,
406
+ *,
407
+ account_id: str,
408
+ plan_id: str,
409
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
410
+ server_url: Optional[str] = None,
411
+ timeout_ms: Optional[int] = None,
412
+ http_headers: Optional[Mapping[str, str]] = None,
413
+ ) -> operations.CreateFeePlanAgreementsResponse:
414
+ r"""Creates the subscription of a fee plan to a merchant account. Merchants are required to accept the fee plan terms prior to activation.
415
+
416
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
417
+ you'll need to specify the `/accounts/{accountID}/profile.write` scope.
418
+
419
+ :param account_id:
420
+ :param plan_id:
421
+ :param retries: Override the default retry configuration for this method
422
+ :param server_url: Override the default server URL for this method
423
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
424
+ :param http_headers: Additional headers to set or replace on requests.
425
+ """
426
+ base_url = None
427
+ url_variables = None
428
+ if timeout_ms is None:
429
+ timeout_ms = self.sdk_configuration.timeout_ms
430
+
431
+ if server_url is not None:
432
+ base_url = server_url
433
+ else:
434
+ base_url = self._get_url(base_url, url_variables)
435
+
436
+ request = operations.CreateFeePlanAgreementsRequest(
437
+ account_id=account_id,
438
+ create_fee_plan_agreement=components.CreateFeePlanAgreement(
439
+ plan_id=plan_id,
440
+ ),
441
+ )
442
+
443
+ req = self._build_request_async(
444
+ method="POST",
445
+ path="/accounts/{accountID}/fee-plan-agreements",
446
+ base_url=base_url,
447
+ url_variables=url_variables,
448
+ request=request,
449
+ request_body_required=True,
450
+ request_has_path_params=True,
451
+ request_has_query_params=True,
452
+ user_agent_header="user-agent",
453
+ accept_header_value="application/json",
454
+ http_headers=http_headers,
455
+ _globals=operations.CreateFeePlanAgreementsGlobals(
456
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
457
+ ),
458
+ security=self.sdk_configuration.security,
459
+ get_serialized_body=lambda: utils.serialize_request_body(
460
+ request.create_fee_plan_agreement,
461
+ False,
462
+ False,
463
+ "json",
464
+ components.CreateFeePlanAgreement,
465
+ ),
466
+ timeout_ms=timeout_ms,
467
+ )
468
+
469
+ if retries == UNSET:
470
+ if self.sdk_configuration.retry_config is not UNSET:
471
+ retries = self.sdk_configuration.retry_config
472
+
473
+ retry_config = None
474
+ if isinstance(retries, utils.RetryConfig):
475
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
476
+
477
+ http_res = await self.do_request_async(
478
+ hook_ctx=HookContext(
479
+ base_url=base_url or "",
480
+ operation_id="createFeePlanAgreements",
481
+ oauth2_scopes=[],
482
+ security_source=get_security_from_env(
483
+ self.sdk_configuration.security, components.Security
484
+ ),
485
+ ),
486
+ request=req,
487
+ error_status_codes=[
488
+ "400",
489
+ "401",
490
+ "403",
491
+ "404",
492
+ "409",
493
+ "422",
494
+ "429",
495
+ "4XX",
496
+ "500",
497
+ "504",
498
+ "5XX",
499
+ ],
500
+ retry_config=retry_config,
501
+ )
502
+
503
+ response_data: Any = None
504
+ if utils.match_response(http_res, "201", "application/json"):
505
+ return operations.CreateFeePlanAgreementsResponse(
506
+ result=utils.unmarshal_json(http_res.text, components.FeePlanAgreement),
507
+ headers=utils.get_response_headers(http_res.headers),
508
+ )
509
+ if utils.match_response(http_res, ["400", "409"], "application/json"):
510
+ response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
511
+ raise errors.GenericError(data=response_data)
512
+ if utils.match_response(http_res, "422", "application/json"):
513
+ response_data = utils.unmarshal_json(
514
+ http_res.text, errors.FeePlanAgreementErrorData
515
+ )
516
+ raise errors.FeePlanAgreementError(data=response_data)
517
+ if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
518
+ http_res_text = await utils.stream_to_text_async(http_res)
519
+ raise errors.APIError(
520
+ "API error occurred", http_res.status_code, http_res_text, http_res
521
+ )
522
+ if utils.match_response(http_res, ["500", "504"], "*"):
523
+ http_res_text = await utils.stream_to_text_async(http_res)
524
+ raise errors.APIError(
525
+ "API error occurred", http_res.status_code, http_res_text, http_res
526
+ )
527
+ if utils.match_response(http_res, "4XX", "*"):
528
+ http_res_text = await utils.stream_to_text_async(http_res)
529
+ raise errors.APIError(
530
+ "API error occurred", http_res.status_code, http_res_text, http_res
531
+ )
532
+ if utils.match_response(http_res, "5XX", "*"):
533
+ http_res_text = await utils.stream_to_text_async(http_res)
534
+ raise errors.APIError(
535
+ "API error occurred", http_res.status_code, http_res_text, http_res
536
+ )
537
+
538
+ content_type = http_res.headers.get("Content-Type")
539
+ http_res_text = await utils.stream_to_text_async(http_res)
540
+ raise errors.APIError(
541
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
542
+ http_res.status_code,
543
+ http_res_text,
544
+ http_res,
545
+ )
546
+
547
+ def list_fee_plans(
548
+ self,
549
+ *,
550
+ account_id: str,
551
+ plan_i_ds: Optional[List[str]] = None,
552
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
553
+ server_url: Optional[str] = None,
554
+ timeout_ms: Optional[int] = None,
555
+ http_headers: Optional[Mapping[str, str]] = None,
556
+ ) -> operations.ListFeePlansResponse:
557
+ r"""List all fee plans available for use by an account. This is intended to be used by an account when
558
+ selecting a fee plan to apply to a connected account.
559
+
560
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
561
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
562
+
563
+ :param account_id:
564
+ :param plan_i_ds: A comma-separated list of plan IDs to filter the results by.
565
+ :param retries: Override the default retry configuration for this method
566
+ :param server_url: Override the default server URL for this method
567
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
568
+ :param http_headers: Additional headers to set or replace on requests.
569
+ """
570
+ base_url = None
571
+ url_variables = None
572
+ if timeout_ms is None:
573
+ timeout_ms = self.sdk_configuration.timeout_ms
574
+
575
+ if server_url is not None:
576
+ base_url = server_url
577
+ else:
578
+ base_url = self._get_url(base_url, url_variables)
579
+
580
+ request = operations.ListFeePlansRequest(
581
+ account_id=account_id,
582
+ plan_i_ds=plan_i_ds,
583
+ )
584
+
585
+ req = self._build_request(
586
+ method="GET",
587
+ path="/accounts/{accountID}/fee-plans",
588
+ base_url=base_url,
589
+ url_variables=url_variables,
590
+ request=request,
591
+ request_body_required=False,
592
+ request_has_path_params=True,
593
+ request_has_query_params=True,
594
+ user_agent_header="user-agent",
595
+ accept_header_value="application/json",
596
+ http_headers=http_headers,
597
+ _globals=operations.ListFeePlansGlobals(
598
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
599
+ ),
600
+ security=self.sdk_configuration.security,
601
+ timeout_ms=timeout_ms,
602
+ )
603
+
604
+ if retries == UNSET:
605
+ if self.sdk_configuration.retry_config is not UNSET:
606
+ retries = self.sdk_configuration.retry_config
607
+
608
+ retry_config = None
609
+ if isinstance(retries, utils.RetryConfig):
610
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
611
+
612
+ http_res = self.do_request(
613
+ hook_ctx=HookContext(
614
+ base_url=base_url or "",
615
+ operation_id="listFeePlans",
616
+ oauth2_scopes=[],
617
+ security_source=get_security_from_env(
618
+ self.sdk_configuration.security, components.Security
619
+ ),
620
+ ),
621
+ request=req,
622
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
623
+ retry_config=retry_config,
624
+ )
625
+
626
+ if utils.match_response(http_res, "200", "application/json"):
627
+ return operations.ListFeePlansResponse(
628
+ result=utils.unmarshal_json(http_res.text, List[components.FeePlan]),
629
+ headers=utils.get_response_headers(http_res.headers),
630
+ )
631
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
632
+ http_res_text = utils.stream_to_text(http_res)
633
+ raise errors.APIError(
634
+ "API error occurred", http_res.status_code, http_res_text, http_res
635
+ )
636
+ if utils.match_response(http_res, ["500", "504"], "*"):
637
+ http_res_text = utils.stream_to_text(http_res)
638
+ raise errors.APIError(
639
+ "API error occurred", http_res.status_code, http_res_text, http_res
640
+ )
641
+ if utils.match_response(http_res, "4XX", "*"):
642
+ http_res_text = utils.stream_to_text(http_res)
643
+ raise errors.APIError(
644
+ "API error occurred", http_res.status_code, http_res_text, http_res
645
+ )
646
+ if utils.match_response(http_res, "5XX", "*"):
647
+ http_res_text = utils.stream_to_text(http_res)
648
+ raise errors.APIError(
649
+ "API error occurred", http_res.status_code, http_res_text, http_res
650
+ )
651
+
652
+ content_type = http_res.headers.get("Content-Type")
653
+ http_res_text = utils.stream_to_text(http_res)
654
+ raise errors.APIError(
655
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
656
+ http_res.status_code,
657
+ http_res_text,
658
+ http_res,
659
+ )
660
+
661
+ async def list_fee_plans_async(
662
+ self,
663
+ *,
664
+ account_id: str,
665
+ plan_i_ds: Optional[List[str]] = None,
666
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
667
+ server_url: Optional[str] = None,
668
+ timeout_ms: Optional[int] = None,
669
+ http_headers: Optional[Mapping[str, str]] = None,
670
+ ) -> operations.ListFeePlansResponse:
671
+ r"""List all fee plans available for use by an account. This is intended to be used by an account when
672
+ selecting a fee plan to apply to a connected account.
673
+
674
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
675
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
676
+
677
+ :param account_id:
678
+ :param plan_i_ds: A comma-separated list of plan IDs to filter the results by.
679
+ :param retries: Override the default retry configuration for this method
680
+ :param server_url: Override the default server URL for this method
681
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
682
+ :param http_headers: Additional headers to set or replace on requests.
683
+ """
684
+ base_url = None
685
+ url_variables = None
686
+ if timeout_ms is None:
687
+ timeout_ms = self.sdk_configuration.timeout_ms
688
+
689
+ if server_url is not None:
690
+ base_url = server_url
691
+ else:
692
+ base_url = self._get_url(base_url, url_variables)
693
+
694
+ request = operations.ListFeePlansRequest(
695
+ account_id=account_id,
696
+ plan_i_ds=plan_i_ds,
697
+ )
698
+
699
+ req = self._build_request_async(
700
+ method="GET",
701
+ path="/accounts/{accountID}/fee-plans",
702
+ base_url=base_url,
703
+ url_variables=url_variables,
704
+ request=request,
705
+ request_body_required=False,
706
+ request_has_path_params=True,
707
+ request_has_query_params=True,
708
+ user_agent_header="user-agent",
709
+ accept_header_value="application/json",
710
+ http_headers=http_headers,
711
+ _globals=operations.ListFeePlansGlobals(
712
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
713
+ ),
714
+ security=self.sdk_configuration.security,
715
+ timeout_ms=timeout_ms,
716
+ )
717
+
718
+ if retries == UNSET:
719
+ if self.sdk_configuration.retry_config is not UNSET:
720
+ retries = self.sdk_configuration.retry_config
721
+
722
+ retry_config = None
723
+ if isinstance(retries, utils.RetryConfig):
724
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
725
+
726
+ http_res = await self.do_request_async(
727
+ hook_ctx=HookContext(
728
+ base_url=base_url or "",
729
+ operation_id="listFeePlans",
730
+ oauth2_scopes=[],
731
+ security_source=get_security_from_env(
732
+ self.sdk_configuration.security, components.Security
733
+ ),
734
+ ),
735
+ request=req,
736
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
737
+ retry_config=retry_config,
738
+ )
739
+
740
+ if utils.match_response(http_res, "200", "application/json"):
741
+ return operations.ListFeePlansResponse(
742
+ result=utils.unmarshal_json(http_res.text, List[components.FeePlan]),
743
+ headers=utils.get_response_headers(http_res.headers),
744
+ )
745
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
746
+ http_res_text = await utils.stream_to_text_async(http_res)
747
+ raise errors.APIError(
748
+ "API error occurred", http_res.status_code, http_res_text, http_res
749
+ )
750
+ if utils.match_response(http_res, ["500", "504"], "*"):
751
+ http_res_text = await utils.stream_to_text_async(http_res)
752
+ raise errors.APIError(
753
+ "API error occurred", http_res.status_code, http_res_text, http_res
754
+ )
755
+ if utils.match_response(http_res, "4XX", "*"):
756
+ http_res_text = await utils.stream_to_text_async(http_res)
757
+ raise errors.APIError(
758
+ "API error occurred", http_res.status_code, http_res_text, http_res
759
+ )
760
+ if utils.match_response(http_res, "5XX", "*"):
761
+ http_res_text = await utils.stream_to_text_async(http_res)
762
+ raise errors.APIError(
763
+ "API error occurred", http_res.status_code, http_res_text, http_res
764
+ )
765
+
766
+ content_type = http_res.headers.get("Content-Type")
767
+ http_res_text = await utils.stream_to_text_async(http_res)
768
+ raise errors.APIError(
769
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
770
+ http_res.status_code,
771
+ http_res_text,
772
+ http_res,
773
+ )
774
+
775
+ def retrieve_fees(
776
+ self,
777
+ *,
778
+ account_id: str,
779
+ transfer_id: Optional[str] = None,
780
+ dispute_id: Optional[str] = None,
781
+ start_date_time: Optional[str] = None,
782
+ end_date_time: Optional[str] = None,
783
+ skip: Optional[int] = None,
784
+ count: Optional[int] = None,
785
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
786
+ server_url: Optional[str] = None,
787
+ timeout_ms: Optional[int] = None,
788
+ http_headers: Optional[Mapping[str, str]] = None,
789
+ ) -> operations.RetrieveFeesResponse:
790
+ r"""Retrieve fees associated with an account.
791
+
792
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
793
+ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
794
+
795
+ :param account_id:
796
+ :param transfer_id: Optional transfer ID to filter the results by.
797
+ :param dispute_id: Optional dispute ID to filter the results by.
798
+ :param start_date_time: Optional date-time to inclusively filter all fees created after this date-time.
799
+ :param end_date_time: Optional date-time to exclusively filter all fees created before this date-time.
800
+ :param skip:
801
+ :param count:
802
+ :param retries: Override the default retry configuration for this method
803
+ :param server_url: Override the default server URL for this method
804
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
805
+ :param http_headers: Additional headers to set or replace on requests.
806
+ """
807
+ base_url = None
808
+ url_variables = None
809
+ if timeout_ms is None:
810
+ timeout_ms = self.sdk_configuration.timeout_ms
811
+
812
+ if server_url is not None:
813
+ base_url = server_url
814
+ else:
815
+ base_url = self._get_url(base_url, url_variables)
816
+
817
+ request = operations.RetrieveFeesRequest(
818
+ account_id=account_id,
819
+ transfer_id=transfer_id,
820
+ dispute_id=dispute_id,
821
+ start_date_time=start_date_time,
822
+ end_date_time=end_date_time,
823
+ skip=skip,
824
+ count=count,
825
+ )
826
+
827
+ req = self._build_request(
828
+ method="GET",
829
+ path="/accounts/{accountID}/fees",
830
+ base_url=base_url,
831
+ url_variables=url_variables,
832
+ request=request,
833
+ request_body_required=False,
834
+ request_has_path_params=True,
835
+ request_has_query_params=True,
836
+ user_agent_header="user-agent",
837
+ accept_header_value="application/json",
838
+ http_headers=http_headers,
839
+ _globals=operations.RetrieveFeesGlobals(
840
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
841
+ ),
842
+ security=self.sdk_configuration.security,
843
+ timeout_ms=timeout_ms,
844
+ )
845
+
846
+ if retries == UNSET:
847
+ if self.sdk_configuration.retry_config is not UNSET:
848
+ retries = self.sdk_configuration.retry_config
849
+
850
+ retry_config = None
851
+ if isinstance(retries, utils.RetryConfig):
852
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
853
+
854
+ http_res = self.do_request(
855
+ hook_ctx=HookContext(
856
+ base_url=base_url or "",
857
+ operation_id="retrieveFees",
858
+ oauth2_scopes=[],
859
+ security_source=get_security_from_env(
860
+ self.sdk_configuration.security, components.Security
861
+ ),
862
+ ),
863
+ request=req,
864
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
865
+ retry_config=retry_config,
866
+ )
867
+
868
+ if utils.match_response(http_res, "200", "application/json"):
869
+ return operations.RetrieveFeesResponse(
870
+ result=utils.unmarshal_json(
871
+ http_res.text, List[components.IncurredFee]
872
+ ),
873
+ headers=utils.get_response_headers(http_res.headers),
874
+ )
875
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
876
+ http_res_text = utils.stream_to_text(http_res)
877
+ raise errors.APIError(
878
+ "API error occurred", http_res.status_code, http_res_text, http_res
879
+ )
880
+ if utils.match_response(http_res, ["500", "504"], "*"):
881
+ http_res_text = utils.stream_to_text(http_res)
882
+ raise errors.APIError(
883
+ "API error occurred", http_res.status_code, http_res_text, http_res
884
+ )
885
+ if utils.match_response(http_res, "4XX", "*"):
886
+ http_res_text = utils.stream_to_text(http_res)
887
+ raise errors.APIError(
888
+ "API error occurred", http_res.status_code, http_res_text, http_res
889
+ )
890
+ if utils.match_response(http_res, "5XX", "*"):
891
+ http_res_text = utils.stream_to_text(http_res)
892
+ raise errors.APIError(
893
+ "API error occurred", http_res.status_code, http_res_text, http_res
894
+ )
895
+
896
+ content_type = http_res.headers.get("Content-Type")
897
+ http_res_text = utils.stream_to_text(http_res)
898
+ raise errors.APIError(
899
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
900
+ http_res.status_code,
901
+ http_res_text,
902
+ http_res,
903
+ )
904
+
905
+ async def retrieve_fees_async(
906
+ self,
907
+ *,
908
+ account_id: str,
909
+ transfer_id: Optional[str] = None,
910
+ dispute_id: Optional[str] = None,
911
+ start_date_time: Optional[str] = None,
912
+ end_date_time: Optional[str] = None,
913
+ skip: Optional[int] = None,
914
+ count: Optional[int] = None,
915
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
916
+ server_url: Optional[str] = None,
917
+ timeout_ms: Optional[int] = None,
918
+ http_headers: Optional[Mapping[str, str]] = None,
919
+ ) -> operations.RetrieveFeesResponse:
920
+ r"""Retrieve fees associated with an account.
921
+
922
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
923
+ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
924
+
925
+ :param account_id:
926
+ :param transfer_id: Optional transfer ID to filter the results by.
927
+ :param dispute_id: Optional dispute ID to filter the results by.
928
+ :param start_date_time: Optional date-time to inclusively filter all fees created after this date-time.
929
+ :param end_date_time: Optional date-time to exclusively filter all fees created before this date-time.
930
+ :param skip:
931
+ :param count:
932
+ :param retries: Override the default retry configuration for this method
933
+ :param server_url: Override the default server URL for this method
934
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
935
+ :param http_headers: Additional headers to set or replace on requests.
936
+ """
937
+ base_url = None
938
+ url_variables = None
939
+ if timeout_ms is None:
940
+ timeout_ms = self.sdk_configuration.timeout_ms
941
+
942
+ if server_url is not None:
943
+ base_url = server_url
944
+ else:
945
+ base_url = self._get_url(base_url, url_variables)
946
+
947
+ request = operations.RetrieveFeesRequest(
948
+ account_id=account_id,
949
+ transfer_id=transfer_id,
950
+ dispute_id=dispute_id,
951
+ start_date_time=start_date_time,
952
+ end_date_time=end_date_time,
953
+ skip=skip,
954
+ count=count,
955
+ )
956
+
957
+ req = self._build_request_async(
958
+ method="GET",
959
+ path="/accounts/{accountID}/fees",
960
+ base_url=base_url,
961
+ url_variables=url_variables,
962
+ request=request,
963
+ request_body_required=False,
964
+ request_has_path_params=True,
965
+ request_has_query_params=True,
966
+ user_agent_header="user-agent",
967
+ accept_header_value="application/json",
968
+ http_headers=http_headers,
969
+ _globals=operations.RetrieveFeesGlobals(
970
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
971
+ ),
972
+ security=self.sdk_configuration.security,
973
+ timeout_ms=timeout_ms,
974
+ )
975
+
976
+ if retries == UNSET:
977
+ if self.sdk_configuration.retry_config is not UNSET:
978
+ retries = self.sdk_configuration.retry_config
979
+
980
+ retry_config = None
981
+ if isinstance(retries, utils.RetryConfig):
982
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
983
+
984
+ http_res = await self.do_request_async(
985
+ hook_ctx=HookContext(
986
+ base_url=base_url or "",
987
+ operation_id="retrieveFees",
988
+ oauth2_scopes=[],
989
+ security_source=get_security_from_env(
990
+ self.sdk_configuration.security, components.Security
991
+ ),
992
+ ),
993
+ request=req,
994
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
995
+ retry_config=retry_config,
996
+ )
997
+
998
+ if utils.match_response(http_res, "200", "application/json"):
999
+ return operations.RetrieveFeesResponse(
1000
+ result=utils.unmarshal_json(
1001
+ http_res.text, List[components.IncurredFee]
1002
+ ),
1003
+ headers=utils.get_response_headers(http_res.headers),
1004
+ )
1005
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1006
+ http_res_text = await utils.stream_to_text_async(http_res)
1007
+ raise errors.APIError(
1008
+ "API error occurred", http_res.status_code, http_res_text, http_res
1009
+ )
1010
+ if utils.match_response(http_res, ["500", "504"], "*"):
1011
+ http_res_text = await utils.stream_to_text_async(http_res)
1012
+ raise errors.APIError(
1013
+ "API error occurred", http_res.status_code, http_res_text, http_res
1014
+ )
1015
+ if utils.match_response(http_res, "4XX", "*"):
1016
+ http_res_text = await utils.stream_to_text_async(http_res)
1017
+ raise errors.APIError(
1018
+ "API error occurred", http_res.status_code, http_res_text, http_res
1019
+ )
1020
+ if utils.match_response(http_res, "5XX", "*"):
1021
+ http_res_text = await utils.stream_to_text_async(http_res)
1022
+ raise errors.APIError(
1023
+ "API error occurred", http_res.status_code, http_res_text, http_res
1024
+ )
1025
+
1026
+ content_type = http_res.headers.get("Content-Type")
1027
+ http_res_text = await utils.stream_to_text_async(http_res)
1028
+ raise errors.APIError(
1029
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1030
+ http_res.status_code,
1031
+ http_res_text,
1032
+ http_res,
1033
+ )
1034
+
1035
+ def list_fees_fetch(
1036
+ self,
1037
+ *,
1038
+ account_id: str,
1039
+ fee_i_ds: Optional[List[str]] = None,
1040
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1041
+ server_url: Optional[str] = None,
1042
+ timeout_ms: Optional[int] = None,
1043
+ http_headers: Optional[Mapping[str, str]] = None,
1044
+ ) -> operations.ListFeesFetchResponse:
1045
+ r"""List fees associated with an account.
1046
+
1047
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1048
+ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
1049
+
1050
+ :param account_id:
1051
+ :param fee_i_ds:
1052
+ :param retries: Override the default retry configuration for this method
1053
+ :param server_url: Override the default server URL for this method
1054
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1055
+ :param http_headers: Additional headers to set or replace on requests.
1056
+ """
1057
+ base_url = None
1058
+ url_variables = None
1059
+ if timeout_ms is None:
1060
+ timeout_ms = self.sdk_configuration.timeout_ms
1061
+
1062
+ if server_url is not None:
1063
+ base_url = server_url
1064
+ else:
1065
+ base_url = self._get_url(base_url, url_variables)
1066
+
1067
+ request = operations.ListFeesFetchRequest(
1068
+ account_id=account_id,
1069
+ list_fees_fetch_request=components.ListFeesFetchRequest(
1070
+ fee_i_ds=fee_i_ds,
1071
+ ),
1072
+ )
1073
+
1074
+ req = self._build_request(
1075
+ method="POST",
1076
+ path="/accounts/{accountID}/fees/.fetch",
1077
+ base_url=base_url,
1078
+ url_variables=url_variables,
1079
+ request=request,
1080
+ request_body_required=False,
1081
+ request_has_path_params=True,
1082
+ request_has_query_params=True,
1083
+ user_agent_header="user-agent",
1084
+ accept_header_value="application/json",
1085
+ http_headers=http_headers,
1086
+ _globals=operations.ListFeesFetchGlobals(
1087
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1088
+ ),
1089
+ security=self.sdk_configuration.security,
1090
+ get_serialized_body=lambda: utils.serialize_request_body(
1091
+ request.list_fees_fetch_request,
1092
+ False,
1093
+ True,
1094
+ "json",
1095
+ Optional[components.ListFeesFetchRequest],
1096
+ ),
1097
+ timeout_ms=timeout_ms,
1098
+ )
1099
+
1100
+ if retries == UNSET:
1101
+ if self.sdk_configuration.retry_config is not UNSET:
1102
+ retries = self.sdk_configuration.retry_config
1103
+
1104
+ retry_config = None
1105
+ if isinstance(retries, utils.RetryConfig):
1106
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1107
+
1108
+ http_res = self.do_request(
1109
+ hook_ctx=HookContext(
1110
+ base_url=base_url or "",
1111
+ operation_id="listFeesFetch",
1112
+ oauth2_scopes=[],
1113
+ security_source=get_security_from_env(
1114
+ self.sdk_configuration.security, components.Security
1115
+ ),
1116
+ ),
1117
+ request=req,
1118
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1119
+ retry_config=retry_config,
1120
+ )
1121
+
1122
+ if utils.match_response(http_res, "200", "application/json"):
1123
+ return operations.ListFeesFetchResponse(
1124
+ result=utils.unmarshal_json(
1125
+ http_res.text, List[components.IncurredFee]
1126
+ ),
1127
+ headers=utils.get_response_headers(http_res.headers),
1128
+ )
1129
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1130
+ http_res_text = utils.stream_to_text(http_res)
1131
+ raise errors.APIError(
1132
+ "API error occurred", http_res.status_code, http_res_text, http_res
1133
+ )
1134
+ if utils.match_response(http_res, ["500", "504"], "*"):
1135
+ http_res_text = utils.stream_to_text(http_res)
1136
+ raise errors.APIError(
1137
+ "API error occurred", http_res.status_code, http_res_text, http_res
1138
+ )
1139
+ if utils.match_response(http_res, "4XX", "*"):
1140
+ http_res_text = utils.stream_to_text(http_res)
1141
+ raise errors.APIError(
1142
+ "API error occurred", http_res.status_code, http_res_text, http_res
1143
+ )
1144
+ if utils.match_response(http_res, "5XX", "*"):
1145
+ http_res_text = utils.stream_to_text(http_res)
1146
+ raise errors.APIError(
1147
+ "API error occurred", http_res.status_code, http_res_text, http_res
1148
+ )
1149
+
1150
+ content_type = http_res.headers.get("Content-Type")
1151
+ http_res_text = utils.stream_to_text(http_res)
1152
+ raise errors.APIError(
1153
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1154
+ http_res.status_code,
1155
+ http_res_text,
1156
+ http_res,
1157
+ )
1158
+
1159
+ async def list_fees_fetch_async(
1160
+ self,
1161
+ *,
1162
+ account_id: str,
1163
+ fee_i_ds: Optional[List[str]] = None,
1164
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1165
+ server_url: Optional[str] = None,
1166
+ timeout_ms: Optional[int] = None,
1167
+ http_headers: Optional[Mapping[str, str]] = None,
1168
+ ) -> operations.ListFeesFetchResponse:
1169
+ r"""List fees associated with an account.
1170
+
1171
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1172
+ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
1173
+
1174
+ :param account_id:
1175
+ :param fee_i_ds:
1176
+ :param retries: Override the default retry configuration for this method
1177
+ :param server_url: Override the default server URL for this method
1178
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1179
+ :param http_headers: Additional headers to set or replace on requests.
1180
+ """
1181
+ base_url = None
1182
+ url_variables = None
1183
+ if timeout_ms is None:
1184
+ timeout_ms = self.sdk_configuration.timeout_ms
1185
+
1186
+ if server_url is not None:
1187
+ base_url = server_url
1188
+ else:
1189
+ base_url = self._get_url(base_url, url_variables)
1190
+
1191
+ request = operations.ListFeesFetchRequest(
1192
+ account_id=account_id,
1193
+ list_fees_fetch_request=components.ListFeesFetchRequest(
1194
+ fee_i_ds=fee_i_ds,
1195
+ ),
1196
+ )
1197
+
1198
+ req = self._build_request_async(
1199
+ method="POST",
1200
+ path="/accounts/{accountID}/fees/.fetch",
1201
+ base_url=base_url,
1202
+ url_variables=url_variables,
1203
+ request=request,
1204
+ request_body_required=False,
1205
+ request_has_path_params=True,
1206
+ request_has_query_params=True,
1207
+ user_agent_header="user-agent",
1208
+ accept_header_value="application/json",
1209
+ http_headers=http_headers,
1210
+ _globals=operations.ListFeesFetchGlobals(
1211
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1212
+ ),
1213
+ security=self.sdk_configuration.security,
1214
+ get_serialized_body=lambda: utils.serialize_request_body(
1215
+ request.list_fees_fetch_request,
1216
+ False,
1217
+ True,
1218
+ "json",
1219
+ Optional[components.ListFeesFetchRequest],
1220
+ ),
1221
+ timeout_ms=timeout_ms,
1222
+ )
1223
+
1224
+ if retries == UNSET:
1225
+ if self.sdk_configuration.retry_config is not UNSET:
1226
+ retries = self.sdk_configuration.retry_config
1227
+
1228
+ retry_config = None
1229
+ if isinstance(retries, utils.RetryConfig):
1230
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1231
+
1232
+ http_res = await self.do_request_async(
1233
+ hook_ctx=HookContext(
1234
+ base_url=base_url or "",
1235
+ operation_id="listFeesFetch",
1236
+ oauth2_scopes=[],
1237
+ security_source=get_security_from_env(
1238
+ self.sdk_configuration.security, components.Security
1239
+ ),
1240
+ ),
1241
+ request=req,
1242
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1243
+ retry_config=retry_config,
1244
+ )
1245
+
1246
+ if utils.match_response(http_res, "200", "application/json"):
1247
+ return operations.ListFeesFetchResponse(
1248
+ result=utils.unmarshal_json(
1249
+ http_res.text, List[components.IncurredFee]
1250
+ ),
1251
+ headers=utils.get_response_headers(http_res.headers),
1252
+ )
1253
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1254
+ http_res_text = await utils.stream_to_text_async(http_res)
1255
+ raise errors.APIError(
1256
+ "API error occurred", http_res.status_code, http_res_text, http_res
1257
+ )
1258
+ if utils.match_response(http_res, ["500", "504"], "*"):
1259
+ http_res_text = await utils.stream_to_text_async(http_res)
1260
+ raise errors.APIError(
1261
+ "API error occurred", http_res.status_code, http_res_text, http_res
1262
+ )
1263
+ if utils.match_response(http_res, "4XX", "*"):
1264
+ http_res_text = await utils.stream_to_text_async(http_res)
1265
+ raise errors.APIError(
1266
+ "API error occurred", http_res.status_code, http_res_text, http_res
1267
+ )
1268
+ if utils.match_response(http_res, "5XX", "*"):
1269
+ http_res_text = await utils.stream_to_text_async(http_res)
1270
+ raise errors.APIError(
1271
+ "API error occurred", http_res.status_code, http_res_text, http_res
1272
+ )
1273
+
1274
+ content_type = http_res.headers.get("Content-Type")
1275
+ http_res_text = await utils.stream_to_text_async(http_res)
1276
+ raise errors.APIError(
1277
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1278
+ http_res.status_code,
1279
+ http_res_text,
1280
+ http_res,
1281
+ )
1282
+
1283
+ def list_partner_pricing(
1284
+ self,
1285
+ *,
1286
+ account_id: str,
1287
+ plan_i_ds: Optional[List[str]] = None,
1288
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1289
+ server_url: Optional[str] = None,
1290
+ timeout_ms: Optional[int] = None,
1291
+ http_headers: Optional[Mapping[str, str]] = None,
1292
+ ) -> operations.ListPartnerPricingResponse:
1293
+ r"""List all partner pricing plans available for use by an account.
1294
+
1295
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1296
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
1297
+
1298
+ :param account_id:
1299
+ :param plan_i_ds: A comma-separated list of plan IDs to filter the results by.
1300
+ :param retries: Override the default retry configuration for this method
1301
+ :param server_url: Override the default server URL for this method
1302
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1303
+ :param http_headers: Additional headers to set or replace on requests.
1304
+ """
1305
+ base_url = None
1306
+ url_variables = None
1307
+ if timeout_ms is None:
1308
+ timeout_ms = self.sdk_configuration.timeout_ms
1309
+
1310
+ if server_url is not None:
1311
+ base_url = server_url
1312
+ else:
1313
+ base_url = self._get_url(base_url, url_variables)
1314
+
1315
+ request = operations.ListPartnerPricingRequest(
1316
+ account_id=account_id,
1317
+ plan_i_ds=plan_i_ds,
1318
+ )
1319
+
1320
+ req = self._build_request(
1321
+ method="GET",
1322
+ path="/accounts/{accountID}/partner-pricing",
1323
+ base_url=base_url,
1324
+ url_variables=url_variables,
1325
+ request=request,
1326
+ request_body_required=False,
1327
+ request_has_path_params=True,
1328
+ request_has_query_params=True,
1329
+ user_agent_header="user-agent",
1330
+ accept_header_value="application/json",
1331
+ http_headers=http_headers,
1332
+ _globals=operations.ListPartnerPricingGlobals(
1333
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1334
+ ),
1335
+ security=self.sdk_configuration.security,
1336
+ timeout_ms=timeout_ms,
1337
+ )
1338
+
1339
+ if retries == UNSET:
1340
+ if self.sdk_configuration.retry_config is not UNSET:
1341
+ retries = self.sdk_configuration.retry_config
1342
+
1343
+ retry_config = None
1344
+ if isinstance(retries, utils.RetryConfig):
1345
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1346
+
1347
+ http_res = self.do_request(
1348
+ hook_ctx=HookContext(
1349
+ base_url=base_url or "",
1350
+ operation_id="listPartnerPricing",
1351
+ oauth2_scopes=[],
1352
+ security_source=get_security_from_env(
1353
+ self.sdk_configuration.security, components.Security
1354
+ ),
1355
+ ),
1356
+ request=req,
1357
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1358
+ retry_config=retry_config,
1359
+ )
1360
+
1361
+ if utils.match_response(http_res, "200", "application/json"):
1362
+ return operations.ListPartnerPricingResponse(
1363
+ result=utils.unmarshal_json(
1364
+ http_res.text, List[components.PartnerPricing]
1365
+ ),
1366
+ headers=utils.get_response_headers(http_res.headers),
1367
+ )
1368
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1369
+ http_res_text = utils.stream_to_text(http_res)
1370
+ raise errors.APIError(
1371
+ "API error occurred", http_res.status_code, http_res_text, http_res
1372
+ )
1373
+ if utils.match_response(http_res, ["500", "504"], "*"):
1374
+ http_res_text = utils.stream_to_text(http_res)
1375
+ raise errors.APIError(
1376
+ "API error occurred", http_res.status_code, http_res_text, http_res
1377
+ )
1378
+ if utils.match_response(http_res, "4XX", "*"):
1379
+ http_res_text = utils.stream_to_text(http_res)
1380
+ raise errors.APIError(
1381
+ "API error occurred", http_res.status_code, http_res_text, http_res
1382
+ )
1383
+ if utils.match_response(http_res, "5XX", "*"):
1384
+ http_res_text = utils.stream_to_text(http_res)
1385
+ raise errors.APIError(
1386
+ "API error occurred", http_res.status_code, http_res_text, http_res
1387
+ )
1388
+
1389
+ content_type = http_res.headers.get("Content-Type")
1390
+ http_res_text = utils.stream_to_text(http_res)
1391
+ raise errors.APIError(
1392
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1393
+ http_res.status_code,
1394
+ http_res_text,
1395
+ http_res,
1396
+ )
1397
+
1398
+ async def list_partner_pricing_async(
1399
+ self,
1400
+ *,
1401
+ account_id: str,
1402
+ plan_i_ds: Optional[List[str]] = None,
1403
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1404
+ server_url: Optional[str] = None,
1405
+ timeout_ms: Optional[int] = None,
1406
+ http_headers: Optional[Mapping[str, str]] = None,
1407
+ ) -> operations.ListPartnerPricingResponse:
1408
+ r"""List all partner pricing plans available for use by an account.
1409
+
1410
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1411
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
1412
+
1413
+ :param account_id:
1414
+ :param plan_i_ds: A comma-separated list of plan IDs to filter the results by.
1415
+ :param retries: Override the default retry configuration for this method
1416
+ :param server_url: Override the default server URL for this method
1417
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1418
+ :param http_headers: Additional headers to set or replace on requests.
1419
+ """
1420
+ base_url = None
1421
+ url_variables = None
1422
+ if timeout_ms is None:
1423
+ timeout_ms = self.sdk_configuration.timeout_ms
1424
+
1425
+ if server_url is not None:
1426
+ base_url = server_url
1427
+ else:
1428
+ base_url = self._get_url(base_url, url_variables)
1429
+
1430
+ request = operations.ListPartnerPricingRequest(
1431
+ account_id=account_id,
1432
+ plan_i_ds=plan_i_ds,
1433
+ )
1434
+
1435
+ req = self._build_request_async(
1436
+ method="GET",
1437
+ path="/accounts/{accountID}/partner-pricing",
1438
+ base_url=base_url,
1439
+ url_variables=url_variables,
1440
+ request=request,
1441
+ request_body_required=False,
1442
+ request_has_path_params=True,
1443
+ request_has_query_params=True,
1444
+ user_agent_header="user-agent",
1445
+ accept_header_value="application/json",
1446
+ http_headers=http_headers,
1447
+ _globals=operations.ListPartnerPricingGlobals(
1448
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1449
+ ),
1450
+ security=self.sdk_configuration.security,
1451
+ timeout_ms=timeout_ms,
1452
+ )
1453
+
1454
+ if retries == UNSET:
1455
+ if self.sdk_configuration.retry_config is not UNSET:
1456
+ retries = self.sdk_configuration.retry_config
1457
+
1458
+ retry_config = None
1459
+ if isinstance(retries, utils.RetryConfig):
1460
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1461
+
1462
+ http_res = await self.do_request_async(
1463
+ hook_ctx=HookContext(
1464
+ base_url=base_url or "",
1465
+ operation_id="listPartnerPricing",
1466
+ oauth2_scopes=[],
1467
+ security_source=get_security_from_env(
1468
+ self.sdk_configuration.security, components.Security
1469
+ ),
1470
+ ),
1471
+ request=req,
1472
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1473
+ retry_config=retry_config,
1474
+ )
1475
+
1476
+ if utils.match_response(http_res, "200", "application/json"):
1477
+ return operations.ListPartnerPricingResponse(
1478
+ result=utils.unmarshal_json(
1479
+ http_res.text, List[components.PartnerPricing]
1480
+ ),
1481
+ headers=utils.get_response_headers(http_res.headers),
1482
+ )
1483
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1484
+ http_res_text = await utils.stream_to_text_async(http_res)
1485
+ raise errors.APIError(
1486
+ "API error occurred", http_res.status_code, http_res_text, http_res
1487
+ )
1488
+ if utils.match_response(http_res, ["500", "504"], "*"):
1489
+ http_res_text = await utils.stream_to_text_async(http_res)
1490
+ raise errors.APIError(
1491
+ "API error occurred", http_res.status_code, http_res_text, http_res
1492
+ )
1493
+ if utils.match_response(http_res, "4XX", "*"):
1494
+ http_res_text = await utils.stream_to_text_async(http_res)
1495
+ raise errors.APIError(
1496
+ "API error occurred", http_res.status_code, http_res_text, http_res
1497
+ )
1498
+ if utils.match_response(http_res, "5XX", "*"):
1499
+ http_res_text = await utils.stream_to_text_async(http_res)
1500
+ raise errors.APIError(
1501
+ "API error occurred", http_res.status_code, http_res_text, http_res
1502
+ )
1503
+
1504
+ content_type = http_res.headers.get("Content-Type")
1505
+ http_res_text = await utils.stream_to_text_async(http_res)
1506
+ raise errors.APIError(
1507
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1508
+ http_res.status_code,
1509
+ http_res_text,
1510
+ http_res,
1511
+ )
1512
+
1513
+ def list_partner_pricing_agreements(
1514
+ self,
1515
+ *,
1516
+ account_id: str,
1517
+ skip: Optional[int] = None,
1518
+ count: Optional[int] = None,
1519
+ agreement_id: Optional[List[str]] = None,
1520
+ status: Optional[List[components.FeePlanAgreementStatus]] = None,
1521
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1522
+ server_url: Optional[str] = None,
1523
+ timeout_ms: Optional[int] = None,
1524
+ http_headers: Optional[Mapping[str, str]] = None,
1525
+ ) -> operations.ListPartnerPricingAgreementsResponse:
1526
+ r"""List all partner pricing agreements associated with an account.
1527
+
1528
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1529
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
1530
+
1531
+ :param account_id:
1532
+ :param skip:
1533
+ :param count:
1534
+ :param agreement_id: A comma-separated list of agreement IDs to filter the results by.
1535
+ :param status: A comma-separated list of statuses to filter the results by.
1536
+ :param retries: Override the default retry configuration for this method
1537
+ :param server_url: Override the default server URL for this method
1538
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1539
+ :param http_headers: Additional headers to set or replace on requests.
1540
+ """
1541
+ base_url = None
1542
+ url_variables = None
1543
+ if timeout_ms is None:
1544
+ timeout_ms = self.sdk_configuration.timeout_ms
1545
+
1546
+ if server_url is not None:
1547
+ base_url = server_url
1548
+ else:
1549
+ base_url = self._get_url(base_url, url_variables)
1550
+
1551
+ request = operations.ListPartnerPricingAgreementsRequest(
1552
+ skip=skip,
1553
+ count=count,
1554
+ account_id=account_id,
1555
+ agreement_id=agreement_id,
1556
+ status=status,
1557
+ )
1558
+
1559
+ req = self._build_request(
1560
+ method="GET",
1561
+ path="/accounts/{accountID}/partner-pricing-agreements",
1562
+ base_url=base_url,
1563
+ url_variables=url_variables,
1564
+ request=request,
1565
+ request_body_required=False,
1566
+ request_has_path_params=True,
1567
+ request_has_query_params=True,
1568
+ user_agent_header="user-agent",
1569
+ accept_header_value="application/json",
1570
+ http_headers=http_headers,
1571
+ _globals=operations.ListPartnerPricingAgreementsGlobals(
1572
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1573
+ ),
1574
+ security=self.sdk_configuration.security,
1575
+ timeout_ms=timeout_ms,
1576
+ )
1577
+
1578
+ if retries == UNSET:
1579
+ if self.sdk_configuration.retry_config is not UNSET:
1580
+ retries = self.sdk_configuration.retry_config
1581
+
1582
+ retry_config = None
1583
+ if isinstance(retries, utils.RetryConfig):
1584
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1585
+
1586
+ http_res = self.do_request(
1587
+ hook_ctx=HookContext(
1588
+ base_url=base_url or "",
1589
+ operation_id="listPartnerPricingAgreements",
1590
+ oauth2_scopes=[],
1591
+ security_source=get_security_from_env(
1592
+ self.sdk_configuration.security, components.Security
1593
+ ),
1594
+ ),
1595
+ request=req,
1596
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1597
+ retry_config=retry_config,
1598
+ )
1599
+
1600
+ if utils.match_response(http_res, "200", "application/json"):
1601
+ return operations.ListPartnerPricingAgreementsResponse(
1602
+ result=utils.unmarshal_json(
1603
+ http_res.text, List[components.PartnerPricingAgreement]
1604
+ ),
1605
+ headers=utils.get_response_headers(http_res.headers),
1606
+ )
1607
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1608
+ http_res_text = utils.stream_to_text(http_res)
1609
+ raise errors.APIError(
1610
+ "API error occurred", http_res.status_code, http_res_text, http_res
1611
+ )
1612
+ if utils.match_response(http_res, ["500", "504"], "*"):
1613
+ http_res_text = utils.stream_to_text(http_res)
1614
+ raise errors.APIError(
1615
+ "API error occurred", http_res.status_code, http_res_text, http_res
1616
+ )
1617
+ if utils.match_response(http_res, "4XX", "*"):
1618
+ http_res_text = utils.stream_to_text(http_res)
1619
+ raise errors.APIError(
1620
+ "API error occurred", http_res.status_code, http_res_text, http_res
1621
+ )
1622
+ if utils.match_response(http_res, "5XX", "*"):
1623
+ http_res_text = utils.stream_to_text(http_res)
1624
+ raise errors.APIError(
1625
+ "API error occurred", http_res.status_code, http_res_text, http_res
1626
+ )
1627
+
1628
+ content_type = http_res.headers.get("Content-Type")
1629
+ http_res_text = utils.stream_to_text(http_res)
1630
+ raise errors.APIError(
1631
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1632
+ http_res.status_code,
1633
+ http_res_text,
1634
+ http_res,
1635
+ )
1636
+
1637
+ async def list_partner_pricing_agreements_async(
1638
+ self,
1639
+ *,
1640
+ account_id: str,
1641
+ skip: Optional[int] = None,
1642
+ count: Optional[int] = None,
1643
+ agreement_id: Optional[List[str]] = None,
1644
+ status: Optional[List[components.FeePlanAgreementStatus]] = None,
1645
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1646
+ server_url: Optional[str] = None,
1647
+ timeout_ms: Optional[int] = None,
1648
+ http_headers: Optional[Mapping[str, str]] = None,
1649
+ ) -> operations.ListPartnerPricingAgreementsResponse:
1650
+ r"""List all partner pricing agreements associated with an account.
1651
+
1652
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
1653
+ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
1654
+
1655
+ :param account_id:
1656
+ :param skip:
1657
+ :param count:
1658
+ :param agreement_id: A comma-separated list of agreement IDs to filter the results by.
1659
+ :param status: A comma-separated list of statuses to filter the results by.
1660
+ :param retries: Override the default retry configuration for this method
1661
+ :param server_url: Override the default server URL for this method
1662
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1663
+ :param http_headers: Additional headers to set or replace on requests.
1664
+ """
1665
+ base_url = None
1666
+ url_variables = None
1667
+ if timeout_ms is None:
1668
+ timeout_ms = self.sdk_configuration.timeout_ms
1669
+
1670
+ if server_url is not None:
1671
+ base_url = server_url
1672
+ else:
1673
+ base_url = self._get_url(base_url, url_variables)
1674
+
1675
+ request = operations.ListPartnerPricingAgreementsRequest(
1676
+ skip=skip,
1677
+ count=count,
1678
+ account_id=account_id,
1679
+ agreement_id=agreement_id,
1680
+ status=status,
1681
+ )
1682
+
1683
+ req = self._build_request_async(
1684
+ method="GET",
1685
+ path="/accounts/{accountID}/partner-pricing-agreements",
1686
+ base_url=base_url,
1687
+ url_variables=url_variables,
1688
+ request=request,
1689
+ request_body_required=False,
1690
+ request_has_path_params=True,
1691
+ request_has_query_params=True,
1692
+ user_agent_header="user-agent",
1693
+ accept_header_value="application/json",
1694
+ http_headers=http_headers,
1695
+ _globals=operations.ListPartnerPricingAgreementsGlobals(
1696
+ x_moov_version=self.sdk_configuration.globals.x_moov_version,
1697
+ ),
1698
+ security=self.sdk_configuration.security,
1699
+ timeout_ms=timeout_ms,
1700
+ )
1701
+
1702
+ if retries == UNSET:
1703
+ if self.sdk_configuration.retry_config is not UNSET:
1704
+ retries = self.sdk_configuration.retry_config
1705
+
1706
+ retry_config = None
1707
+ if isinstance(retries, utils.RetryConfig):
1708
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1709
+
1710
+ http_res = await self.do_request_async(
1711
+ hook_ctx=HookContext(
1712
+ base_url=base_url or "",
1713
+ operation_id="listPartnerPricingAgreements",
1714
+ oauth2_scopes=[],
1715
+ security_source=get_security_from_env(
1716
+ self.sdk_configuration.security, components.Security
1717
+ ),
1718
+ ),
1719
+ request=req,
1720
+ error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
1721
+ retry_config=retry_config,
1722
+ )
1723
+
1724
+ if utils.match_response(http_res, "200", "application/json"):
1725
+ return operations.ListPartnerPricingAgreementsResponse(
1726
+ result=utils.unmarshal_json(
1727
+ http_res.text, List[components.PartnerPricingAgreement]
1728
+ ),
1729
+ headers=utils.get_response_headers(http_res.headers),
1730
+ )
1731
+ if utils.match_response(http_res, ["401", "403", "429"], "*"):
1732
+ http_res_text = await utils.stream_to_text_async(http_res)
1733
+ raise errors.APIError(
1734
+ "API error occurred", http_res.status_code, http_res_text, http_res
1735
+ )
1736
+ if utils.match_response(http_res, ["500", "504"], "*"):
1737
+ http_res_text = await utils.stream_to_text_async(http_res)
1738
+ raise errors.APIError(
1739
+ "API error occurred", http_res.status_code, http_res_text, http_res
1740
+ )
1741
+ if utils.match_response(http_res, "4XX", "*"):
1742
+ http_res_text = await utils.stream_to_text_async(http_res)
1743
+ raise errors.APIError(
1744
+ "API error occurred", http_res.status_code, http_res_text, http_res
1745
+ )
1746
+ if utils.match_response(http_res, "5XX", "*"):
1747
+ http_res_text = await utils.stream_to_text_async(http_res)
1748
+ raise errors.APIError(
1749
+ "API error occurred", http_res.status_code, http_res_text, http_res
1750
+ )
1751
+
1752
+ content_type = http_res.headers.get("Content-Type")
1753
+ http_res_text = await utils.stream_to_text_async(http_res)
1754
+ raise errors.APIError(
1755
+ f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1756
+ http_res.status_code,
1757
+ http_res_text,
1758
+ http_res,
1759
+ )