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.
Files changed (283) hide show
  1. basis_theory/__init__.py +350 -0
  2. basis_theory/account_updater/__init__.py +7 -0
  3. basis_theory/account_updater/client.py +44 -0
  4. basis_theory/account_updater/jobs/__init__.py +4 -0
  5. basis_theory/account_updater/jobs/client.py +259 -0
  6. basis_theory/account_updater/jobs/raw_client.py +450 -0
  7. basis_theory/account_updater/raw_client.py +13 -0
  8. basis_theory/account_updater/real_time/__init__.py +4 -0
  9. basis_theory/account_updater/real_time/client.py +161 -0
  10. basis_theory/account_updater/real_time/raw_client.py +246 -0
  11. basis_theory/apple_pay/__init__.py +7 -0
  12. basis_theory/apple_pay/client.py +267 -0
  13. basis_theory/apple_pay/domain/__init__.py +4 -0
  14. basis_theory/apple_pay/domain/client.py +309 -0
  15. basis_theory/apple_pay/domain/raw_client.py +631 -0
  16. basis_theory/apple_pay/raw_client.py +499 -0
  17. basis_theory/apple_pay/session/__init__.py +4 -0
  18. basis_theory/apple_pay/session/client.py +130 -0
  19. basis_theory/apple_pay/session/raw_client.py +225 -0
  20. basis_theory/application_keys/__init__.py +4 -0
  21. basis_theory/application_keys/client.py +354 -0
  22. basis_theory/application_keys/raw_client.py +615 -0
  23. basis_theory/application_templates/__init__.py +4 -0
  24. basis_theory/application_templates/client.py +166 -0
  25. basis_theory/application_templates/raw_client.py +253 -0
  26. basis_theory/applications/__init__.py +4 -0
  27. basis_theory/applications/client.py +582 -0
  28. basis_theory/applications/raw_client.py +1030 -0
  29. basis_theory/client.py +230 -0
  30. basis_theory/connection/__init__.py +7 -0
  31. basis_theory/connection/apple_pay/__init__.py +7 -0
  32. basis_theory/connection/apple_pay/client.py +128 -0
  33. basis_theory/connection/apple_pay/domain/__init__.py +4 -0
  34. basis_theory/connection/apple_pay/domain/client.py +309 -0
  35. basis_theory/connection/apple_pay/domain/raw_client.py +631 -0
  36. basis_theory/connection/apple_pay/raw_client.py +216 -0
  37. basis_theory/connection/apple_pay/session/__init__.py +4 -0
  38. basis_theory/connection/apple_pay/session/client.py +130 -0
  39. basis_theory/connection/apple_pay/session/raw_client.py +225 -0
  40. basis_theory/connection/client.py +39 -0
  41. basis_theory/connection/raw_client.py +13 -0
  42. basis_theory/core/__init__.py +55 -0
  43. basis_theory/core/api_error.py +23 -0
  44. basis_theory/core/client_wrapper.py +89 -0
  45. basis_theory/core/datetime_utils.py +28 -0
  46. basis_theory/core/file.py +67 -0
  47. basis_theory/core/force_multipart.py +16 -0
  48. basis_theory/core/http_client.py +543 -0
  49. basis_theory/core/http_response.py +55 -0
  50. basis_theory/core/jsonable_encoder.py +100 -0
  51. basis_theory/core/pagination.py +82 -0
  52. basis_theory/core/pydantic_utilities.py +255 -0
  53. basis_theory/core/query_encoder.py +58 -0
  54. basis_theory/core/remove_none_from_dict.py +11 -0
  55. basis_theory/core/request_options.py +35 -0
  56. basis_theory/core/serialization.py +276 -0
  57. basis_theory/documents/__init__.py +7 -0
  58. basis_theory/documents/client.py +258 -0
  59. basis_theory/documents/data/__init__.py +4 -0
  60. basis_theory/documents/data/client.py +78 -0
  61. basis_theory/documents/data/raw_client.py +173 -0
  62. basis_theory/documents/raw_client.py +442 -0
  63. basis_theory/enrichments/__init__.py +4 -0
  64. basis_theory/enrichments/client.py +135 -0
  65. basis_theory/enrichments/raw_client.py +203 -0
  66. basis_theory/environment.py +7 -0
  67. basis_theory/errors/__init__.py +23 -0
  68. basis_theory/errors/bad_request_error.py +11 -0
  69. basis_theory/errors/conflict_error.py +11 -0
  70. basis_theory/errors/forbidden_error.py +11 -0
  71. basis_theory/errors/internal_server_error.py +11 -0
  72. basis_theory/errors/not_found_error.py +10 -0
  73. basis_theory/errors/service_unavailable_error.py +11 -0
  74. basis_theory/errors/unauthorized_error.py +11 -0
  75. basis_theory/errors/unprocessable_entity_error.py +11 -0
  76. basis_theory/googlepay/__init__.py +4 -0
  77. basis_theory/googlepay/client.py +120 -0
  78. basis_theory/googlepay/raw_client.py +239 -0
  79. basis_theory/keys/__init__.py +4 -0
  80. basis_theory/keys/client.py +313 -0
  81. basis_theory/keys/raw_client.py +673 -0
  82. basis_theory/logs/__init__.py +4 -0
  83. basis_theory/logs/client.py +240 -0
  84. basis_theory/logs/raw_client.py +376 -0
  85. basis_theory/network_tokens/__init__.py +4 -0
  86. basis_theory/network_tokens/client.py +478 -0
  87. basis_theory/network_tokens/raw_client.py +1113 -0
  88. basis_theory/permissions/__init__.py +4 -0
  89. basis_theory/permissions/client.py +106 -0
  90. basis_theory/permissions/raw_client.py +170 -0
  91. basis_theory/proxies/__init__.py +4 -0
  92. basis_theory/proxies/client.py +751 -0
  93. basis_theory/proxies/raw_client.py +1255 -0
  94. basis_theory/py.typed +0 -0
  95. basis_theory/reactors/__init__.py +7 -0
  96. basis_theory/reactors/client.py +823 -0
  97. basis_theory/reactors/raw_client.py +1553 -0
  98. basis_theory/reactors/results/__init__.py +4 -0
  99. basis_theory/reactors/results/client.py +115 -0
  100. basis_theory/reactors/results/raw_client.py +194 -0
  101. basis_theory/roles/__init__.py +4 -0
  102. basis_theory/roles/client.py +98 -0
  103. basis_theory/roles/raw_client.py +134 -0
  104. basis_theory/sessions/__init__.py +4 -0
  105. basis_theory/sessions/client.py +222 -0
  106. basis_theory/sessions/raw_client.py +399 -0
  107. basis_theory/tenants/__init__.py +7 -0
  108. basis_theory/tenants/client.py +59 -0
  109. basis_theory/tenants/connections/__init__.py +4 -0
  110. basis_theory/tenants/connections/client.py +198 -0
  111. basis_theory/tenants/connections/raw_client.py +344 -0
  112. basis_theory/tenants/invitations/__init__.py +4 -0
  113. basis_theory/tenants/invitations/client.py +458 -0
  114. basis_theory/tenants/invitations/raw_client.py +805 -0
  115. basis_theory/tenants/members/__init__.py +4 -0
  116. basis_theory/tenants/members/client.py +296 -0
  117. basis_theory/tenants/members/raw_client.py +497 -0
  118. basis_theory/tenants/owner/__init__.py +4 -0
  119. basis_theory/tenants/owner/client.py +98 -0
  120. basis_theory/tenants/owner/raw_client.py +157 -0
  121. basis_theory/tenants/raw_client.py +13 -0
  122. basis_theory/tenants/self_/__init__.py +4 -0
  123. basis_theory/tenants/self_/client.py +308 -0
  124. basis_theory/tenants/self_/raw_client.py +605 -0
  125. basis_theory/threeds/__init__.py +7 -0
  126. basis_theory/threeds/client.py +39 -0
  127. basis_theory/threeds/raw_client.py +13 -0
  128. basis_theory/threeds/sessions/__init__.py +4 -0
  129. basis_theory/threeds/sessions/client.py +521 -0
  130. basis_theory/threeds/sessions/raw_client.py +808 -0
  131. basis_theory/token_intents/__init__.py +4 -0
  132. basis_theory/token_intents/client.py +258 -0
  133. basis_theory/token_intents/raw_client.py +454 -0
  134. basis_theory/tokens/__init__.py +4 -0
  135. basis_theory/tokens/client.py +1015 -0
  136. basis_theory/tokens/raw_client.py +1861 -0
  137. basis_theory/types/__init__.py +277 -0
  138. basis_theory/types/access_rule.py +25 -0
  139. basis_theory/types/account_updater_job.py +55 -0
  140. basis_theory/types/account_updater_job_list.py +22 -0
  141. basis_theory/types/account_updater_job_list_pagination.py +20 -0
  142. basis_theory/types/account_updater_job_status.py +5 -0
  143. basis_theory/types/account_updater_real_time_response.py +24 -0
  144. basis_theory/types/additional_card_details.py +23 -0
  145. basis_theory/types/address.py +25 -0
  146. basis_theory/types/apple_pay_create_response.py +20 -0
  147. basis_theory/types/apple_pay_create_token_response.py +28 -0
  148. basis_theory/types/apple_pay_domain_deregistration_request.py +19 -0
  149. basis_theory/types/apple_pay_domain_registration_list_request.py +19 -0
  150. basis_theory/types/apple_pay_domain_registration_request.py +19 -0
  151. basis_theory/types/apple_pay_domain_registration_response.py +20 -0
  152. basis_theory/types/apple_pay_method_token.py +25 -0
  153. basis_theory/types/apple_pay_session_request.py +21 -0
  154. basis_theory/types/apple_pay_token.py +33 -0
  155. basis_theory/types/apple_pay_tokenize_response.py +20 -0
  156. basis_theory/types/application.py +33 -0
  157. basis_theory/types/application_key.py +24 -0
  158. basis_theory/types/application_paginated_list.py +22 -0
  159. basis_theory/types/application_template.py +27 -0
  160. basis_theory/types/assurance_details.py +20 -0
  161. basis_theory/types/async_react_response.py +23 -0
  162. basis_theory/types/authenticate_three_ds_session_request.py +35 -0
  163. basis_theory/types/authentication.py +22 -0
  164. basis_theory/types/authentication_response.py +21 -0
  165. basis_theory/types/bank_details.py +20 -0
  166. basis_theory/types/bank_verification_response.py +19 -0
  167. basis_theory/types/bin_details.py +41 -0
  168. basis_theory/types/bin_details_bank.py +22 -0
  169. basis_theory/types/bin_details_country.py +21 -0
  170. basis_theory/types/bin_details_product.py +20 -0
  171. basis_theory/types/card.py +22 -0
  172. basis_theory/types/card_details.py +32 -0
  173. basis_theory/types/card_issuer.py +20 -0
  174. basis_theory/types/card_issuer_country.py +21 -0
  175. basis_theory/types/cardholder_info.py +21 -0
  176. basis_theory/types/client_encryption_key_metadata_response.py +23 -0
  177. basis_theory/types/client_encryption_key_response.py +24 -0
  178. basis_theory/types/condition.py +21 -0
  179. basis_theory/types/create_account_updater_job_request.py +22 -0
  180. basis_theory/types/create_document_request.py +19 -0
  181. basis_theory/types/create_reactor_formula_request.py +28 -0
  182. basis_theory/types/create_session_response.py +22 -0
  183. basis_theory/types/create_tenant_connection_response.py +19 -0
  184. basis_theory/types/create_three_ds_session_response.py +29 -0
  185. basis_theory/types/create_token_intent_response.py +36 -0
  186. basis_theory/types/cursor_pagination.py +20 -0
  187. basis_theory/types/document.py +25 -0
  188. basis_theory/types/domain_registration_response.py +20 -0
  189. basis_theory/types/event_types.py +5 -0
  190. basis_theory/types/get_applications.py +23 -0
  191. basis_theory/types/get_logs.py +26 -0
  192. basis_theory/types/get_permissions.py +19 -0
  193. basis_theory/types/get_proxies.py +23 -0
  194. basis_theory/types/get_reactor_formulas.py +22 -0
  195. basis_theory/types/get_reactors.py +23 -0
  196. basis_theory/types/get_tenant_invitations.py +23 -0
  197. basis_theory/types/get_tenant_members.py +22 -0
  198. basis_theory/types/get_tokens.py +23 -0
  199. basis_theory/types/get_tokens_v2.py +24 -0
  200. basis_theory/types/google_pay_tokenize_response.py +20 -0
  201. basis_theory/types/google_payment_method_token.py +27 -0
  202. basis_theory/types/header.py +26 -0
  203. basis_theory/types/intermediate_signing_key.py +22 -0
  204. basis_theory/types/log.py +28 -0
  205. basis_theory/types/log_entity_type.py +20 -0
  206. basis_theory/types/log_paginated_list.py +22 -0
  207. basis_theory/types/network_token.py +38 -0
  208. basis_theory/types/network_token_cryptogram.py +20 -0
  209. basis_theory/types/network_token_extras.py +19 -0
  210. basis_theory/types/pagination.py +24 -0
  211. basis_theory/types/payment_data.py +23 -0
  212. basis_theory/types/permission.py +21 -0
  213. basis_theory/types/privacy.py +21 -0
  214. basis_theory/types/problem_details.py +23 -0
  215. basis_theory/types/proxy.py +39 -0
  216. basis_theory/types/proxy_paginated_list.py +22 -0
  217. basis_theory/types/proxy_transform.py +23 -0
  218. basis_theory/types/public_key.py +3 -0
  219. basis_theory/types/react_response.py +22 -0
  220. basis_theory/types/reactor.py +32 -0
  221. basis_theory/types/reactor_formula.py +34 -0
  222. basis_theory/types/reactor_formula_configuration.py +21 -0
  223. basis_theory/types/reactor_formula_paginated_list.py +22 -0
  224. basis_theory/types/reactor_formula_request_parameter.py +22 -0
  225. basis_theory/types/reactor_paginated_list.py +22 -0
  226. basis_theory/types/role.py +19 -0
  227. basis_theory/types/string_string_key_value_pair.py +20 -0
  228. basis_theory/types/submerchant_authentication_response.py +21 -0
  229. basis_theory/types/tenant.py +28 -0
  230. basis_theory/types/tenant_connection_options.py +19 -0
  231. basis_theory/types/tenant_invitation_response.py +30 -0
  232. basis_theory/types/tenant_invitation_response_paginated_list.py +22 -0
  233. basis_theory/types/tenant_invitation_status.py +5 -0
  234. basis_theory/types/tenant_member_response.py +28 -0
  235. basis_theory/types/tenant_member_response_paginated_list.py +22 -0
  236. basis_theory/types/tenant_usage_report.py +19 -0
  237. basis_theory/types/three_ds_acs_rendering_type.py +22 -0
  238. basis_theory/types/three_ds_address.py +25 -0
  239. basis_theory/types/three_ds_authentication.py +53 -0
  240. basis_theory/types/three_ds_callback_urls.py +20 -0
  241. basis_theory/types/three_ds_cardholder_account_info.py +33 -0
  242. basis_theory/types/three_ds_cardholder_authentication_info.py +21 -0
  243. basis_theory/types/three_ds_cardholder_info.py +36 -0
  244. basis_theory/types/three_ds_cardholder_phone_number.py +20 -0
  245. basis_theory/types/three_ds_device_info.py +36 -0
  246. basis_theory/types/three_ds_merchant_info.py +26 -0
  247. basis_theory/types/three_ds_merchant_risk_info.py +27 -0
  248. basis_theory/types/three_ds_message_extension.py +22 -0
  249. basis_theory/types/three_ds_method.py +20 -0
  250. basis_theory/types/three_ds_mobile_sdk_render_options.py +20 -0
  251. basis_theory/types/three_ds_prior_authentication_info.py +22 -0
  252. basis_theory/types/three_ds_purchase_info.py +26 -0
  253. basis_theory/types/three_ds_requestor_info.py +25 -0
  254. basis_theory/types/three_ds_session.py +42 -0
  255. basis_theory/types/three_ds_version.py +25 -0
  256. basis_theory/types/token.py +49 -0
  257. basis_theory/types/token_cursor_paginated_list.py +22 -0
  258. basis_theory/types/token_enrichments.py +22 -0
  259. basis_theory/types/token_enrichments_card_details.py +20 -0
  260. basis_theory/types/token_extras.py +24 -0
  261. basis_theory/types/token_intent.py +36 -0
  262. basis_theory/types/token_intent_extras.py +21 -0
  263. basis_theory/types/token_paginated_list.py +22 -0
  264. basis_theory/types/token_service_provider_details.py +34 -0
  265. basis_theory/types/update_privacy.py +20 -0
  266. basis_theory/types/update_reactor_formula_request.py +27 -0
  267. basis_theory/types/user.py +25 -0
  268. basis_theory/types/validation_problem_details.py +24 -0
  269. basis_theory/types/webhook.py +35 -0
  270. basis_theory/types/webhook_list.py +22 -0
  271. basis_theory/types/webhook_list_pagination.py +20 -0
  272. basis_theory/types/webhook_status.py +5 -0
  273. basis_theory/version.py +3 -0
  274. basis_theory/webhooks/__init__.py +7 -0
  275. basis_theory/webhooks/client.py +543 -0
  276. basis_theory/webhooks/events/__init__.py +4 -0
  277. basis_theory/webhooks/events/client.py +102 -0
  278. basis_theory/webhooks/events/raw_client.py +136 -0
  279. basis_theory/webhooks/raw_client.py +943 -0
  280. basistheoryclient-0.0.1.dist-info/LICENSE +201 -0
  281. basistheoryclient-0.0.1.dist-info/METADATA +213 -0
  282. basistheoryclient-0.0.1.dist-info/RECORD +283 -0
  283. basistheoryclient-0.0.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,823 @@
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.pagination import AsyncPager, SyncPager
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.application import Application
9
+ from ..types.async_react_response import AsyncReactResponse
10
+ from ..types.react_response import ReactResponse
11
+ from ..types.reactor import Reactor
12
+ from .raw_client import AsyncRawReactorsClient, RawReactorsClient
13
+ from .results.client import AsyncResultsClient, ResultsClient
14
+
15
+ # this is used as the default value for optional parameters
16
+ OMIT = typing.cast(typing.Any, ...)
17
+
18
+
19
+ class ReactorsClient:
20
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
21
+ self._raw_client = RawReactorsClient(client_wrapper=client_wrapper)
22
+ self.results = ResultsClient(client_wrapper=client_wrapper)
23
+
24
+ @property
25
+ def with_raw_response(self) -> RawReactorsClient:
26
+ """
27
+ Retrieves a raw implementation of this client that returns raw responses.
28
+
29
+ Returns
30
+ -------
31
+ RawReactorsClient
32
+ """
33
+ return self._raw_client
34
+
35
+ def list(
36
+ self,
37
+ *,
38
+ id: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
39
+ name: typing.Optional[str] = None,
40
+ page: typing.Optional[int] = None,
41
+ start: typing.Optional[str] = None,
42
+ size: typing.Optional[int] = None,
43
+ request_options: typing.Optional[RequestOptions] = None,
44
+ ) -> SyncPager[Reactor]:
45
+ """
46
+ Parameters
47
+ ----------
48
+ id : typing.Optional[typing.Union[str, typing.Sequence[str]]]
49
+
50
+ name : typing.Optional[str]
51
+
52
+ page : typing.Optional[int]
53
+
54
+ start : typing.Optional[str]
55
+
56
+ size : typing.Optional[int]
57
+
58
+ request_options : typing.Optional[RequestOptions]
59
+ Request-specific configuration.
60
+
61
+ Returns
62
+ -------
63
+ SyncPager[Reactor]
64
+ Success
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
+ response = client.reactors.list()
75
+ for item in response:
76
+ yield item
77
+ # alternatively, you can paginate page-by-page
78
+ for page in response.iter_pages():
79
+ yield page
80
+ """
81
+ return self._raw_client.list(
82
+ id=id, name=name, page=page, start=start, size=size, request_options=request_options
83
+ )
84
+
85
+ def create(
86
+ self,
87
+ *,
88
+ name: str,
89
+ code: str,
90
+ application: typing.Optional[Application] = OMIT,
91
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
92
+ idempotency_key: typing.Optional[str] = None,
93
+ request_options: typing.Optional[RequestOptions] = None,
94
+ ) -> Reactor:
95
+ """
96
+ Parameters
97
+ ----------
98
+ name : str
99
+
100
+ code : str
101
+
102
+ application : typing.Optional[Application]
103
+
104
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
105
+
106
+ idempotency_key : typing.Optional[str]
107
+
108
+ request_options : typing.Optional[RequestOptions]
109
+ Request-specific configuration.
110
+
111
+ Returns
112
+ -------
113
+ Reactor
114
+ Created
115
+
116
+ Examples
117
+ --------
118
+ from basis_theory import BasisTheory
119
+
120
+ client = BasisTheory(
121
+ correlation_id="YOUR_CORRELATION_ID",
122
+ api_key="YOUR_API_KEY",
123
+ )
124
+ client.reactors.create(
125
+ name="name",
126
+ code="code",
127
+ )
128
+ """
129
+ _response = self._raw_client.create(
130
+ name=name,
131
+ code=code,
132
+ application=application,
133
+ configuration=configuration,
134
+ idempotency_key=idempotency_key,
135
+ request_options=request_options,
136
+ )
137
+ return _response.data
138
+
139
+ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Reactor:
140
+ """
141
+ Parameters
142
+ ----------
143
+ id : str
144
+
145
+ request_options : typing.Optional[RequestOptions]
146
+ Request-specific configuration.
147
+
148
+ Returns
149
+ -------
150
+ Reactor
151
+ Success
152
+
153
+ Examples
154
+ --------
155
+ from basis_theory import BasisTheory
156
+
157
+ client = BasisTheory(
158
+ correlation_id="YOUR_CORRELATION_ID",
159
+ api_key="YOUR_API_KEY",
160
+ )
161
+ client.reactors.get(
162
+ id="id",
163
+ )
164
+ """
165
+ _response = self._raw_client.get(id, request_options=request_options)
166
+ return _response.data
167
+
168
+ def update(
169
+ self,
170
+ id: str,
171
+ *,
172
+ name: str,
173
+ code: str,
174
+ application: typing.Optional[Application] = OMIT,
175
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
176
+ idempotency_key: typing.Optional[str] = None,
177
+ request_options: typing.Optional[RequestOptions] = None,
178
+ ) -> Reactor:
179
+ """
180
+ Parameters
181
+ ----------
182
+ id : str
183
+
184
+ name : str
185
+
186
+ code : str
187
+
188
+ application : typing.Optional[Application]
189
+
190
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
191
+
192
+ idempotency_key : typing.Optional[str]
193
+
194
+ request_options : typing.Optional[RequestOptions]
195
+ Request-specific configuration.
196
+
197
+ Returns
198
+ -------
199
+ Reactor
200
+ Success
201
+
202
+ Examples
203
+ --------
204
+ from basis_theory import BasisTheory
205
+
206
+ client = BasisTheory(
207
+ correlation_id="YOUR_CORRELATION_ID",
208
+ api_key="YOUR_API_KEY",
209
+ )
210
+ client.reactors.update(
211
+ id="id",
212
+ name="name",
213
+ code="code",
214
+ )
215
+ """
216
+ _response = self._raw_client.update(
217
+ id,
218
+ name=name,
219
+ code=code,
220
+ application=application,
221
+ configuration=configuration,
222
+ idempotency_key=idempotency_key,
223
+ request_options=request_options,
224
+ )
225
+ return _response.data
226
+
227
+ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
228
+ """
229
+ Parameters
230
+ ----------
231
+ id : str
232
+
233
+ request_options : typing.Optional[RequestOptions]
234
+ Request-specific configuration.
235
+
236
+ Returns
237
+ -------
238
+ None
239
+
240
+ Examples
241
+ --------
242
+ from basis_theory import BasisTheory
243
+
244
+ client = BasisTheory(
245
+ correlation_id="YOUR_CORRELATION_ID",
246
+ api_key="YOUR_API_KEY",
247
+ )
248
+ client.reactors.delete(
249
+ id="id",
250
+ )
251
+ """
252
+ _response = self._raw_client.delete(id, request_options=request_options)
253
+ return _response.data
254
+
255
+ def patch(
256
+ self,
257
+ id: str,
258
+ *,
259
+ name: typing.Optional[str] = OMIT,
260
+ application: typing.Optional[Application] = OMIT,
261
+ code: typing.Optional[str] = OMIT,
262
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
263
+ idempotency_key: typing.Optional[str] = None,
264
+ request_options: typing.Optional[RequestOptions] = None,
265
+ ) -> None:
266
+ """
267
+ Parameters
268
+ ----------
269
+ id : str
270
+
271
+ name : typing.Optional[str]
272
+
273
+ application : typing.Optional[Application]
274
+
275
+ code : typing.Optional[str]
276
+
277
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
278
+
279
+ idempotency_key : typing.Optional[str]
280
+
281
+ request_options : typing.Optional[RequestOptions]
282
+ Request-specific configuration.
283
+
284
+ Returns
285
+ -------
286
+ None
287
+
288
+ Examples
289
+ --------
290
+ from basis_theory import BasisTheory
291
+
292
+ client = BasisTheory(
293
+ correlation_id="YOUR_CORRELATION_ID",
294
+ api_key="YOUR_API_KEY",
295
+ )
296
+ client.reactors.patch(
297
+ id="id",
298
+ )
299
+ """
300
+ _response = self._raw_client.patch(
301
+ id,
302
+ name=name,
303
+ application=application,
304
+ code=code,
305
+ configuration=configuration,
306
+ idempotency_key=idempotency_key,
307
+ request_options=request_options,
308
+ )
309
+ return _response.data
310
+
311
+ def react(
312
+ self,
313
+ id: str,
314
+ *,
315
+ args: typing.Optional[typing.Optional[typing.Any]] = OMIT,
316
+ callback_url: typing.Optional[str] = OMIT,
317
+ request_options: typing.Optional[RequestOptions] = None,
318
+ ) -> ReactResponse:
319
+ """
320
+ Parameters
321
+ ----------
322
+ id : str
323
+
324
+ args : typing.Optional[typing.Optional[typing.Any]]
325
+
326
+ callback_url : typing.Optional[str]
327
+
328
+ request_options : typing.Optional[RequestOptions]
329
+ Request-specific configuration.
330
+
331
+ Returns
332
+ -------
333
+ ReactResponse
334
+ Success
335
+
336
+ Examples
337
+ --------
338
+ from basis_theory import BasisTheory
339
+
340
+ client = BasisTheory(
341
+ correlation_id="YOUR_CORRELATION_ID",
342
+ api_key="YOUR_API_KEY",
343
+ )
344
+ client.reactors.react(
345
+ id="id",
346
+ )
347
+ """
348
+ _response = self._raw_client.react(id, args=args, callback_url=callback_url, request_options=request_options)
349
+ return _response.data
350
+
351
+ def react_async(
352
+ self,
353
+ id: str,
354
+ *,
355
+ args: typing.Optional[typing.Optional[typing.Any]] = OMIT,
356
+ request_options: typing.Optional[RequestOptions] = None,
357
+ ) -> AsyncReactResponse:
358
+ """
359
+ Parameters
360
+ ----------
361
+ id : str
362
+
363
+ args : typing.Optional[typing.Optional[typing.Any]]
364
+
365
+ request_options : typing.Optional[RequestOptions]
366
+ Request-specific configuration.
367
+
368
+ Returns
369
+ -------
370
+ AsyncReactResponse
371
+ Accepted
372
+
373
+ Examples
374
+ --------
375
+ from basis_theory import BasisTheory
376
+
377
+ client = BasisTheory(
378
+ correlation_id="YOUR_CORRELATION_ID",
379
+ api_key="YOUR_API_KEY",
380
+ )
381
+ client.reactors.react_async(
382
+ id="id",
383
+ )
384
+ """
385
+ _response = self._raw_client.react_async(id, args=args, request_options=request_options)
386
+ return _response.data
387
+
388
+
389
+ class AsyncReactorsClient:
390
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
391
+ self._raw_client = AsyncRawReactorsClient(client_wrapper=client_wrapper)
392
+ self.results = AsyncResultsClient(client_wrapper=client_wrapper)
393
+
394
+ @property
395
+ def with_raw_response(self) -> AsyncRawReactorsClient:
396
+ """
397
+ Retrieves a raw implementation of this client that returns raw responses.
398
+
399
+ Returns
400
+ -------
401
+ AsyncRawReactorsClient
402
+ """
403
+ return self._raw_client
404
+
405
+ async def list(
406
+ self,
407
+ *,
408
+ id: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
409
+ name: typing.Optional[str] = None,
410
+ page: typing.Optional[int] = None,
411
+ start: typing.Optional[str] = None,
412
+ size: typing.Optional[int] = None,
413
+ request_options: typing.Optional[RequestOptions] = None,
414
+ ) -> AsyncPager[Reactor]:
415
+ """
416
+ Parameters
417
+ ----------
418
+ id : typing.Optional[typing.Union[str, typing.Sequence[str]]]
419
+
420
+ name : typing.Optional[str]
421
+
422
+ page : typing.Optional[int]
423
+
424
+ start : typing.Optional[str]
425
+
426
+ size : typing.Optional[int]
427
+
428
+ request_options : typing.Optional[RequestOptions]
429
+ Request-specific configuration.
430
+
431
+ Returns
432
+ -------
433
+ AsyncPager[Reactor]
434
+ Success
435
+
436
+ Examples
437
+ --------
438
+ import asyncio
439
+
440
+ from basis_theory import AsyncBasisTheory
441
+
442
+ client = AsyncBasisTheory(
443
+ correlation_id="YOUR_CORRELATION_ID",
444
+ api_key="YOUR_API_KEY",
445
+ )
446
+
447
+
448
+ async def main() -> None:
449
+ response = await client.reactors.list()
450
+ async for item in response:
451
+ yield item
452
+
453
+ # alternatively, you can paginate page-by-page
454
+ async for page in response.iter_pages():
455
+ yield page
456
+
457
+
458
+ asyncio.run(main())
459
+ """
460
+ return await self._raw_client.list(
461
+ id=id, name=name, page=page, start=start, size=size, request_options=request_options
462
+ )
463
+
464
+ async def create(
465
+ self,
466
+ *,
467
+ name: str,
468
+ code: str,
469
+ application: typing.Optional[Application] = OMIT,
470
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
471
+ idempotency_key: typing.Optional[str] = None,
472
+ request_options: typing.Optional[RequestOptions] = None,
473
+ ) -> Reactor:
474
+ """
475
+ Parameters
476
+ ----------
477
+ name : str
478
+
479
+ code : str
480
+
481
+ application : typing.Optional[Application]
482
+
483
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
484
+
485
+ idempotency_key : typing.Optional[str]
486
+
487
+ request_options : typing.Optional[RequestOptions]
488
+ Request-specific configuration.
489
+
490
+ Returns
491
+ -------
492
+ Reactor
493
+ Created
494
+
495
+ Examples
496
+ --------
497
+ import asyncio
498
+
499
+ from basis_theory import AsyncBasisTheory
500
+
501
+ client = AsyncBasisTheory(
502
+ correlation_id="YOUR_CORRELATION_ID",
503
+ api_key="YOUR_API_KEY",
504
+ )
505
+
506
+
507
+ async def main() -> None:
508
+ await client.reactors.create(
509
+ name="name",
510
+ code="code",
511
+ )
512
+
513
+
514
+ asyncio.run(main())
515
+ """
516
+ _response = await self._raw_client.create(
517
+ name=name,
518
+ code=code,
519
+ application=application,
520
+ configuration=configuration,
521
+ idempotency_key=idempotency_key,
522
+ request_options=request_options,
523
+ )
524
+ return _response.data
525
+
526
+ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Reactor:
527
+ """
528
+ Parameters
529
+ ----------
530
+ id : str
531
+
532
+ request_options : typing.Optional[RequestOptions]
533
+ Request-specific configuration.
534
+
535
+ Returns
536
+ -------
537
+ Reactor
538
+ Success
539
+
540
+ Examples
541
+ --------
542
+ import asyncio
543
+
544
+ from basis_theory import AsyncBasisTheory
545
+
546
+ client = AsyncBasisTheory(
547
+ correlation_id="YOUR_CORRELATION_ID",
548
+ api_key="YOUR_API_KEY",
549
+ )
550
+
551
+
552
+ async def main() -> None:
553
+ await client.reactors.get(
554
+ id="id",
555
+ )
556
+
557
+
558
+ asyncio.run(main())
559
+ """
560
+ _response = await self._raw_client.get(id, request_options=request_options)
561
+ return _response.data
562
+
563
+ async def update(
564
+ self,
565
+ id: str,
566
+ *,
567
+ name: str,
568
+ code: str,
569
+ application: typing.Optional[Application] = OMIT,
570
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
571
+ idempotency_key: typing.Optional[str] = None,
572
+ request_options: typing.Optional[RequestOptions] = None,
573
+ ) -> Reactor:
574
+ """
575
+ Parameters
576
+ ----------
577
+ id : str
578
+
579
+ name : str
580
+
581
+ code : str
582
+
583
+ application : typing.Optional[Application]
584
+
585
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
586
+
587
+ idempotency_key : typing.Optional[str]
588
+
589
+ request_options : typing.Optional[RequestOptions]
590
+ Request-specific configuration.
591
+
592
+ Returns
593
+ -------
594
+ Reactor
595
+ Success
596
+
597
+ Examples
598
+ --------
599
+ import asyncio
600
+
601
+ from basis_theory import AsyncBasisTheory
602
+
603
+ client = AsyncBasisTheory(
604
+ correlation_id="YOUR_CORRELATION_ID",
605
+ api_key="YOUR_API_KEY",
606
+ )
607
+
608
+
609
+ async def main() -> None:
610
+ await client.reactors.update(
611
+ id="id",
612
+ name="name",
613
+ code="code",
614
+ )
615
+
616
+
617
+ asyncio.run(main())
618
+ """
619
+ _response = await self._raw_client.update(
620
+ id,
621
+ name=name,
622
+ code=code,
623
+ application=application,
624
+ configuration=configuration,
625
+ idempotency_key=idempotency_key,
626
+ request_options=request_options,
627
+ )
628
+ return _response.data
629
+
630
+ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
631
+ """
632
+ Parameters
633
+ ----------
634
+ id : str
635
+
636
+ request_options : typing.Optional[RequestOptions]
637
+ Request-specific configuration.
638
+
639
+ Returns
640
+ -------
641
+ None
642
+
643
+ Examples
644
+ --------
645
+ import asyncio
646
+
647
+ from basis_theory import AsyncBasisTheory
648
+
649
+ client = AsyncBasisTheory(
650
+ correlation_id="YOUR_CORRELATION_ID",
651
+ api_key="YOUR_API_KEY",
652
+ )
653
+
654
+
655
+ async def main() -> None:
656
+ await client.reactors.delete(
657
+ id="id",
658
+ )
659
+
660
+
661
+ asyncio.run(main())
662
+ """
663
+ _response = await self._raw_client.delete(id, request_options=request_options)
664
+ return _response.data
665
+
666
+ async def patch(
667
+ self,
668
+ id: str,
669
+ *,
670
+ name: typing.Optional[str] = OMIT,
671
+ application: typing.Optional[Application] = OMIT,
672
+ code: typing.Optional[str] = OMIT,
673
+ configuration: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
674
+ idempotency_key: typing.Optional[str] = None,
675
+ request_options: typing.Optional[RequestOptions] = None,
676
+ ) -> None:
677
+ """
678
+ Parameters
679
+ ----------
680
+ id : str
681
+
682
+ name : typing.Optional[str]
683
+
684
+ application : typing.Optional[Application]
685
+
686
+ code : typing.Optional[str]
687
+
688
+ configuration : typing.Optional[typing.Dict[str, typing.Optional[str]]]
689
+
690
+ idempotency_key : typing.Optional[str]
691
+
692
+ request_options : typing.Optional[RequestOptions]
693
+ Request-specific configuration.
694
+
695
+ Returns
696
+ -------
697
+ None
698
+
699
+ Examples
700
+ --------
701
+ import asyncio
702
+
703
+ from basis_theory import AsyncBasisTheory
704
+
705
+ client = AsyncBasisTheory(
706
+ correlation_id="YOUR_CORRELATION_ID",
707
+ api_key="YOUR_API_KEY",
708
+ )
709
+
710
+
711
+ async def main() -> None:
712
+ await client.reactors.patch(
713
+ id="id",
714
+ )
715
+
716
+
717
+ asyncio.run(main())
718
+ """
719
+ _response = await self._raw_client.patch(
720
+ id,
721
+ name=name,
722
+ application=application,
723
+ code=code,
724
+ configuration=configuration,
725
+ idempotency_key=idempotency_key,
726
+ request_options=request_options,
727
+ )
728
+ return _response.data
729
+
730
+ async def react(
731
+ self,
732
+ id: str,
733
+ *,
734
+ args: typing.Optional[typing.Optional[typing.Any]] = OMIT,
735
+ callback_url: typing.Optional[str] = OMIT,
736
+ request_options: typing.Optional[RequestOptions] = None,
737
+ ) -> ReactResponse:
738
+ """
739
+ Parameters
740
+ ----------
741
+ id : str
742
+
743
+ args : typing.Optional[typing.Optional[typing.Any]]
744
+
745
+ callback_url : typing.Optional[str]
746
+
747
+ request_options : typing.Optional[RequestOptions]
748
+ Request-specific configuration.
749
+
750
+ Returns
751
+ -------
752
+ ReactResponse
753
+ Success
754
+
755
+ Examples
756
+ --------
757
+ import asyncio
758
+
759
+ from basis_theory import AsyncBasisTheory
760
+
761
+ client = AsyncBasisTheory(
762
+ correlation_id="YOUR_CORRELATION_ID",
763
+ api_key="YOUR_API_KEY",
764
+ )
765
+
766
+
767
+ async def main() -> None:
768
+ await client.reactors.react(
769
+ id="id",
770
+ )
771
+
772
+
773
+ asyncio.run(main())
774
+ """
775
+ _response = await self._raw_client.react(
776
+ id, args=args, callback_url=callback_url, request_options=request_options
777
+ )
778
+ return _response.data
779
+
780
+ async def react_async(
781
+ self,
782
+ id: str,
783
+ *,
784
+ args: typing.Optional[typing.Optional[typing.Any]] = OMIT,
785
+ request_options: typing.Optional[RequestOptions] = None,
786
+ ) -> AsyncReactResponse:
787
+ """
788
+ Parameters
789
+ ----------
790
+ id : str
791
+
792
+ args : typing.Optional[typing.Optional[typing.Any]]
793
+
794
+ request_options : typing.Optional[RequestOptions]
795
+ Request-specific configuration.
796
+
797
+ Returns
798
+ -------
799
+ AsyncReactResponse
800
+ Accepted
801
+
802
+ Examples
803
+ --------
804
+ import asyncio
805
+
806
+ from basis_theory import AsyncBasisTheory
807
+
808
+ client = AsyncBasisTheory(
809
+ correlation_id="YOUR_CORRELATION_ID",
810
+ api_key="YOUR_API_KEY",
811
+ )
812
+
813
+
814
+ async def main() -> None:
815
+ await client.reactors.react_async(
816
+ id="id",
817
+ )
818
+
819
+
820
+ asyncio.run(main())
821
+ """
822
+ _response = await self._raw_client.react_async(id, args=args, request_options=request_options)
823
+ return _response.data