BasisTheoryClient 0.2.0__tar.gz → 0.3.2__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.
Files changed (164) hide show
  1. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/PKG-INFO +1 -2
  2. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/README.md +1 -1
  3. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/pyproject.toml +1 -1
  4. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/__init__.py +6 -0
  5. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/client.py +4 -0
  6. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/client_wrapper.py +6 -6
  7. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/http_client.py +22 -16
  8. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/pydantic_utilities.py +26 -3
  9. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/request_options.py +3 -0
  10. basistheoryclient-0.3.2/src/basis_theory/enrichments/client.py +203 -0
  11. basistheoryclient-0.3.2/src/basis_theory/tenants/__init__.py +5 -0
  12. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tenants/client.py +4 -0
  13. basistheoryclient-0.3.2/src/basis_theory/tenants/owner/client.py +172 -0
  14. basistheoryclient-0.3.2/src/basis_theory/threeds/__init__.py +5 -0
  15. basistheoryclient-0.3.2/src/basis_theory/threeds/client.py +248 -0
  16. {basistheoryclient-0.2.0/src/basis_theory/threeds → basistheoryclient-0.3.2/src/basis_theory/threeds/sessions}/client.py +38 -46
  17. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tokens/client.py +16 -40
  18. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/__init__.py +4 -0
  19. basistheoryclient-0.3.2/src/basis_theory/types/create_three_ds_session_response.py +27 -0
  20. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_authentication.py +2 -0
  21. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_session.py +3 -0
  22. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token.py +4 -0
  23. basistheoryclient-0.3.2/src/basis_theory/types/token_extras.py +19 -0
  24. basistheoryclient-0.3.2/src/basis_theory/webhooks/events/__init__.py +2 -0
  25. basistheoryclient-0.3.2/src/basis_theory/webhooks/signing_key/__init__.py +2 -0
  26. basistheoryclient-0.2.0/src/basis_theory/tenants/__init__.py +0 -5
  27. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/application_keys/__init__.py +0 -0
  28. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/application_keys/client.py +0 -0
  29. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/application_templates/__init__.py +0 -0
  30. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/application_templates/client.py +0 -0
  31. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/applications/__init__.py +0 -0
  32. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/applications/client.py +0 -0
  33. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/__init__.py +0 -0
  34. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/api_error.py +0 -0
  35. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/datetime_utils.py +0 -0
  36. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/file.py +0 -0
  37. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/jsonable_encoder.py +0 -0
  38. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/pagination.py +0 -0
  39. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/query_encoder.py +0 -0
  40. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/remove_none_from_dict.py +0 -0
  41. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/core/serialization.py +0 -0
  42. {basistheoryclient-0.2.0/src/basis_theory/logs → basistheoryclient-0.3.2/src/basis_theory/enrichments}/__init__.py +0 -0
  43. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/environment.py +0 -0
  44. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/__init__.py +0 -0
  45. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/bad_request_error.py +0 -0
  46. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/conflict_error.py +0 -0
  47. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/forbidden_error.py +0 -0
  48. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/not_found_error.py +0 -0
  49. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/unauthorized_error.py +0 -0
  50. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/errors/unprocessable_entity_error.py +0 -0
  51. {basistheoryclient-0.2.0/src/basis_theory/permissions → basistheoryclient-0.3.2/src/basis_theory/logs}/__init__.py +0 -0
  52. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/logs/client.py +0 -0
  53. {basistheoryclient-0.2.0/src/basis_theory/proxies → basistheoryclient-0.3.2/src/basis_theory/permissions}/__init__.py +0 -0
  54. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/permissions/client.py +0 -0
  55. {basistheoryclient-0.2.0/src/basis_theory/reactorformulas → basistheoryclient-0.3.2/src/basis_theory/proxies}/__init__.py +0 -0
  56. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/proxies/client.py +0 -0
  57. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/py.typed +0 -0
  58. {basistheoryclient-0.2.0/src/basis_theory/reactors/results → basistheoryclient-0.3.2/src/basis_theory/reactorformulas}/__init__.py +0 -0
  59. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/reactorformulas/client.py +0 -0
  60. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/reactors/__init__.py +0 -0
  61. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/reactors/client.py +0 -0
  62. {basistheoryclient-0.2.0/src/basis_theory/roles → basistheoryclient-0.3.2/src/basis_theory/reactors/results}/__init__.py +0 -0
  63. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/reactors/results/client.py +0 -0
  64. {basistheoryclient-0.2.0/src/basis_theory/sessions → basistheoryclient-0.3.2/src/basis_theory/roles}/__init__.py +0 -0
  65. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/roles/client.py +0 -0
  66. {basistheoryclient-0.2.0/src/basis_theory/tenants/connections → basistheoryclient-0.3.2/src/basis_theory/sessions}/__init__.py +0 -0
  67. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/sessions/client.py +0 -0
  68. {basistheoryclient-0.2.0/src/basis_theory/tenants/invitations → basistheoryclient-0.3.2/src/basis_theory/tenants/connections}/__init__.py +0 -0
  69. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tenants/connections/client.py +0 -0
  70. {basistheoryclient-0.2.0/src/basis_theory/tenants/members → basistheoryclient-0.3.2/src/basis_theory/tenants/invitations}/__init__.py +0 -0
  71. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tenants/invitations/client.py +0 -0
  72. {basistheoryclient-0.2.0/src/basis_theory/tenants/self_ → basistheoryclient-0.3.2/src/basis_theory/tenants/members}/__init__.py +0 -0
  73. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tenants/members/client.py +0 -0
  74. {basistheoryclient-0.2.0/src/basis_theory/threeds → basistheoryclient-0.3.2/src/basis_theory/tenants/owner}/__init__.py +0 -0
  75. {basistheoryclient-0.2.0/src/basis_theory/tokens → basistheoryclient-0.3.2/src/basis_theory/tenants/self_}/__init__.py +0 -0
  76. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/tenants/self_/client.py +0 -0
  77. {basistheoryclient-0.2.0/src/basis_theory/webhooks/events → basistheoryclient-0.3.2/src/basis_theory/threeds/sessions}/__init__.py +0 -0
  78. {basistheoryclient-0.2.0/src/basis_theory/webhooks/signing_key → basistheoryclient-0.3.2/src/basis_theory/tokens}/__init__.py +0 -0
  79. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/access_rule.py +0 -0
  80. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/application.py +0 -0
  81. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/application_key.py +0 -0
  82. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/application_paginated_list.py +0 -0
  83. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/application_template.py +0 -0
  84. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/bin_details.py +0 -0
  85. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/bin_details_bank.py +0 -0
  86. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/bin_details_country.py +0 -0
  87. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/bin_details_product.py +0 -0
  88. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/card_details.py +0 -0
  89. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/condition.py +0 -0
  90. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/create_session_response.py +0 -0
  91. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/create_tenant_connection_response.py +0 -0
  92. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/cursor_pagination.py +0 -0
  93. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/event_types.py +0 -0
  94. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_applications.py +0 -0
  95. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_logs.py +0 -0
  96. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_permissions.py +0 -0
  97. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_proxies.py +0 -0
  98. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_reactor_formulas.py +0 -0
  99. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_reactors.py +0 -0
  100. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_tenant_invitations.py +0 -0
  101. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_tenant_members.py +0 -0
  102. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_tokens.py +0 -0
  103. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/get_tokens_v2.py +0 -0
  104. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/log.py +0 -0
  105. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/log_entity_type.py +0 -0
  106. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/log_paginated_list.py +0 -0
  107. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/pagination.py +0 -0
  108. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/permission.py +0 -0
  109. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/privacy.py +0 -0
  110. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/problem_details.py +0 -0
  111. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/proxy.py +0 -0
  112. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/proxy_paginated_list.py +0 -0
  113. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/proxy_transform.py +0 -0
  114. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/public_key.py +0 -0
  115. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/react_response.py +0 -0
  116. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor.py +0 -0
  117. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor_formula.py +0 -0
  118. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor_formula_configuration.py +0 -0
  119. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor_formula_paginated_list.py +0 -0
  120. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor_formula_request_parameter.py +0 -0
  121. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/reactor_paginated_list.py +0 -0
  122. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/role.py +0 -0
  123. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/string_string_key_value_pair.py +0 -0
  124. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant.py +0 -0
  125. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_connection_options.py +0 -0
  126. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_invitation_response.py +0 -0
  127. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_invitation_response_paginated_list.py +0 -0
  128. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_invitation_status.py +0 -0
  129. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_member_response.py +0 -0
  130. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_member_response_paginated_list.py +0 -0
  131. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/tenant_usage_report.py +0 -0
  132. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_acs_rendering_type.py +0 -0
  133. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_address.py +0 -0
  134. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_cardholder_account_info.py +0 -0
  135. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_cardholder_authentication_info.py +0 -0
  136. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_cardholder_info.py +0 -0
  137. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_cardholder_phone_number.py +0 -0
  138. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_device_info.py +0 -0
  139. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_merchant_info.py +0 -0
  140. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_merchant_risk_info.py +0 -0
  141. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_message_extension.py +0 -0
  142. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_method.py +0 -0
  143. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_mobile_sdk_render_options.py +0 -0
  144. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_prior_authentication_info.py +0 -0
  145. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_purchase_info.py +0 -0
  146. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_requestor_info.py +0 -0
  147. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/three_ds_version.py +0 -0
  148. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token_cursor_paginated_list.py +0 -0
  149. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token_enrichments.py +0 -0
  150. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token_metrics.py +0 -0
  151. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token_paginated_list.py +0 -0
  152. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/token_report.py +0 -0
  153. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/update_privacy.py +0 -0
  154. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/user.py +0 -0
  155. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/validation_problem_details.py +0 -0
  156. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/webhook.py +0 -0
  157. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/webhook_list.py +0 -0
  158. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/webhook_list_pagination.py +0 -0
  159. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/types/webhook_status.py +0 -0
  160. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/version.py +0 -0
  161. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/webhooks/__init__.py +0 -0
  162. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/webhooks/client.py +0 -0
  163. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/webhooks/events/client.py +0 -0
  164. {basistheoryclient-0.2.0 → basistheoryclient-0.3.2}/src/basis_theory/webhooks/signing_key/client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: BasisTheoryClient
3
- Version: 0.2.0
3
+ Version: 0.3.2
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -177,4 +177,3 @@ a proof of concept, but know that we will not be able to merge it as-is. We sugg
177
177
  an issue first to discuss with us!
178
178
 
179
179
  On the other hand, contributions to the README are always very welcome!
180
-
@@ -149,4 +149,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
149
149
  a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
150
150
  an issue first to discuss with us!
151
151
 
152
- On the other hand, contributions to the README are always very welcome!
152
+ On the other hand, contributions to the README are always very welcome!
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "BasisTheoryClient"
3
- version = "0.2.0"
3
+ version = "0.3.2"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -14,6 +14,7 @@ from .types import (
14
14
  Condition,
15
15
  CreateSessionResponse,
16
16
  CreateTenantConnectionResponse,
17
+ CreateThreeDsSessionResponse,
17
18
  CursorPagination,
18
19
  EventTypes,
19
20
  GetApplications,
@@ -75,6 +76,7 @@ from .types import (
75
76
  Token,
76
77
  TokenCursorPaginatedList,
77
78
  TokenEnrichments,
79
+ TokenExtras,
78
80
  TokenMetrics,
79
81
  TokenPaginatedList,
80
82
  TokenReport,
@@ -98,6 +100,7 @@ from . import (
98
100
  application_keys,
99
101
  application_templates,
100
102
  applications,
103
+ enrichments,
101
104
  logs,
102
105
  permissions,
103
106
  proxies,
@@ -133,6 +136,7 @@ __all__ = [
133
136
  "ConflictError",
134
137
  "CreateSessionResponse",
135
138
  "CreateTenantConnectionResponse",
139
+ "CreateThreeDsSessionResponse",
136
140
  "CursorPagination",
137
141
  "EventTypes",
138
142
  "ForbiddenError",
@@ -196,6 +200,7 @@ __all__ = [
196
200
  "Token",
197
201
  "TokenCursorPaginatedList",
198
202
  "TokenEnrichments",
203
+ "TokenExtras",
199
204
  "TokenMetrics",
200
205
  "TokenPaginatedList",
201
206
  "TokenReport",
@@ -212,6 +217,7 @@ __all__ = [
212
217
  "application_keys",
213
218
  "application_templates",
214
219
  "applications",
220
+ "enrichments",
215
221
  "logs",
216
222
  "permissions",
217
223
  "proxies",
@@ -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 .tokens.client import TokensClient
13
+ from .enrichments.client import EnrichmentsClient
13
14
  from .logs.client import LogsClient
14
15
  from .permissions.client import PermissionsClient
15
16
  from .proxies.client import ProxiesClient
@@ -25,6 +26,7 @@ from .applications.client import AsyncApplicationsClient
25
26
  from .application_keys.client import AsyncApplicationKeysClient
26
27
  from .application_templates.client import AsyncApplicationTemplatesClient
27
28
  from .tokens.client import AsyncTokensClient
29
+ from .enrichments.client import AsyncEnrichmentsClient
28
30
  from .logs.client import AsyncLogsClient
29
31
  from .permissions.client import AsyncPermissionsClient
30
32
  from .proxies.client import AsyncProxiesClient
@@ -101,6 +103,7 @@ class BasisTheory:
101
103
  self.application_keys = ApplicationKeysClient(client_wrapper=self._client_wrapper)
102
104
  self.application_templates = ApplicationTemplatesClient(client_wrapper=self._client_wrapper)
103
105
  self.tokens = TokensClient(client_wrapper=self._client_wrapper)
106
+ self.enrichments = EnrichmentsClient(client_wrapper=self._client_wrapper)
104
107
  self.logs = LogsClient(client_wrapper=self._client_wrapper)
105
108
  self.permissions = PermissionsClient(client_wrapper=self._client_wrapper)
106
109
  self.proxies = ProxiesClient(client_wrapper=self._client_wrapper)
@@ -177,6 +180,7 @@ class AsyncBasisTheory:
177
180
  self.application_keys = AsyncApplicationKeysClient(client_wrapper=self._client_wrapper)
178
181
  self.application_templates = AsyncApplicationTemplatesClient(client_wrapper=self._client_wrapper)
179
182
  self.tokens = AsyncTokensClient(client_wrapper=self._client_wrapper)
183
+ self.enrichments = AsyncEnrichmentsClient(client_wrapper=self._client_wrapper)
180
184
  self.logs = AsyncLogsClient(client_wrapper=self._client_wrapper)
181
185
  self.permissions = AsyncPermissionsClient(client_wrapper=self._client_wrapper)
182
186
  self.proxies = AsyncProxiesClient(client_wrapper=self._client_wrapper)
@@ -35,9 +35,9 @@ class SyncClientWrapper(BaseClientWrapper):
35
35
  super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
36
36
  self.httpx_client = HttpClient(
37
37
  httpx_client=httpx_client,
38
- base_headers=self.get_headers(),
39
- base_timeout=self.get_timeout(),
40
- base_url=self.get_base_url(),
38
+ base_headers=self.get_headers,
39
+ base_timeout=self.get_timeout,
40
+ base_url=self.get_base_url,
41
41
  )
42
42
 
43
43
 
@@ -48,7 +48,7 @@ class AsyncClientWrapper(BaseClientWrapper):
48
48
  super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
49
49
  self.httpx_client = AsyncHttpClient(
50
50
  httpx_client=httpx_client,
51
- base_headers=self.get_headers(),
52
- base_timeout=self.get_timeout(),
53
- base_url=self.get_base_url(),
51
+ base_headers=self.get_headers,
52
+ base_timeout=self.get_timeout,
53
+ base_url=self.get_base_url,
54
54
  )
@@ -152,9 +152,9 @@ class HttpClient:
152
152
  self,
153
153
  *,
154
154
  httpx_client: httpx.Client,
155
- base_timeout: typing.Optional[float],
156
- base_headers: typing.Dict[str, str],
157
- base_url: typing.Optional[str] = None,
155
+ base_timeout: typing.Callable[[], typing.Optional[float]],
156
+ base_headers: typing.Callable[[], typing.Dict[str, str]],
157
+ base_url: typing.Optional[typing.Callable[[], str]] = None,
158
158
  ):
159
159
  self.base_url = base_url
160
160
  self.base_timeout = base_timeout
@@ -162,7 +162,10 @@ class HttpClient:
162
162
  self.httpx_client = httpx_client
163
163
 
164
164
  def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
165
- base_url = self.base_url if maybe_base_url is None else maybe_base_url
165
+ base_url = maybe_base_url
166
+ if self.base_url is not None and base_url is None:
167
+ base_url = self.base_url()
168
+
166
169
  if base_url is None:
167
170
  raise ValueError("A base_url is required to make this request, please provide one and try again.")
168
171
  return base_url
@@ -187,7 +190,7 @@ class HttpClient:
187
190
  timeout = (
188
191
  request_options.get("timeout_in_seconds")
189
192
  if request_options is not None and request_options.get("timeout_in_seconds") is not None
190
- else self.base_timeout
193
+ else self.base_timeout()
191
194
  )
192
195
 
193
196
  json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
@@ -198,7 +201,7 @@ class HttpClient:
198
201
  headers=jsonable_encoder(
199
202
  remove_none_from_dict(
200
203
  {
201
- **self.base_headers,
204
+ **self.base_headers(),
202
205
  **(headers if headers is not None else {}),
203
206
  **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
204
207
  }
@@ -271,7 +274,7 @@ class HttpClient:
271
274
  timeout = (
272
275
  request_options.get("timeout_in_seconds")
273
276
  if request_options is not None and request_options.get("timeout_in_seconds") is not None
274
- else self.base_timeout
277
+ else self.base_timeout()
275
278
  )
276
279
 
277
280
  json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
@@ -282,7 +285,7 @@ class HttpClient:
282
285
  headers=jsonable_encoder(
283
286
  remove_none_from_dict(
284
287
  {
285
- **self.base_headers,
288
+ **self.base_headers(),
286
289
  **(headers if headers is not None else {}),
287
290
  **(request_options.get("additional_headers", {}) if request_options is not None else {}),
288
291
  }
@@ -321,9 +324,9 @@ class AsyncHttpClient:
321
324
  self,
322
325
  *,
323
326
  httpx_client: httpx.AsyncClient,
324
- base_timeout: typing.Optional[float],
325
- base_headers: typing.Dict[str, str],
326
- base_url: typing.Optional[str] = None,
327
+ base_timeout: typing.Callable[[], typing.Optional[float]],
328
+ base_headers: typing.Callable[[], typing.Dict[str, str]],
329
+ base_url: typing.Optional[typing.Callable[[], str]] = None,
327
330
  ):
328
331
  self.base_url = base_url
329
332
  self.base_timeout = base_timeout
@@ -331,7 +334,10 @@ class AsyncHttpClient:
331
334
  self.httpx_client = httpx_client
332
335
 
333
336
  def get_base_url(self, maybe_base_url: typing.Optional[str]) -> str:
334
- base_url = self.base_url if maybe_base_url is None else maybe_base_url
337
+ base_url = maybe_base_url
338
+ if self.base_url is not None and base_url is None:
339
+ base_url = self.base_url()
340
+
335
341
  if base_url is None:
336
342
  raise ValueError("A base_url is required to make this request, please provide one and try again.")
337
343
  return base_url
@@ -356,7 +362,7 @@ class AsyncHttpClient:
356
362
  timeout = (
357
363
  request_options.get("timeout_in_seconds")
358
364
  if request_options is not None and request_options.get("timeout_in_seconds") is not None
359
- else self.base_timeout
365
+ else self.base_timeout()
360
366
  )
361
367
 
362
368
  json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
@@ -368,7 +374,7 @@ class AsyncHttpClient:
368
374
  headers=jsonable_encoder(
369
375
  remove_none_from_dict(
370
376
  {
371
- **self.base_headers,
377
+ **self.base_headers(),
372
378
  **(headers if headers is not None else {}),
373
379
  **(request_options.get("additional_headers", {}) or {} if request_options is not None else {}),
374
380
  }
@@ -438,7 +444,7 @@ class AsyncHttpClient:
438
444
  timeout = (
439
445
  request_options.get("timeout_in_seconds")
440
446
  if request_options is not None and request_options.get("timeout_in_seconds") is not None
441
- else self.base_timeout
447
+ else self.base_timeout()
442
448
  )
443
449
 
444
450
  json_body, data_body = get_request_body(json=json, data=data, request_options=request_options, omit=omit)
@@ -449,7 +455,7 @@ class AsyncHttpClient:
449
455
  headers=jsonable_encoder(
450
456
  remove_none_from_dict(
451
457
  {
452
- **self.base_headers,
458
+ **self.base_headers(),
453
459
  **(headers if headers is not None else {}),
454
460
  **(request_options.get("additional_headers", {}) if request_options is not None else {}),
455
461
  }
@@ -152,7 +152,7 @@ class UniversalBaseModel(pydantic.BaseModel):
152
152
  )
153
153
 
154
154
  else:
155
- _fields_set = self.__fields_set__
155
+ _fields_set = self.__fields_set__.copy()
156
156
 
157
157
  fields = _get_model_fields(self.__class__)
158
158
  for name, field in fields.items():
@@ -162,9 +162,12 @@ class UniversalBaseModel(pydantic.BaseModel):
162
162
  # If the default values are non-null act like they've been set
163
163
  # This effectively allows exclude_unset to work like exclude_none where
164
164
  # the latter passes through intentionally set none values.
165
- if default != None:
165
+ if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]):
166
166
  _fields_set.add(name)
167
167
 
168
+ if default is not None:
169
+ self.__fields_set__.add(name)
170
+
168
171
  kwargs_with_defaults_exclude_unset_include_fields: typing.Any = {
169
172
  "by_alias": True,
170
173
  "exclude_unset": True,
@@ -177,13 +180,33 @@ class UniversalBaseModel(pydantic.BaseModel):
177
180
  return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write")
178
181
 
179
182
 
183
+ def _union_list_of_pydantic_dicts(
184
+ source: typing.List[typing.Any], destination: typing.List[typing.Any]
185
+ ) -> typing.List[typing.Any]:
186
+ converted_list: typing.List[typing.Any] = []
187
+ for i, item in enumerate(source):
188
+ destination_value = destination[i] # type: ignore
189
+ if isinstance(item, dict):
190
+ converted_list.append(deep_union_pydantic_dicts(item, destination_value))
191
+ elif isinstance(item, list):
192
+ converted_list.append(_union_list_of_pydantic_dicts(item, destination_value))
193
+ else:
194
+ converted_list.append(item)
195
+ return converted_list
196
+
197
+
180
198
  def deep_union_pydantic_dicts(
181
199
  source: typing.Dict[str, typing.Any], destination: typing.Dict[str, typing.Any]
182
200
  ) -> typing.Dict[str, typing.Any]:
183
201
  for key, value in source.items():
202
+ node = destination.setdefault(key, {})
184
203
  if isinstance(value, dict):
185
- node = destination.setdefault(key, {})
186
204
  deep_union_pydantic_dicts(value, node)
205
+ # Note: we do not do this same processing for sets given we do not have sets of models
206
+ # and given the sets are unordered, the processing of the set and matching objects would
207
+ # be non-trivial.
208
+ elif isinstance(value, list):
209
+ destination[key] = _union_list_of_pydantic_dicts(value, node)
187
210
  else:
188
211
  destination[key] = value
189
212
 
@@ -23,6 +23,8 @@ class RequestOptions(typing.TypedDict, total=False):
23
23
  - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
24
24
 
25
25
  - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
26
+
27
+ - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads.
26
28
  """
27
29
 
28
30
  timeout_in_seconds: NotRequired[int]
@@ -30,3 +32,4 @@ class RequestOptions(typing.TypedDict, total=False):
30
32
  additional_headers: NotRequired[typing.Dict[str, typing.Any]]
31
33
  additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
32
34
  additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
35
+ chunk_size: NotRequired[int]
@@ -0,0 +1,203 @@
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 ..core.request_options import RequestOptions
6
+ from ..errors.bad_request_error import BadRequestError
7
+ from ..types.validation_problem_details import ValidationProblemDetails
8
+ from ..core.pydantic_utilities import parse_obj_as
9
+ from ..errors.unauthorized_error import UnauthorizedError
10
+ from ..types.problem_details import ProblemDetails
11
+ from ..errors.forbidden_error import ForbiddenError
12
+ from json.decoder import JSONDecodeError
13
+ from ..core.api_error import ApiError
14
+ from ..core.client_wrapper import AsyncClientWrapper
15
+
16
+ # this is used as the default value for optional parameters
17
+ OMIT = typing.cast(typing.Any, ...)
18
+
19
+
20
+ class EnrichmentsClient:
21
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
22
+ self._client_wrapper = client_wrapper
23
+
24
+ def bankaccountverify(
25
+ self,
26
+ *,
27
+ token_id: str,
28
+ country_code: typing.Optional[str] = OMIT,
29
+ routing_number: typing.Optional[str] = OMIT,
30
+ request_options: typing.Optional[RequestOptions] = None,
31
+ ) -> None:
32
+ """
33
+ Parameters
34
+ ----------
35
+ token_id : str
36
+
37
+ country_code : typing.Optional[str]
38
+
39
+ routing_number : typing.Optional[str]
40
+
41
+ request_options : typing.Optional[RequestOptions]
42
+ Request-specific configuration.
43
+
44
+ Returns
45
+ -------
46
+ None
47
+
48
+ Examples
49
+ --------
50
+ from basis_theory import BasisTheory
51
+
52
+ client = BasisTheory(
53
+ api_key="YOUR_API_KEY",
54
+ )
55
+ client.enrichments.bankaccountverify(
56
+ token_id="token_id",
57
+ )
58
+ """
59
+ _response = self._client_wrapper.httpx_client.request(
60
+ "enrichments/bank-account-verify",
61
+ method="POST",
62
+ json={
63
+ "token_id": token_id,
64
+ "country_code": country_code,
65
+ "routing_number": routing_number,
66
+ },
67
+ request_options=request_options,
68
+ omit=OMIT,
69
+ )
70
+ try:
71
+ if 200 <= _response.status_code < 300:
72
+ return
73
+ if _response.status_code == 400:
74
+ raise BadRequestError(
75
+ typing.cast(
76
+ ValidationProblemDetails,
77
+ parse_obj_as(
78
+ type_=ValidationProblemDetails, # type: ignore
79
+ object_=_response.json(),
80
+ ),
81
+ )
82
+ )
83
+ if _response.status_code == 401:
84
+ raise UnauthorizedError(
85
+ typing.cast(
86
+ ProblemDetails,
87
+ parse_obj_as(
88
+ type_=ProblemDetails, # type: ignore
89
+ object_=_response.json(),
90
+ ),
91
+ )
92
+ )
93
+ if _response.status_code == 403:
94
+ raise ForbiddenError(
95
+ typing.cast(
96
+ ProblemDetails,
97
+ parse_obj_as(
98
+ type_=ProblemDetails, # type: ignore
99
+ object_=_response.json(),
100
+ ),
101
+ )
102
+ )
103
+ _response_json = _response.json()
104
+ except JSONDecodeError:
105
+ raise ApiError(status_code=_response.status_code, body=_response.text)
106
+ raise ApiError(status_code=_response.status_code, body=_response_json)
107
+
108
+
109
+ class AsyncEnrichmentsClient:
110
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
111
+ self._client_wrapper = client_wrapper
112
+
113
+ async def bankaccountverify(
114
+ self,
115
+ *,
116
+ token_id: str,
117
+ country_code: typing.Optional[str] = OMIT,
118
+ routing_number: typing.Optional[str] = OMIT,
119
+ request_options: typing.Optional[RequestOptions] = None,
120
+ ) -> None:
121
+ """
122
+ Parameters
123
+ ----------
124
+ token_id : str
125
+
126
+ country_code : typing.Optional[str]
127
+
128
+ routing_number : typing.Optional[str]
129
+
130
+ request_options : typing.Optional[RequestOptions]
131
+ Request-specific configuration.
132
+
133
+ Returns
134
+ -------
135
+ None
136
+
137
+ Examples
138
+ --------
139
+ import asyncio
140
+
141
+ from basis_theory import AsyncBasisTheory
142
+
143
+ client = AsyncBasisTheory(
144
+ api_key="YOUR_API_KEY",
145
+ )
146
+
147
+
148
+ async def main() -> None:
149
+ await client.enrichments.bankaccountverify(
150
+ token_id="token_id",
151
+ )
152
+
153
+
154
+ asyncio.run(main())
155
+ """
156
+ _response = await self._client_wrapper.httpx_client.request(
157
+ "enrichments/bank-account-verify",
158
+ method="POST",
159
+ json={
160
+ "token_id": token_id,
161
+ "country_code": country_code,
162
+ "routing_number": routing_number,
163
+ },
164
+ request_options=request_options,
165
+ omit=OMIT,
166
+ )
167
+ try:
168
+ if 200 <= _response.status_code < 300:
169
+ return
170
+ if _response.status_code == 400:
171
+ raise BadRequestError(
172
+ typing.cast(
173
+ ValidationProblemDetails,
174
+ parse_obj_as(
175
+ type_=ValidationProblemDetails, # type: ignore
176
+ object_=_response.json(),
177
+ ),
178
+ )
179
+ )
180
+ if _response.status_code == 401:
181
+ raise UnauthorizedError(
182
+ typing.cast(
183
+ ProblemDetails,
184
+ parse_obj_as(
185
+ type_=ProblemDetails, # type: ignore
186
+ object_=_response.json(),
187
+ ),
188
+ )
189
+ )
190
+ if _response.status_code == 403:
191
+ raise ForbiddenError(
192
+ typing.cast(
193
+ ProblemDetails,
194
+ parse_obj_as(
195
+ type_=ProblemDetails, # type: ignore
196
+ object_=_response.json(),
197
+ ),
198
+ )
199
+ )
200
+ _response_json = _response.json()
201
+ except JSONDecodeError:
202
+ raise ApiError(status_code=_response.status_code, body=_response.text)
203
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from . import connections, invitations, members, owner, self_
4
+
5
+ __all__ = ["connections", "invitations", "members", "owner", "self_"]
@@ -4,11 +4,13 @@ from ..core.client_wrapper import SyncClientWrapper
4
4
  from .connections.client import ConnectionsClient
5
5
  from .invitations.client import InvitationsClient
6
6
  from .members.client import MembersClient
7
+ from .owner.client import OwnerClient
7
8
  from .self_.client import SelfClient
8
9
  from ..core.client_wrapper import AsyncClientWrapper
9
10
  from .connections.client import AsyncConnectionsClient
10
11
  from .invitations.client import AsyncInvitationsClient
11
12
  from .members.client import AsyncMembersClient
13
+ from .owner.client import AsyncOwnerClient
12
14
  from .self_.client import AsyncSelfClient
13
15
 
14
16
 
@@ -18,6 +20,7 @@ class TenantsClient:
18
20
  self.connections = ConnectionsClient(client_wrapper=self._client_wrapper)
19
21
  self.invitations = InvitationsClient(client_wrapper=self._client_wrapper)
20
22
  self.members = MembersClient(client_wrapper=self._client_wrapper)
23
+ self.owner = OwnerClient(client_wrapper=self._client_wrapper)
21
24
  self.self_ = SelfClient(client_wrapper=self._client_wrapper)
22
25
 
23
26
 
@@ -27,4 +30,5 @@ class AsyncTenantsClient:
27
30
  self.connections = AsyncConnectionsClient(client_wrapper=self._client_wrapper)
28
31
  self.invitations = AsyncInvitationsClient(client_wrapper=self._client_wrapper)
29
32
  self.members = AsyncMembersClient(client_wrapper=self._client_wrapper)
33
+ self.owner = AsyncOwnerClient(client_wrapper=self._client_wrapper)
30
34
  self.self_ = AsyncSelfClient(client_wrapper=self._client_wrapper)