moovio_sdk 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moovio_sdk/_version.py +3 -3
- moovio_sdk/account_terminal_applications.py +985 -0
- moovio_sdk/models/components/__init__.py +6 -0
- moovio_sdk/models/components/linkaccountterminalapplication.py +22 -0
- moovio_sdk/models/errors/__init__.py +6 -0
- moovio_sdk/models/errors/accountterminalapplicationerror.py +24 -0
- moovio_sdk/models/operations/__init__.py +42 -0
- moovio_sdk/models/operations/createtransfer.py +2 -2
- moovio_sdk/models/operations/getaccountterminalapplication.py +73 -0
- moovio_sdk/models/operations/initiaterefund.py +2 -2
- moovio_sdk/models/operations/linkaccountterminalapplication.py +78 -0
- moovio_sdk/models/operations/listaccountterminalapplications.py +66 -0
- moovio_sdk/sdk.py +5 -3
- moovio_sdk/terminal_applications.py +8 -8
- moovio_sdk/transfers.py +4 -4
- {moovio_sdk-0.4.0.dist-info → moovio_sdk-0.4.2.dist-info}/METADATA +24 -12
- {moovio_sdk-0.4.0.dist-info → moovio_sdk-0.4.2.dist-info}/RECORD +18 -13
- moovio_sdk/terminal_configurations.py +0 -241
- {moovio_sdk-0.4.0.dist-info → moovio_sdk-0.4.2.dist-info}/WHEEL +0 -0
@@ -3,7 +3,8 @@ moovio_sdk/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c
|
|
3
3
|
moovio_sdk/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
4
4
|
moovio_sdk/_hooks/sdkhooks.py,sha256=2XuMgiV2N7UE7lN00Is-c3spxVWigYitXS6xSmS_Qow,2560
|
5
5
|
moovio_sdk/_hooks/types.py,sha256=xAyw_8EoIrUHL-zLoqXrogOkBq1ZFICNGZfp9xne2ww,2813
|
6
|
-
moovio_sdk/_version.py,sha256=
|
6
|
+
moovio_sdk/_version.py,sha256=udkwU7VAHt5AGKt6p1A14ZGQ0g_Ia4V0zmrCazArVUo,464
|
7
|
+
moovio_sdk/account_terminal_applications.py,sha256=7Td1lpM3mqBQGPLoU5fLWZKRII1CjWikuUdD5bll4NI,41863
|
7
8
|
moovio_sdk/accounts.py,sha256=owJJuChHd-iucAiR4JWlaMYD1oKvjzCYSO6rckje6vs,107907
|
8
9
|
moovio_sdk/adjustments.py,sha256=m7S8Vn0KB4bMaTQTX50sCPvNZr72kjA6DTLxeJ2U-fc,19272
|
9
10
|
moovio_sdk/apple_pay.py,sha256=D5agY7yrZrZEtuadtY0_oQq3bSRpTy_bUG90T0iXDck,60723
|
@@ -26,7 +27,7 @@ moovio_sdk/industries.py,sha256=7VputoHEST4GXazczXDWEYsSkfWkFJaTSXAEDx267Vo,1024
|
|
26
27
|
moovio_sdk/institutions.py,sha256=1CjxrmzYf0tAs2beUyYiVPO9w8jibwG-Ya9ifXifUG8,11238
|
27
28
|
moovio_sdk/issuing_transactions.py,sha256=ftaJUPR8vGuNVOf3oWgecZG7DQSYRZiHZTtRfXMacgc,53212
|
28
29
|
moovio_sdk/models/__init__.py,sha256=HRiFG5CV9y2HvWWQl_JQNbYTPme0UYR1Mhh13Qc-5jE,84
|
29
|
-
moovio_sdk/models/components/__init__.py,sha256=
|
30
|
+
moovio_sdk/models/components/__init__.py,sha256=djDZTOAspsKSAaelD76Ll_jAP8C8EqFbiok4U5gk_c4,52261
|
30
31
|
moovio_sdk/models/components/account.py,sha256=QejMoPHYyHF-6TRrUVKYyfD_6Qbl7lFVOEaE8zlOgmI,4181
|
31
32
|
moovio_sdk/models/components/accountcapability.py,sha256=LJ908Zr4lw2qtMwUMLWoscTUjj5wV7YlZ4Z0Vv_abjg,527
|
32
33
|
moovio_sdk/models/components/accountcountries.py,sha256=sI1VAu3PqS2HTOarkT7f6FbkgUT55NL57PvAZKcbRHw,456
|
@@ -235,6 +236,7 @@ moovio_sdk/models/components/issuingmerchantdata.py,sha256=Y8T-FTzpN_WCMYsqQWz68
|
|
235
236
|
moovio_sdk/models/components/issuingvelocitylimit.py,sha256=EAMkVPkcNzKoQnhNEP7hWxODIAr62KkFegtGOmGE8K8,808
|
236
237
|
moovio_sdk/models/components/issuingvelocitylimiterror.py,sha256=gDN82-mW3oJzxclhbhJBmSHtfMkPLrMuJt55kvk3cqI,458
|
237
238
|
moovio_sdk/models/components/jsonwebkey.py,sha256=Wvp9Crb2wNzFaU1f-C67kAkcA7md1gl_w-f6loVTw80,3068
|
239
|
+
moovio_sdk/models/components/linkaccountterminalapplication.py,sha256=cvkxJMHb0Hgky6G43fpSjOkDraftOtCI7s_sRkBVgZw,709
|
238
240
|
moovio_sdk/models/components/linkapplepay.py,sha256=gPYSG9s7zcAcRh5bbWqzKRXgyfv-WbwEnMGJZm7a84Q,2136
|
239
241
|
moovio_sdk/models/components/linkapplepaymentdata.py,sha256=hBwjtz_H2VbWek6oSH7JpN8NIZ0rxarUS6me7rzTFNE,1866
|
240
242
|
moovio_sdk/models/components/linkapplepaymentmethod.py,sha256=pOkR3OS9zVH86wA2ccEAJl3cLB32jadWJ7u9zyc5UdE,1183
|
@@ -388,7 +390,8 @@ moovio_sdk/models/components/wallettransaction.py,sha256=oVx_Vtmw0UmSGk_Mdw_DeFp
|
|
388
390
|
moovio_sdk/models/components/wallettransactionsourcetype.py,sha256=Mh549qh9Sbr1QPOHZdyJAjhbdlcTP6uZS3ygHdALx5E,404
|
389
391
|
moovio_sdk/models/components/wallettransactionstatus.py,sha256=7V75cmxoazf9FwZnZxAbJ_Rw0qXEGa0WapyMAQCv2_8,274
|
390
392
|
moovio_sdk/models/components/wallettransactiontype.py,sha256=EiiCvg2dF1cYIIZ-5E-zzsrlJzr9rGL-le6Iz8kTD8w,1058
|
391
|
-
moovio_sdk/models/errors/__init__.py,sha256=
|
393
|
+
moovio_sdk/models/errors/__init__.py,sha256=Q-mT0CprEk9DlB04dgydIb1zfly0HSAH7BVAZfXmCVY,5588
|
394
|
+
moovio_sdk/models/errors/accountterminalapplicationerror.py,sha256=WG8srFSdwI4-cm--EYa8vC1JNL0oJJkyrW3KQWElQzg,742
|
392
395
|
moovio_sdk/models/errors/addcapabilitieserror.py,sha256=kdp29Khv0aN1bgoa7RXQxbFKDpGcXlPcwHID0JC1Mjw,684
|
393
396
|
moovio_sdk/models/errors/apierror.py,sha256=9mTyJSyvUAOnSfW_1HWt9dGl8IDlpQ68DebwYsDNdug,528
|
394
397
|
moovio_sdk/models/errors/assigncountrieserror.py,sha256=Zqd5o1rwkG7LuXxVJpvJ1olPsqsKCxD1ff9p8-U75qo,622
|
@@ -425,7 +428,7 @@ moovio_sdk/models/errors/updatepaymentlinkerror.py,sha256=FrRZvrNFtNBuaKyZKStjEM
|
|
425
428
|
moovio_sdk/models/errors/updateunderwritingerror.py,sha256=A8XDduhlAQo6xcZE29atSa7UsQ9uEg2xbbur-V1yUbg,2409
|
426
429
|
moovio_sdk/models/internal/__init__.py,sha256=6khoka0i1AXj5YsxEjzmIs1UYeD8DggU2Z69bLfmxvE,164
|
427
430
|
moovio_sdk/models/internal/globals.py,sha256=uz3scUHVTLawU2bzU4ov4C3bSRwoNolTJ5O27QSMIgA,1701
|
428
|
-
moovio_sdk/models/operations/__init__.py,sha256=
|
431
|
+
moovio_sdk/models/operations/__init__.py,sha256=Zh6SoI_8jYh1P2pwYrffigoVx8M56X-BUMPCj6t7b9A,63236
|
429
432
|
moovio_sdk/models/operations/acceptdispute.py,sha256=imJTeB7PuXqfKBqA-VkIAFFNpW92U7DMxPx7CEb9eDQ,2544
|
430
433
|
moovio_sdk/models/operations/assignaccountcountries.py,sha256=NIGZ5oNIW7Ei4Y7WNnMVqcYUSQgIq3o_TlR0_ptwLJg,2753
|
431
434
|
moovio_sdk/models/operations/cancelschedule.py,sha256=X0vmSDaW6vyM387Tf02KSBCZNggKxNYm_T0W5zJY494,2394
|
@@ -445,7 +448,7 @@ moovio_sdk/models/operations/createreversal.py,sha256=nQIIp68Itf7mtVTpeIDrDUZWsK
|
|
445
448
|
moovio_sdk/models/operations/createschedule.py,sha256=vxJYRV6gAF6OuOCwZ8soVGHPNOaFNid_uofiphsYWsU,2751
|
446
449
|
moovio_sdk/models/operations/createsweepconfig.py,sha256=mC-dbVIizvTJjYTygLrFOO-C9Uv8nMDlGrDfVboN6e8,2765
|
447
450
|
moovio_sdk/models/operations/createterminalapplication.py,sha256=n7mnj-ixVXSV8El7dVhwueNm4Pd8xTiTefI1oayrIGE,2188
|
448
|
-
moovio_sdk/models/operations/createtransfer.py,sha256=
|
451
|
+
moovio_sdk/models/operations/createtransfer.py,sha256=gkOOByWzgyFCYrAfBCbNc0YPIT3rUpnr4SdeRZi9I6g,4726
|
449
452
|
moovio_sdk/models/operations/createtransferoptions.py,sha256=DCrQtu3VPSdEOSt8gFnZHcCtRIN-c6NHBohifMolCzg,2139
|
450
453
|
moovio_sdk/models/operations/deletedisputeevidencefile.py,sha256=NHUuvakVuXiCwqI_gDDgjhFAAfKypztOzasr0S78KQE,2648
|
451
454
|
moovio_sdk/models/operations/deleterepresentative.py,sha256=H3bKQTMMsB9_wCqxfZqwgq-NljV5W-lGWzXIHEnxxv0,2582
|
@@ -458,6 +461,7 @@ moovio_sdk/models/operations/disconnectaccount.py,sha256=1db9q5UeliMidNx9h4fGP5L
|
|
458
461
|
moovio_sdk/models/operations/generateendtoendkey.py,sha256=0G-6TSNNA7qDCJmGwYyYeCNy5zaPxey3lgQjYlwDo7U,2222
|
459
462
|
moovio_sdk/models/operations/getaccount.py,sha256=OEz8rcS2uYsbcgdWVdoFI2muroDGcqeIMYAALc2rxI0,2338
|
460
463
|
moovio_sdk/models/operations/getaccountcountries.py,sha256=CAFsZ8fAvLbl0yUn79FZYCukwfo8blFIx436sWEKpQY,2446
|
464
|
+
moovio_sdk/models/operations/getaccountterminalapplication.py,sha256=JfhP__WL0lxps_CcUqdAF06IDRufopp6fv9RZKtmN1s,2759
|
461
465
|
moovio_sdk/models/operations/getadjustment.py,sha256=nXzv2N-m_-0U_9_ehO3SfQbUJRjZahwhMpfSl1biyMA,2571
|
462
466
|
moovio_sdk/models/operations/getapplepaymerchantdomains.py,sha256=1YyucKlsFEz1pulzcGH-j92z5ePDVKjM3fgKJljPQfQ,2661
|
463
467
|
moovio_sdk/models/operations/getavatar.py,sha256=tBGttLfllmfdy8AxGfGYNrT1cBi0-kfiuhUmI2fqWRk,2470
|
@@ -497,11 +501,13 @@ moovio_sdk/models/operations/getwallet.py,sha256=nuG7gt_r-L7qCBfE6FsfXIZvR38C_W5
|
|
497
501
|
moovio_sdk/models/operations/getwallettransaction.py,sha256=V-Q1fac_DX6COQ_yzRliE-11iZdjXMLLOJMPfaR3_FI,2852
|
498
502
|
moovio_sdk/models/operations/initiatebankaccountverification.py,sha256=Y0pWpajoaef2jGYvMIcy-6kGgQaCvLgLcAUIvkEQen8,3688
|
499
503
|
moovio_sdk/models/operations/initiatemicrodeposits.py,sha256=KV55DcpYWx5rKRgzVHXBPa3-hudOdpoeVLVtxVVj33U,2447
|
500
|
-
moovio_sdk/models/operations/initiaterefund.py,sha256=
|
504
|
+
moovio_sdk/models/operations/initiaterefund.py,sha256=jCQj6dYU0WGqbDdJV876qVOhbg7sPuI-Qc0PpQSP9m0,4951
|
505
|
+
moovio_sdk/models/operations/linkaccountterminalapplication.py,sha256=shc1xlTDSviTTDPxMu9qaclrPLEOhNu_ybzT_r9kmBs,2997
|
501
506
|
moovio_sdk/models/operations/linkapplepaytoken.py,sha256=EvfviwK6pfngiD_aVYiieODw9AF8NmgSa1uMevCf9hA,2947
|
502
507
|
moovio_sdk/models/operations/linkbankaccount.py,sha256=BlLa8ZqMjjEgJF083GE425l0Hu3ppivNWGYf3-p7vBw,3878
|
503
508
|
moovio_sdk/models/operations/linkcard.py,sha256=-4Yi9kRAfHgMhPLNqZxAYjV8eh3P7VZYQb92xmqf7ug,3718
|
504
509
|
moovio_sdk/models/operations/listaccounts.py,sha256=j1mplRYfzRIYNuxFUG7juJv6tOIO1XV91c3jRaq53es,6584
|
510
|
+
moovio_sdk/models/operations/listaccountterminalapplications.py,sha256=inDKgs9govCB0P7aT71OCJyjAe2jz_jsT0nO2HhWhL0,2557
|
505
511
|
moovio_sdk/models/operations/listadjustments.py,sha256=zCe-wryS5XbW75HnaH5UYKovfkW9LiNiGhi6LjWVDtw,2752
|
506
512
|
moovio_sdk/models/operations/listbankaccounts.py,sha256=wj8-E1aGn51EJBmdyxm97WEFJXIdxiHeAISmHKpRD4Q,2410
|
507
513
|
moovio_sdk/models/operations/listcapabilities.py,sha256=u_F8g_Hm4sWXZHPd6GuVOvVTwgvyAL3YXtTrzTFvF68,2404
|
@@ -566,12 +572,11 @@ moovio_sdk/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
566
572
|
moovio_sdk/receipts.py,sha256=9lLgl2K87xsdMJSOqUIkdWyTgMSN0edTjLcmz3ghvVU,20688
|
567
573
|
moovio_sdk/representatives.py,sha256=nmDgxhxxfHtE8Li-F0zk9kUuq33cR9fEibue2zJ6nO0,64454
|
568
574
|
moovio_sdk/scheduling.py,sha256=-i2mkiwWLjz3ZjWEPvO6U6nZwd7V0gxr48r-955li8k,65653
|
569
|
-
moovio_sdk/sdk.py,sha256=
|
575
|
+
moovio_sdk/sdk.py,sha256=N_Qm-P2hwu_8VkrropsIpbHn8fOjfpp9mnDAb6mN1B8,10308
|
570
576
|
moovio_sdk/sdkconfiguration.py,sha256=7NP1kNUcms-14o77cdoPmV7ZGWTtCLqqMTWN6pdwm-8,1822
|
571
577
|
moovio_sdk/sweeps.py,sha256=6QLuQRTQRRQ3qRyG9ZBPz1fkK3tnZeRAg_0YK6Scdts,66711
|
572
|
-
moovio_sdk/terminal_applications.py,sha256=
|
573
|
-
moovio_sdk/
|
574
|
-
moovio_sdk/transfers.py,sha256=rN9Qcma4vvMLNO4FhBlIvcZoB5mlpO6KmYEDpkORO9c,132982
|
578
|
+
moovio_sdk/terminal_applications.py,sha256=lOnAQYqYRoNvE6c6p7YZi2OFeer8I27tQhtX5w6oyiY,42830
|
579
|
+
moovio_sdk/transfers.py,sha256=aYGm2hNcuSgU0Z-iCxnRTQcT1NFo6wqewk6eyF9caPE,133138
|
575
580
|
moovio_sdk/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
576
581
|
moovio_sdk/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
577
582
|
moovio_sdk/underwriting.py,sha256=Q3bOkxgz3syy6YgdTKK_DTAqK6lV_uawgVZZX3iPuqc,24353
|
@@ -592,6 +597,6 @@ moovio_sdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
592
597
|
moovio_sdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
593
598
|
moovio_sdk/wallet_transactions.py,sha256=gP5AYXIn4LkCtm1ncheuWGxZCK0d67b20UIDheo_Khg,24943
|
594
599
|
moovio_sdk/wallets.py,sha256=5RcHiuHxBDi2YmK0V83s1hwEN-29aFar17LsQIYXpo0,19250
|
595
|
-
moovio_sdk-0.4.
|
596
|
-
moovio_sdk-0.4.
|
597
|
-
moovio_sdk-0.4.
|
600
|
+
moovio_sdk-0.4.2.dist-info/METADATA,sha256=3ZCWOd-UvxsLGgWDCf69UT5Vcb-uvk01p7ZOJr2aB0M,105514
|
601
|
+
moovio_sdk-0.4.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
602
|
+
moovio_sdk-0.4.2.dist-info/RECORD,,
|
@@ -1,241 +0,0 @@
|
|
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 Mapping, Optional
|
10
|
-
|
11
|
-
|
12
|
-
class TerminalConfigurations(BaseSDK):
|
13
|
-
def get(
|
14
|
-
self,
|
15
|
-
*,
|
16
|
-
account_id: str,
|
17
|
-
terminal_application_id: str,
|
18
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
19
|
-
server_url: Optional[str] = None,
|
20
|
-
timeout_ms: Optional[int] = None,
|
21
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
22
|
-
) -> operations.GetTerminalConfigurationResponse:
|
23
|
-
r"""Fetch the configuration for a given Terminal Application
|
24
|
-
|
25
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
26
|
-
you'll need to specify the `/accounts/{accountID}/terminal-configuration.read` scope.
|
27
|
-
|
28
|
-
:param account_id:
|
29
|
-
:param terminal_application_id:
|
30
|
-
:param retries: Override the default retry configuration for this method
|
31
|
-
:param server_url: Override the default server URL for this method
|
32
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
33
|
-
:param http_headers: Additional headers to set or replace on requests.
|
34
|
-
"""
|
35
|
-
base_url = None
|
36
|
-
url_variables = None
|
37
|
-
if timeout_ms is None:
|
38
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
39
|
-
|
40
|
-
if server_url is not None:
|
41
|
-
base_url = server_url
|
42
|
-
else:
|
43
|
-
base_url = self._get_url(base_url, url_variables)
|
44
|
-
|
45
|
-
request = operations.GetTerminalConfigurationRequest(
|
46
|
-
account_id=account_id,
|
47
|
-
terminal_application_id=terminal_application_id,
|
48
|
-
)
|
49
|
-
|
50
|
-
req = self._build_request(
|
51
|
-
method="GET",
|
52
|
-
path="/accounts/{accountID}/terminal-applications/{terminalApplicationID}/configuration",
|
53
|
-
base_url=base_url,
|
54
|
-
url_variables=url_variables,
|
55
|
-
request=request,
|
56
|
-
request_body_required=False,
|
57
|
-
request_has_path_params=True,
|
58
|
-
request_has_query_params=True,
|
59
|
-
user_agent_header="user-agent",
|
60
|
-
accept_header_value="application/json",
|
61
|
-
http_headers=http_headers,
|
62
|
-
_globals=operations.GetTerminalConfigurationGlobals(
|
63
|
-
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
64
|
-
),
|
65
|
-
security=self.sdk_configuration.security,
|
66
|
-
timeout_ms=timeout_ms,
|
67
|
-
)
|
68
|
-
|
69
|
-
if retries == UNSET:
|
70
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
71
|
-
retries = self.sdk_configuration.retry_config
|
72
|
-
|
73
|
-
retry_config = None
|
74
|
-
if isinstance(retries, utils.RetryConfig):
|
75
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
76
|
-
|
77
|
-
http_res = self.do_request(
|
78
|
-
hook_ctx=HookContext(
|
79
|
-
base_url=base_url or "",
|
80
|
-
operation_id="getTerminalConfiguration",
|
81
|
-
oauth2_scopes=[],
|
82
|
-
security_source=get_security_from_env(
|
83
|
-
self.sdk_configuration.security, components.Security
|
84
|
-
),
|
85
|
-
),
|
86
|
-
request=req,
|
87
|
-
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
88
|
-
retry_config=retry_config,
|
89
|
-
)
|
90
|
-
|
91
|
-
if utils.match_response(http_res, "200", "application/json"):
|
92
|
-
return operations.GetTerminalConfigurationResponse(
|
93
|
-
result=utils.unmarshal_json(
|
94
|
-
http_res.text, components.TerminalConfiguration
|
95
|
-
),
|
96
|
-
headers=utils.get_response_headers(http_res.headers),
|
97
|
-
)
|
98
|
-
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
99
|
-
http_res_text = utils.stream_to_text(http_res)
|
100
|
-
raise errors.APIError(
|
101
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
102
|
-
)
|
103
|
-
if utils.match_response(http_res, ["500", "504"], "*"):
|
104
|
-
http_res_text = utils.stream_to_text(http_res)
|
105
|
-
raise errors.APIError(
|
106
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
107
|
-
)
|
108
|
-
if utils.match_response(http_res, "4XX", "*"):
|
109
|
-
http_res_text = utils.stream_to_text(http_res)
|
110
|
-
raise errors.APIError(
|
111
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
112
|
-
)
|
113
|
-
if utils.match_response(http_res, "5XX", "*"):
|
114
|
-
http_res_text = utils.stream_to_text(http_res)
|
115
|
-
raise errors.APIError(
|
116
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
117
|
-
)
|
118
|
-
|
119
|
-
content_type = http_res.headers.get("Content-Type")
|
120
|
-
http_res_text = utils.stream_to_text(http_res)
|
121
|
-
raise errors.APIError(
|
122
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
123
|
-
http_res.status_code,
|
124
|
-
http_res_text,
|
125
|
-
http_res,
|
126
|
-
)
|
127
|
-
|
128
|
-
async def get_async(
|
129
|
-
self,
|
130
|
-
*,
|
131
|
-
account_id: str,
|
132
|
-
terminal_application_id: str,
|
133
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
134
|
-
server_url: Optional[str] = None,
|
135
|
-
timeout_ms: Optional[int] = None,
|
136
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
137
|
-
) -> operations.GetTerminalConfigurationResponse:
|
138
|
-
r"""Fetch the configuration for a given Terminal Application
|
139
|
-
|
140
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
141
|
-
you'll need to specify the `/accounts/{accountID}/terminal-configuration.read` scope.
|
142
|
-
|
143
|
-
:param account_id:
|
144
|
-
:param terminal_application_id:
|
145
|
-
:param retries: Override the default retry configuration for this method
|
146
|
-
:param server_url: Override the default server URL for this method
|
147
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
148
|
-
:param http_headers: Additional headers to set or replace on requests.
|
149
|
-
"""
|
150
|
-
base_url = None
|
151
|
-
url_variables = None
|
152
|
-
if timeout_ms is None:
|
153
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
154
|
-
|
155
|
-
if server_url is not None:
|
156
|
-
base_url = server_url
|
157
|
-
else:
|
158
|
-
base_url = self._get_url(base_url, url_variables)
|
159
|
-
|
160
|
-
request = operations.GetTerminalConfigurationRequest(
|
161
|
-
account_id=account_id,
|
162
|
-
terminal_application_id=terminal_application_id,
|
163
|
-
)
|
164
|
-
|
165
|
-
req = self._build_request_async(
|
166
|
-
method="GET",
|
167
|
-
path="/accounts/{accountID}/terminal-applications/{terminalApplicationID}/configuration",
|
168
|
-
base_url=base_url,
|
169
|
-
url_variables=url_variables,
|
170
|
-
request=request,
|
171
|
-
request_body_required=False,
|
172
|
-
request_has_path_params=True,
|
173
|
-
request_has_query_params=True,
|
174
|
-
user_agent_header="user-agent",
|
175
|
-
accept_header_value="application/json",
|
176
|
-
http_headers=http_headers,
|
177
|
-
_globals=operations.GetTerminalConfigurationGlobals(
|
178
|
-
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
179
|
-
),
|
180
|
-
security=self.sdk_configuration.security,
|
181
|
-
timeout_ms=timeout_ms,
|
182
|
-
)
|
183
|
-
|
184
|
-
if retries == UNSET:
|
185
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
186
|
-
retries = self.sdk_configuration.retry_config
|
187
|
-
|
188
|
-
retry_config = None
|
189
|
-
if isinstance(retries, utils.RetryConfig):
|
190
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
191
|
-
|
192
|
-
http_res = await self.do_request_async(
|
193
|
-
hook_ctx=HookContext(
|
194
|
-
base_url=base_url or "",
|
195
|
-
operation_id="getTerminalConfiguration",
|
196
|
-
oauth2_scopes=[],
|
197
|
-
security_source=get_security_from_env(
|
198
|
-
self.sdk_configuration.security, components.Security
|
199
|
-
),
|
200
|
-
),
|
201
|
-
request=req,
|
202
|
-
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
203
|
-
retry_config=retry_config,
|
204
|
-
)
|
205
|
-
|
206
|
-
if utils.match_response(http_res, "200", "application/json"):
|
207
|
-
return operations.GetTerminalConfigurationResponse(
|
208
|
-
result=utils.unmarshal_json(
|
209
|
-
http_res.text, components.TerminalConfiguration
|
210
|
-
),
|
211
|
-
headers=utils.get_response_headers(http_res.headers),
|
212
|
-
)
|
213
|
-
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
214
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
215
|
-
raise errors.APIError(
|
216
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
217
|
-
)
|
218
|
-
if utils.match_response(http_res, ["500", "504"], "*"):
|
219
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
220
|
-
raise errors.APIError(
|
221
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
222
|
-
)
|
223
|
-
if utils.match_response(http_res, "4XX", "*"):
|
224
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
225
|
-
raise errors.APIError(
|
226
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
227
|
-
)
|
228
|
-
if utils.match_response(http_res, "5XX", "*"):
|
229
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
230
|
-
raise errors.APIError(
|
231
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
232
|
-
)
|
233
|
-
|
234
|
-
content_type = http_res.headers.get("Content-Type")
|
235
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
236
|
-
raise errors.APIError(
|
237
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
238
|
-
http_res.status_code,
|
239
|
-
http_res_text,
|
240
|
-
http_res,
|
241
|
-
)
|
File without changes
|