BasisTheoryClient 2.1.0__tar.gz → 2.2.0__tar.gz
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.
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/PKG-INFO +1 -1
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/pyproject.toml +1 -1
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/__init__.py +12 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/real_time/client.py +10 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/client.py +4 -0
- basistheoryclient-2.2.0/src/basis_theory/documents/__init__.py +5 -0
- basistheoryclient-2.2.0/src/basis_theory/documents/client.py +511 -0
- basistheoryclient-2.2.0/src/basis_theory/documents/data/client.py +150 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/network_tokens/client.py +398 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/threeds/sessions/client.py +13 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tokens/client.py +0 -244
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/__init__.py +10 -0
- basistheoryclient-2.2.0/src/basis_theory/types/create_account_updater_job_request.py +22 -0
- basistheoryclient-2.2.0/src/basis_theory/types/create_document_request.py +19 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/create_three_ds_session_response.py +1 -0
- basistheoryclient-2.2.0/src/basis_theory/types/document.py +25 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/network_token.py +5 -0
- basistheoryclient-2.2.0/src/basis_theory/types/network_token_extras.py +19 -0
- basistheoryclient-2.2.0/src/basis_theory/types/three_ds_callback_urls.py +20 -0
- basistheoryclient-2.2.0/src/basis_theory/webhooks/events/__init__.py +2 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/README.md +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/jobs/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/jobs/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/account_updater/real_time/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/domain/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/domain/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/session/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/apple_pay/session/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/application_keys/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/application_keys/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/application_templates/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/application_templates/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/applications/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/applications/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/domain/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/domain/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/session/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/apple_pay/session/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/connection/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/api_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/client_wrapper.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/datetime_utils.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/file.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/http_client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/jsonable_encoder.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/pagination.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/pydantic_utilities.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/query_encoder.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/remove_none_from_dict.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/request_options.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/core/serialization.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/enrichments → basistheoryclient-2.2.0/src/basis_theory/documents/data}/__init__.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/googlepay → basistheoryclient-2.2.0/src/basis_theory/enrichments}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/enrichments/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/environment.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/bad_request_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/conflict_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/forbidden_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/internal_server_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/not_found_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/service_unavailable_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/unauthorized_error.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/errors/unprocessable_entity_error.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/keys → basistheoryclient-2.2.0/src/basis_theory/googlepay}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/googlepay/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/logs → basistheoryclient-2.2.0/src/basis_theory/keys}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/keys/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/network_tokens → basistheoryclient-2.2.0/src/basis_theory/logs}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/logs/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/permissions → basistheoryclient-2.2.0/src/basis_theory/network_tokens}/__init__.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/proxies → basistheoryclient-2.2.0/src/basis_theory/permissions}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/permissions/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/reactors/results → basistheoryclient-2.2.0/src/basis_theory/proxies}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/proxies/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/py.typed +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/reactors/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/reactors/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/roles → basistheoryclient-2.2.0/src/basis_theory/reactors/results}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/reactors/results/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/sessions → basistheoryclient-2.2.0/src/basis_theory/roles}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/roles/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tenants/connections → basistheoryclient-2.2.0/src/basis_theory/sessions}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/sessions/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tenants/invitations → basistheoryclient-2.2.0/src/basis_theory/tenants/connections}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/connections/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tenants/members → basistheoryclient-2.2.0/src/basis_theory/tenants/invitations}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/invitations/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tenants/owner → basistheoryclient-2.2.0/src/basis_theory/tenants/members}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/members/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tenants/self_ → basistheoryclient-2.2.0/src/basis_theory/tenants/owner}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/owner/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/threeds/sessions → basistheoryclient-2.2.0/src/basis_theory/tenants/self_}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/tenants/self_/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/threeds/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/threeds/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/token_intents → basistheoryclient-2.2.0/src/basis_theory/threeds/sessions}/__init__.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/tokens → basistheoryclient-2.2.0/src/basis_theory/token_intents}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/token_intents/client.py +0 -0
- {basistheoryclient-2.1.0/src/basis_theory/webhooks/events → basistheoryclient-2.2.0/src/basis_theory/tokens}/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/access_rule.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/account_updater_job.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/account_updater_job_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/account_updater_job_list_pagination.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/account_updater_job_status.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/account_updater_real_time_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/additional_card_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/address.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_create_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_create_token_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_domain_deregistration_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_domain_registration_list_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_domain_registration_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_domain_registration_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_method_token.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_session_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_token.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/apple_pay_tokenize_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/application.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/application_key.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/application_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/application_template.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/assurance_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/async_react_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/authenticate_three_ds_session_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/authentication.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/authentication_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bank_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bank_verification_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bin_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bin_details_bank.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bin_details_country.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/bin_details_product.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/card.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/card_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/card_issuer.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/card_issuer_country.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/cardholder_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/client_encryption_key_metadata_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/client_encryption_key_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/condition.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/create_reactor_formula_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/create_session_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/create_tenant_connection_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/create_token_intent_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/cursor_pagination.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/domain_registration_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/event_types.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_applications.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_logs.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_permissions.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_proxies.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_reactor_formulas.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_reactors.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_tenant_invitations.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_tenant_members.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_tokens.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/get_tokens_v2.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/google_pay_tokenize_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/google_payment_method_token.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/header.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/intermediate_signing_key.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/log.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/log_entity_type.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/log_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/network_token_cryptogram.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/pagination.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/payment_data.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/permission.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/privacy.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/problem_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/proxy.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/proxy_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/proxy_transform.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/public_key.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/react_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor_formula.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor_formula_configuration.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor_formula_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor_formula_request_parameter.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/reactor_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/role.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/string_string_key_value_pair.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/submerchant_authentication_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_connection_options.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_invitation_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_invitation_response_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_invitation_status.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_member_response.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_member_response_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/tenant_usage_report.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_acs_rendering_type.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_address.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_authentication.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_cardholder_account_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_cardholder_authentication_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_cardholder_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_cardholder_phone_number.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_device_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_merchant_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_merchant_risk_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_message_extension.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_method.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_mobile_sdk_render_options.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_prior_authentication_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_purchase_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_requestor_info.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_session.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/three_ds_version.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_cursor_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_enrichments.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_enrichments_card_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_extras.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_intent.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_intent_extras.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_paginated_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/token_service_provider_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/update_privacy.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/update_reactor_formula_request.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/user.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/validation_problem_details.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/webhook.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/webhook_list.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/webhook_list_pagination.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/types/webhook_status.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/version.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/webhooks/__init__.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/webhooks/client.py +0 -0
- {basistheoryclient-2.1.0 → basistheoryclient-2.2.0}/src/basis_theory/webhooks/events/client.py +0 -0
|
@@ -42,12 +42,15 @@ from .types import (
|
|
|
42
42
|
ClientEncryptionKeyMetadataResponse,
|
|
43
43
|
ClientEncryptionKeyResponse,
|
|
44
44
|
Condition,
|
|
45
|
+
CreateAccountUpdaterJobRequest,
|
|
46
|
+
CreateDocumentRequest,
|
|
45
47
|
CreateReactorFormulaRequest,
|
|
46
48
|
CreateSessionResponse,
|
|
47
49
|
CreateTenantConnectionResponse,
|
|
48
50
|
CreateThreeDsSessionResponse,
|
|
49
51
|
CreateTokenIntentResponse,
|
|
50
52
|
CursorPagination,
|
|
53
|
+
Document,
|
|
51
54
|
DomainRegistrationResponse,
|
|
52
55
|
EventTypes,
|
|
53
56
|
GetApplications,
|
|
@@ -69,6 +72,7 @@ from .types import (
|
|
|
69
72
|
LogPaginatedList,
|
|
70
73
|
NetworkToken,
|
|
71
74
|
NetworkTokenCryptogram,
|
|
75
|
+
NetworkTokenExtras,
|
|
72
76
|
Pagination,
|
|
73
77
|
PaymentData,
|
|
74
78
|
Permission,
|
|
@@ -99,6 +103,7 @@ from .types import (
|
|
|
99
103
|
ThreeDsAcsRenderingType,
|
|
100
104
|
ThreeDsAddress,
|
|
101
105
|
ThreeDsAuthentication,
|
|
106
|
+
ThreeDsCallbackUrls,
|
|
102
107
|
ThreeDsCardholderAccountInfo,
|
|
103
108
|
ThreeDsCardholderAuthenticationInfo,
|
|
104
109
|
ThreeDsCardholderInfo,
|
|
@@ -149,6 +154,7 @@ from . import (
|
|
|
149
154
|
application_templates,
|
|
150
155
|
applications,
|
|
151
156
|
connection,
|
|
157
|
+
documents,
|
|
152
158
|
enrichments,
|
|
153
159
|
googlepay,
|
|
154
160
|
keys,
|
|
@@ -216,12 +222,15 @@ __all__ = [
|
|
|
216
222
|
"ClientEncryptionKeyResponse",
|
|
217
223
|
"Condition",
|
|
218
224
|
"ConflictError",
|
|
225
|
+
"CreateAccountUpdaterJobRequest",
|
|
226
|
+
"CreateDocumentRequest",
|
|
219
227
|
"CreateReactorFormulaRequest",
|
|
220
228
|
"CreateSessionResponse",
|
|
221
229
|
"CreateTenantConnectionResponse",
|
|
222
230
|
"CreateThreeDsSessionResponse",
|
|
223
231
|
"CreateTokenIntentResponse",
|
|
224
232
|
"CursorPagination",
|
|
233
|
+
"Document",
|
|
225
234
|
"DomainRegistrationResponse",
|
|
226
235
|
"EventTypes",
|
|
227
236
|
"ForbiddenError",
|
|
@@ -245,6 +254,7 @@ __all__ = [
|
|
|
245
254
|
"LogPaginatedList",
|
|
246
255
|
"NetworkToken",
|
|
247
256
|
"NetworkTokenCryptogram",
|
|
257
|
+
"NetworkTokenExtras",
|
|
248
258
|
"NotFoundError",
|
|
249
259
|
"Pagination",
|
|
250
260
|
"PaymentData",
|
|
@@ -277,6 +287,7 @@ __all__ = [
|
|
|
277
287
|
"ThreeDsAcsRenderingType",
|
|
278
288
|
"ThreeDsAddress",
|
|
279
289
|
"ThreeDsAuthentication",
|
|
290
|
+
"ThreeDsCallbackUrls",
|
|
280
291
|
"ThreeDsCardholderAccountInfo",
|
|
281
292
|
"ThreeDsCardholderAuthenticationInfo",
|
|
282
293
|
"ThreeDsCardholderInfo",
|
|
@@ -318,6 +329,7 @@ __all__ = [
|
|
|
318
329
|
"application_templates",
|
|
319
330
|
"applications",
|
|
320
331
|
"connection",
|
|
332
|
+
"documents",
|
|
321
333
|
"enrichments",
|
|
322
334
|
"googlepay",
|
|
323
335
|
"keys",
|
|
@@ -29,6 +29,7 @@ class RealTimeClient:
|
|
|
29
29
|
token_id: str,
|
|
30
30
|
expiration_year: typing.Optional[int] = OMIT,
|
|
31
31
|
expiration_month: typing.Optional[int] = OMIT,
|
|
32
|
+
deduplicate_token: typing.Optional[bool] = OMIT,
|
|
32
33
|
request_options: typing.Optional[RequestOptions] = None,
|
|
33
34
|
) -> AccountUpdaterRealTimeResponse:
|
|
34
35
|
"""
|
|
@@ -45,6 +46,9 @@ class RealTimeClient:
|
|
|
45
46
|
expiration_month : typing.Optional[int]
|
|
46
47
|
The 2-digit expiration month of the account number. Not required if the card token already stores this value.
|
|
47
48
|
|
|
49
|
+
deduplicate_token : typing.Optional[bool]
|
|
50
|
+
Whether deduplication should be enabled when creating the new token. Uses the value of the Deduplicate Tokens setting on the tenant if not set.
|
|
51
|
+
|
|
48
52
|
request_options : typing.Optional[RequestOptions]
|
|
49
53
|
Request-specific configuration.
|
|
50
54
|
|
|
@@ -72,6 +76,7 @@ class RealTimeClient:
|
|
|
72
76
|
"token_id": token_id,
|
|
73
77
|
"expiration_year": expiration_year,
|
|
74
78
|
"expiration_month": expiration_month,
|
|
79
|
+
"deduplicate_token": deduplicate_token,
|
|
75
80
|
},
|
|
76
81
|
headers={
|
|
77
82
|
"content-type": "application/json",
|
|
@@ -144,6 +149,7 @@ class AsyncRealTimeClient:
|
|
|
144
149
|
token_id: str,
|
|
145
150
|
expiration_year: typing.Optional[int] = OMIT,
|
|
146
151
|
expiration_month: typing.Optional[int] = OMIT,
|
|
152
|
+
deduplicate_token: typing.Optional[bool] = OMIT,
|
|
147
153
|
request_options: typing.Optional[RequestOptions] = None,
|
|
148
154
|
) -> AccountUpdaterRealTimeResponse:
|
|
149
155
|
"""
|
|
@@ -160,6 +166,9 @@ class AsyncRealTimeClient:
|
|
|
160
166
|
expiration_month : typing.Optional[int]
|
|
161
167
|
The 2-digit expiration month of the account number. Not required if the card token already stores this value.
|
|
162
168
|
|
|
169
|
+
deduplicate_token : typing.Optional[bool]
|
|
170
|
+
Whether deduplication should be enabled when creating the new token. Uses the value of the Deduplicate Tokens setting on the tenant if not set.
|
|
171
|
+
|
|
163
172
|
request_options : typing.Optional[RequestOptions]
|
|
164
173
|
Request-specific configuration.
|
|
165
174
|
|
|
@@ -195,6 +204,7 @@ class AsyncRealTimeClient:
|
|
|
195
204
|
"token_id": token_id,
|
|
196
205
|
"expiration_year": expiration_year,
|
|
197
206
|
"expiration_month": expiration_month,
|
|
207
|
+
"deduplicate_token": deduplicate_token,
|
|
198
208
|
},
|
|
199
209
|
headers={
|
|
200
210
|
"content-type": "application/json",
|
|
@@ -10,6 +10,7 @@ from .applications.client import ApplicationsClient
|
|
|
10
10
|
from .application_keys.client import ApplicationKeysClient
|
|
11
11
|
from .application_templates.client import ApplicationTemplatesClient
|
|
12
12
|
from .apple_pay.client import ApplePayClient
|
|
13
|
+
from .documents.client import DocumentsClient
|
|
13
14
|
from .tokens.client import TokensClient
|
|
14
15
|
from .enrichments.client import EnrichmentsClient
|
|
15
16
|
from .googlepay.client import GooglepayClient
|
|
@@ -32,6 +33,7 @@ from .applications.client import AsyncApplicationsClient
|
|
|
32
33
|
from .application_keys.client import AsyncApplicationKeysClient
|
|
33
34
|
from .application_templates.client import AsyncApplicationTemplatesClient
|
|
34
35
|
from .apple_pay.client import AsyncApplePayClient
|
|
36
|
+
from .documents.client import AsyncDocumentsClient
|
|
35
37
|
from .tokens.client import AsyncTokensClient
|
|
36
38
|
from .enrichments.client import AsyncEnrichmentsClient
|
|
37
39
|
from .googlepay.client import AsyncGooglepayClient
|
|
@@ -119,6 +121,7 @@ class BasisTheory:
|
|
|
119
121
|
self.application_keys = ApplicationKeysClient(client_wrapper=self._client_wrapper)
|
|
120
122
|
self.application_templates = ApplicationTemplatesClient(client_wrapper=self._client_wrapper)
|
|
121
123
|
self.apple_pay = ApplePayClient(client_wrapper=self._client_wrapper)
|
|
124
|
+
self.documents = DocumentsClient(client_wrapper=self._client_wrapper)
|
|
122
125
|
self.tokens = TokensClient(client_wrapper=self._client_wrapper)
|
|
123
126
|
self.enrichments = EnrichmentsClient(client_wrapper=self._client_wrapper)
|
|
124
127
|
self.googlepay = GooglepayClient(client_wrapper=self._client_wrapper)
|
|
@@ -206,6 +209,7 @@ class AsyncBasisTheory:
|
|
|
206
209
|
self.application_keys = AsyncApplicationKeysClient(client_wrapper=self._client_wrapper)
|
|
207
210
|
self.application_templates = AsyncApplicationTemplatesClient(client_wrapper=self._client_wrapper)
|
|
208
211
|
self.apple_pay = AsyncApplePayClient(client_wrapper=self._client_wrapper)
|
|
212
|
+
self.documents = AsyncDocumentsClient(client_wrapper=self._client_wrapper)
|
|
209
213
|
self.tokens = AsyncTokensClient(client_wrapper=self._client_wrapper)
|
|
210
214
|
self.enrichments = AsyncEnrichmentsClient(client_wrapper=self._client_wrapper)
|
|
211
215
|
self.googlepay = AsyncGooglepayClient(client_wrapper=self._client_wrapper)
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
5
|
+
from .data.client import DataClient
|
|
6
|
+
from .. import core
|
|
7
|
+
from ..types.create_document_request import CreateDocumentRequest
|
|
8
|
+
from ..core.request_options import RequestOptions
|
|
9
|
+
from ..types.document import Document
|
|
10
|
+
import json
|
|
11
|
+
from ..core.jsonable_encoder import jsonable_encoder
|
|
12
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
13
|
+
from ..errors.bad_request_error import BadRequestError
|
|
14
|
+
from ..types.validation_problem_details import ValidationProblemDetails
|
|
15
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
16
|
+
from ..types.problem_details import ProblemDetails
|
|
17
|
+
from ..errors.forbidden_error import ForbiddenError
|
|
18
|
+
from json.decoder import JSONDecodeError
|
|
19
|
+
from ..core.api_error import ApiError
|
|
20
|
+
from ..errors.not_found_error import NotFoundError
|
|
21
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
22
|
+
from .data.client import AsyncDataClient
|
|
23
|
+
|
|
24
|
+
# this is used as the default value for optional parameters
|
|
25
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DocumentsClient:
|
|
29
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
30
|
+
self._client_wrapper = client_wrapper
|
|
31
|
+
self.data = DataClient(client_wrapper=self._client_wrapper)
|
|
32
|
+
|
|
33
|
+
def upload(
|
|
34
|
+
self,
|
|
35
|
+
*,
|
|
36
|
+
document: typing.Optional[core.File] = OMIT,
|
|
37
|
+
request: typing.Optional[CreateDocumentRequest] = OMIT,
|
|
38
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
39
|
+
) -> Document:
|
|
40
|
+
"""
|
|
41
|
+
Parameters
|
|
42
|
+
----------
|
|
43
|
+
document : typing.Optional[core.File]
|
|
44
|
+
See core.File for more documentation
|
|
45
|
+
|
|
46
|
+
request : typing.Optional[CreateDocumentRequest]
|
|
47
|
+
|
|
48
|
+
request_options : typing.Optional[RequestOptions]
|
|
49
|
+
Request-specific configuration.
|
|
50
|
+
|
|
51
|
+
Returns
|
|
52
|
+
-------
|
|
53
|
+
Document
|
|
54
|
+
Accepted
|
|
55
|
+
|
|
56
|
+
Examples
|
|
57
|
+
--------
|
|
58
|
+
from basis_theory import BasisTheory
|
|
59
|
+
|
|
60
|
+
client = BasisTheory(
|
|
61
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
62
|
+
api_key="YOUR_API_KEY",
|
|
63
|
+
)
|
|
64
|
+
client.documents.upload()
|
|
65
|
+
"""
|
|
66
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
67
|
+
"documents",
|
|
68
|
+
method="POST",
|
|
69
|
+
data={},
|
|
70
|
+
files={
|
|
71
|
+
"document": document,
|
|
72
|
+
**(
|
|
73
|
+
{"request": (None, json.dumps(jsonable_encoder(request)), "application/json")}
|
|
74
|
+
if request is not OMIT
|
|
75
|
+
else {}
|
|
76
|
+
),
|
|
77
|
+
},
|
|
78
|
+
request_options=request_options,
|
|
79
|
+
omit=OMIT,
|
|
80
|
+
)
|
|
81
|
+
try:
|
|
82
|
+
if 200 <= _response.status_code < 300:
|
|
83
|
+
return typing.cast(
|
|
84
|
+
Document,
|
|
85
|
+
parse_obj_as(
|
|
86
|
+
type_=Document, # type: ignore
|
|
87
|
+
object_=_response.json(),
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
if _response.status_code == 400:
|
|
91
|
+
raise BadRequestError(
|
|
92
|
+
typing.cast(
|
|
93
|
+
ValidationProblemDetails,
|
|
94
|
+
parse_obj_as(
|
|
95
|
+
type_=ValidationProblemDetails, # type: ignore
|
|
96
|
+
object_=_response.json(),
|
|
97
|
+
),
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
if _response.status_code == 401:
|
|
101
|
+
raise UnauthorizedError(
|
|
102
|
+
typing.cast(
|
|
103
|
+
ProblemDetails,
|
|
104
|
+
parse_obj_as(
|
|
105
|
+
type_=ProblemDetails, # type: ignore
|
|
106
|
+
object_=_response.json(),
|
|
107
|
+
),
|
|
108
|
+
)
|
|
109
|
+
)
|
|
110
|
+
if _response.status_code == 403:
|
|
111
|
+
raise ForbiddenError(
|
|
112
|
+
typing.cast(
|
|
113
|
+
ProblemDetails,
|
|
114
|
+
parse_obj_as(
|
|
115
|
+
type_=ProblemDetails, # type: ignore
|
|
116
|
+
object_=_response.json(),
|
|
117
|
+
),
|
|
118
|
+
)
|
|
119
|
+
)
|
|
120
|
+
_response_json = _response.json()
|
|
121
|
+
except JSONDecodeError:
|
|
122
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
123
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
124
|
+
|
|
125
|
+
def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Document:
|
|
126
|
+
"""
|
|
127
|
+
Parameters
|
|
128
|
+
----------
|
|
129
|
+
id : str
|
|
130
|
+
|
|
131
|
+
request_options : typing.Optional[RequestOptions]
|
|
132
|
+
Request-specific configuration.
|
|
133
|
+
|
|
134
|
+
Returns
|
|
135
|
+
-------
|
|
136
|
+
Document
|
|
137
|
+
Success
|
|
138
|
+
|
|
139
|
+
Examples
|
|
140
|
+
--------
|
|
141
|
+
from basis_theory import BasisTheory
|
|
142
|
+
|
|
143
|
+
client = BasisTheory(
|
|
144
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
145
|
+
api_key="YOUR_API_KEY",
|
|
146
|
+
)
|
|
147
|
+
client.documents.get(
|
|
148
|
+
id="id",
|
|
149
|
+
)
|
|
150
|
+
"""
|
|
151
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
152
|
+
f"documents/{jsonable_encoder(id)}",
|
|
153
|
+
method="GET",
|
|
154
|
+
request_options=request_options,
|
|
155
|
+
)
|
|
156
|
+
try:
|
|
157
|
+
if 200 <= _response.status_code < 300:
|
|
158
|
+
return typing.cast(
|
|
159
|
+
Document,
|
|
160
|
+
parse_obj_as(
|
|
161
|
+
type_=Document, # type: ignore
|
|
162
|
+
object_=_response.json(),
|
|
163
|
+
),
|
|
164
|
+
)
|
|
165
|
+
if _response.status_code == 401:
|
|
166
|
+
raise UnauthorizedError(
|
|
167
|
+
typing.cast(
|
|
168
|
+
ProblemDetails,
|
|
169
|
+
parse_obj_as(
|
|
170
|
+
type_=ProblemDetails, # type: ignore
|
|
171
|
+
object_=_response.json(),
|
|
172
|
+
),
|
|
173
|
+
)
|
|
174
|
+
)
|
|
175
|
+
if _response.status_code == 403:
|
|
176
|
+
raise ForbiddenError(
|
|
177
|
+
typing.cast(
|
|
178
|
+
ProblemDetails,
|
|
179
|
+
parse_obj_as(
|
|
180
|
+
type_=ProblemDetails, # type: ignore
|
|
181
|
+
object_=_response.json(),
|
|
182
|
+
),
|
|
183
|
+
)
|
|
184
|
+
)
|
|
185
|
+
if _response.status_code == 404:
|
|
186
|
+
raise NotFoundError(
|
|
187
|
+
typing.cast(
|
|
188
|
+
typing.Optional[typing.Any],
|
|
189
|
+
parse_obj_as(
|
|
190
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
191
|
+
object_=_response.json(),
|
|
192
|
+
),
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
_response_json = _response.json()
|
|
196
|
+
except JSONDecodeError:
|
|
197
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
198
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
199
|
+
|
|
200
|
+
def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
201
|
+
"""
|
|
202
|
+
Parameters
|
|
203
|
+
----------
|
|
204
|
+
id : str
|
|
205
|
+
|
|
206
|
+
request_options : typing.Optional[RequestOptions]
|
|
207
|
+
Request-specific configuration.
|
|
208
|
+
|
|
209
|
+
Returns
|
|
210
|
+
-------
|
|
211
|
+
None
|
|
212
|
+
|
|
213
|
+
Examples
|
|
214
|
+
--------
|
|
215
|
+
from basis_theory import BasisTheory
|
|
216
|
+
|
|
217
|
+
client = BasisTheory(
|
|
218
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
219
|
+
api_key="YOUR_API_KEY",
|
|
220
|
+
)
|
|
221
|
+
client.documents.delete(
|
|
222
|
+
id="id",
|
|
223
|
+
)
|
|
224
|
+
"""
|
|
225
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
226
|
+
f"documents/{jsonable_encoder(id)}",
|
|
227
|
+
method="DELETE",
|
|
228
|
+
request_options=request_options,
|
|
229
|
+
)
|
|
230
|
+
try:
|
|
231
|
+
if 200 <= _response.status_code < 300:
|
|
232
|
+
return
|
|
233
|
+
if _response.status_code == 401:
|
|
234
|
+
raise UnauthorizedError(
|
|
235
|
+
typing.cast(
|
|
236
|
+
ProblemDetails,
|
|
237
|
+
parse_obj_as(
|
|
238
|
+
type_=ProblemDetails, # type: ignore
|
|
239
|
+
object_=_response.json(),
|
|
240
|
+
),
|
|
241
|
+
)
|
|
242
|
+
)
|
|
243
|
+
if _response.status_code == 403:
|
|
244
|
+
raise ForbiddenError(
|
|
245
|
+
typing.cast(
|
|
246
|
+
ProblemDetails,
|
|
247
|
+
parse_obj_as(
|
|
248
|
+
type_=ProblemDetails, # type: ignore
|
|
249
|
+
object_=_response.json(),
|
|
250
|
+
),
|
|
251
|
+
)
|
|
252
|
+
)
|
|
253
|
+
_response_json = _response.json()
|
|
254
|
+
except JSONDecodeError:
|
|
255
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
256
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class AsyncDocumentsClient:
|
|
260
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
261
|
+
self._client_wrapper = client_wrapper
|
|
262
|
+
self.data = AsyncDataClient(client_wrapper=self._client_wrapper)
|
|
263
|
+
|
|
264
|
+
async def upload(
|
|
265
|
+
self,
|
|
266
|
+
*,
|
|
267
|
+
document: typing.Optional[core.File] = OMIT,
|
|
268
|
+
request: typing.Optional[CreateDocumentRequest] = OMIT,
|
|
269
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
270
|
+
) -> Document:
|
|
271
|
+
"""
|
|
272
|
+
Parameters
|
|
273
|
+
----------
|
|
274
|
+
document : typing.Optional[core.File]
|
|
275
|
+
See core.File for more documentation
|
|
276
|
+
|
|
277
|
+
request : typing.Optional[CreateDocumentRequest]
|
|
278
|
+
|
|
279
|
+
request_options : typing.Optional[RequestOptions]
|
|
280
|
+
Request-specific configuration.
|
|
281
|
+
|
|
282
|
+
Returns
|
|
283
|
+
-------
|
|
284
|
+
Document
|
|
285
|
+
Accepted
|
|
286
|
+
|
|
287
|
+
Examples
|
|
288
|
+
--------
|
|
289
|
+
import asyncio
|
|
290
|
+
|
|
291
|
+
from basis_theory import AsyncBasisTheory
|
|
292
|
+
|
|
293
|
+
client = AsyncBasisTheory(
|
|
294
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
295
|
+
api_key="YOUR_API_KEY",
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
async def main() -> None:
|
|
300
|
+
await client.documents.upload()
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
asyncio.run(main())
|
|
304
|
+
"""
|
|
305
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
306
|
+
"documents",
|
|
307
|
+
method="POST",
|
|
308
|
+
data={},
|
|
309
|
+
files={
|
|
310
|
+
"document": document,
|
|
311
|
+
**(
|
|
312
|
+
{"request": (None, json.dumps(jsonable_encoder(request)), "application/json")}
|
|
313
|
+
if request is not OMIT
|
|
314
|
+
else {}
|
|
315
|
+
),
|
|
316
|
+
},
|
|
317
|
+
request_options=request_options,
|
|
318
|
+
omit=OMIT,
|
|
319
|
+
)
|
|
320
|
+
try:
|
|
321
|
+
if 200 <= _response.status_code < 300:
|
|
322
|
+
return typing.cast(
|
|
323
|
+
Document,
|
|
324
|
+
parse_obj_as(
|
|
325
|
+
type_=Document, # type: ignore
|
|
326
|
+
object_=_response.json(),
|
|
327
|
+
),
|
|
328
|
+
)
|
|
329
|
+
if _response.status_code == 400:
|
|
330
|
+
raise BadRequestError(
|
|
331
|
+
typing.cast(
|
|
332
|
+
ValidationProblemDetails,
|
|
333
|
+
parse_obj_as(
|
|
334
|
+
type_=ValidationProblemDetails, # type: ignore
|
|
335
|
+
object_=_response.json(),
|
|
336
|
+
),
|
|
337
|
+
)
|
|
338
|
+
)
|
|
339
|
+
if _response.status_code == 401:
|
|
340
|
+
raise UnauthorizedError(
|
|
341
|
+
typing.cast(
|
|
342
|
+
ProblemDetails,
|
|
343
|
+
parse_obj_as(
|
|
344
|
+
type_=ProblemDetails, # type: ignore
|
|
345
|
+
object_=_response.json(),
|
|
346
|
+
),
|
|
347
|
+
)
|
|
348
|
+
)
|
|
349
|
+
if _response.status_code == 403:
|
|
350
|
+
raise ForbiddenError(
|
|
351
|
+
typing.cast(
|
|
352
|
+
ProblemDetails,
|
|
353
|
+
parse_obj_as(
|
|
354
|
+
type_=ProblemDetails, # type: ignore
|
|
355
|
+
object_=_response.json(),
|
|
356
|
+
),
|
|
357
|
+
)
|
|
358
|
+
)
|
|
359
|
+
_response_json = _response.json()
|
|
360
|
+
except JSONDecodeError:
|
|
361
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
362
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
363
|
+
|
|
364
|
+
async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Document:
|
|
365
|
+
"""
|
|
366
|
+
Parameters
|
|
367
|
+
----------
|
|
368
|
+
id : str
|
|
369
|
+
|
|
370
|
+
request_options : typing.Optional[RequestOptions]
|
|
371
|
+
Request-specific configuration.
|
|
372
|
+
|
|
373
|
+
Returns
|
|
374
|
+
-------
|
|
375
|
+
Document
|
|
376
|
+
Success
|
|
377
|
+
|
|
378
|
+
Examples
|
|
379
|
+
--------
|
|
380
|
+
import asyncio
|
|
381
|
+
|
|
382
|
+
from basis_theory import AsyncBasisTheory
|
|
383
|
+
|
|
384
|
+
client = AsyncBasisTheory(
|
|
385
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
386
|
+
api_key="YOUR_API_KEY",
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
async def main() -> None:
|
|
391
|
+
await client.documents.get(
|
|
392
|
+
id="id",
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
asyncio.run(main())
|
|
397
|
+
"""
|
|
398
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
399
|
+
f"documents/{jsonable_encoder(id)}",
|
|
400
|
+
method="GET",
|
|
401
|
+
request_options=request_options,
|
|
402
|
+
)
|
|
403
|
+
try:
|
|
404
|
+
if 200 <= _response.status_code < 300:
|
|
405
|
+
return typing.cast(
|
|
406
|
+
Document,
|
|
407
|
+
parse_obj_as(
|
|
408
|
+
type_=Document, # type: ignore
|
|
409
|
+
object_=_response.json(),
|
|
410
|
+
),
|
|
411
|
+
)
|
|
412
|
+
if _response.status_code == 401:
|
|
413
|
+
raise UnauthorizedError(
|
|
414
|
+
typing.cast(
|
|
415
|
+
ProblemDetails,
|
|
416
|
+
parse_obj_as(
|
|
417
|
+
type_=ProblemDetails, # type: ignore
|
|
418
|
+
object_=_response.json(),
|
|
419
|
+
),
|
|
420
|
+
)
|
|
421
|
+
)
|
|
422
|
+
if _response.status_code == 403:
|
|
423
|
+
raise ForbiddenError(
|
|
424
|
+
typing.cast(
|
|
425
|
+
ProblemDetails,
|
|
426
|
+
parse_obj_as(
|
|
427
|
+
type_=ProblemDetails, # type: ignore
|
|
428
|
+
object_=_response.json(),
|
|
429
|
+
),
|
|
430
|
+
)
|
|
431
|
+
)
|
|
432
|
+
if _response.status_code == 404:
|
|
433
|
+
raise NotFoundError(
|
|
434
|
+
typing.cast(
|
|
435
|
+
typing.Optional[typing.Any],
|
|
436
|
+
parse_obj_as(
|
|
437
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
438
|
+
object_=_response.json(),
|
|
439
|
+
),
|
|
440
|
+
)
|
|
441
|
+
)
|
|
442
|
+
_response_json = _response.json()
|
|
443
|
+
except JSONDecodeError:
|
|
444
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
445
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
446
|
+
|
|
447
|
+
async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
448
|
+
"""
|
|
449
|
+
Parameters
|
|
450
|
+
----------
|
|
451
|
+
id : str
|
|
452
|
+
|
|
453
|
+
request_options : typing.Optional[RequestOptions]
|
|
454
|
+
Request-specific configuration.
|
|
455
|
+
|
|
456
|
+
Returns
|
|
457
|
+
-------
|
|
458
|
+
None
|
|
459
|
+
|
|
460
|
+
Examples
|
|
461
|
+
--------
|
|
462
|
+
import asyncio
|
|
463
|
+
|
|
464
|
+
from basis_theory import AsyncBasisTheory
|
|
465
|
+
|
|
466
|
+
client = AsyncBasisTheory(
|
|
467
|
+
correlation_id="YOUR_CORRELATION_ID",
|
|
468
|
+
api_key="YOUR_API_KEY",
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
async def main() -> None:
|
|
473
|
+
await client.documents.delete(
|
|
474
|
+
id="id",
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
asyncio.run(main())
|
|
479
|
+
"""
|
|
480
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
481
|
+
f"documents/{jsonable_encoder(id)}",
|
|
482
|
+
method="DELETE",
|
|
483
|
+
request_options=request_options,
|
|
484
|
+
)
|
|
485
|
+
try:
|
|
486
|
+
if 200 <= _response.status_code < 300:
|
|
487
|
+
return
|
|
488
|
+
if _response.status_code == 401:
|
|
489
|
+
raise UnauthorizedError(
|
|
490
|
+
typing.cast(
|
|
491
|
+
ProblemDetails,
|
|
492
|
+
parse_obj_as(
|
|
493
|
+
type_=ProblemDetails, # type: ignore
|
|
494
|
+
object_=_response.json(),
|
|
495
|
+
),
|
|
496
|
+
)
|
|
497
|
+
)
|
|
498
|
+
if _response.status_code == 403:
|
|
499
|
+
raise ForbiddenError(
|
|
500
|
+
typing.cast(
|
|
501
|
+
ProblemDetails,
|
|
502
|
+
parse_obj_as(
|
|
503
|
+
type_=ProblemDetails, # type: ignore
|
|
504
|
+
object_=_response.json(),
|
|
505
|
+
),
|
|
506
|
+
)
|
|
507
|
+
)
|
|
508
|
+
_response_json = _response.json()
|
|
509
|
+
except JSONDecodeError:
|
|
510
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
511
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|