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,1015 @@
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.privacy import Privacy
9
+ from ..types.token import Token
10
+ from ..types.update_privacy import UpdatePrivacy
11
+ from .raw_client import AsyncRawTokensClient, RawTokensClient
12
+
13
+ # this is used as the default value for optional parameters
14
+ OMIT = typing.cast(typing.Any, ...)
15
+
16
+
17
+ class TokensClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._raw_client = RawTokensClient(client_wrapper=client_wrapper)
20
+
21
+ @property
22
+ def with_raw_response(self) -> RawTokensClient:
23
+ """
24
+ Retrieves a raw implementation of this client that returns raw responses.
25
+
26
+ Returns
27
+ -------
28
+ RawTokensClient
29
+ """
30
+ return self._raw_client
31
+
32
+ def detokenize(
33
+ self, *, request: typing.Optional[typing.Any] = None, request_options: typing.Optional[RequestOptions] = None
34
+ ) -> typing.Optional[typing.Any]:
35
+ """
36
+ Parameters
37
+ ----------
38
+ request : typing.Optional[typing.Any]
39
+
40
+ request_options : typing.Optional[RequestOptions]
41
+ Request-specific configuration.
42
+
43
+ Returns
44
+ -------
45
+ typing.Optional[typing.Any]
46
+ Success
47
+
48
+ Examples
49
+ --------
50
+ from basis_theory import BasisTheory
51
+
52
+ client = BasisTheory(
53
+ correlation_id="YOUR_CORRELATION_ID",
54
+ api_key="YOUR_API_KEY",
55
+ )
56
+ client.tokens.detokenize(
57
+ request={"key": "value"},
58
+ )
59
+ """
60
+ _response = self._raw_client.detokenize(request=request, request_options=request_options)
61
+ return _response.data
62
+
63
+ def tokenize(
64
+ self,
65
+ *,
66
+ request: typing.Optional[typing.Any] = None,
67
+ idempotency_key: typing.Optional[str] = None,
68
+ request_options: typing.Optional[RequestOptions] = None,
69
+ ) -> typing.Optional[typing.Any]:
70
+ """
71
+ Parameters
72
+ ----------
73
+ request : typing.Optional[typing.Any]
74
+
75
+ idempotency_key : typing.Optional[str]
76
+
77
+ request_options : typing.Optional[RequestOptions]
78
+ Request-specific configuration.
79
+
80
+ Returns
81
+ -------
82
+ typing.Optional[typing.Any]
83
+ Success
84
+
85
+ Examples
86
+ --------
87
+ from basis_theory import BasisTheory
88
+
89
+ client = BasisTheory(
90
+ correlation_id="YOUR_CORRELATION_ID",
91
+ api_key="YOUR_API_KEY",
92
+ )
93
+ client.tokens.tokenize(
94
+ request={"key": "value"},
95
+ )
96
+ """
97
+ _response = self._raw_client.tokenize(
98
+ request=request, idempotency_key=idempotency_key, request_options=request_options
99
+ )
100
+ return _response.data
101
+
102
+ def list(
103
+ self,
104
+ *,
105
+ id: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
106
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
107
+ page: typing.Optional[int] = None,
108
+ start: typing.Optional[str] = None,
109
+ size: typing.Optional[int] = None,
110
+ request_options: typing.Optional[RequestOptions] = None,
111
+ ) -> SyncPager[Token]:
112
+ """
113
+ Parameters
114
+ ----------
115
+ id : typing.Optional[typing.Union[str, typing.Sequence[str]]]
116
+
117
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
118
+
119
+ page : typing.Optional[int]
120
+
121
+ start : typing.Optional[str]
122
+
123
+ size : typing.Optional[int]
124
+
125
+ request_options : typing.Optional[RequestOptions]
126
+ Request-specific configuration.
127
+
128
+ Returns
129
+ -------
130
+ SyncPager[Token]
131
+ Success
132
+
133
+ Examples
134
+ --------
135
+ from basis_theory import BasisTheory
136
+
137
+ client = BasisTheory(
138
+ correlation_id="YOUR_CORRELATION_ID",
139
+ api_key="YOUR_API_KEY",
140
+ )
141
+ response = client.tokens.list()
142
+ for item in response:
143
+ yield item
144
+ # alternatively, you can paginate page-by-page
145
+ for page in response.iter_pages():
146
+ yield page
147
+ """
148
+ return self._raw_client.list(
149
+ id=id, metadata=metadata, page=page, start=start, size=size, request_options=request_options
150
+ )
151
+
152
+ def create(
153
+ self,
154
+ *,
155
+ id: typing.Optional[str] = OMIT,
156
+ type: typing.Optional[str] = OMIT,
157
+ data: typing.Optional[typing.Optional[typing.Any]] = OMIT,
158
+ encrypted: typing.Optional[str] = OMIT,
159
+ privacy: typing.Optional[Privacy] = OMIT,
160
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
161
+ search_indexes: typing.Optional[typing.Sequence[str]] = OMIT,
162
+ fingerprint_expression: typing.Optional[str] = OMIT,
163
+ mask: typing.Optional[typing.Optional[typing.Any]] = OMIT,
164
+ deduplicate_token: typing.Optional[bool] = OMIT,
165
+ expires_at: typing.Optional[str] = OMIT,
166
+ containers: typing.Optional[typing.Sequence[str]] = OMIT,
167
+ token_intent_id: typing.Optional[str] = OMIT,
168
+ idempotency_key: typing.Optional[str] = None,
169
+ request_options: typing.Optional[RequestOptions] = None,
170
+ ) -> Token:
171
+ """
172
+ Parameters
173
+ ----------
174
+ id : typing.Optional[str]
175
+
176
+ type : typing.Optional[str]
177
+
178
+ data : typing.Optional[typing.Optional[typing.Any]]
179
+
180
+ encrypted : typing.Optional[str]
181
+
182
+ privacy : typing.Optional[Privacy]
183
+
184
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
185
+
186
+ search_indexes : typing.Optional[typing.Sequence[str]]
187
+
188
+ fingerprint_expression : typing.Optional[str]
189
+
190
+ mask : typing.Optional[typing.Optional[typing.Any]]
191
+
192
+ deduplicate_token : typing.Optional[bool]
193
+
194
+ expires_at : typing.Optional[str]
195
+
196
+ containers : typing.Optional[typing.Sequence[str]]
197
+
198
+ token_intent_id : typing.Optional[str]
199
+
200
+ idempotency_key : typing.Optional[str]
201
+
202
+ request_options : typing.Optional[RequestOptions]
203
+ Request-specific configuration.
204
+
205
+ Returns
206
+ -------
207
+ Token
208
+ Created
209
+
210
+ Examples
211
+ --------
212
+ from basis_theory import BasisTheory
213
+
214
+ client = BasisTheory(
215
+ correlation_id="YOUR_CORRELATION_ID",
216
+ api_key="YOUR_API_KEY",
217
+ )
218
+ client.tokens.create()
219
+ """
220
+ _response = self._raw_client.create(
221
+ id=id,
222
+ type=type,
223
+ data=data,
224
+ encrypted=encrypted,
225
+ privacy=privacy,
226
+ metadata=metadata,
227
+ search_indexes=search_indexes,
228
+ fingerprint_expression=fingerprint_expression,
229
+ mask=mask,
230
+ deduplicate_token=deduplicate_token,
231
+ expires_at=expires_at,
232
+ containers=containers,
233
+ token_intent_id=token_intent_id,
234
+ idempotency_key=idempotency_key,
235
+ request_options=request_options,
236
+ )
237
+ return _response.data
238
+
239
+ def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Token:
240
+ """
241
+ Parameters
242
+ ----------
243
+ id : str
244
+
245
+ request_options : typing.Optional[RequestOptions]
246
+ Request-specific configuration.
247
+
248
+ Returns
249
+ -------
250
+ Token
251
+ Success
252
+
253
+ Examples
254
+ --------
255
+ from basis_theory import BasisTheory
256
+
257
+ client = BasisTheory(
258
+ correlation_id="YOUR_CORRELATION_ID",
259
+ api_key="YOUR_API_KEY",
260
+ )
261
+ client.tokens.get(
262
+ id="id",
263
+ )
264
+ """
265
+ _response = self._raw_client.get(id, request_options=request_options)
266
+ return _response.data
267
+
268
+ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
269
+ """
270
+ Parameters
271
+ ----------
272
+ id : str
273
+
274
+ request_options : typing.Optional[RequestOptions]
275
+ Request-specific configuration.
276
+
277
+ Returns
278
+ -------
279
+ None
280
+
281
+ Examples
282
+ --------
283
+ from basis_theory import BasisTheory
284
+
285
+ client = BasisTheory(
286
+ correlation_id="YOUR_CORRELATION_ID",
287
+ api_key="YOUR_API_KEY",
288
+ )
289
+ client.tokens.delete(
290
+ id="id",
291
+ )
292
+ """
293
+ _response = self._raw_client.delete(id, request_options=request_options)
294
+ return _response.data
295
+
296
+ def update(
297
+ self,
298
+ id: str,
299
+ *,
300
+ data: typing.Optional[typing.Optional[typing.Any]] = OMIT,
301
+ privacy: typing.Optional[UpdatePrivacy] = OMIT,
302
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
303
+ search_indexes: typing.Optional[typing.Sequence[str]] = OMIT,
304
+ fingerprint_expression: typing.Optional[str] = OMIT,
305
+ mask: typing.Optional[typing.Optional[typing.Any]] = OMIT,
306
+ expires_at: typing.Optional[str] = OMIT,
307
+ deduplicate_token: typing.Optional[bool] = OMIT,
308
+ containers: typing.Optional[typing.Sequence[str]] = OMIT,
309
+ idempotency_key: typing.Optional[str] = None,
310
+ request_options: typing.Optional[RequestOptions] = None,
311
+ ) -> Token:
312
+ """
313
+ Parameters
314
+ ----------
315
+ id : str
316
+
317
+ data : typing.Optional[typing.Optional[typing.Any]]
318
+
319
+ privacy : typing.Optional[UpdatePrivacy]
320
+
321
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
322
+
323
+ search_indexes : typing.Optional[typing.Sequence[str]]
324
+
325
+ fingerprint_expression : typing.Optional[str]
326
+
327
+ mask : typing.Optional[typing.Optional[typing.Any]]
328
+
329
+ expires_at : typing.Optional[str]
330
+
331
+ deduplicate_token : typing.Optional[bool]
332
+
333
+ containers : typing.Optional[typing.Sequence[str]]
334
+
335
+ idempotency_key : typing.Optional[str]
336
+
337
+ request_options : typing.Optional[RequestOptions]
338
+ Request-specific configuration.
339
+
340
+ Returns
341
+ -------
342
+ Token
343
+ Success
344
+
345
+ Examples
346
+ --------
347
+ from basis_theory import BasisTheory
348
+
349
+ client = BasisTheory(
350
+ correlation_id="YOUR_CORRELATION_ID",
351
+ api_key="YOUR_API_KEY",
352
+ )
353
+ client.tokens.update(
354
+ id="id",
355
+ )
356
+ """
357
+ _response = self._raw_client.update(
358
+ id,
359
+ data=data,
360
+ privacy=privacy,
361
+ metadata=metadata,
362
+ search_indexes=search_indexes,
363
+ fingerprint_expression=fingerprint_expression,
364
+ mask=mask,
365
+ expires_at=expires_at,
366
+ deduplicate_token=deduplicate_token,
367
+ containers=containers,
368
+ idempotency_key=idempotency_key,
369
+ request_options=request_options,
370
+ )
371
+ return _response.data
372
+
373
+ def list_v2(
374
+ self,
375
+ *,
376
+ type: typing.Optional[str] = None,
377
+ container: typing.Optional[str] = None,
378
+ fingerprint: typing.Optional[str] = None,
379
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
380
+ start: typing.Optional[str] = None,
381
+ size: typing.Optional[int] = None,
382
+ request_options: typing.Optional[RequestOptions] = None,
383
+ ) -> SyncPager[Token]:
384
+ """
385
+ Parameters
386
+ ----------
387
+ type : typing.Optional[str]
388
+
389
+ container : typing.Optional[str]
390
+
391
+ fingerprint : typing.Optional[str]
392
+
393
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
394
+
395
+ start : typing.Optional[str]
396
+
397
+ size : typing.Optional[int]
398
+
399
+ request_options : typing.Optional[RequestOptions]
400
+ Request-specific configuration.
401
+
402
+ Returns
403
+ -------
404
+ SyncPager[Token]
405
+ Success
406
+
407
+ Examples
408
+ --------
409
+ from basis_theory import BasisTheory
410
+
411
+ client = BasisTheory(
412
+ correlation_id="YOUR_CORRELATION_ID",
413
+ api_key="YOUR_API_KEY",
414
+ )
415
+ response = client.tokens.list_v2()
416
+ for item in response:
417
+ yield item
418
+ # alternatively, you can paginate page-by-page
419
+ for page in response.iter_pages():
420
+ yield page
421
+ """
422
+ return self._raw_client.list_v2(
423
+ type=type,
424
+ container=container,
425
+ fingerprint=fingerprint,
426
+ metadata=metadata,
427
+ start=start,
428
+ size=size,
429
+ request_options=request_options,
430
+ )
431
+
432
+ def search_v2(
433
+ self,
434
+ *,
435
+ query: typing.Optional[str] = OMIT,
436
+ start: typing.Optional[str] = OMIT,
437
+ size: typing.Optional[int] = OMIT,
438
+ idempotency_key: typing.Optional[str] = None,
439
+ request_options: typing.Optional[RequestOptions] = None,
440
+ ) -> SyncPager[Token]:
441
+ """
442
+ Parameters
443
+ ----------
444
+ query : typing.Optional[str]
445
+
446
+ start : typing.Optional[str]
447
+
448
+ size : typing.Optional[int]
449
+
450
+ idempotency_key : typing.Optional[str]
451
+
452
+ request_options : typing.Optional[RequestOptions]
453
+ Request-specific configuration.
454
+
455
+ Returns
456
+ -------
457
+ SyncPager[Token]
458
+ Success
459
+
460
+ Examples
461
+ --------
462
+ from basis_theory import BasisTheory
463
+
464
+ client = BasisTheory(
465
+ correlation_id="YOUR_CORRELATION_ID",
466
+ api_key="YOUR_API_KEY",
467
+ )
468
+ response = client.tokens.search_v2()
469
+ for item in response:
470
+ yield item
471
+ # alternatively, you can paginate page-by-page
472
+ for page in response.iter_pages():
473
+ yield page
474
+ """
475
+ return self._raw_client.search_v2(
476
+ query=query, start=start, size=size, idempotency_key=idempotency_key, request_options=request_options
477
+ )
478
+
479
+
480
+ class AsyncTokensClient:
481
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
482
+ self._raw_client = AsyncRawTokensClient(client_wrapper=client_wrapper)
483
+
484
+ @property
485
+ def with_raw_response(self) -> AsyncRawTokensClient:
486
+ """
487
+ Retrieves a raw implementation of this client that returns raw responses.
488
+
489
+ Returns
490
+ -------
491
+ AsyncRawTokensClient
492
+ """
493
+ return self._raw_client
494
+
495
+ async def detokenize(
496
+ self, *, request: typing.Optional[typing.Any] = None, request_options: typing.Optional[RequestOptions] = None
497
+ ) -> typing.Optional[typing.Any]:
498
+ """
499
+ Parameters
500
+ ----------
501
+ request : typing.Optional[typing.Any]
502
+
503
+ request_options : typing.Optional[RequestOptions]
504
+ Request-specific configuration.
505
+
506
+ Returns
507
+ -------
508
+ typing.Optional[typing.Any]
509
+ Success
510
+
511
+ Examples
512
+ --------
513
+ import asyncio
514
+
515
+ from basis_theory import AsyncBasisTheory
516
+
517
+ client = AsyncBasisTheory(
518
+ correlation_id="YOUR_CORRELATION_ID",
519
+ api_key="YOUR_API_KEY",
520
+ )
521
+
522
+
523
+ async def main() -> None:
524
+ await client.tokens.detokenize(
525
+ request={"key": "value"},
526
+ )
527
+
528
+
529
+ asyncio.run(main())
530
+ """
531
+ _response = await self._raw_client.detokenize(request=request, request_options=request_options)
532
+ return _response.data
533
+
534
+ async def tokenize(
535
+ self,
536
+ *,
537
+ request: typing.Optional[typing.Any] = None,
538
+ idempotency_key: typing.Optional[str] = None,
539
+ request_options: typing.Optional[RequestOptions] = None,
540
+ ) -> typing.Optional[typing.Any]:
541
+ """
542
+ Parameters
543
+ ----------
544
+ request : typing.Optional[typing.Any]
545
+
546
+ idempotency_key : typing.Optional[str]
547
+
548
+ request_options : typing.Optional[RequestOptions]
549
+ Request-specific configuration.
550
+
551
+ Returns
552
+ -------
553
+ typing.Optional[typing.Any]
554
+ Success
555
+
556
+ Examples
557
+ --------
558
+ import asyncio
559
+
560
+ from basis_theory import AsyncBasisTheory
561
+
562
+ client = AsyncBasisTheory(
563
+ correlation_id="YOUR_CORRELATION_ID",
564
+ api_key="YOUR_API_KEY",
565
+ )
566
+
567
+
568
+ async def main() -> None:
569
+ await client.tokens.tokenize(
570
+ request={"key": "value"},
571
+ )
572
+
573
+
574
+ asyncio.run(main())
575
+ """
576
+ _response = await self._raw_client.tokenize(
577
+ request=request, idempotency_key=idempotency_key, request_options=request_options
578
+ )
579
+ return _response.data
580
+
581
+ async def list(
582
+ self,
583
+ *,
584
+ id: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
585
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
586
+ page: typing.Optional[int] = None,
587
+ start: typing.Optional[str] = None,
588
+ size: typing.Optional[int] = None,
589
+ request_options: typing.Optional[RequestOptions] = None,
590
+ ) -> AsyncPager[Token]:
591
+ """
592
+ Parameters
593
+ ----------
594
+ id : typing.Optional[typing.Union[str, typing.Sequence[str]]]
595
+
596
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
597
+
598
+ page : typing.Optional[int]
599
+
600
+ start : typing.Optional[str]
601
+
602
+ size : typing.Optional[int]
603
+
604
+ request_options : typing.Optional[RequestOptions]
605
+ Request-specific configuration.
606
+
607
+ Returns
608
+ -------
609
+ AsyncPager[Token]
610
+ Success
611
+
612
+ Examples
613
+ --------
614
+ import asyncio
615
+
616
+ from basis_theory import AsyncBasisTheory
617
+
618
+ client = AsyncBasisTheory(
619
+ correlation_id="YOUR_CORRELATION_ID",
620
+ api_key="YOUR_API_KEY",
621
+ )
622
+
623
+
624
+ async def main() -> None:
625
+ response = await client.tokens.list()
626
+ async for item in response:
627
+ yield item
628
+
629
+ # alternatively, you can paginate page-by-page
630
+ async for page in response.iter_pages():
631
+ yield page
632
+
633
+
634
+ asyncio.run(main())
635
+ """
636
+ return await self._raw_client.list(
637
+ id=id, metadata=metadata, page=page, start=start, size=size, request_options=request_options
638
+ )
639
+
640
+ async def create(
641
+ self,
642
+ *,
643
+ id: typing.Optional[str] = OMIT,
644
+ type: typing.Optional[str] = OMIT,
645
+ data: typing.Optional[typing.Optional[typing.Any]] = OMIT,
646
+ encrypted: typing.Optional[str] = OMIT,
647
+ privacy: typing.Optional[Privacy] = OMIT,
648
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
649
+ search_indexes: typing.Optional[typing.Sequence[str]] = OMIT,
650
+ fingerprint_expression: typing.Optional[str] = OMIT,
651
+ mask: typing.Optional[typing.Optional[typing.Any]] = OMIT,
652
+ deduplicate_token: typing.Optional[bool] = OMIT,
653
+ expires_at: typing.Optional[str] = OMIT,
654
+ containers: typing.Optional[typing.Sequence[str]] = OMIT,
655
+ token_intent_id: typing.Optional[str] = OMIT,
656
+ idempotency_key: typing.Optional[str] = None,
657
+ request_options: typing.Optional[RequestOptions] = None,
658
+ ) -> Token:
659
+ """
660
+ Parameters
661
+ ----------
662
+ id : typing.Optional[str]
663
+
664
+ type : typing.Optional[str]
665
+
666
+ data : typing.Optional[typing.Optional[typing.Any]]
667
+
668
+ encrypted : typing.Optional[str]
669
+
670
+ privacy : typing.Optional[Privacy]
671
+
672
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
673
+
674
+ search_indexes : typing.Optional[typing.Sequence[str]]
675
+
676
+ fingerprint_expression : typing.Optional[str]
677
+
678
+ mask : typing.Optional[typing.Optional[typing.Any]]
679
+
680
+ deduplicate_token : typing.Optional[bool]
681
+
682
+ expires_at : typing.Optional[str]
683
+
684
+ containers : typing.Optional[typing.Sequence[str]]
685
+
686
+ token_intent_id : typing.Optional[str]
687
+
688
+ idempotency_key : typing.Optional[str]
689
+
690
+ request_options : typing.Optional[RequestOptions]
691
+ Request-specific configuration.
692
+
693
+ Returns
694
+ -------
695
+ Token
696
+ Created
697
+
698
+ Examples
699
+ --------
700
+ import asyncio
701
+
702
+ from basis_theory import AsyncBasisTheory
703
+
704
+ client = AsyncBasisTheory(
705
+ correlation_id="YOUR_CORRELATION_ID",
706
+ api_key="YOUR_API_KEY",
707
+ )
708
+
709
+
710
+ async def main() -> None:
711
+ await client.tokens.create()
712
+
713
+
714
+ asyncio.run(main())
715
+ """
716
+ _response = await self._raw_client.create(
717
+ id=id,
718
+ type=type,
719
+ data=data,
720
+ encrypted=encrypted,
721
+ privacy=privacy,
722
+ metadata=metadata,
723
+ search_indexes=search_indexes,
724
+ fingerprint_expression=fingerprint_expression,
725
+ mask=mask,
726
+ deduplicate_token=deduplicate_token,
727
+ expires_at=expires_at,
728
+ containers=containers,
729
+ token_intent_id=token_intent_id,
730
+ idempotency_key=idempotency_key,
731
+ request_options=request_options,
732
+ )
733
+ return _response.data
734
+
735
+ async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Token:
736
+ """
737
+ Parameters
738
+ ----------
739
+ id : str
740
+
741
+ request_options : typing.Optional[RequestOptions]
742
+ Request-specific configuration.
743
+
744
+ Returns
745
+ -------
746
+ Token
747
+ Success
748
+
749
+ Examples
750
+ --------
751
+ import asyncio
752
+
753
+ from basis_theory import AsyncBasisTheory
754
+
755
+ client = AsyncBasisTheory(
756
+ correlation_id="YOUR_CORRELATION_ID",
757
+ api_key="YOUR_API_KEY",
758
+ )
759
+
760
+
761
+ async def main() -> None:
762
+ await client.tokens.get(
763
+ id="id",
764
+ )
765
+
766
+
767
+ asyncio.run(main())
768
+ """
769
+ _response = await self._raw_client.get(id, request_options=request_options)
770
+ return _response.data
771
+
772
+ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
773
+ """
774
+ Parameters
775
+ ----------
776
+ id : str
777
+
778
+ request_options : typing.Optional[RequestOptions]
779
+ Request-specific configuration.
780
+
781
+ Returns
782
+ -------
783
+ None
784
+
785
+ Examples
786
+ --------
787
+ import asyncio
788
+
789
+ from basis_theory import AsyncBasisTheory
790
+
791
+ client = AsyncBasisTheory(
792
+ correlation_id="YOUR_CORRELATION_ID",
793
+ api_key="YOUR_API_KEY",
794
+ )
795
+
796
+
797
+ async def main() -> None:
798
+ await client.tokens.delete(
799
+ id="id",
800
+ )
801
+
802
+
803
+ asyncio.run(main())
804
+ """
805
+ _response = await self._raw_client.delete(id, request_options=request_options)
806
+ return _response.data
807
+
808
+ async def update(
809
+ self,
810
+ id: str,
811
+ *,
812
+ data: typing.Optional[typing.Optional[typing.Any]] = OMIT,
813
+ privacy: typing.Optional[UpdatePrivacy] = OMIT,
814
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
815
+ search_indexes: typing.Optional[typing.Sequence[str]] = OMIT,
816
+ fingerprint_expression: typing.Optional[str] = OMIT,
817
+ mask: typing.Optional[typing.Optional[typing.Any]] = OMIT,
818
+ expires_at: typing.Optional[str] = OMIT,
819
+ deduplicate_token: typing.Optional[bool] = OMIT,
820
+ containers: typing.Optional[typing.Sequence[str]] = OMIT,
821
+ idempotency_key: typing.Optional[str] = None,
822
+ request_options: typing.Optional[RequestOptions] = None,
823
+ ) -> Token:
824
+ """
825
+ Parameters
826
+ ----------
827
+ id : str
828
+
829
+ data : typing.Optional[typing.Optional[typing.Any]]
830
+
831
+ privacy : typing.Optional[UpdatePrivacy]
832
+
833
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
834
+
835
+ search_indexes : typing.Optional[typing.Sequence[str]]
836
+
837
+ fingerprint_expression : typing.Optional[str]
838
+
839
+ mask : typing.Optional[typing.Optional[typing.Any]]
840
+
841
+ expires_at : typing.Optional[str]
842
+
843
+ deduplicate_token : typing.Optional[bool]
844
+
845
+ containers : typing.Optional[typing.Sequence[str]]
846
+
847
+ idempotency_key : typing.Optional[str]
848
+
849
+ request_options : typing.Optional[RequestOptions]
850
+ Request-specific configuration.
851
+
852
+ Returns
853
+ -------
854
+ Token
855
+ Success
856
+
857
+ Examples
858
+ --------
859
+ import asyncio
860
+
861
+ from basis_theory import AsyncBasisTheory
862
+
863
+ client = AsyncBasisTheory(
864
+ correlation_id="YOUR_CORRELATION_ID",
865
+ api_key="YOUR_API_KEY",
866
+ )
867
+
868
+
869
+ async def main() -> None:
870
+ await client.tokens.update(
871
+ id="id",
872
+ )
873
+
874
+
875
+ asyncio.run(main())
876
+ """
877
+ _response = await self._raw_client.update(
878
+ id,
879
+ data=data,
880
+ privacy=privacy,
881
+ metadata=metadata,
882
+ search_indexes=search_indexes,
883
+ fingerprint_expression=fingerprint_expression,
884
+ mask=mask,
885
+ expires_at=expires_at,
886
+ deduplicate_token=deduplicate_token,
887
+ containers=containers,
888
+ idempotency_key=idempotency_key,
889
+ request_options=request_options,
890
+ )
891
+ return _response.data
892
+
893
+ async def list_v2(
894
+ self,
895
+ *,
896
+ type: typing.Optional[str] = None,
897
+ container: typing.Optional[str] = None,
898
+ fingerprint: typing.Optional[str] = None,
899
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None,
900
+ start: typing.Optional[str] = None,
901
+ size: typing.Optional[int] = None,
902
+ request_options: typing.Optional[RequestOptions] = None,
903
+ ) -> AsyncPager[Token]:
904
+ """
905
+ Parameters
906
+ ----------
907
+ type : typing.Optional[str]
908
+
909
+ container : typing.Optional[str]
910
+
911
+ fingerprint : typing.Optional[str]
912
+
913
+ metadata : typing.Optional[typing.Dict[str, typing.Optional[str]]]
914
+
915
+ start : typing.Optional[str]
916
+
917
+ size : typing.Optional[int]
918
+
919
+ request_options : typing.Optional[RequestOptions]
920
+ Request-specific configuration.
921
+
922
+ Returns
923
+ -------
924
+ AsyncPager[Token]
925
+ Success
926
+
927
+ Examples
928
+ --------
929
+ import asyncio
930
+
931
+ from basis_theory import AsyncBasisTheory
932
+
933
+ client = AsyncBasisTheory(
934
+ correlation_id="YOUR_CORRELATION_ID",
935
+ api_key="YOUR_API_KEY",
936
+ )
937
+
938
+
939
+ async def main() -> None:
940
+ response = await client.tokens.list_v2()
941
+ async for item in response:
942
+ yield item
943
+
944
+ # alternatively, you can paginate page-by-page
945
+ async for page in response.iter_pages():
946
+ yield page
947
+
948
+
949
+ asyncio.run(main())
950
+ """
951
+ return await self._raw_client.list_v2(
952
+ type=type,
953
+ container=container,
954
+ fingerprint=fingerprint,
955
+ metadata=metadata,
956
+ start=start,
957
+ size=size,
958
+ request_options=request_options,
959
+ )
960
+
961
+ async def search_v2(
962
+ self,
963
+ *,
964
+ query: typing.Optional[str] = OMIT,
965
+ start: typing.Optional[str] = OMIT,
966
+ size: typing.Optional[int] = OMIT,
967
+ idempotency_key: typing.Optional[str] = None,
968
+ request_options: typing.Optional[RequestOptions] = None,
969
+ ) -> AsyncPager[Token]:
970
+ """
971
+ Parameters
972
+ ----------
973
+ query : typing.Optional[str]
974
+
975
+ start : typing.Optional[str]
976
+
977
+ size : typing.Optional[int]
978
+
979
+ idempotency_key : typing.Optional[str]
980
+
981
+ request_options : typing.Optional[RequestOptions]
982
+ Request-specific configuration.
983
+
984
+ Returns
985
+ -------
986
+ AsyncPager[Token]
987
+ Success
988
+
989
+ Examples
990
+ --------
991
+ import asyncio
992
+
993
+ from basis_theory import AsyncBasisTheory
994
+
995
+ client = AsyncBasisTheory(
996
+ correlation_id="YOUR_CORRELATION_ID",
997
+ api_key="YOUR_API_KEY",
998
+ )
999
+
1000
+
1001
+ async def main() -> None:
1002
+ response = await client.tokens.search_v2()
1003
+ async for item in response:
1004
+ yield item
1005
+
1006
+ # alternatively, you can paginate page-by-page
1007
+ async for page in response.iter_pages():
1008
+ yield page
1009
+
1010
+
1011
+ asyncio.run(main())
1012
+ """
1013
+ return await self._raw_client.search_v2(
1014
+ query=query, start=start, size=size, idempotency_key=idempotency_key, request_options=request_options
1015
+ )