paid-python 1.0.0a0__py3-none-any.whl → 1.0.0a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. paid/__init__.py +61 -122
  2. paid/client.py +16 -22
  3. paid/contacts/client.py +415 -133
  4. paid/contacts/raw_client.py +1046 -118
  5. paid/core/client_wrapper.py +8 -10
  6. paid/customers/__init__.py +0 -3
  7. paid/customers/client.py +392 -1112
  8. paid/customers/raw_client.py +656 -1054
  9. paid/environment.py +1 -1
  10. paid/errors/bad_request_error.py +2 -2
  11. paid/errors/forbidden_error.py +2 -2
  12. paid/errors/internal_server_error.py +2 -2
  13. paid/errors/not_found_error.py +2 -2
  14. paid/invoices/client.py +369 -0
  15. paid/{plans → invoices}/raw_client.py +310 -201
  16. paid/orders/__init__.py +0 -3
  17. paid/orders/client.py +279 -471
  18. paid/orders/raw_client.py +551 -538
  19. paid/products/__init__.py +0 -3
  20. paid/products/client.py +129 -265
  21. paid/products/raw_client.py +563 -233
  22. paid/signals/client.py +130 -0
  23. paid/signals/raw_client.py +190 -0
  24. paid/tracing/autoinstrumentation.py +12 -6
  25. paid/tracing/context_manager.py +2 -6
  26. paid/tracing/distributed_tracing.py +3 -3
  27. paid/tracing/signal.py +3 -3
  28. paid/tracing/wrappers/openai_agents/openaiAgentsHook.py +1 -1
  29. paid/types/__init__.py +58 -110
  30. paid/types/attribution.py +8 -0
  31. paid/types/{agent_attribute.py → bulk_signals_response.py} +4 -5
  32. paid/types/contact.py +12 -20
  33. paid/types/{address.py → contact_billing_address.py} +6 -7
  34. paid/types/{traces_response.py → contact_list_response.py} +5 -9
  35. paid/types/customer.py +15 -22
  36. paid/types/customer_attribution.py +8 -0
  37. paid/types/customer_billing_address.py +26 -0
  38. paid/types/{usage_summary_order.py → customer_by_external_id.py} +3 -5
  39. paid/types/{usage_summary_order_line.py → customer_by_id.py} +3 -5
  40. paid/types/customer_creation_state.py +5 -0
  41. paid/types/customer_list_response.py +22 -0
  42. paid/types/empty_response.py +17 -0
  43. paid/types/{error.py → error_response.py} +4 -7
  44. paid/types/invoice.py +33 -51
  45. paid/types/invoice_line.py +42 -0
  46. paid/types/invoice_line_payment_status.py +7 -0
  47. paid/types/invoice_lines_response.py +22 -0
  48. paid/types/invoice_list_response.py +22 -0
  49. paid/types/invoice_payment_status.py +5 -0
  50. paid/types/invoice_source.py +5 -0
  51. paid/types/invoice_status.py +3 -1
  52. paid/types/invoice_tax_status.py +7 -0
  53. paid/types/order.py +30 -29
  54. paid/types/order_creation_state.py +5 -0
  55. paid/types/order_line.py +6 -24
  56. paid/types/order_lines_response.py +22 -0
  57. paid/types/order_list_response.py +22 -0
  58. paid/types/pagination.py +24 -0
  59. paid/types/product.py +4 -29
  60. paid/types/{tier.py → product_by_external_id.py} +5 -4
  61. paid/types/{cost_amount.py → product_by_id.py} +5 -12
  62. paid/types/product_list_response.py +22 -0
  63. paid/types/signal.py +8 -34
  64. paid/types/{agent_update.py → update_contact_request.py} +10 -9
  65. paid/types/update_customer_request.py +38 -0
  66. paid/types/{product_update.py → update_product_request.py} +2 -12
  67. {paid_python-1.0.0a0.dist-info → paid_python-1.0.0a1.dist-info}/METADATA +22 -8
  68. paid_python-1.0.0a1.dist-info/RECORD +110 -0
  69. paid/agents/client.py +0 -880
  70. paid/agents/raw_client.py +0 -785
  71. paid/customers/types/__init__.py +0 -8
  72. paid/customers/types/customers_check_entitlement_request_view.py +0 -5
  73. paid/customers/types/customers_check_entitlement_response.py +0 -22
  74. paid/orders/lines/client.py +0 -144
  75. paid/orders/lines/raw_client.py +0 -129
  76. paid/plans/__init__.py +0 -4
  77. paid/plans/client.py +0 -403
  78. paid/products/types/__init__.py +0 -7
  79. paid/products/types/product_create_type.py +0 -5
  80. paid/traces/__init__.py +0 -4
  81. paid/traces/client.py +0 -218
  82. paid/traces/raw_client.py +0 -226
  83. paid/types/agent.py +0 -31
  84. paid/types/agent_price_point.py +0 -27
  85. paid/types/agent_price_point_tiers.py +0 -23
  86. paid/types/api_error.py +0 -29
  87. paid/types/billing_frequency.py +0 -5
  88. paid/types/cancel_renewal_response.py +0 -49
  89. paid/types/charge_type.py +0 -5
  90. paid/types/contact_create_for_customer.py +0 -37
  91. paid/types/cost_trace.py +0 -55
  92. paid/types/cost_traces_response.py +0 -26
  93. paid/types/creation_source.py +0 -5
  94. paid/types/creation_state.py +0 -5
  95. paid/types/customer_update.py +0 -40
  96. paid/types/entitlement_usage.py +0 -48
  97. paid/types/order_line_attribute.py +0 -27
  98. paid/types/order_line_attribute_create_one.py +0 -5
  99. paid/types/order_line_attribute_pricing.py +0 -33
  100. paid/types/order_line_create.py +0 -72
  101. paid/types/pagination_meta.py +0 -84
  102. paid/types/payment_method.py +0 -58
  103. paid/types/payment_method_card.py +0 -49
  104. paid/types/payment_method_type.py +0 -5
  105. paid/types/payment_method_us_bank_account.py +0 -36
  106. paid/types/payment_method_us_bank_account_account_type.py +0 -5
  107. paid/types/plan.py +0 -81
  108. paid/types/plan_group.py +0 -60
  109. paid/types/plan_plan_products_item.py +0 -41
  110. paid/types/plan_plan_products_item_plan_product_attribute_item.py +0 -34
  111. paid/types/plan_with_features.py +0 -69
  112. paid/types/plan_with_features_features_item.py +0 -34
  113. paid/types/price_point.py +0 -25
  114. paid/types/pricing.py +0 -31
  115. paid/types/pricing_model_type.py +0 -7
  116. paid/types/product_type.py +0 -5
  117. paid/types/product_update_type.py +0 -5
  118. paid/types/proration_attribute_update.py +0 -44
  119. paid/types/proration_detail.py +0 -49
  120. paid/types/proration_upgrade_response.py +0 -73
  121. paid/types/salutation.py +0 -5
  122. paid/types/signal_v_2.py +0 -56
  123. paid/types/tax_exempt_status.py +0 -5
  124. paid/types/trace.py +0 -69
  125. paid/types/usage_pagination_meta.py +0 -43
  126. paid/types/usage_summaries_response.py +0 -26
  127. paid/types/usage_summary.py +0 -121
  128. paid/usage/__init__.py +0 -7
  129. paid/usage/client.py +0 -321
  130. paid/usage/raw_client.py +0 -387
  131. paid/usage/types/__init__.py +0 -7
  132. paid/usage/types/usage_check_usage_response.py +0 -53
  133. paid_python-1.0.0a0.dist-info/RECORD +0 -152
  134. /paid/{agents → invoices}/__init__.py +0 -0
  135. /paid/{orders/lines → signals}/__init__.py +0 -0
  136. {paid_python-1.0.0a0.dist-info → paid_python-1.0.0a1.dist-info}/LICENSE +0 -0
  137. {paid_python-1.0.0a0.dist-info → paid_python-1.0.0a1.dist-info}/WHEEL +0 -0
paid/types/order_line.py CHANGED
@@ -1,39 +1,21 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import datetime as dt
3
4
  import typing
4
5
 
5
6
  import pydantic
6
7
  import typing_extensions
7
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
9
  from ..core.serialization import FieldMetadata
9
- from .agent import Agent
10
- from .creation_state import CreationState
11
- from .order_line_attribute import OrderLineAttribute
12
10
 
13
11
 
14
12
  class OrderLine(UniversalBaseModel):
15
- id: typing.Optional[str] = None
16
- order_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="orderId")] = None
17
- agent_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentId")] = None
18
- name: typing.Optional[str] = None
13
+ id: str
14
+ product_id: typing_extensions.Annotated[str, FieldMetadata(alias="productId")]
15
+ name: str
19
16
  description: typing.Optional[str] = None
20
- start_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="startDate")] = None
21
- end_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endDate")] = None
22
- total_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="totalAmount")] = None
23
- billed_amount_without_tax: typing_extensions.Annotated[
24
- typing.Optional[float], FieldMetadata(alias="billedAmountWithoutTax")
25
- ] = None
26
- billed_tax: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="billedTax")] = None
27
- total_billed_amount: typing_extensions.Annotated[
28
- typing.Optional[float], FieldMetadata(alias="totalBilledAmount")
29
- ] = None
30
- creation_state: typing_extensions.Annotated[
31
- typing.Optional[CreationState], FieldMetadata(alias="creationState")
32
- ] = None
33
- agent: typing.Optional[Agent] = None
34
- order_line_attributes: typing_extensions.Annotated[
35
- typing.Optional[typing.List[OrderLineAttribute]], FieldMetadata(alias="orderLineAttributes")
36
- ] = None
17
+ start_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="startDate")]
18
+ end_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endDate")] = None
37
19
 
38
20
  if IS_PYDANTIC_V2:
39
21
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .order_line import OrderLine
8
+ from .pagination import Pagination
9
+
10
+
11
+ class OrderLinesResponse(UniversalBaseModel):
12
+ data: typing.List[OrderLine]
13
+ pagination: Pagination
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .order import Order
8
+ from .pagination import Pagination
9
+
10
+
11
+ class OrderListResponse(UniversalBaseModel):
12
+ data: typing.List[Order]
13
+ pagination: Pagination
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -0,0 +1,24 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+
10
+
11
+ class Pagination(UniversalBaseModel):
12
+ limit: int
13
+ offset: int
14
+ total: int
15
+ has_more: typing_extensions.Annotated[bool, FieldMetadata(alias="hasMore")]
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19
+ else:
20
+
21
+ class Config:
22
+ frozen = True
23
+ smart_union = True
24
+ extra = pydantic.Extra.allow
paid/types/product.py CHANGED
@@ -7,44 +7,19 @@ import pydantic
7
7
  import typing_extensions
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
9
  from ..core.serialization import FieldMetadata
10
- from .agent_attribute import AgentAttribute
11
- from .product_type import ProductType
12
10
 
13
11
 
14
12
  class Product(UniversalBaseModel):
15
- """
16
- A product in the Paid system (previously called Agent)
17
- """
18
-
19
13
  id: str
20
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
21
- display_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="displayId")] = pydantic.Field(
22
- default=None
23
- )
24
- """
25
- Human-readable display ID
26
- """
27
-
28
- organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
29
14
  name: str
30
15
  description: typing.Optional[str] = None
31
- type: ProductType = pydantic.Field()
32
- """
33
- The type of product
34
- """
35
-
16
+ created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")]
17
+ updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")]
36
18
  active: bool
37
19
  product_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productCode")] = None
38
- product_attribute: typing_extensions.Annotated[
39
- typing.Optional[typing.List[AgentAttribute]], FieldMetadata(alias="ProductAttribute")
40
- ] = pydantic.Field(default=None)
41
- """
42
- Pricing attributes for this product
43
- """
44
-
20
+ external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
21
+ archived_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="archivedAt")] = None
45
22
  metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
46
- created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
47
- updated_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt")] = None
48
23
 
49
24
  if IS_PYDANTIC_V2:
50
25
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -8,10 +8,11 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
9
 
10
10
 
11
- class Tier(UniversalBaseModel):
12
- lower_bound: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="lowerBound")] = None
13
- upper_bound: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="upperBound")] = None
14
- price: typing.Optional[float] = None
11
+ class ProductByExternalId(UniversalBaseModel):
12
+ external_product_id: typing_extensions.Annotated[str, FieldMetadata(alias="externalProductId")] = pydantic.Field()
13
+ """
14
+ Your external product ID
15
+ """
15
16
 
16
17
  if IS_PYDANTIC_V2:
17
18
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -3,22 +3,15 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
+ import typing_extensions
6
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
7
9
 
8
10
 
9
- class CostAmount(UniversalBaseModel):
11
+ class ProductById(UniversalBaseModel):
12
+ product_id: typing_extensions.Annotated[str, FieldMetadata(alias="productId")] = pydantic.Field()
10
13
  """
11
- Cost amount with currency
12
- """
13
-
14
- amount: float = pydantic.Field()
15
- """
16
- The cost amount
17
- """
18
-
19
- currency: str = pydantic.Field()
20
- """
21
- The currency code (e.g., "USD")
14
+ The Paid product ID
22
15
  """
23
16
 
24
17
  if IS_PYDANTIC_V2:
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .pagination import Pagination
8
+ from .product import Product
9
+
10
+
11
+ class ProductListResponse(UniversalBaseModel):
12
+ data: typing.List[Product]
13
+ pagination: Pagination
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
paid/types/signal.py CHANGED
@@ -3,45 +3,19 @@
3
3
  import typing
4
4
 
5
5
  import pydantic
6
+ import typing_extensions
6
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .attribution import Attribution
10
+ from .customer_attribution import CustomerAttribution
7
11
 
8
12
 
9
13
  class Signal(UniversalBaseModel):
10
- """
11
- DEPRECATED: Use SignalV2 instead for cleaner field names.
12
- """
13
-
14
- event_name: typing.Optional[str] = None
15
- agent_id: typing.Optional[str] = pydantic.Field(default=None)
16
- """
17
- DEPRECATED: Use product_id in SignalV2 instead.
18
- """
19
-
20
- external_agent_id: typing.Optional[str] = pydantic.Field(default=None)
21
- """
22
- DEPRECATED: Use external_product_id in SignalV2 instead.
23
- """
24
-
25
- customer_id: typing.Optional[str] = pydantic.Field(default=None)
26
- """
27
- DEPRECATED: The external customer id. Use `external_customer_id` or `internal_customer_id` instead.
28
- """
29
-
14
+ event_name: typing_extensions.Annotated[str, FieldMetadata(alias="eventName")]
15
+ customer: CustomerAttribution
16
+ attribution: typing.Optional[Attribution] = None
30
17
  data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
31
- idempotency_key: typing.Optional[str] = pydantic.Field(default=None)
32
- """
33
- A unique key to ensure idempotent signal processing
34
- """
35
-
36
- internal_customer_id: typing.Optional[str] = pydantic.Field(default=None)
37
- """
38
- DEPRECATED: Use customer_id in SignalV2 instead. This was Paid's internal customer ID.
39
- """
40
-
41
- external_customer_id: typing.Optional[str] = pydantic.Field(default=None)
42
- """
43
- Your system's customer ID
44
- """
18
+ idempotency_key: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="idempotencyKey")] = None
45
19
 
46
20
  if IS_PYDANTIC_V2:
47
21
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -6,18 +6,19 @@ import pydantic
6
6
  import typing_extensions
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from .agent_attribute import AgentAttribute
9
+ from .contact_billing_address import ContactBillingAddress
10
10
 
11
11
 
12
- class AgentUpdate(UniversalBaseModel):
13
- name: typing.Optional[str] = None
14
- description: typing.Optional[str] = None
15
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
16
- active: typing.Optional[bool] = None
17
- agent_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentCode")] = None
18
- agent_attributes: typing_extensions.Annotated[
19
- typing.Optional[typing.List[AgentAttribute]], FieldMetadata(alias="agentAttributes")
12
+ class UpdateContactRequest(UniversalBaseModel):
13
+ customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = None
14
+ first_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="firstName")] = None
15
+ last_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="lastName")] = None
16
+ email: typing.Optional[str] = None
17
+ phone: typing.Optional[str] = None
18
+ billing_address: typing_extensions.Annotated[
19
+ typing.Optional[ContactBillingAddress], FieldMetadata(alias="billingAddress")
20
20
  ] = None
21
+ external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
21
22
 
22
23
  if IS_PYDANTIC_V2:
23
24
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,38 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ import pydantic
7
+ import typing_extensions
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
+ from ..core.serialization import FieldMetadata
10
+ from .customer_billing_address import CustomerBillingAddress
11
+ from .customer_creation_state import CustomerCreationState
12
+
13
+
14
+ class UpdateCustomerRequest(UniversalBaseModel):
15
+ name: typing.Optional[str] = None
16
+ legal_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="legalName")] = None
17
+ email: typing.Optional[str] = None
18
+ phone: typing.Optional[str] = None
19
+ website: typing.Optional[str] = None
20
+ external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
21
+ billing_address: typing_extensions.Annotated[
22
+ typing.Optional[CustomerBillingAddress], FieldMetadata(alias="billingAddress")
23
+ ] = None
24
+ creation_state: typing_extensions.Annotated[
25
+ typing.Optional[CustomerCreationState], FieldMetadata(alias="creationState")
26
+ ] = None
27
+ churn_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="churnDate")] = None
28
+ vat_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="vatNumber")] = None
29
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
30
+
31
+ if IS_PYDANTIC_V2:
32
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
33
+ else:
34
+
35
+ class Config:
36
+ frozen = True
37
+ smart_union = True
38
+ extra = pydantic.Extra.allow
@@ -6,24 +6,14 @@ import pydantic
6
6
  import typing_extensions
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
8
  from ..core.serialization import FieldMetadata
9
- from .agent_attribute import AgentAttribute
10
- from .product_update_type import ProductUpdateType
11
9
 
12
10
 
13
- class ProductUpdate(UniversalBaseModel):
11
+ class UpdateProductRequest(UniversalBaseModel):
14
12
  name: typing.Optional[str] = None
15
13
  description: typing.Optional[str] = None
16
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
17
- type: typing.Optional[ProductUpdateType] = None
18
14
  active: typing.Optional[bool] = None
19
15
  product_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productCode")] = None
20
- product_attribute: typing_extensions.Annotated[
21
- typing.Optional[typing.List[AgentAttribute]], FieldMetadata(alias="ProductAttribute")
22
- ] = pydantic.Field(default=None)
23
- """
24
- Pricing attributes for this product
25
- """
26
-
16
+ external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
27
17
  metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
28
18
 
29
19
  if IS_PYDANTIC_V2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paid-python
3
- Version: 1.0.0a0
3
+ Version: 1.0.0a1
4
4
  Summary:
5
5
  Requires-Python: >=3.9,<3.14
6
6
  Classifier: Intended Audience :: Developers
@@ -78,7 +78,7 @@ from paid import Paid
78
78
 
79
79
  client = Paid(token="API_KEY")
80
80
 
81
- client.customers.create(
81
+ client.customers.create_a_new_customer(
82
82
  name="name"
83
83
  )
84
84
  ```
@@ -89,7 +89,7 @@ The SDK provides Python classes for all request and response types. These are au
89
89
 
90
90
  ```python
91
91
  # Example of creating a customer
92
- response = client.customers.create(
92
+ response = client.customers.create_a_new_customer(
93
93
  name="John Doe",
94
94
  )
95
95
 
@@ -103,13 +103,21 @@ print(response.email)
103
103
  When the API returns a non-success status code (4xx or 5xx response), the SDK will raise an appropriate error.
104
104
 
105
105
  ```python
106
+ from paid import BadRequestError, NotFoundError
107
+ from paid.core.api_error import ApiError
108
+
106
109
  try:
107
- client.customers.create(...)
108
- except paid.Error as e:
110
+ client.customers.create_a_new_customer(name="John Doe")
111
+ except BadRequestError as e:
112
+ print(e.status_code) # 400
113
+ print(e.body) # ErrorResponse with error details
114
+ except NotFoundError as e:
115
+ print(e.status_code) # 404
116
+ print(e.body)
117
+ except ApiError as e:
118
+ # Catch-all for other API errors
109
119
  print(e.status_code)
110
- print(e.message)
111
120
  print(e.body)
112
- print(e.raw_response)
113
121
  ```
114
122
 
115
123
  ## Logging
@@ -154,6 +162,7 @@ export PAID_ENABLED=false
154
162
  ```
155
163
 
156
164
  This is useful for:
165
+
157
166
  - Development/testing environments where tracing isn't needed
158
167
  - Temporarily disabling tracing without modifying code
159
168
  - Feature flagging in different deployment environments
@@ -215,11 +224,13 @@ Both approaches:
215
224
  - Support the same parameters: `external_customer_id`, `external_product_id`, `tracing_token`, `store_prompt`, `metadata`
216
225
 
217
226
  * Note - if it happens that you're calling `paid_tracing` from non-main thread, then it's advised to initialize from main thread:
227
+
218
228
  ```python
219
229
  from paid.tracing import initialize_tracing
220
230
  initialize_tracing()
221
231
  ```
222
- * `initialize_tracing` also accepts optional arguments like OTEL collector endpoint and api key if you want to reroute your tracing somewhere else :)
232
+
233
+ - `initialize_tracing` also accepts optional arguments like OTEL collector endpoint and api key if you want to reroute your tracing somewhere else :)
223
234
 
224
235
  ### Using the Paid wrappers
225
236
 
@@ -302,6 +313,7 @@ You can attach custom metadata to your traces by passing a `metadata` dictionary
302
313
 
303
314
  process_event(incoming_event)
304
315
  ```
316
+
305
317
  </Tab>
306
318
 
307
319
  <Tab title="Python - Context Manager">
@@ -336,6 +348,7 @@ You can attach custom metadata to your traces by passing a `metadata` dictionary
336
348
  ):
337
349
  process_event(incoming_event)
338
350
  ```
351
+
339
352
  </Tab>
340
353
 
341
354
  <Tab title="Node.js">
@@ -772,6 +785,7 @@ await do_work()
772
785
  ### Paid OTEL Tracer Provider
773
786
 
774
787
  If you would like to use the Paid OTEL tracer provider:
788
+
775
789
  ```python
776
790
  from paid.tracing import get_paid_tracer_provider
777
791
  paid_tracer_provider = get_paid_tracer_provider()
@@ -0,0 +1,110 @@
1
+ paid/__init__.py,sha256=6m_GmocptMPX6LExm6-xQp_2lbd9eCWByLFVba6IwzU,2304
2
+ paid/client.py,sha256=WpVtnBUNu_olaiVatkwT9PzR9cnYbPSg1BnutTWqXNw,6508
3
+ paid/contacts/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
4
+ paid/contacts/client.py,sha256=8HUUdqHPy4U51jA-QIfO1t5rUvsQ7ffi4rz4GlRfJV8,20767
5
+ paid/contacts/raw_client.py,sha256=Qhxd2BnPZWATHg5osC-9pVYRcoHJDlHKzS9xOlcXk9k,53755
6
+ paid/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
7
+ paid/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
8
+ paid/core/client_wrapper.py,sha256=CW2IjYCun_HGBWN4cLY_Wq8XWqCbnH9cXkbyzpy9flI,2250
9
+ paid/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
10
+ paid/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
11
+ paid/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
12
+ paid/core/http_client.py,sha256=QurkBvCZZz2Z1d8znp4M2YbOXebBUPcPXRhPIS84Wvk,21214
13
+ paid/core/http_response.py,sha256=4uOAtXXFTyFXHLXeQWSfQST9PGcOCRAdHVgGTxdyg84,1334
14
+ paid/core/jsonable_encoder.py,sha256=hGgcEEeX11sqxxsll7h15pO3pTNVxk_n79Kcn0laoWA,3655
15
+ paid/core/pydantic_utilities.py,sha256=HxbbISfaP1XBvzbIkc0ZcF_GHKd9BfYsJAcFh9B126k,10787
16
+ paid/core/query_encoder.py,sha256=ekulqNd0j8TgD7ox-Qbz7liqX8-KP9blvT9DsRCenYM,2144
17
+ paid/core/remove_none_from_dict.py,sha256=EU9SGgYidWq7SexuJbNs4-PZ-5Bl3Vppd864mS6vQZw,342
18
+ paid/core/request_options.py,sha256=h0QUNCFVdCW_7GclVySCAY2w4NhtXVBUCmHgmzaxpcg,1681
19
+ paid/core/serialization.py,sha256=ECL3bvv_0i7U4uvPidZCNel--MUbA0iq0aGcNKi3kws,9818
20
+ paid/customers/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
21
+ paid/customers/client.py,sha256=_UDA71l--2cni1VAXYSB2MxJGZMqUjOaEWb2QSyOJ7o,24411
22
+ paid/customers/raw_client.py,sha256=xt-MESxwFXguTl1umEoFGzbCzIGFQaC7fjPwp_bFEBE,57785
23
+ paid/environment.py,sha256=ZD9ZhcWXkKDJ-gkIyv9k86w1-3Fy3o0Y1ivNao4-Oig,161
24
+ paid/errors/__init__.py,sha256=i1Cxfwfm2tL1DRuYRbTEXZ5MIhobgDE8zm38gqGSNKY,363
25
+ paid/errors/bad_request_error.py,sha256=8YeeU1pvrmePf-GsOtENIQY-X88pArGYskLDK0qPGn4,373
26
+ paid/errors/forbidden_error.py,sha256=S4-q7biEKqqZoY3vW0it49EeYkdR_u2p3DYzxD5A8fY,372
27
+ paid/errors/internal_server_error.py,sha256=qqVfFsLvs14COaHjgUUZv-_GKe2wIraZyHKMGMaMFtg,377
28
+ paid/errors/not_found_error.py,sha256=J4qzyBLJ3TMvRqxK65coEAoi7O7WHoufRSKi4aNtJ1s,371
29
+ paid/invoices/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
30
+ paid/invoices/client.py,sha256=0szLix_Wra0_IK3TM0SCyHtaS_uv_UlpWZz6-FZbTtQ,9112
31
+ paid/invoices/raw_client.py,sha256=Dfq-ZNlKNjUtrhODWuFFBNtaiyjILdKuRmp3ygdUcNE,25405
32
+ paid/logger.py,sha256=CIo_i2n2Azp4g57GkU9twb_GzJ7x9lZmURqPsq4379M,514
33
+ paid/orders/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
34
+ paid/orders/client.py,sha256=BZBH10iQ6vvJtpDbRa7W_WQZxkd0PBHM0-ty8nxD05Y,18947
35
+ paid/orders/raw_client.py,sha256=YDNbxM9ST0JRNNWEit4iDJah6v0VT1zodcca-Y5u0uA,43044
36
+ paid/products/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
37
+ paid/products/client.py,sha256=uoQ2cJi_AiOuIvKZdbtAIzEx-UzvZPELf2ZFPYgNBdE,16704
38
+ paid/products/raw_client.py,sha256=V4pc1PJa3azPYFo2WjJE8s2e9LvYrYz5ac3x5nFk3tQ,41489
39
+ paid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ paid/signals/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
41
+ paid/signals/client.py,sha256=5SMcdrTxMTBrT6W_PDI1HCBunSli86YXYX8wLzjYuDI,4024
42
+ paid/signals/raw_client.py,sha256=2FiZLh1fQzrR1HCg-HJqKkDgvma-augsfTzroVA4maM,7649
43
+ paid/tracing/__init__.py,sha256=fwjE0SnDWxNZKpYFnLB9IfTMa5ZIfLejs1aM4UA57yY,564
44
+ paid/tracing/autoinstrumentation.py,sha256=hbmJgf2vv769gs2IBxX_dpI9RWO0Cepy8qybiY1mL08,8152
45
+ paid/tracing/context_data.py,sha256=oiLocz-9qDqB5nQzJlrLsc2Mkr9MaNt_yF_hjppobKc,3298
46
+ paid/tracing/context_manager.py,sha256=8UISHMxNI-FNSzPvmeeC7fdkmxBIeYCVl-HkJwQoJzQ,8562
47
+ paid/tracing/distributed_tracing.py,sha256=VJZbg6t6sNTEw4kX3BhvKWUbIzLp-ao-M7K7Pqfrqmo,4003
48
+ paid/tracing/signal.py,sha256=Tbg-ebGoNsFCW7GyY1pSAclBEmEGDudcj1kNembDNGs,3264
49
+ paid/tracing/tracing.py,sha256=MCIqzRELFB6VbvFrnpIp7bLX7HYfpHnmUapDLcAEioE,16478
50
+ paid/tracing/wrappers/__init__.py,sha256=IIleLB_JUbzLw7FshrU2VHZAKF3dZHMGy1O5zCBwwqM,1588
51
+ paid/tracing/wrappers/anthropic/__init__.py,sha256=_x1fjySAQxuT5cIGO_jU09LiGcZH-WQLqKg8mUFAu2w,115
52
+ paid/tracing/wrappers/anthropic/anthropicWrapper.py,sha256=pGchbOb41CbTxc7H8xXoM-LjR085spqrzXqCVC_rrFk,4913
53
+ paid/tracing/wrappers/bedrock/__init__.py,sha256=HSeZYbslJuWU5xWJm2rAHz4sL_Hxb70iJjTyAOoJj3s,67
54
+ paid/tracing/wrappers/bedrock/bedrockWrapper.py,sha256=aKfGpbkGqJfI-9QX7O-3vkf15Fi35pPyDxOjydTNpQk,1962
55
+ paid/tracing/wrappers/gemini/__init__.py,sha256=6tzEaxuuYcJEtQHlxzjPLqJuEDY2cZe6QC_ZvZCHMS4,64
56
+ paid/tracing/wrappers/gemini/geminiWrapper.py,sha256=xXp8gJyT4k39CWCni_Whnua4dEdyFLtYPK9Wqa9ZByU,3837
57
+ paid/tracing/wrappers/langchain/__init__.py,sha256=LDNPT9UoZen-8f5K0-FO2-Bau7jpeM0Ht3FxctfWW3w,101
58
+ paid/tracing/wrappers/langchain/paidLangChainCallback.py,sha256=2wKFGsYaHwBl24o0UtBZsGne5SGObbaZH54nKvIP3wI,12794
59
+ paid/tracing/wrappers/llamaindex/__init__.py,sha256=bM2bibDwbb_cmvQehb8i-fi9XwSx2HAk6qpGee7wnu8,88
60
+ paid/tracing/wrappers/llamaindex/llamaIndexWrapper.py,sha256=p4Ft7PhZ5cQ_QWeKmdJlYEH75u0seNVBMiXfki8O7sU,3271
61
+ paid/tracing/wrappers/mistral/__init__.py,sha256=_Z1DVul6JBG9vYSXSc9mpm0M4l8GebBWSxwBodGQnew,74
62
+ paid/tracing/wrappers/mistral/mistralWrapper.py,sha256=IgK_N5tEj4HDLKxw3uwJYiXB9BQyxLNF-04uiNHMD5Y,8265
63
+ paid/tracing/wrappers/openai/__init__.py,sha256=pfaL3O4f4WOS47UUcdZbDbZSNB9fsTyE_WLqqBahVzs,100
64
+ paid/tracing/wrappers/openai/openAiWrapper.py,sha256=DIMOGdQTjpFaiKV-JeJvNH_cxHsfmzu2wIrKXDwRkbw,22148
65
+ paid/tracing/wrappers/openai_agents/__init__.py,sha256=-xX5HPhYYX6hDWbn5FpFw-P6M2h0k1X9Qjrg0Bkv7cc,94
66
+ paid/tracing/wrappers/openai_agents/openaiAgentsHook.py,sha256=pORdteM-Cm0NYTfxl8-YcEbNVhSafomKmig3u8jvycA,6672
67
+ paid/tracing/wrappers/utils.py,sha256=_0FCF3BC2wK5cU8suEvo_mXm6Jn8ULkyeEhnYPUlO2Y,2347
68
+ paid/types/__init__.py,sha256=7d2MnglOazCm10Wjisp8HsQU32LkfZJfLJ6ZAf2fJQ4,2709
69
+ paid/types/attribution.py,sha256=T8x9BW63O0X0bCa5eq_8GZwE7rWArVruarx5Bdx5yT0,237
70
+ paid/types/bulk_signals_response.py,sha256=-VfR56UTa8M2OOmevFy-0EKgcz5RLNXAE_1iqD0PW1Y,566
71
+ paid/types/contact.py,sha256=aqRs3cdleq40efjs9kGVTRieKu9LgHqC0eDaYOhFdTc,1408
72
+ paid/types/contact_billing_address.py,sha256=Rw_7GH-SSMM-5YfpAISwrbTbLYW2nxvvHmBqD3CbBJc,847
73
+ paid/types/contact_list_response.py,sha256=d1jOsCIDjAWOTu0t2HJBts3jAOCAlZc_fZgHpO_LZ3U,634
74
+ paid/types/customer.py,sha256=Ejwk8YugtQTNiK6dDM0Dot2r4DMoRoxI5LuK0JTSyR4,1751
75
+ paid/types/customer_attribution.py,sha256=A8iObOJOUD1h5Wf7sqlB8ppcJUuKD2X6SRpBnjYOYxM,251
76
+ paid/types/customer_billing_address.py,sha256=PCbuRjCOsPmKQF_SLvCJac__0xO5gpWnXp6A0IYb_fo,886
77
+ paid/types/customer_by_external_id.py,sha256=V8sTJeFOIbMQnfJCaMdxJlEStHtAgxGy0CHlNQu6pzA,752
78
+ paid/types/customer_by_id.py,sha256=WEHYyLbYWJ9Fp2GlvR2KJhuVAMFmL18jxU5Xiri13ek,722
79
+ paid/types/customer_creation_state.py,sha256=ZeExJagYbOJRpzxByRT7ChjhD1dFrnqt7gdiT5XzU8I,164
80
+ paid/types/customer_list_response.py,sha256=dMvmbPuxXxIc67vgPWXKS6bwJeOpXmw8nt6r7momJuU,638
81
+ paid/types/empty_response.py,sha256=niHKOAeq0SX4JfJOn1sAoNhpaK4DSNtK9OBeoZqOz7I,505
82
+ paid/types/error_response.py,sha256=TvU6N8sVWRy-w9blHymiKvvSbbfZZ43Gr9rjhCNDPBQ,600
83
+ paid/types/invoice.py,sha256=RSsa_BM0UVzBUElBvywipniL8V6iegAZeALf1Icg6uM,3465
84
+ paid/types/invoice_line.py,sha256=g4UeS3g3_F9Y5AhUhFlaPT37aOfxEop6XiryJ1dltKY,2061
85
+ paid/types/invoice_line_payment_status.py,sha256=kH5xrnjpzDXcO7gAAyUaI1Y2exN1zdH40q8dxbt3eZo,210
86
+ paid/types/invoice_lines_response.py,sha256=DLY8Sjdkfv1K0eA1uukf7N5XZnidGYq3hvWpZcXg8Q0,648
87
+ paid/types/invoice_list_response.py,sha256=4prBgJ1PAn84CxQk_kG4iHaX2feydG_lQxi0fEynt8I,634
88
+ paid/types/invoice_payment_status.py,sha256=Cj64SVR1J8SYytq08I0gdhcfgf2NHYAFWvvNDVOxnqs,200
89
+ paid/types/invoice_source.py,sha256=IUziukxKnI_GcMneos0O-52J89ZD7xrTxtjYD6S-2W0,162
90
+ paid/types/invoice_status.py,sha256=G-oLWOZebE9TB8GIqp_Stne9EulV-OgpxpVpnNCHUdQ,216
91
+ paid/types/invoice_tax_status.py,sha256=3Y3wBVT5-H3hbhGK27ovrSAvyTwItgwq4fmIVqL49RM,211
92
+ paid/types/order.py,sha256=EbiOaHi8K4kxtZsJ2Jvn3eP_iCCF8NIJZCQHI-bxo_w,2779
93
+ paid/types/order_creation_state.py,sha256=J4vpCsxVWZhSrwN6Qo_k7NTZTIQJKYlUGLDw6cpJHrE,161
94
+ paid/types/order_line.py,sha256=h7DYFWnrKsABOKVomBlvgKn6j0Afb2XqVJqYCEHuO8s,952
95
+ paid/types/order_lines_response.py,sha256=udjqlD4ChJKWMtCKAO5YZI7NkR-kJkcxtTveXntSV-w,640
96
+ paid/types/order_list_response.py,sha256=4QmdROgg-8n6ei6b0MMCu_aW9p0-1gLyQj4wJrmCWSU,626
97
+ paid/types/pagination.py,sha256=CCwgTYMJUJxgz6I7cu1n4-4ZfOl0X0H3NBGTYF_MGE0,701
98
+ paid/types/product.py,sha256=WscwCcoHJ4gFWHtxRhsWVBXgJk3GkQ2u8dMI2Sh3kUw,1285
99
+ paid/types/product_by_external_id.py,sha256=MOvHBdETwsZNY2hOBWkNtLpFIWKFAJbRVu9zziOAUW0,748
100
+ paid/types/product_by_id.py,sha256=O_NSPpCewmwGUCbIpqtw8WVmHg8TB1dsEMILinfTJuc,718
101
+ paid/types/product_list_response.py,sha256=9EDZkJF9Gwl4GPTV_vFWVNWeyfeTG5wkvuX5BMUttGA,634
102
+ paid/types/signal.py,sha256=vtKEUY2o9PS0SYst7qcxFgHN7MWMwR6ps03XOJB1Xcs,1029
103
+ paid/types/update_contact_request.py,sha256=JCLZ8wfOweFr4x3dW9Kx2bpKGNLDsjIImjfdvslOcxQ,1301
104
+ paid/types/update_customer_request.py,sha256=jfBLDFD50CG69OmIUm9G-V73xJ1cQNItmFrpO-e_ggE,1704
105
+ paid/types/update_product_request.py,sha256=y8-8up2EEIoNqtWN1x3Z_E29CjAJKTSS6XASK0hezXA,1013
106
+ paid/version.py,sha256=QIpDFnOrxMxrs86eL0iNH0mSZ1DO078wWHYY9TYAoew,78
107
+ paid_python-1.0.0a1.dist-info/LICENSE,sha256=Nz4baY1zvv0Qy7lqrQtbaiMhmEeGr2Q7A93aqzpml4c,1071
108
+ paid_python-1.0.0a1.dist-info/METADATA,sha256=ixOGvZHL2-Ewj67taaV_K7Bm604LvJ_fvWLrBwiKfRI,24550
109
+ paid_python-1.0.0a1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
110
+ paid_python-1.0.0a1.dist-info/RECORD,,