BasisTheoryClient 0.0.1__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.
- basis_theory/__init__.py +350 -0
- basis_theory/account_updater/__init__.py +7 -0
- basis_theory/account_updater/client.py +44 -0
- basis_theory/account_updater/jobs/__init__.py +4 -0
- basis_theory/account_updater/jobs/client.py +259 -0
- basis_theory/account_updater/jobs/raw_client.py +450 -0
- basis_theory/account_updater/raw_client.py +13 -0
- basis_theory/account_updater/real_time/__init__.py +4 -0
- basis_theory/account_updater/real_time/client.py +161 -0
- basis_theory/account_updater/real_time/raw_client.py +246 -0
- basis_theory/apple_pay/__init__.py +7 -0
- basis_theory/apple_pay/client.py +267 -0
- basis_theory/apple_pay/domain/__init__.py +4 -0
- basis_theory/apple_pay/domain/client.py +309 -0
- basis_theory/apple_pay/domain/raw_client.py +631 -0
- basis_theory/apple_pay/raw_client.py +499 -0
- basis_theory/apple_pay/session/__init__.py +4 -0
- basis_theory/apple_pay/session/client.py +130 -0
- basis_theory/apple_pay/session/raw_client.py +225 -0
- basis_theory/application_keys/__init__.py +4 -0
- basis_theory/application_keys/client.py +354 -0
- basis_theory/application_keys/raw_client.py +615 -0
- basis_theory/application_templates/__init__.py +4 -0
- basis_theory/application_templates/client.py +166 -0
- basis_theory/application_templates/raw_client.py +253 -0
- basis_theory/applications/__init__.py +4 -0
- basis_theory/applications/client.py +582 -0
- basis_theory/applications/raw_client.py +1030 -0
- basis_theory/client.py +230 -0
- basis_theory/connection/__init__.py +7 -0
- basis_theory/connection/apple_pay/__init__.py +7 -0
- basis_theory/connection/apple_pay/client.py +128 -0
- basis_theory/connection/apple_pay/domain/__init__.py +4 -0
- basis_theory/connection/apple_pay/domain/client.py +309 -0
- basis_theory/connection/apple_pay/domain/raw_client.py +631 -0
- basis_theory/connection/apple_pay/raw_client.py +216 -0
- basis_theory/connection/apple_pay/session/__init__.py +4 -0
- basis_theory/connection/apple_pay/session/client.py +130 -0
- basis_theory/connection/apple_pay/session/raw_client.py +225 -0
- basis_theory/connection/client.py +39 -0
- basis_theory/connection/raw_client.py +13 -0
- basis_theory/core/__init__.py +55 -0
- basis_theory/core/api_error.py +23 -0
- basis_theory/core/client_wrapper.py +89 -0
- basis_theory/core/datetime_utils.py +28 -0
- basis_theory/core/file.py +67 -0
- basis_theory/core/force_multipart.py +16 -0
- basis_theory/core/http_client.py +543 -0
- basis_theory/core/http_response.py +55 -0
- basis_theory/core/jsonable_encoder.py +100 -0
- basis_theory/core/pagination.py +82 -0
- basis_theory/core/pydantic_utilities.py +255 -0
- basis_theory/core/query_encoder.py +58 -0
- basis_theory/core/remove_none_from_dict.py +11 -0
- basis_theory/core/request_options.py +35 -0
- basis_theory/core/serialization.py +276 -0
- basis_theory/documents/__init__.py +7 -0
- basis_theory/documents/client.py +258 -0
- basis_theory/documents/data/__init__.py +4 -0
- basis_theory/documents/data/client.py +78 -0
- basis_theory/documents/data/raw_client.py +173 -0
- basis_theory/documents/raw_client.py +442 -0
- basis_theory/enrichments/__init__.py +4 -0
- basis_theory/enrichments/client.py +135 -0
- basis_theory/enrichments/raw_client.py +203 -0
- basis_theory/environment.py +7 -0
- basis_theory/errors/__init__.py +23 -0
- basis_theory/errors/bad_request_error.py +11 -0
- basis_theory/errors/conflict_error.py +11 -0
- basis_theory/errors/forbidden_error.py +11 -0
- basis_theory/errors/internal_server_error.py +11 -0
- basis_theory/errors/not_found_error.py +10 -0
- basis_theory/errors/service_unavailable_error.py +11 -0
- basis_theory/errors/unauthorized_error.py +11 -0
- basis_theory/errors/unprocessable_entity_error.py +11 -0
- basis_theory/googlepay/__init__.py +4 -0
- basis_theory/googlepay/client.py +120 -0
- basis_theory/googlepay/raw_client.py +239 -0
- basis_theory/keys/__init__.py +4 -0
- basis_theory/keys/client.py +313 -0
- basis_theory/keys/raw_client.py +673 -0
- basis_theory/logs/__init__.py +4 -0
- basis_theory/logs/client.py +240 -0
- basis_theory/logs/raw_client.py +376 -0
- basis_theory/network_tokens/__init__.py +4 -0
- basis_theory/network_tokens/client.py +478 -0
- basis_theory/network_tokens/raw_client.py +1113 -0
- basis_theory/permissions/__init__.py +4 -0
- basis_theory/permissions/client.py +106 -0
- basis_theory/permissions/raw_client.py +170 -0
- basis_theory/proxies/__init__.py +4 -0
- basis_theory/proxies/client.py +751 -0
- basis_theory/proxies/raw_client.py +1255 -0
- basis_theory/py.typed +0 -0
- basis_theory/reactors/__init__.py +7 -0
- basis_theory/reactors/client.py +823 -0
- basis_theory/reactors/raw_client.py +1553 -0
- basis_theory/reactors/results/__init__.py +4 -0
- basis_theory/reactors/results/client.py +115 -0
- basis_theory/reactors/results/raw_client.py +194 -0
- basis_theory/roles/__init__.py +4 -0
- basis_theory/roles/client.py +98 -0
- basis_theory/roles/raw_client.py +134 -0
- basis_theory/sessions/__init__.py +4 -0
- basis_theory/sessions/client.py +222 -0
- basis_theory/sessions/raw_client.py +399 -0
- basis_theory/tenants/__init__.py +7 -0
- basis_theory/tenants/client.py +59 -0
- basis_theory/tenants/connections/__init__.py +4 -0
- basis_theory/tenants/connections/client.py +198 -0
- basis_theory/tenants/connections/raw_client.py +344 -0
- basis_theory/tenants/invitations/__init__.py +4 -0
- basis_theory/tenants/invitations/client.py +458 -0
- basis_theory/tenants/invitations/raw_client.py +805 -0
- basis_theory/tenants/members/__init__.py +4 -0
- basis_theory/tenants/members/client.py +296 -0
- basis_theory/tenants/members/raw_client.py +497 -0
- basis_theory/tenants/owner/__init__.py +4 -0
- basis_theory/tenants/owner/client.py +98 -0
- basis_theory/tenants/owner/raw_client.py +157 -0
- basis_theory/tenants/raw_client.py +13 -0
- basis_theory/tenants/self_/__init__.py +4 -0
- basis_theory/tenants/self_/client.py +308 -0
- basis_theory/tenants/self_/raw_client.py +605 -0
- basis_theory/threeds/__init__.py +7 -0
- basis_theory/threeds/client.py +39 -0
- basis_theory/threeds/raw_client.py +13 -0
- basis_theory/threeds/sessions/__init__.py +4 -0
- basis_theory/threeds/sessions/client.py +521 -0
- basis_theory/threeds/sessions/raw_client.py +808 -0
- basis_theory/token_intents/__init__.py +4 -0
- basis_theory/token_intents/client.py +258 -0
- basis_theory/token_intents/raw_client.py +454 -0
- basis_theory/tokens/__init__.py +4 -0
- basis_theory/tokens/client.py +1015 -0
- basis_theory/tokens/raw_client.py +1861 -0
- basis_theory/types/__init__.py +277 -0
- basis_theory/types/access_rule.py +25 -0
- basis_theory/types/account_updater_job.py +55 -0
- basis_theory/types/account_updater_job_list.py +22 -0
- basis_theory/types/account_updater_job_list_pagination.py +20 -0
- basis_theory/types/account_updater_job_status.py +5 -0
- basis_theory/types/account_updater_real_time_response.py +24 -0
- basis_theory/types/additional_card_details.py +23 -0
- basis_theory/types/address.py +25 -0
- basis_theory/types/apple_pay_create_response.py +20 -0
- basis_theory/types/apple_pay_create_token_response.py +28 -0
- basis_theory/types/apple_pay_domain_deregistration_request.py +19 -0
- basis_theory/types/apple_pay_domain_registration_list_request.py +19 -0
- basis_theory/types/apple_pay_domain_registration_request.py +19 -0
- basis_theory/types/apple_pay_domain_registration_response.py +20 -0
- basis_theory/types/apple_pay_method_token.py +25 -0
- basis_theory/types/apple_pay_session_request.py +21 -0
- basis_theory/types/apple_pay_token.py +33 -0
- basis_theory/types/apple_pay_tokenize_response.py +20 -0
- basis_theory/types/application.py +33 -0
- basis_theory/types/application_key.py +24 -0
- basis_theory/types/application_paginated_list.py +22 -0
- basis_theory/types/application_template.py +27 -0
- basis_theory/types/assurance_details.py +20 -0
- basis_theory/types/async_react_response.py +23 -0
- basis_theory/types/authenticate_three_ds_session_request.py +35 -0
- basis_theory/types/authentication.py +22 -0
- basis_theory/types/authentication_response.py +21 -0
- basis_theory/types/bank_details.py +20 -0
- basis_theory/types/bank_verification_response.py +19 -0
- basis_theory/types/bin_details.py +41 -0
- basis_theory/types/bin_details_bank.py +22 -0
- basis_theory/types/bin_details_country.py +21 -0
- basis_theory/types/bin_details_product.py +20 -0
- basis_theory/types/card.py +22 -0
- basis_theory/types/card_details.py +32 -0
- basis_theory/types/card_issuer.py +20 -0
- basis_theory/types/card_issuer_country.py +21 -0
- basis_theory/types/cardholder_info.py +21 -0
- basis_theory/types/client_encryption_key_metadata_response.py +23 -0
- basis_theory/types/client_encryption_key_response.py +24 -0
- basis_theory/types/condition.py +21 -0
- basis_theory/types/create_account_updater_job_request.py +22 -0
- basis_theory/types/create_document_request.py +19 -0
- basis_theory/types/create_reactor_formula_request.py +28 -0
- basis_theory/types/create_session_response.py +22 -0
- basis_theory/types/create_tenant_connection_response.py +19 -0
- basis_theory/types/create_three_ds_session_response.py +29 -0
- basis_theory/types/create_token_intent_response.py +36 -0
- basis_theory/types/cursor_pagination.py +20 -0
- basis_theory/types/document.py +25 -0
- basis_theory/types/domain_registration_response.py +20 -0
- basis_theory/types/event_types.py +5 -0
- basis_theory/types/get_applications.py +23 -0
- basis_theory/types/get_logs.py +26 -0
- basis_theory/types/get_permissions.py +19 -0
- basis_theory/types/get_proxies.py +23 -0
- basis_theory/types/get_reactor_formulas.py +22 -0
- basis_theory/types/get_reactors.py +23 -0
- basis_theory/types/get_tenant_invitations.py +23 -0
- basis_theory/types/get_tenant_members.py +22 -0
- basis_theory/types/get_tokens.py +23 -0
- basis_theory/types/get_tokens_v2.py +24 -0
- basis_theory/types/google_pay_tokenize_response.py +20 -0
- basis_theory/types/google_payment_method_token.py +27 -0
- basis_theory/types/header.py +26 -0
- basis_theory/types/intermediate_signing_key.py +22 -0
- basis_theory/types/log.py +28 -0
- basis_theory/types/log_entity_type.py +20 -0
- basis_theory/types/log_paginated_list.py +22 -0
- basis_theory/types/network_token.py +38 -0
- basis_theory/types/network_token_cryptogram.py +20 -0
- basis_theory/types/network_token_extras.py +19 -0
- basis_theory/types/pagination.py +24 -0
- basis_theory/types/payment_data.py +23 -0
- basis_theory/types/permission.py +21 -0
- basis_theory/types/privacy.py +21 -0
- basis_theory/types/problem_details.py +23 -0
- basis_theory/types/proxy.py +39 -0
- basis_theory/types/proxy_paginated_list.py +22 -0
- basis_theory/types/proxy_transform.py +23 -0
- basis_theory/types/public_key.py +3 -0
- basis_theory/types/react_response.py +22 -0
- basis_theory/types/reactor.py +32 -0
- basis_theory/types/reactor_formula.py +34 -0
- basis_theory/types/reactor_formula_configuration.py +21 -0
- basis_theory/types/reactor_formula_paginated_list.py +22 -0
- basis_theory/types/reactor_formula_request_parameter.py +22 -0
- basis_theory/types/reactor_paginated_list.py +22 -0
- basis_theory/types/role.py +19 -0
- basis_theory/types/string_string_key_value_pair.py +20 -0
- basis_theory/types/submerchant_authentication_response.py +21 -0
- basis_theory/types/tenant.py +28 -0
- basis_theory/types/tenant_connection_options.py +19 -0
- basis_theory/types/tenant_invitation_response.py +30 -0
- basis_theory/types/tenant_invitation_response_paginated_list.py +22 -0
- basis_theory/types/tenant_invitation_status.py +5 -0
- basis_theory/types/tenant_member_response.py +28 -0
- basis_theory/types/tenant_member_response_paginated_list.py +22 -0
- basis_theory/types/tenant_usage_report.py +19 -0
- basis_theory/types/three_ds_acs_rendering_type.py +22 -0
- basis_theory/types/three_ds_address.py +25 -0
- basis_theory/types/three_ds_authentication.py +53 -0
- basis_theory/types/three_ds_callback_urls.py +20 -0
- basis_theory/types/three_ds_cardholder_account_info.py +33 -0
- basis_theory/types/three_ds_cardholder_authentication_info.py +21 -0
- basis_theory/types/three_ds_cardholder_info.py +36 -0
- basis_theory/types/three_ds_cardholder_phone_number.py +20 -0
- basis_theory/types/three_ds_device_info.py +36 -0
- basis_theory/types/three_ds_merchant_info.py +26 -0
- basis_theory/types/three_ds_merchant_risk_info.py +27 -0
- basis_theory/types/three_ds_message_extension.py +22 -0
- basis_theory/types/three_ds_method.py +20 -0
- basis_theory/types/three_ds_mobile_sdk_render_options.py +20 -0
- basis_theory/types/three_ds_prior_authentication_info.py +22 -0
- basis_theory/types/three_ds_purchase_info.py +26 -0
- basis_theory/types/three_ds_requestor_info.py +25 -0
- basis_theory/types/three_ds_session.py +42 -0
- basis_theory/types/three_ds_version.py +25 -0
- basis_theory/types/token.py +49 -0
- basis_theory/types/token_cursor_paginated_list.py +22 -0
- basis_theory/types/token_enrichments.py +22 -0
- basis_theory/types/token_enrichments_card_details.py +20 -0
- basis_theory/types/token_extras.py +24 -0
- basis_theory/types/token_intent.py +36 -0
- basis_theory/types/token_intent_extras.py +21 -0
- basis_theory/types/token_paginated_list.py +22 -0
- basis_theory/types/token_service_provider_details.py +34 -0
- basis_theory/types/update_privacy.py +20 -0
- basis_theory/types/update_reactor_formula_request.py +27 -0
- basis_theory/types/user.py +25 -0
- basis_theory/types/validation_problem_details.py +24 -0
- basis_theory/types/webhook.py +35 -0
- basis_theory/types/webhook_list.py +22 -0
- basis_theory/types/webhook_list_pagination.py +20 -0
- basis_theory/types/webhook_status.py +5 -0
- basis_theory/version.py +3 -0
- basis_theory/webhooks/__init__.py +7 -0
- basis_theory/webhooks/client.py +543 -0
- basis_theory/webhooks/events/__init__.py +4 -0
- basis_theory/webhooks/events/client.py +102 -0
- basis_theory/webhooks/events/raw_client.py +136 -0
- basis_theory/webhooks/raw_client.py +943 -0
- basistheoryclient-0.0.1.dist-info/LICENSE +201 -0
- basistheoryclient-0.0.1.dist-info/METADATA +213 -0
- basistheoryclient-0.0.1.dist-info/RECORD +283 -0
- basistheoryclient-0.0.1.dist-info/WHEEL +4 -0
basis_theory/client.py
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import httpx
|
|
7
|
+
from .account_updater.client import AccountUpdaterClient, AsyncAccountUpdaterClient
|
|
8
|
+
from .apple_pay.client import ApplePayClient, AsyncApplePayClient
|
|
9
|
+
from .application_keys.client import ApplicationKeysClient, AsyncApplicationKeysClient
|
|
10
|
+
from .application_templates.client import ApplicationTemplatesClient, AsyncApplicationTemplatesClient
|
|
11
|
+
from .applications.client import ApplicationsClient, AsyncApplicationsClient
|
|
12
|
+
from .connection.client import AsyncConnectionClient, ConnectionClient
|
|
13
|
+
from .core.api_error import ApiError
|
|
14
|
+
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
15
|
+
from .documents.client import AsyncDocumentsClient, DocumentsClient
|
|
16
|
+
from .enrichments.client import AsyncEnrichmentsClient, EnrichmentsClient
|
|
17
|
+
from .environment import BasisTheoryEnvironment
|
|
18
|
+
from .googlepay.client import AsyncGooglepayClient, GooglepayClient
|
|
19
|
+
from .keys.client import AsyncKeysClient, KeysClient
|
|
20
|
+
from .logs.client import AsyncLogsClient, LogsClient
|
|
21
|
+
from .network_tokens.client import AsyncNetworkTokensClient, NetworkTokensClient
|
|
22
|
+
from .permissions.client import AsyncPermissionsClient, PermissionsClient
|
|
23
|
+
from .proxies.client import AsyncProxiesClient, ProxiesClient
|
|
24
|
+
from .reactors.client import AsyncReactorsClient, ReactorsClient
|
|
25
|
+
from .roles.client import AsyncRolesClient, RolesClient
|
|
26
|
+
from .sessions.client import AsyncSessionsClient, SessionsClient
|
|
27
|
+
from .tenants.client import AsyncTenantsClient, TenantsClient
|
|
28
|
+
from .threeds.client import AsyncThreedsClient, ThreedsClient
|
|
29
|
+
from .token_intents.client import AsyncTokenIntentsClient, TokenIntentsClient
|
|
30
|
+
from .tokens.client import AsyncTokensClient, TokensClient
|
|
31
|
+
from .webhooks.client import AsyncWebhooksClient, WebhooksClient
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BasisTheory:
|
|
35
|
+
"""
|
|
36
|
+
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
|
37
|
+
|
|
38
|
+
Parameters
|
|
39
|
+
----------
|
|
40
|
+
base_url : typing.Optional[str]
|
|
41
|
+
The base url to use for requests from the client.
|
|
42
|
+
|
|
43
|
+
environment : BasisTheoryEnvironment
|
|
44
|
+
The environment to use for requests from the client. from .environment import BasisTheoryEnvironment
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Defaults to BasisTheoryEnvironment.DEFAULT
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
correlation_id : typing.Optional[str]
|
|
53
|
+
api_key : typing.Optional[str]
|
|
54
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
|
55
|
+
Additional headers to send with every request.
|
|
56
|
+
|
|
57
|
+
timeout : typing.Optional[float]
|
|
58
|
+
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
|
|
59
|
+
|
|
60
|
+
follow_redirects : typing.Optional[bool]
|
|
61
|
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
|
|
62
|
+
|
|
63
|
+
httpx_client : typing.Optional[httpx.Client]
|
|
64
|
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
|
|
65
|
+
|
|
66
|
+
Examples
|
|
67
|
+
--------
|
|
68
|
+
from basis_theory import BasisTheory
|
|
69
|
+
|
|
70
|
+
client = BasisTheory(
|
|
71
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
72
|
+
api_key="YOUR_API_KEY",
|
|
73
|
+
)
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
def __init__(
|
|
77
|
+
self,
|
|
78
|
+
*,
|
|
79
|
+
base_url: typing.Optional[str] = None,
|
|
80
|
+
environment: BasisTheoryEnvironment = BasisTheoryEnvironment.DEFAULT,
|
|
81
|
+
correlation_id: typing.Optional[str] = None,
|
|
82
|
+
api_key: typing.Optional[str] = os.getenv("BT-API-KEY"),
|
|
83
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
84
|
+
timeout: typing.Optional[float] = None,
|
|
85
|
+
follow_redirects: typing.Optional[bool] = True,
|
|
86
|
+
httpx_client: typing.Optional[httpx.Client] = None,
|
|
87
|
+
):
|
|
88
|
+
_defaulted_timeout = (
|
|
89
|
+
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
90
|
+
)
|
|
91
|
+
if api_key is None:
|
|
92
|
+
raise ApiError(body="The client must be instantiated be either passing in api_key or setting BT-API-KEY")
|
|
93
|
+
self._client_wrapper = SyncClientWrapper(
|
|
94
|
+
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
95
|
+
correlation_id=correlation_id,
|
|
96
|
+
api_key=api_key,
|
|
97
|
+
headers=headers,
|
|
98
|
+
httpx_client=httpx_client
|
|
99
|
+
if httpx_client is not None
|
|
100
|
+
else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
|
101
|
+
if follow_redirects is not None
|
|
102
|
+
else httpx.Client(timeout=_defaulted_timeout),
|
|
103
|
+
timeout=_defaulted_timeout,
|
|
104
|
+
)
|
|
105
|
+
self.applications = ApplicationsClient(client_wrapper=self._client_wrapper)
|
|
106
|
+
self.application_keys = ApplicationKeysClient(client_wrapper=self._client_wrapper)
|
|
107
|
+
self.application_templates = ApplicationTemplatesClient(client_wrapper=self._client_wrapper)
|
|
108
|
+
self.apple_pay = ApplePayClient(client_wrapper=self._client_wrapper)
|
|
109
|
+
self.documents = DocumentsClient(client_wrapper=self._client_wrapper)
|
|
110
|
+
self.tokens = TokensClient(client_wrapper=self._client_wrapper)
|
|
111
|
+
self.enrichments = EnrichmentsClient(client_wrapper=self._client_wrapper)
|
|
112
|
+
self.googlepay = GooglepayClient(client_wrapper=self._client_wrapper)
|
|
113
|
+
self.keys = KeysClient(client_wrapper=self._client_wrapper)
|
|
114
|
+
self.logs = LogsClient(client_wrapper=self._client_wrapper)
|
|
115
|
+
self.network_tokens = NetworkTokensClient(client_wrapper=self._client_wrapper)
|
|
116
|
+
self.permissions = PermissionsClient(client_wrapper=self._client_wrapper)
|
|
117
|
+
self.proxies = ProxiesClient(client_wrapper=self._client_wrapper)
|
|
118
|
+
self.reactors = ReactorsClient(client_wrapper=self._client_wrapper)
|
|
119
|
+
self.roles = RolesClient(client_wrapper=self._client_wrapper)
|
|
120
|
+
self.sessions = SessionsClient(client_wrapper=self._client_wrapper)
|
|
121
|
+
self.token_intents = TokenIntentsClient(client_wrapper=self._client_wrapper)
|
|
122
|
+
self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper)
|
|
123
|
+
self.account_updater = AccountUpdaterClient(client_wrapper=self._client_wrapper)
|
|
124
|
+
self.connection = ConnectionClient(client_wrapper=self._client_wrapper)
|
|
125
|
+
self.tenants = TenantsClient(client_wrapper=self._client_wrapper)
|
|
126
|
+
self.threeds = ThreedsClient(client_wrapper=self._client_wrapper)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class AsyncBasisTheory:
|
|
130
|
+
"""
|
|
131
|
+
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
|
132
|
+
|
|
133
|
+
Parameters
|
|
134
|
+
----------
|
|
135
|
+
base_url : typing.Optional[str]
|
|
136
|
+
The base url to use for requests from the client.
|
|
137
|
+
|
|
138
|
+
environment : BasisTheoryEnvironment
|
|
139
|
+
The environment to use for requests from the client. from .environment import BasisTheoryEnvironment
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
Defaults to BasisTheoryEnvironment.DEFAULT
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
correlation_id : typing.Optional[str]
|
|
148
|
+
api_key : typing.Optional[str]
|
|
149
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
|
150
|
+
Additional headers to send with every request.
|
|
151
|
+
|
|
152
|
+
timeout : typing.Optional[float]
|
|
153
|
+
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
|
|
154
|
+
|
|
155
|
+
follow_redirects : typing.Optional[bool]
|
|
156
|
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
|
|
157
|
+
|
|
158
|
+
httpx_client : typing.Optional[httpx.AsyncClient]
|
|
159
|
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
|
|
160
|
+
|
|
161
|
+
Examples
|
|
162
|
+
--------
|
|
163
|
+
from basis_theory import AsyncBasisTheory
|
|
164
|
+
|
|
165
|
+
client = AsyncBasisTheory(
|
|
166
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
167
|
+
api_key="YOUR_API_KEY",
|
|
168
|
+
)
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
def __init__(
|
|
172
|
+
self,
|
|
173
|
+
*,
|
|
174
|
+
base_url: typing.Optional[str] = None,
|
|
175
|
+
environment: BasisTheoryEnvironment = BasisTheoryEnvironment.DEFAULT,
|
|
176
|
+
correlation_id: typing.Optional[str] = None,
|
|
177
|
+
api_key: typing.Optional[str] = os.getenv("BT-API-KEY"),
|
|
178
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
179
|
+
timeout: typing.Optional[float] = None,
|
|
180
|
+
follow_redirects: typing.Optional[bool] = True,
|
|
181
|
+
httpx_client: typing.Optional[httpx.AsyncClient] = None,
|
|
182
|
+
):
|
|
183
|
+
_defaulted_timeout = (
|
|
184
|
+
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
185
|
+
)
|
|
186
|
+
if api_key is None:
|
|
187
|
+
raise ApiError(body="The client must be instantiated be either passing in api_key or setting BT-API-KEY")
|
|
188
|
+
self._client_wrapper = AsyncClientWrapper(
|
|
189
|
+
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
190
|
+
correlation_id=correlation_id,
|
|
191
|
+
api_key=api_key,
|
|
192
|
+
headers=headers,
|
|
193
|
+
httpx_client=httpx_client
|
|
194
|
+
if httpx_client is not None
|
|
195
|
+
else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
|
196
|
+
if follow_redirects is not None
|
|
197
|
+
else httpx.AsyncClient(timeout=_defaulted_timeout),
|
|
198
|
+
timeout=_defaulted_timeout,
|
|
199
|
+
)
|
|
200
|
+
self.applications = AsyncApplicationsClient(client_wrapper=self._client_wrapper)
|
|
201
|
+
self.application_keys = AsyncApplicationKeysClient(client_wrapper=self._client_wrapper)
|
|
202
|
+
self.application_templates = AsyncApplicationTemplatesClient(client_wrapper=self._client_wrapper)
|
|
203
|
+
self.apple_pay = AsyncApplePayClient(client_wrapper=self._client_wrapper)
|
|
204
|
+
self.documents = AsyncDocumentsClient(client_wrapper=self._client_wrapper)
|
|
205
|
+
self.tokens = AsyncTokensClient(client_wrapper=self._client_wrapper)
|
|
206
|
+
self.enrichments = AsyncEnrichmentsClient(client_wrapper=self._client_wrapper)
|
|
207
|
+
self.googlepay = AsyncGooglepayClient(client_wrapper=self._client_wrapper)
|
|
208
|
+
self.keys = AsyncKeysClient(client_wrapper=self._client_wrapper)
|
|
209
|
+
self.logs = AsyncLogsClient(client_wrapper=self._client_wrapper)
|
|
210
|
+
self.network_tokens = AsyncNetworkTokensClient(client_wrapper=self._client_wrapper)
|
|
211
|
+
self.permissions = AsyncPermissionsClient(client_wrapper=self._client_wrapper)
|
|
212
|
+
self.proxies = AsyncProxiesClient(client_wrapper=self._client_wrapper)
|
|
213
|
+
self.reactors = AsyncReactorsClient(client_wrapper=self._client_wrapper)
|
|
214
|
+
self.roles = AsyncRolesClient(client_wrapper=self._client_wrapper)
|
|
215
|
+
self.sessions = AsyncSessionsClient(client_wrapper=self._client_wrapper)
|
|
216
|
+
self.token_intents = AsyncTokenIntentsClient(client_wrapper=self._client_wrapper)
|
|
217
|
+
self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper)
|
|
218
|
+
self.account_updater = AsyncAccountUpdaterClient(client_wrapper=self._client_wrapper)
|
|
219
|
+
self.connection = AsyncConnectionClient(client_wrapper=self._client_wrapper)
|
|
220
|
+
self.tenants = AsyncTenantsClient(client_wrapper=self._client_wrapper)
|
|
221
|
+
self.threeds = AsyncThreedsClient(client_wrapper=self._client_wrapper)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: BasisTheoryEnvironment) -> str:
|
|
225
|
+
if base_url is not None:
|
|
226
|
+
return base_url
|
|
227
|
+
elif environment is not None:
|
|
228
|
+
return environment.value
|
|
229
|
+
else:
|
|
230
|
+
raise Exception("Please pass in either base_url or environment to construct the client")
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.request_options import RequestOptions
|
|
7
|
+
from ...types.apple_pay_method_token import ApplePayMethodToken
|
|
8
|
+
from ...types.apple_pay_tokenize_response import ApplePayTokenizeResponse
|
|
9
|
+
from .domain.client import AsyncDomainClient, DomainClient
|
|
10
|
+
from .raw_client import AsyncRawApplePayClient, RawApplePayClient
|
|
11
|
+
from .session.client import AsyncSessionClient, SessionClient
|
|
12
|
+
|
|
13
|
+
# this is used as the default value for optional parameters
|
|
14
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ApplePayClient:
|
|
18
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
19
|
+
self._raw_client = RawApplePayClient(client_wrapper=client_wrapper)
|
|
20
|
+
self.domain = DomainClient(client_wrapper=client_wrapper)
|
|
21
|
+
|
|
22
|
+
self.session = SessionClient(client_wrapper=client_wrapper)
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def with_raw_response(self) -> RawApplePayClient:
|
|
26
|
+
"""
|
|
27
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
28
|
+
|
|
29
|
+
Returns
|
|
30
|
+
-------
|
|
31
|
+
RawApplePayClient
|
|
32
|
+
"""
|
|
33
|
+
return self._raw_client
|
|
34
|
+
|
|
35
|
+
def tokenize(
|
|
36
|
+
self,
|
|
37
|
+
*,
|
|
38
|
+
apple_payment_method_token: typing.Optional[ApplePayMethodToken] = OMIT,
|
|
39
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
40
|
+
) -> ApplePayTokenizeResponse:
|
|
41
|
+
"""
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
apple_payment_method_token : typing.Optional[ApplePayMethodToken]
|
|
45
|
+
|
|
46
|
+
request_options : typing.Optional[RequestOptions]
|
|
47
|
+
Request-specific configuration.
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
ApplePayTokenizeResponse
|
|
52
|
+
Created
|
|
53
|
+
|
|
54
|
+
Examples
|
|
55
|
+
--------
|
|
56
|
+
from basis_theory import BasisTheory
|
|
57
|
+
|
|
58
|
+
client = BasisTheory(
|
|
59
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
60
|
+
api_key="YOUR_API_KEY",
|
|
61
|
+
)
|
|
62
|
+
client.connection.apple_pay.tokenize()
|
|
63
|
+
"""
|
|
64
|
+
_response = self._raw_client.tokenize(
|
|
65
|
+
apple_payment_method_token=apple_payment_method_token, request_options=request_options
|
|
66
|
+
)
|
|
67
|
+
return _response.data
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class AsyncApplePayClient:
|
|
71
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
72
|
+
self._raw_client = AsyncRawApplePayClient(client_wrapper=client_wrapper)
|
|
73
|
+
self.domain = AsyncDomainClient(client_wrapper=client_wrapper)
|
|
74
|
+
|
|
75
|
+
self.session = AsyncSessionClient(client_wrapper=client_wrapper)
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def with_raw_response(self) -> AsyncRawApplePayClient:
|
|
79
|
+
"""
|
|
80
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
81
|
+
|
|
82
|
+
Returns
|
|
83
|
+
-------
|
|
84
|
+
AsyncRawApplePayClient
|
|
85
|
+
"""
|
|
86
|
+
return self._raw_client
|
|
87
|
+
|
|
88
|
+
async def tokenize(
|
|
89
|
+
self,
|
|
90
|
+
*,
|
|
91
|
+
apple_payment_method_token: typing.Optional[ApplePayMethodToken] = OMIT,
|
|
92
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
93
|
+
) -> ApplePayTokenizeResponse:
|
|
94
|
+
"""
|
|
95
|
+
Parameters
|
|
96
|
+
----------
|
|
97
|
+
apple_payment_method_token : typing.Optional[ApplePayMethodToken]
|
|
98
|
+
|
|
99
|
+
request_options : typing.Optional[RequestOptions]
|
|
100
|
+
Request-specific configuration.
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
ApplePayTokenizeResponse
|
|
105
|
+
Created
|
|
106
|
+
|
|
107
|
+
Examples
|
|
108
|
+
--------
|
|
109
|
+
import asyncio
|
|
110
|
+
|
|
111
|
+
from basis_theory import AsyncBasisTheory
|
|
112
|
+
|
|
113
|
+
client = AsyncBasisTheory(
|
|
114
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
115
|
+
api_key="YOUR_API_KEY",
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
async def main() -> None:
|
|
120
|
+
await client.connection.apple_pay.tokenize()
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
asyncio.run(main())
|
|
124
|
+
"""
|
|
125
|
+
_response = await self._raw_client.tokenize(
|
|
126
|
+
apple_payment_method_token=apple_payment_method_token, request_options=request_options
|
|
127
|
+
)
|
|
128
|
+
return _response.data
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ....core.request_options import RequestOptions
|
|
7
|
+
from ....types.apple_pay_domain_registration_response import ApplePayDomainRegistrationResponse
|
|
8
|
+
from .raw_client import AsyncRawDomainClient, RawDomainClient
|
|
9
|
+
|
|
10
|
+
# this is used as the default value for optional parameters
|
|
11
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DomainClient:
|
|
15
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
|
+
self._raw_client = RawDomainClient(client_wrapper=client_wrapper)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def with_raw_response(self) -> RawDomainClient:
|
|
20
|
+
"""
|
|
21
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
RawDomainClient
|
|
26
|
+
"""
|
|
27
|
+
return self._raw_client
|
|
28
|
+
|
|
29
|
+
def deregister(self, *, domain: str, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
30
|
+
"""
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
domain : str
|
|
34
|
+
|
|
35
|
+
request_options : typing.Optional[RequestOptions]
|
|
36
|
+
Request-specific configuration.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
None
|
|
41
|
+
|
|
42
|
+
Examples
|
|
43
|
+
--------
|
|
44
|
+
from basis_theory import BasisTheory
|
|
45
|
+
|
|
46
|
+
client = BasisTheory(
|
|
47
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
48
|
+
api_key="YOUR_API_KEY",
|
|
49
|
+
)
|
|
50
|
+
client.connection.apple_pay.domain.deregister(
|
|
51
|
+
domain="domain",
|
|
52
|
+
)
|
|
53
|
+
"""
|
|
54
|
+
_response = self._raw_client.deregister(domain=domain, request_options=request_options)
|
|
55
|
+
return _response.data
|
|
56
|
+
|
|
57
|
+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> ApplePayDomainRegistrationResponse:
|
|
58
|
+
"""
|
|
59
|
+
Parameters
|
|
60
|
+
----------
|
|
61
|
+
request_options : typing.Optional[RequestOptions]
|
|
62
|
+
Request-specific configuration.
|
|
63
|
+
|
|
64
|
+
Returns
|
|
65
|
+
-------
|
|
66
|
+
ApplePayDomainRegistrationResponse
|
|
67
|
+
Success
|
|
68
|
+
|
|
69
|
+
Examples
|
|
70
|
+
--------
|
|
71
|
+
from basis_theory import BasisTheory
|
|
72
|
+
|
|
73
|
+
client = BasisTheory(
|
|
74
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
75
|
+
api_key="YOUR_API_KEY",
|
|
76
|
+
)
|
|
77
|
+
client.connection.apple_pay.domain.get()
|
|
78
|
+
"""
|
|
79
|
+
_response = self._raw_client.get(request_options=request_options)
|
|
80
|
+
return _response.data
|
|
81
|
+
|
|
82
|
+
def register(
|
|
83
|
+
self, *, domain: str, request_options: typing.Optional[RequestOptions] = None
|
|
84
|
+
) -> ApplePayDomainRegistrationResponse:
|
|
85
|
+
"""
|
|
86
|
+
Parameters
|
|
87
|
+
----------
|
|
88
|
+
domain : str
|
|
89
|
+
|
|
90
|
+
request_options : typing.Optional[RequestOptions]
|
|
91
|
+
Request-specific configuration.
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
ApplePayDomainRegistrationResponse
|
|
96
|
+
Accepted
|
|
97
|
+
|
|
98
|
+
Examples
|
|
99
|
+
--------
|
|
100
|
+
from basis_theory import BasisTheory
|
|
101
|
+
|
|
102
|
+
client = BasisTheory(
|
|
103
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
104
|
+
api_key="YOUR_API_KEY",
|
|
105
|
+
)
|
|
106
|
+
client.connection.apple_pay.domain.register(
|
|
107
|
+
domain="domain",
|
|
108
|
+
)
|
|
109
|
+
"""
|
|
110
|
+
_response = self._raw_client.register(domain=domain, request_options=request_options)
|
|
111
|
+
return _response.data
|
|
112
|
+
|
|
113
|
+
def register_all(
|
|
114
|
+
self,
|
|
115
|
+
*,
|
|
116
|
+
domains: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
117
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
118
|
+
) -> ApplePayDomainRegistrationResponse:
|
|
119
|
+
"""
|
|
120
|
+
Parameters
|
|
121
|
+
----------
|
|
122
|
+
domains : typing.Optional[typing.Sequence[str]]
|
|
123
|
+
|
|
124
|
+
request_options : typing.Optional[RequestOptions]
|
|
125
|
+
Request-specific configuration.
|
|
126
|
+
|
|
127
|
+
Returns
|
|
128
|
+
-------
|
|
129
|
+
ApplePayDomainRegistrationResponse
|
|
130
|
+
Accepted
|
|
131
|
+
|
|
132
|
+
Examples
|
|
133
|
+
--------
|
|
134
|
+
from basis_theory import BasisTheory
|
|
135
|
+
|
|
136
|
+
client = BasisTheory(
|
|
137
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
138
|
+
api_key="YOUR_API_KEY",
|
|
139
|
+
)
|
|
140
|
+
client.connection.apple_pay.domain.register_all()
|
|
141
|
+
"""
|
|
142
|
+
_response = self._raw_client.register_all(domains=domains, request_options=request_options)
|
|
143
|
+
return _response.data
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class AsyncDomainClient:
|
|
147
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
148
|
+
self._raw_client = AsyncRawDomainClient(client_wrapper=client_wrapper)
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def with_raw_response(self) -> AsyncRawDomainClient:
|
|
152
|
+
"""
|
|
153
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
154
|
+
|
|
155
|
+
Returns
|
|
156
|
+
-------
|
|
157
|
+
AsyncRawDomainClient
|
|
158
|
+
"""
|
|
159
|
+
return self._raw_client
|
|
160
|
+
|
|
161
|
+
async def deregister(self, *, domain: str, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
162
|
+
"""
|
|
163
|
+
Parameters
|
|
164
|
+
----------
|
|
165
|
+
domain : str
|
|
166
|
+
|
|
167
|
+
request_options : typing.Optional[RequestOptions]
|
|
168
|
+
Request-specific configuration.
|
|
169
|
+
|
|
170
|
+
Returns
|
|
171
|
+
-------
|
|
172
|
+
None
|
|
173
|
+
|
|
174
|
+
Examples
|
|
175
|
+
--------
|
|
176
|
+
import asyncio
|
|
177
|
+
|
|
178
|
+
from basis_theory import AsyncBasisTheory
|
|
179
|
+
|
|
180
|
+
client = AsyncBasisTheory(
|
|
181
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
182
|
+
api_key="YOUR_API_KEY",
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
async def main() -> None:
|
|
187
|
+
await client.connection.apple_pay.domain.deregister(
|
|
188
|
+
domain="domain",
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
asyncio.run(main())
|
|
193
|
+
"""
|
|
194
|
+
_response = await self._raw_client.deregister(domain=domain, request_options=request_options)
|
|
195
|
+
return _response.data
|
|
196
|
+
|
|
197
|
+
async def get(
|
|
198
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
199
|
+
) -> ApplePayDomainRegistrationResponse:
|
|
200
|
+
"""
|
|
201
|
+
Parameters
|
|
202
|
+
----------
|
|
203
|
+
request_options : typing.Optional[RequestOptions]
|
|
204
|
+
Request-specific configuration.
|
|
205
|
+
|
|
206
|
+
Returns
|
|
207
|
+
-------
|
|
208
|
+
ApplePayDomainRegistrationResponse
|
|
209
|
+
Success
|
|
210
|
+
|
|
211
|
+
Examples
|
|
212
|
+
--------
|
|
213
|
+
import asyncio
|
|
214
|
+
|
|
215
|
+
from basis_theory import AsyncBasisTheory
|
|
216
|
+
|
|
217
|
+
client = AsyncBasisTheory(
|
|
218
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
219
|
+
api_key="YOUR_API_KEY",
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
async def main() -> None:
|
|
224
|
+
await client.connection.apple_pay.domain.get()
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
asyncio.run(main())
|
|
228
|
+
"""
|
|
229
|
+
_response = await self._raw_client.get(request_options=request_options)
|
|
230
|
+
return _response.data
|
|
231
|
+
|
|
232
|
+
async def register(
|
|
233
|
+
self, *, domain: str, request_options: typing.Optional[RequestOptions] = None
|
|
234
|
+
) -> ApplePayDomainRegistrationResponse:
|
|
235
|
+
"""
|
|
236
|
+
Parameters
|
|
237
|
+
----------
|
|
238
|
+
domain : str
|
|
239
|
+
|
|
240
|
+
request_options : typing.Optional[RequestOptions]
|
|
241
|
+
Request-specific configuration.
|
|
242
|
+
|
|
243
|
+
Returns
|
|
244
|
+
-------
|
|
245
|
+
ApplePayDomainRegistrationResponse
|
|
246
|
+
Accepted
|
|
247
|
+
|
|
248
|
+
Examples
|
|
249
|
+
--------
|
|
250
|
+
import asyncio
|
|
251
|
+
|
|
252
|
+
from basis_theory import AsyncBasisTheory
|
|
253
|
+
|
|
254
|
+
client = AsyncBasisTheory(
|
|
255
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
256
|
+
api_key="YOUR_API_KEY",
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
async def main() -> None:
|
|
261
|
+
await client.connection.apple_pay.domain.register(
|
|
262
|
+
domain="domain",
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
asyncio.run(main())
|
|
267
|
+
"""
|
|
268
|
+
_response = await self._raw_client.register(domain=domain, request_options=request_options)
|
|
269
|
+
return _response.data
|
|
270
|
+
|
|
271
|
+
async def register_all(
|
|
272
|
+
self,
|
|
273
|
+
*,
|
|
274
|
+
domains: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
275
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
276
|
+
) -> ApplePayDomainRegistrationResponse:
|
|
277
|
+
"""
|
|
278
|
+
Parameters
|
|
279
|
+
----------
|
|
280
|
+
domains : typing.Optional[typing.Sequence[str]]
|
|
281
|
+
|
|
282
|
+
request_options : typing.Optional[RequestOptions]
|
|
283
|
+
Request-specific configuration.
|
|
284
|
+
|
|
285
|
+
Returns
|
|
286
|
+
-------
|
|
287
|
+
ApplePayDomainRegistrationResponse
|
|
288
|
+
Accepted
|
|
289
|
+
|
|
290
|
+
Examples
|
|
291
|
+
--------
|
|
292
|
+
import asyncio
|
|
293
|
+
|
|
294
|
+
from basis_theory import AsyncBasisTheory
|
|
295
|
+
|
|
296
|
+
client = AsyncBasisTheory(
|
|
297
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
298
|
+
api_key="YOUR_API_KEY",
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
async def main() -> None:
|
|
303
|
+
await client.connection.apple_pay.domain.register_all()
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
asyncio.run(main())
|
|
307
|
+
"""
|
|
308
|
+
_response = await self._raw_client.register_all(domains=domains, request_options=request_options)
|
|
309
|
+
return _response.data
|