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
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ...core.api_error import ApiError
|
|
7
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ...core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
|
10
|
+
from ...core.pydantic_utilities import parse_obj_as
|
|
11
|
+
from ...core.request_options import RequestOptions
|
|
12
|
+
from ...errors.forbidden_error import ForbiddenError
|
|
13
|
+
from ...errors.not_found_error import NotFoundError
|
|
14
|
+
from ...errors.unauthorized_error import UnauthorizedError
|
|
15
|
+
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
16
|
+
from ...types.account_updater_job import AccountUpdaterJob
|
|
17
|
+
from ...types.account_updater_job_list import AccountUpdaterJobList
|
|
18
|
+
from ...types.problem_details import ProblemDetails
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class RawJobsClient:
|
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
23
|
+
self._client_wrapper = client_wrapper
|
|
24
|
+
|
|
25
|
+
def get(
|
|
26
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
27
|
+
) -> HttpResponse[AccountUpdaterJob]:
|
|
28
|
+
"""
|
|
29
|
+
Returns the account updater batch job
|
|
30
|
+
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
id : str
|
|
34
|
+
|
|
35
|
+
request_options : typing.Optional[RequestOptions]
|
|
36
|
+
Request-specific configuration.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
HttpResponse[AccountUpdaterJob]
|
|
41
|
+
Success
|
|
42
|
+
"""
|
|
43
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
44
|
+
f"account-updater/jobs/{jsonable_encoder(id)}",
|
|
45
|
+
method="GET",
|
|
46
|
+
request_options=request_options,
|
|
47
|
+
)
|
|
48
|
+
try:
|
|
49
|
+
if 200 <= _response.status_code < 300:
|
|
50
|
+
_data = typing.cast(
|
|
51
|
+
AccountUpdaterJob,
|
|
52
|
+
parse_obj_as(
|
|
53
|
+
type_=AccountUpdaterJob, # type: ignore
|
|
54
|
+
object_=_response.json(),
|
|
55
|
+
),
|
|
56
|
+
)
|
|
57
|
+
return HttpResponse(response=_response, data=_data)
|
|
58
|
+
if _response.status_code == 401:
|
|
59
|
+
raise UnauthorizedError(
|
|
60
|
+
headers=dict(_response.headers),
|
|
61
|
+
body=typing.cast(
|
|
62
|
+
ProblemDetails,
|
|
63
|
+
parse_obj_as(
|
|
64
|
+
type_=ProblemDetails, # type: ignore
|
|
65
|
+
object_=_response.json(),
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
if _response.status_code == 403:
|
|
70
|
+
raise ForbiddenError(
|
|
71
|
+
headers=dict(_response.headers),
|
|
72
|
+
body=typing.cast(
|
|
73
|
+
ProblemDetails,
|
|
74
|
+
parse_obj_as(
|
|
75
|
+
type_=ProblemDetails, # type: ignore
|
|
76
|
+
object_=_response.json(),
|
|
77
|
+
),
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
if _response.status_code == 404:
|
|
81
|
+
raise NotFoundError(
|
|
82
|
+
headers=dict(_response.headers),
|
|
83
|
+
body=typing.cast(
|
|
84
|
+
typing.Optional[typing.Any],
|
|
85
|
+
parse_obj_as(
|
|
86
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
87
|
+
object_=_response.json(),
|
|
88
|
+
),
|
|
89
|
+
),
|
|
90
|
+
)
|
|
91
|
+
_response_json = _response.json()
|
|
92
|
+
except JSONDecodeError:
|
|
93
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
94
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
95
|
+
|
|
96
|
+
def list(
|
|
97
|
+
self,
|
|
98
|
+
*,
|
|
99
|
+
size: typing.Optional[int] = None,
|
|
100
|
+
start: typing.Optional[str] = None,
|
|
101
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
102
|
+
) -> HttpResponse[AccountUpdaterJobList]:
|
|
103
|
+
"""
|
|
104
|
+
Returns a list of account updater batch jobs
|
|
105
|
+
|
|
106
|
+
Parameters
|
|
107
|
+
----------
|
|
108
|
+
size : typing.Optional[int]
|
|
109
|
+
The maximum number of jobs to return
|
|
110
|
+
|
|
111
|
+
start : typing.Optional[str]
|
|
112
|
+
Cursor for pagination
|
|
113
|
+
|
|
114
|
+
request_options : typing.Optional[RequestOptions]
|
|
115
|
+
Request-specific configuration.
|
|
116
|
+
|
|
117
|
+
Returns
|
|
118
|
+
-------
|
|
119
|
+
HttpResponse[AccountUpdaterJobList]
|
|
120
|
+
Success
|
|
121
|
+
"""
|
|
122
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
123
|
+
"account-updater/jobs",
|
|
124
|
+
method="GET",
|
|
125
|
+
params={
|
|
126
|
+
"size": size,
|
|
127
|
+
"start": start,
|
|
128
|
+
},
|
|
129
|
+
request_options=request_options,
|
|
130
|
+
)
|
|
131
|
+
try:
|
|
132
|
+
if 200 <= _response.status_code < 300:
|
|
133
|
+
_data = typing.cast(
|
|
134
|
+
AccountUpdaterJobList,
|
|
135
|
+
parse_obj_as(
|
|
136
|
+
type_=AccountUpdaterJobList, # type: ignore
|
|
137
|
+
object_=_response.json(),
|
|
138
|
+
),
|
|
139
|
+
)
|
|
140
|
+
return HttpResponse(response=_response, data=_data)
|
|
141
|
+
if _response.status_code == 401:
|
|
142
|
+
raise UnauthorizedError(
|
|
143
|
+
headers=dict(_response.headers),
|
|
144
|
+
body=typing.cast(
|
|
145
|
+
ProblemDetails,
|
|
146
|
+
parse_obj_as(
|
|
147
|
+
type_=ProblemDetails, # type: ignore
|
|
148
|
+
object_=_response.json(),
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
)
|
|
152
|
+
if _response.status_code == 403:
|
|
153
|
+
raise ForbiddenError(
|
|
154
|
+
headers=dict(_response.headers),
|
|
155
|
+
body=typing.cast(
|
|
156
|
+
ProblemDetails,
|
|
157
|
+
parse_obj_as(
|
|
158
|
+
type_=ProblemDetails, # type: ignore
|
|
159
|
+
object_=_response.json(),
|
|
160
|
+
),
|
|
161
|
+
),
|
|
162
|
+
)
|
|
163
|
+
_response_json = _response.json()
|
|
164
|
+
except JSONDecodeError:
|
|
165
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
166
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
167
|
+
|
|
168
|
+
def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AccountUpdaterJob]:
|
|
169
|
+
"""
|
|
170
|
+
Returns the created account updater batch job
|
|
171
|
+
|
|
172
|
+
Parameters
|
|
173
|
+
----------
|
|
174
|
+
request_options : typing.Optional[RequestOptions]
|
|
175
|
+
Request-specific configuration.
|
|
176
|
+
|
|
177
|
+
Returns
|
|
178
|
+
-------
|
|
179
|
+
HttpResponse[AccountUpdaterJob]
|
|
180
|
+
Success
|
|
181
|
+
"""
|
|
182
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
183
|
+
"account-updater/jobs",
|
|
184
|
+
method="POST",
|
|
185
|
+
request_options=request_options,
|
|
186
|
+
)
|
|
187
|
+
try:
|
|
188
|
+
if 200 <= _response.status_code < 300:
|
|
189
|
+
_data = typing.cast(
|
|
190
|
+
AccountUpdaterJob,
|
|
191
|
+
parse_obj_as(
|
|
192
|
+
type_=AccountUpdaterJob, # type: ignore
|
|
193
|
+
object_=_response.json(),
|
|
194
|
+
),
|
|
195
|
+
)
|
|
196
|
+
return HttpResponse(response=_response, data=_data)
|
|
197
|
+
if _response.status_code == 401:
|
|
198
|
+
raise UnauthorizedError(
|
|
199
|
+
headers=dict(_response.headers),
|
|
200
|
+
body=typing.cast(
|
|
201
|
+
ProblemDetails,
|
|
202
|
+
parse_obj_as(
|
|
203
|
+
type_=ProblemDetails, # type: ignore
|
|
204
|
+
object_=_response.json(),
|
|
205
|
+
),
|
|
206
|
+
),
|
|
207
|
+
)
|
|
208
|
+
if _response.status_code == 403:
|
|
209
|
+
raise ForbiddenError(
|
|
210
|
+
headers=dict(_response.headers),
|
|
211
|
+
body=typing.cast(
|
|
212
|
+
ProblemDetails,
|
|
213
|
+
parse_obj_as(
|
|
214
|
+
type_=ProblemDetails, # type: ignore
|
|
215
|
+
object_=_response.json(),
|
|
216
|
+
),
|
|
217
|
+
),
|
|
218
|
+
)
|
|
219
|
+
if _response.status_code == 422:
|
|
220
|
+
raise UnprocessableEntityError(
|
|
221
|
+
headers=dict(_response.headers),
|
|
222
|
+
body=typing.cast(
|
|
223
|
+
ProblemDetails,
|
|
224
|
+
parse_obj_as(
|
|
225
|
+
type_=ProblemDetails, # type: ignore
|
|
226
|
+
object_=_response.json(),
|
|
227
|
+
),
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
_response_json = _response.json()
|
|
231
|
+
except JSONDecodeError:
|
|
232
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
233
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
class AsyncRawJobsClient:
|
|
237
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
238
|
+
self._client_wrapper = client_wrapper
|
|
239
|
+
|
|
240
|
+
async def get(
|
|
241
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
242
|
+
) -> AsyncHttpResponse[AccountUpdaterJob]:
|
|
243
|
+
"""
|
|
244
|
+
Returns the account updater batch job
|
|
245
|
+
|
|
246
|
+
Parameters
|
|
247
|
+
----------
|
|
248
|
+
id : str
|
|
249
|
+
|
|
250
|
+
request_options : typing.Optional[RequestOptions]
|
|
251
|
+
Request-specific configuration.
|
|
252
|
+
|
|
253
|
+
Returns
|
|
254
|
+
-------
|
|
255
|
+
AsyncHttpResponse[AccountUpdaterJob]
|
|
256
|
+
Success
|
|
257
|
+
"""
|
|
258
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
259
|
+
f"account-updater/jobs/{jsonable_encoder(id)}",
|
|
260
|
+
method="GET",
|
|
261
|
+
request_options=request_options,
|
|
262
|
+
)
|
|
263
|
+
try:
|
|
264
|
+
if 200 <= _response.status_code < 300:
|
|
265
|
+
_data = typing.cast(
|
|
266
|
+
AccountUpdaterJob,
|
|
267
|
+
parse_obj_as(
|
|
268
|
+
type_=AccountUpdaterJob, # type: ignore
|
|
269
|
+
object_=_response.json(),
|
|
270
|
+
),
|
|
271
|
+
)
|
|
272
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
273
|
+
if _response.status_code == 401:
|
|
274
|
+
raise UnauthorizedError(
|
|
275
|
+
headers=dict(_response.headers),
|
|
276
|
+
body=typing.cast(
|
|
277
|
+
ProblemDetails,
|
|
278
|
+
parse_obj_as(
|
|
279
|
+
type_=ProblemDetails, # type: ignore
|
|
280
|
+
object_=_response.json(),
|
|
281
|
+
),
|
|
282
|
+
),
|
|
283
|
+
)
|
|
284
|
+
if _response.status_code == 403:
|
|
285
|
+
raise ForbiddenError(
|
|
286
|
+
headers=dict(_response.headers),
|
|
287
|
+
body=typing.cast(
|
|
288
|
+
ProblemDetails,
|
|
289
|
+
parse_obj_as(
|
|
290
|
+
type_=ProblemDetails, # type: ignore
|
|
291
|
+
object_=_response.json(),
|
|
292
|
+
),
|
|
293
|
+
),
|
|
294
|
+
)
|
|
295
|
+
if _response.status_code == 404:
|
|
296
|
+
raise NotFoundError(
|
|
297
|
+
headers=dict(_response.headers),
|
|
298
|
+
body=typing.cast(
|
|
299
|
+
typing.Optional[typing.Any],
|
|
300
|
+
parse_obj_as(
|
|
301
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
302
|
+
object_=_response.json(),
|
|
303
|
+
),
|
|
304
|
+
),
|
|
305
|
+
)
|
|
306
|
+
_response_json = _response.json()
|
|
307
|
+
except JSONDecodeError:
|
|
308
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
309
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
310
|
+
|
|
311
|
+
async def list(
|
|
312
|
+
self,
|
|
313
|
+
*,
|
|
314
|
+
size: typing.Optional[int] = None,
|
|
315
|
+
start: typing.Optional[str] = None,
|
|
316
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
317
|
+
) -> AsyncHttpResponse[AccountUpdaterJobList]:
|
|
318
|
+
"""
|
|
319
|
+
Returns a list of account updater batch jobs
|
|
320
|
+
|
|
321
|
+
Parameters
|
|
322
|
+
----------
|
|
323
|
+
size : typing.Optional[int]
|
|
324
|
+
The maximum number of jobs to return
|
|
325
|
+
|
|
326
|
+
start : typing.Optional[str]
|
|
327
|
+
Cursor for pagination
|
|
328
|
+
|
|
329
|
+
request_options : typing.Optional[RequestOptions]
|
|
330
|
+
Request-specific configuration.
|
|
331
|
+
|
|
332
|
+
Returns
|
|
333
|
+
-------
|
|
334
|
+
AsyncHttpResponse[AccountUpdaterJobList]
|
|
335
|
+
Success
|
|
336
|
+
"""
|
|
337
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
338
|
+
"account-updater/jobs",
|
|
339
|
+
method="GET",
|
|
340
|
+
params={
|
|
341
|
+
"size": size,
|
|
342
|
+
"start": start,
|
|
343
|
+
},
|
|
344
|
+
request_options=request_options,
|
|
345
|
+
)
|
|
346
|
+
try:
|
|
347
|
+
if 200 <= _response.status_code < 300:
|
|
348
|
+
_data = typing.cast(
|
|
349
|
+
AccountUpdaterJobList,
|
|
350
|
+
parse_obj_as(
|
|
351
|
+
type_=AccountUpdaterJobList, # type: ignore
|
|
352
|
+
object_=_response.json(),
|
|
353
|
+
),
|
|
354
|
+
)
|
|
355
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
356
|
+
if _response.status_code == 401:
|
|
357
|
+
raise UnauthorizedError(
|
|
358
|
+
headers=dict(_response.headers),
|
|
359
|
+
body=typing.cast(
|
|
360
|
+
ProblemDetails,
|
|
361
|
+
parse_obj_as(
|
|
362
|
+
type_=ProblemDetails, # type: ignore
|
|
363
|
+
object_=_response.json(),
|
|
364
|
+
),
|
|
365
|
+
),
|
|
366
|
+
)
|
|
367
|
+
if _response.status_code == 403:
|
|
368
|
+
raise ForbiddenError(
|
|
369
|
+
headers=dict(_response.headers),
|
|
370
|
+
body=typing.cast(
|
|
371
|
+
ProblemDetails,
|
|
372
|
+
parse_obj_as(
|
|
373
|
+
type_=ProblemDetails, # type: ignore
|
|
374
|
+
object_=_response.json(),
|
|
375
|
+
),
|
|
376
|
+
),
|
|
377
|
+
)
|
|
378
|
+
_response_json = _response.json()
|
|
379
|
+
except JSONDecodeError:
|
|
380
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
381
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
382
|
+
|
|
383
|
+
async def create(
|
|
384
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
385
|
+
) -> AsyncHttpResponse[AccountUpdaterJob]:
|
|
386
|
+
"""
|
|
387
|
+
Returns the created account updater batch job
|
|
388
|
+
|
|
389
|
+
Parameters
|
|
390
|
+
----------
|
|
391
|
+
request_options : typing.Optional[RequestOptions]
|
|
392
|
+
Request-specific configuration.
|
|
393
|
+
|
|
394
|
+
Returns
|
|
395
|
+
-------
|
|
396
|
+
AsyncHttpResponse[AccountUpdaterJob]
|
|
397
|
+
Success
|
|
398
|
+
"""
|
|
399
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
400
|
+
"account-updater/jobs",
|
|
401
|
+
method="POST",
|
|
402
|
+
request_options=request_options,
|
|
403
|
+
)
|
|
404
|
+
try:
|
|
405
|
+
if 200 <= _response.status_code < 300:
|
|
406
|
+
_data = typing.cast(
|
|
407
|
+
AccountUpdaterJob,
|
|
408
|
+
parse_obj_as(
|
|
409
|
+
type_=AccountUpdaterJob, # type: ignore
|
|
410
|
+
object_=_response.json(),
|
|
411
|
+
),
|
|
412
|
+
)
|
|
413
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
414
|
+
if _response.status_code == 401:
|
|
415
|
+
raise UnauthorizedError(
|
|
416
|
+
headers=dict(_response.headers),
|
|
417
|
+
body=typing.cast(
|
|
418
|
+
ProblemDetails,
|
|
419
|
+
parse_obj_as(
|
|
420
|
+
type_=ProblemDetails, # type: ignore
|
|
421
|
+
object_=_response.json(),
|
|
422
|
+
),
|
|
423
|
+
),
|
|
424
|
+
)
|
|
425
|
+
if _response.status_code == 403:
|
|
426
|
+
raise ForbiddenError(
|
|
427
|
+
headers=dict(_response.headers),
|
|
428
|
+
body=typing.cast(
|
|
429
|
+
ProblemDetails,
|
|
430
|
+
parse_obj_as(
|
|
431
|
+
type_=ProblemDetails, # type: ignore
|
|
432
|
+
object_=_response.json(),
|
|
433
|
+
),
|
|
434
|
+
),
|
|
435
|
+
)
|
|
436
|
+
if _response.status_code == 422:
|
|
437
|
+
raise UnprocessableEntityError(
|
|
438
|
+
headers=dict(_response.headers),
|
|
439
|
+
body=typing.cast(
|
|
440
|
+
ProblemDetails,
|
|
441
|
+
parse_obj_as(
|
|
442
|
+
type_=ProblemDetails, # type: ignore
|
|
443
|
+
object_=_response.json(),
|
|
444
|
+
),
|
|
445
|
+
),
|
|
446
|
+
)
|
|
447
|
+
_response_json = _response.json()
|
|
448
|
+
except JSONDecodeError:
|
|
449
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
450
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class RawAccountUpdaterClient:
|
|
7
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
8
|
+
self._client_wrapper = client_wrapper
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AsyncRawAccountUpdaterClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
13
|
+
self._client_wrapper = client_wrapper
|
|
@@ -0,0 +1,161 @@
|
|
|
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.account_updater_real_time_response import AccountUpdaterRealTimeResponse
|
|
8
|
+
from .raw_client import AsyncRawRealTimeClient, RawRealTimeClient
|
|
9
|
+
|
|
10
|
+
# this is used as the default value for optional parameters
|
|
11
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RealTimeClient:
|
|
15
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
|
+
self._raw_client = RawRealTimeClient(client_wrapper=client_wrapper)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def with_raw_response(self) -> RawRealTimeClient:
|
|
20
|
+
"""
|
|
21
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
RawRealTimeClient
|
|
26
|
+
"""
|
|
27
|
+
return self._raw_client
|
|
28
|
+
|
|
29
|
+
def invoke(
|
|
30
|
+
self,
|
|
31
|
+
*,
|
|
32
|
+
token_id: str,
|
|
33
|
+
expiration_year: typing.Optional[int] = OMIT,
|
|
34
|
+
expiration_month: typing.Optional[int] = OMIT,
|
|
35
|
+
deduplicate_token: typing.Optional[bool] = OMIT,
|
|
36
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
37
|
+
) -> AccountUpdaterRealTimeResponse:
|
|
38
|
+
"""
|
|
39
|
+
Returns the update result
|
|
40
|
+
|
|
41
|
+
Parameters
|
|
42
|
+
----------
|
|
43
|
+
token_id : str
|
|
44
|
+
Card Token identifier
|
|
45
|
+
|
|
46
|
+
expiration_year : typing.Optional[int]
|
|
47
|
+
The 4-digit expiration year of the account number. Not required if the card token already stores this value.
|
|
48
|
+
|
|
49
|
+
expiration_month : typing.Optional[int]
|
|
50
|
+
The 2-digit expiration month of the account number. Not required if the card token already stores this value.
|
|
51
|
+
|
|
52
|
+
deduplicate_token : typing.Optional[bool]
|
|
53
|
+
Whether deduplication should be enabled when creating the new token. Uses the value of the Deduplicate Tokens setting on the tenant if not set.
|
|
54
|
+
|
|
55
|
+
request_options : typing.Optional[RequestOptions]
|
|
56
|
+
Request-specific configuration.
|
|
57
|
+
|
|
58
|
+
Returns
|
|
59
|
+
-------
|
|
60
|
+
AccountUpdaterRealTimeResponse
|
|
61
|
+
Success
|
|
62
|
+
|
|
63
|
+
Examples
|
|
64
|
+
--------
|
|
65
|
+
from basis_theory import BasisTheory
|
|
66
|
+
|
|
67
|
+
client = BasisTheory(
|
|
68
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
69
|
+
api_key="YOUR_API_KEY",
|
|
70
|
+
)
|
|
71
|
+
client.account_updater.real_time.invoke(
|
|
72
|
+
token_id="9a420b15-ddfe-4793-9466-48f53520e47c",
|
|
73
|
+
)
|
|
74
|
+
"""
|
|
75
|
+
_response = self._raw_client.invoke(
|
|
76
|
+
token_id=token_id,
|
|
77
|
+
expiration_year=expiration_year,
|
|
78
|
+
expiration_month=expiration_month,
|
|
79
|
+
deduplicate_token=deduplicate_token,
|
|
80
|
+
request_options=request_options,
|
|
81
|
+
)
|
|
82
|
+
return _response.data
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class AsyncRealTimeClient:
|
|
86
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
87
|
+
self._raw_client = AsyncRawRealTimeClient(client_wrapper=client_wrapper)
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def with_raw_response(self) -> AsyncRawRealTimeClient:
|
|
91
|
+
"""
|
|
92
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
93
|
+
|
|
94
|
+
Returns
|
|
95
|
+
-------
|
|
96
|
+
AsyncRawRealTimeClient
|
|
97
|
+
"""
|
|
98
|
+
return self._raw_client
|
|
99
|
+
|
|
100
|
+
async def invoke(
|
|
101
|
+
self,
|
|
102
|
+
*,
|
|
103
|
+
token_id: str,
|
|
104
|
+
expiration_year: typing.Optional[int] = OMIT,
|
|
105
|
+
expiration_month: typing.Optional[int] = OMIT,
|
|
106
|
+
deduplicate_token: typing.Optional[bool] = OMIT,
|
|
107
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
108
|
+
) -> AccountUpdaterRealTimeResponse:
|
|
109
|
+
"""
|
|
110
|
+
Returns the update result
|
|
111
|
+
|
|
112
|
+
Parameters
|
|
113
|
+
----------
|
|
114
|
+
token_id : str
|
|
115
|
+
Card Token identifier
|
|
116
|
+
|
|
117
|
+
expiration_year : typing.Optional[int]
|
|
118
|
+
The 4-digit expiration year of the account number. Not required if the card token already stores this value.
|
|
119
|
+
|
|
120
|
+
expiration_month : typing.Optional[int]
|
|
121
|
+
The 2-digit expiration month of the account number. Not required if the card token already stores this value.
|
|
122
|
+
|
|
123
|
+
deduplicate_token : typing.Optional[bool]
|
|
124
|
+
Whether deduplication should be enabled when creating the new token. Uses the value of the Deduplicate Tokens setting on the tenant if not set.
|
|
125
|
+
|
|
126
|
+
request_options : typing.Optional[RequestOptions]
|
|
127
|
+
Request-specific configuration.
|
|
128
|
+
|
|
129
|
+
Returns
|
|
130
|
+
-------
|
|
131
|
+
AccountUpdaterRealTimeResponse
|
|
132
|
+
Success
|
|
133
|
+
|
|
134
|
+
Examples
|
|
135
|
+
--------
|
|
136
|
+
import asyncio
|
|
137
|
+
|
|
138
|
+
from basis_theory import AsyncBasisTheory
|
|
139
|
+
|
|
140
|
+
client = AsyncBasisTheory(
|
|
141
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
142
|
+
api_key="YOUR_API_KEY",
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
async def main() -> None:
|
|
147
|
+
await client.account_updater.real_time.invoke(
|
|
148
|
+
token_id="9a420b15-ddfe-4793-9466-48f53520e47c",
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
asyncio.run(main())
|
|
153
|
+
"""
|
|
154
|
+
_response = await self._raw_client.invoke(
|
|
155
|
+
token_id=token_id,
|
|
156
|
+
expiration_year=expiration_year,
|
|
157
|
+
expiration_month=expiration_month,
|
|
158
|
+
deduplicate_token=deduplicate_token,
|
|
159
|
+
request_options=request_options,
|
|
160
|
+
)
|
|
161
|
+
return _response.data
|