paid-python 1.4.1__tar.gz → 1.5.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.
Files changed (137) hide show
  1. {paid_python-1.4.1 → paid_python-1.5.0}/PKG-INFO +1 -1
  2. {paid_python-1.4.1 → paid_python-1.5.0}/pyproject.toml +4 -4
  3. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/__init__.py +21 -1
  4. paid_python-1.5.0/src/paid/checkouts/__init__.py +34 -0
  5. paid_python-1.5.0/src/paid/checkouts/client.py +410 -0
  6. paid_python-1.5.0/src/paid/checkouts/raw_client.py +718 -0
  7. paid_python-1.5.0/src/paid/checkouts/types/__init__.py +34 -0
  8. paid_python-1.5.0/src/paid/checkouts/types/list_checkouts_request_status.py +5 -0
  9. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/client.py +19 -0
  10. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/client_wrapper.py +2 -2
  11. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/__init__.py +15 -0
  12. paid_python-1.5.0/src/paid/types/checkout.py +44 -0
  13. paid_python-1.5.0/src/paid/types/checkout_list_response.py +22 -0
  14. paid_python-1.5.0/src/paid/types/checkout_product.py +19 -0
  15. paid_python-1.5.0/src/paid/types/checkout_product_input.py +19 -0
  16. paid_python-1.5.0/src/paid/types/checkout_status.py +5 -0
  17. {paid_python-1.4.1 → paid_python-1.5.0}/LICENSE +0 -0
  18. {paid_python-1.4.1 → paid_python-1.5.0}/README.md +0 -0
  19. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/contacts/__init__.py +0 -0
  20. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/contacts/client.py +0 -0
  21. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/contacts/raw_client.py +0 -0
  22. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/contacts/types/__init__.py +0 -0
  23. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/contacts/types/create_contact_request_roles_item.py +0 -0
  24. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/__init__.py +0 -0
  25. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/api_error.py +0 -0
  26. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/datetime_utils.py +0 -0
  27. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/file.py +0 -0
  28. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/force_multipart.py +0 -0
  29. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_client.py +0 -0
  30. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_response.py +0 -0
  31. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_sse/__init__.py +0 -0
  32. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_sse/_api.py +0 -0
  33. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_sse/_decoders.py +0 -0
  34. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_sse/_exceptions.py +0 -0
  35. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/http_sse/_models.py +0 -0
  36. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/jsonable_encoder.py +0 -0
  37. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/pydantic_utilities.py +0 -0
  38. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/query_encoder.py +0 -0
  39. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/remove_none_from_dict.py +0 -0
  40. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/request_options.py +0 -0
  41. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/core/serialization.py +0 -0
  42. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/customers/__init__.py +0 -0
  43. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/customers/client.py +0 -0
  44. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/customers/raw_client.py +0 -0
  45. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/environment.py +0 -0
  46. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/errors/__init__.py +0 -0
  47. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/errors/bad_request_error.py +0 -0
  48. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/errors/forbidden_error.py +0 -0
  49. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/errors/internal_server_error.py +0 -0
  50. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/errors/not_found_error.py +0 -0
  51. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/invoices/__init__.py +0 -0
  52. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/invoices/client.py +0 -0
  53. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/invoices/raw_client.py +0 -0
  54. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/logger.py +0 -0
  55. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/orders/__init__.py +0 -0
  56. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/orders/client.py +0 -0
  57. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/orders/raw_client.py +0 -0
  58. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/products/__init__.py +0 -0
  59. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/products/client.py +0 -0
  60. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/products/raw_client.py +0 -0
  61. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/py.typed +0 -0
  62. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/signals/__init__.py +0 -0
  63. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/signals/client.py +0 -0
  64. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/signals/raw_client.py +0 -0
  65. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/__init__.py +0 -0
  66. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/anthropic_patches/__init__.py +0 -0
  67. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/anthropic_patches/patches.py +0 -0
  68. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/autoinstrumentation.py +0 -0
  69. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/context_data.py +0 -0
  70. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/context_manager.py +0 -0
  71. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/distributed_tracing.py +0 -0
  72. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/gemini_patches/__init__.py +0 -0
  73. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/gemini_patches/patches.py +0 -0
  74. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/openai_agents_patches/__init__.py +0 -0
  75. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/openai_agents_patches/patches.py +0 -0
  76. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/openai_patches/__init__.py +0 -0
  77. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/openai_patches/patches.py +0 -0
  78. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/signal.py +0 -0
  79. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/tracing.py +0 -0
  80. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/__init__.py +0 -0
  81. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/anthropic/__init__.py +0 -0
  82. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/anthropic/anthropicWrapper.py +0 -0
  83. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/bedrock/__init__.py +0 -0
  84. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/bedrock/bedrockWrapper.py +0 -0
  85. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/gemini/__init__.py +0 -0
  86. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/gemini/geminiWrapper.py +0 -0
  87. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/langchain/__init__.py +0 -0
  88. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/langchain/paidLangChainCallback.py +0 -0
  89. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/mistral/__init__.py +0 -0
  90. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/mistral/mistralWrapper.py +0 -0
  91. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/openai/__init__.py +0 -0
  92. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/openai/openAiWrapper.py +0 -0
  93. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/openai_agents/__init__.py +0 -0
  94. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/openai_agents/openaiAgentsHook.py +0 -0
  95. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/tracing/wrappers/utils.py +0 -0
  96. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/attribution.py +0 -0
  97. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/bulk_signals_response.py +0 -0
  98. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/contact.py +0 -0
  99. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/contact_billing_address.py +0 -0
  100. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/contact_list_response.py +0 -0
  101. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/contact_roles_item.py +0 -0
  102. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/create_order_line_attribute_request.py +0 -0
  103. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/create_order_line_request.py +0 -0
  104. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer.py +0 -0
  105. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_attribution.py +0 -0
  106. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_billing_address.py +0 -0
  107. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_by_external_id.py +0 -0
  108. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_by_id.py +0 -0
  109. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_creation_state.py +0 -0
  110. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/customer_list_response.py +0 -0
  111. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/empty_response.py +0 -0
  112. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/error_response.py +0 -0
  113. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice.py +0 -0
  114. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_line.py +0 -0
  115. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_line_payment_status.py +0 -0
  116. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_lines_response.py +0 -0
  117. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_list_response.py +0 -0
  118. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_payment_status.py +0 -0
  119. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_source.py +0 -0
  120. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_status.py +0 -0
  121. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/invoice_tax_status.py +0 -0
  122. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/order.py +0 -0
  123. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/order_creation_state.py +0 -0
  124. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/order_line.py +0 -0
  125. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/order_lines_response.py +0 -0
  126. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/order_list_response.py +0 -0
  127. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/pagination.py +0 -0
  128. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/product.py +0 -0
  129. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/product_by_external_id.py +0 -0
  130. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/product_by_id.py +0 -0
  131. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/product_list_response.py +0 -0
  132. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/signal.py +0 -0
  133. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/update_contact_request.py +0 -0
  134. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/update_contact_request_roles_item.py +0 -0
  135. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/update_customer_request.py +0 -0
  136. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/types/update_product_request.py +0 -0
  137. {paid_python-1.4.1 → paid_python-1.5.0}/src/paid/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paid-python
3
- Version: 1.4.1
3
+ Version: 1.5.0
4
4
  Summary:
5
5
  Requires-Python: >=3.10,<3.14
6
6
  Classifier: Intended Audience :: Developers
@@ -4,7 +4,7 @@ dynamic = ["version"]
4
4
 
5
5
  [tool.poetry]
6
6
  name = "paid-python"
7
- version = "1.4.1"
7
+ version = "1.5.0"
8
8
  description = ""
9
9
  readme = "README.md"
10
10
  authors = []
@@ -39,12 +39,12 @@ httpx = ">=0.21.2"
39
39
  mutagen = ">=1.47.0"
40
40
  openinference-instrumentation-anthropic = ">=0.1.20,<1.0.0"
41
41
  openinference-instrumentation-bedrock = ">=0.1.0"
42
+ openinference-instrumentation-claude-agent-sdk = ">=0.1.0"
42
43
  openinference-instrumentation-google-genai = ">=0.1.8"
43
44
  openinference-instrumentation-instructor = ">=0.1.0"
44
45
  openinference-instrumentation-langchain = ">=0.1.55"
45
46
  openinference-instrumentation-openai = ">=0.1.40"
46
47
  openinference-instrumentation-openai-agents = ">=1.0.0"
47
- openinference-instrumentation-claude-agent-sdk = ">=0.1.0"
48
48
  opentelemetry-api = ">=1.23.0"
49
49
  opentelemetry-exporter-otlp-proto-http = ">=1.23.0"
50
50
  opentelemetry-sdk = ">=1.23.0"
@@ -60,11 +60,11 @@ pytest-xdist = "^3.6.1"
60
60
  python-dateutil = "^2.9.0"
61
61
  types-python-dateutil = "^2.9.0.20240316"
62
62
  anthropic = ">=0.57.0"
63
- claude-agent-sdk = ">=0.1.0"
63
+ claude-agent-sdk = ">=0.1.0,<0.1.49"
64
64
  google-genai = ">=1.19.0"
65
65
  instructor = ">=1.0.0"
66
66
  langchain-core = ">=0.1.0"
67
- mistralai = ">=1.9.0"
67
+ mistralai = ">=1.9.0,<2.0.0"
68
68
  openai = ">=1.12.0"
69
69
  openai-agents = ">=0.2.0"
70
70
  pydantic-ai = ">=1.41.0"
@@ -9,6 +9,11 @@ if typing.TYPE_CHECKING:
9
9
  from .types import (
10
10
  Attribution,
11
11
  BulkSignalsResponse,
12
+ Checkout,
13
+ CheckoutListResponse,
14
+ CheckoutProduct,
15
+ CheckoutProductInput,
16
+ CheckoutStatus,
12
17
  Contact,
13
18
  ContactBillingAddress,
14
19
  ContactListResponse,
@@ -50,7 +55,8 @@ if typing.TYPE_CHECKING:
50
55
  UpdateProductRequest,
51
56
  )
52
57
  from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError
53
- from . import contacts, customers, invoices, orders, products, signals
58
+ from . import checkouts, contacts, customers, invoices, orders, products, signals
59
+ from .checkouts import ListCheckoutsRequestStatus
54
60
  from .client import AsyncPaid, Paid
55
61
  from .contacts import CreateContactRequestRolesItem
56
62
  from .environment import PaidEnvironment
@@ -60,6 +66,11 @@ _dynamic_imports: typing.Dict[str, str] = {
60
66
  "Attribution": ".types",
61
67
  "BadRequestError": ".errors",
62
68
  "BulkSignalsResponse": ".types",
69
+ "Checkout": ".types",
70
+ "CheckoutListResponse": ".types",
71
+ "CheckoutProduct": ".types",
72
+ "CheckoutProductInput": ".types",
73
+ "CheckoutStatus": ".types",
63
74
  "Contact": ".types",
64
75
  "ContactBillingAddress": ".types",
65
76
  "ContactListResponse": ".types",
@@ -87,6 +98,7 @@ _dynamic_imports: typing.Dict[str, str] = {
87
98
  "InvoiceSource": ".types",
88
99
  "InvoiceStatus": ".types",
89
100
  "InvoiceTaxStatus": ".types",
101
+ "ListCheckoutsRequestStatus": ".checkouts",
90
102
  "NotFoundError": ".errors",
91
103
  "Order": ".types",
92
104
  "OrderCreationState": ".types",
@@ -106,6 +118,7 @@ _dynamic_imports: typing.Dict[str, str] = {
106
118
  "UpdateCustomerRequest": ".types",
107
119
  "UpdateProductRequest": ".types",
108
120
  "__version__": ".version",
121
+ "checkouts": ".checkouts",
109
122
  "contacts": ".contacts",
110
123
  "customers": ".customers",
111
124
  "invoices": ".invoices",
@@ -141,6 +154,11 @@ __all__ = [
141
154
  "Attribution",
142
155
  "BadRequestError",
143
156
  "BulkSignalsResponse",
157
+ "Checkout",
158
+ "CheckoutListResponse",
159
+ "CheckoutProduct",
160
+ "CheckoutProductInput",
161
+ "CheckoutStatus",
144
162
  "Contact",
145
163
  "ContactBillingAddress",
146
164
  "ContactListResponse",
@@ -168,6 +186,7 @@ __all__ = [
168
186
  "InvoiceSource",
169
187
  "InvoiceStatus",
170
188
  "InvoiceTaxStatus",
189
+ "ListCheckoutsRequestStatus",
171
190
  "NotFoundError",
172
191
  "Order",
173
192
  "OrderCreationState",
@@ -187,6 +206,7 @@ __all__ = [
187
206
  "UpdateCustomerRequest",
188
207
  "UpdateProductRequest",
189
208
  "__version__",
209
+ "checkouts",
190
210
  "contacts",
191
211
  "customers",
192
212
  "invoices",
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .types import ListCheckoutsRequestStatus
10
+ _dynamic_imports: typing.Dict[str, str] = {"ListCheckoutsRequestStatus": ".types"}
11
+
12
+
13
+ def __getattr__(attr_name: str) -> typing.Any:
14
+ module_name = _dynamic_imports.get(attr_name)
15
+ if module_name is None:
16
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17
+ try:
18
+ module = import_module(module_name, __package__)
19
+ if module_name == f".{attr_name}":
20
+ return module
21
+ else:
22
+ return getattr(module, attr_name)
23
+ except ImportError as e:
24
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25
+ except AttributeError as e:
26
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27
+
28
+
29
+ def __dir__():
30
+ lazy_attrs = list(_dynamic_imports.keys())
31
+ return sorted(lazy_attrs)
32
+
33
+
34
+ __all__ = ["ListCheckoutsRequestStatus"]
@@ -0,0 +1,410 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.checkout import Checkout
9
+ from ..types.checkout_list_response import CheckoutListResponse
10
+ from ..types.checkout_product_input import CheckoutProductInput
11
+ from ..types.empty_response import EmptyResponse
12
+ from .raw_client import AsyncRawCheckoutsClient, RawCheckoutsClient
13
+ from .types.list_checkouts_request_status import ListCheckoutsRequestStatus
14
+
15
+ # this is used as the default value for optional parameters
16
+ OMIT = typing.cast(typing.Any, ...)
17
+
18
+
19
+ class CheckoutsClient:
20
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
21
+ self._raw_client = RawCheckoutsClient(client_wrapper=client_wrapper)
22
+
23
+ @property
24
+ def with_raw_response(self) -> RawCheckoutsClient:
25
+ """
26
+ Retrieves a raw implementation of this client that returns raw responses.
27
+
28
+ Returns
29
+ -------
30
+ RawCheckoutsClient
31
+ """
32
+ return self._raw_client
33
+
34
+ def list_checkouts(
35
+ self,
36
+ *,
37
+ limit: typing.Optional[int] = None,
38
+ offset: typing.Optional[int] = None,
39
+ status: typing.Optional[ListCheckoutsRequestStatus] = None,
40
+ request_options: typing.Optional[RequestOptions] = None,
41
+ ) -> CheckoutListResponse:
42
+ """
43
+ Get a list of checkouts for the organization
44
+
45
+ Parameters
46
+ ----------
47
+ limit : typing.Optional[int]
48
+
49
+ offset : typing.Optional[int]
50
+
51
+ status : typing.Optional[ListCheckoutsRequestStatus]
52
+
53
+ request_options : typing.Optional[RequestOptions]
54
+ Request-specific configuration.
55
+
56
+ Returns
57
+ -------
58
+ CheckoutListResponse
59
+ 200
60
+
61
+ Examples
62
+ --------
63
+ from paid import Paid
64
+
65
+ client = Paid(
66
+ token="YOUR_TOKEN",
67
+ )
68
+ client.checkouts.list_checkouts()
69
+ """
70
+ _response = self._raw_client.list_checkouts(
71
+ limit=limit, offset=offset, status=status, request_options=request_options
72
+ )
73
+ return _response.data
74
+
75
+ def create_checkout(
76
+ self,
77
+ *,
78
+ products: typing.Sequence[CheckoutProductInput],
79
+ success_url: str,
80
+ customer_id: typing.Optional[str] = OMIT,
81
+ cancel_url: typing.Optional[str] = OMIT,
82
+ expires_at: typing.Optional[dt.datetime] = OMIT,
83
+ metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
84
+ request_options: typing.Optional[RequestOptions] = None,
85
+ ) -> Checkout:
86
+ """
87
+ Creates a checkout link that generates a URL for a customer to complete a purchase
88
+
89
+ Parameters
90
+ ----------
91
+ products : typing.Sequence[CheckoutProductInput]
92
+
93
+ success_url : str
94
+
95
+ customer_id : typing.Optional[str]
96
+
97
+ cancel_url : typing.Optional[str]
98
+
99
+ expires_at : typing.Optional[dt.datetime]
100
+
101
+ metadata : typing.Optional[typing.Dict[str, typing.Any]]
102
+
103
+ request_options : typing.Optional[RequestOptions]
104
+ Request-specific configuration.
105
+
106
+ Returns
107
+ -------
108
+ Checkout
109
+ 201
110
+
111
+ Examples
112
+ --------
113
+ from paid import CheckoutProductInput, Paid
114
+
115
+ client = Paid(
116
+ token="YOUR_TOKEN",
117
+ )
118
+ client.checkouts.create_checkout(
119
+ products=[
120
+ CheckoutProductInput(
121
+ id="id",
122
+ )
123
+ ],
124
+ success_url="successUrl",
125
+ )
126
+ """
127
+ _response = self._raw_client.create_checkout(
128
+ products=products,
129
+ success_url=success_url,
130
+ customer_id=customer_id,
131
+ cancel_url=cancel_url,
132
+ expires_at=expires_at,
133
+ metadata=metadata,
134
+ request_options=request_options,
135
+ )
136
+ return _response.data
137
+
138
+ def get_checkout(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Checkout:
139
+ """
140
+ Get a checkout by ID
141
+
142
+ Parameters
143
+ ----------
144
+ id : str
145
+
146
+ request_options : typing.Optional[RequestOptions]
147
+ Request-specific configuration.
148
+
149
+ Returns
150
+ -------
151
+ Checkout
152
+ 200
153
+
154
+ Examples
155
+ --------
156
+ from paid import Paid
157
+
158
+ client = Paid(
159
+ token="YOUR_TOKEN",
160
+ )
161
+ client.checkouts.get_checkout(
162
+ id="id",
163
+ )
164
+ """
165
+ _response = self._raw_client.get_checkout(id, request_options=request_options)
166
+ return _response.data
167
+
168
+ def archive_checkout(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> EmptyResponse:
169
+ """
170
+ Archive a checkout by ID
171
+
172
+ Parameters
173
+ ----------
174
+ id : str
175
+
176
+ request_options : typing.Optional[RequestOptions]
177
+ Request-specific configuration.
178
+
179
+ Returns
180
+ -------
181
+ EmptyResponse
182
+ 200
183
+
184
+ Examples
185
+ --------
186
+ from paid import Paid
187
+
188
+ client = Paid(
189
+ token="YOUR_TOKEN",
190
+ )
191
+ client.checkouts.archive_checkout(
192
+ id="id",
193
+ )
194
+ """
195
+ _response = self._raw_client.archive_checkout(id, request_options=request_options)
196
+ return _response.data
197
+
198
+
199
+ class AsyncCheckoutsClient:
200
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
201
+ self._raw_client = AsyncRawCheckoutsClient(client_wrapper=client_wrapper)
202
+
203
+ @property
204
+ def with_raw_response(self) -> AsyncRawCheckoutsClient:
205
+ """
206
+ Retrieves a raw implementation of this client that returns raw responses.
207
+
208
+ Returns
209
+ -------
210
+ AsyncRawCheckoutsClient
211
+ """
212
+ return self._raw_client
213
+
214
+ async def list_checkouts(
215
+ self,
216
+ *,
217
+ limit: typing.Optional[int] = None,
218
+ offset: typing.Optional[int] = None,
219
+ status: typing.Optional[ListCheckoutsRequestStatus] = None,
220
+ request_options: typing.Optional[RequestOptions] = None,
221
+ ) -> CheckoutListResponse:
222
+ """
223
+ Get a list of checkouts for the organization
224
+
225
+ Parameters
226
+ ----------
227
+ limit : typing.Optional[int]
228
+
229
+ offset : typing.Optional[int]
230
+
231
+ status : typing.Optional[ListCheckoutsRequestStatus]
232
+
233
+ request_options : typing.Optional[RequestOptions]
234
+ Request-specific configuration.
235
+
236
+ Returns
237
+ -------
238
+ CheckoutListResponse
239
+ 200
240
+
241
+ Examples
242
+ --------
243
+ import asyncio
244
+
245
+ from paid import AsyncPaid
246
+
247
+ client = AsyncPaid(
248
+ token="YOUR_TOKEN",
249
+ )
250
+
251
+
252
+ async def main() -> None:
253
+ await client.checkouts.list_checkouts()
254
+
255
+
256
+ asyncio.run(main())
257
+ """
258
+ _response = await self._raw_client.list_checkouts(
259
+ limit=limit, offset=offset, status=status, request_options=request_options
260
+ )
261
+ return _response.data
262
+
263
+ async def create_checkout(
264
+ self,
265
+ *,
266
+ products: typing.Sequence[CheckoutProductInput],
267
+ success_url: str,
268
+ customer_id: typing.Optional[str] = OMIT,
269
+ cancel_url: typing.Optional[str] = OMIT,
270
+ expires_at: typing.Optional[dt.datetime] = OMIT,
271
+ metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
272
+ request_options: typing.Optional[RequestOptions] = None,
273
+ ) -> Checkout:
274
+ """
275
+ Creates a checkout link that generates a URL for a customer to complete a purchase
276
+
277
+ Parameters
278
+ ----------
279
+ products : typing.Sequence[CheckoutProductInput]
280
+
281
+ success_url : str
282
+
283
+ customer_id : typing.Optional[str]
284
+
285
+ cancel_url : typing.Optional[str]
286
+
287
+ expires_at : typing.Optional[dt.datetime]
288
+
289
+ metadata : typing.Optional[typing.Dict[str, typing.Any]]
290
+
291
+ request_options : typing.Optional[RequestOptions]
292
+ Request-specific configuration.
293
+
294
+ Returns
295
+ -------
296
+ Checkout
297
+ 201
298
+
299
+ Examples
300
+ --------
301
+ import asyncio
302
+
303
+ from paid import AsyncPaid, CheckoutProductInput
304
+
305
+ client = AsyncPaid(
306
+ token="YOUR_TOKEN",
307
+ )
308
+
309
+
310
+ async def main() -> None:
311
+ await client.checkouts.create_checkout(
312
+ products=[
313
+ CheckoutProductInput(
314
+ id="id",
315
+ )
316
+ ],
317
+ success_url="successUrl",
318
+ )
319
+
320
+
321
+ asyncio.run(main())
322
+ """
323
+ _response = await self._raw_client.create_checkout(
324
+ products=products,
325
+ success_url=success_url,
326
+ customer_id=customer_id,
327
+ cancel_url=cancel_url,
328
+ expires_at=expires_at,
329
+ metadata=metadata,
330
+ request_options=request_options,
331
+ )
332
+ return _response.data
333
+
334
+ async def get_checkout(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Checkout:
335
+ """
336
+ Get a checkout by ID
337
+
338
+ Parameters
339
+ ----------
340
+ id : str
341
+
342
+ request_options : typing.Optional[RequestOptions]
343
+ Request-specific configuration.
344
+
345
+ Returns
346
+ -------
347
+ Checkout
348
+ 200
349
+
350
+ Examples
351
+ --------
352
+ import asyncio
353
+
354
+ from paid import AsyncPaid
355
+
356
+ client = AsyncPaid(
357
+ token="YOUR_TOKEN",
358
+ )
359
+
360
+
361
+ async def main() -> None:
362
+ await client.checkouts.get_checkout(
363
+ id="id",
364
+ )
365
+
366
+
367
+ asyncio.run(main())
368
+ """
369
+ _response = await self._raw_client.get_checkout(id, request_options=request_options)
370
+ return _response.data
371
+
372
+ async def archive_checkout(
373
+ self, id: str, *, request_options: typing.Optional[RequestOptions] = None
374
+ ) -> EmptyResponse:
375
+ """
376
+ Archive a checkout by ID
377
+
378
+ Parameters
379
+ ----------
380
+ id : str
381
+
382
+ request_options : typing.Optional[RequestOptions]
383
+ Request-specific configuration.
384
+
385
+ Returns
386
+ -------
387
+ EmptyResponse
388
+ 200
389
+
390
+ Examples
391
+ --------
392
+ import asyncio
393
+
394
+ from paid import AsyncPaid
395
+
396
+ client = AsyncPaid(
397
+ token="YOUR_TOKEN",
398
+ )
399
+
400
+
401
+ async def main() -> None:
402
+ await client.checkouts.archive_checkout(
403
+ id="id",
404
+ )
405
+
406
+
407
+ asyncio.run(main())
408
+ """
409
+ _response = await self._raw_client.archive_checkout(id, request_options=request_options)
410
+ return _response.data