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
@@ -1,33 +0,0 @@
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
- from .billing_frequency import BillingFrequency
10
- from .charge_type import ChargeType
11
- from .price_point import PricePoint
12
- from .pricing_model_type import PricingModelType
13
-
14
-
15
- class OrderLineAttributePricing(UniversalBaseModel):
16
- event_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventName")] = None
17
- charge_type: typing_extensions.Annotated[typing.Optional[ChargeType], FieldMetadata(alias="chargeType")] = None
18
- price_point: typing_extensions.Annotated[typing.Optional[PricePoint], FieldMetadata(alias="pricePoint")] = None
19
- pricing_model: typing_extensions.Annotated[
20
- typing.Optional[PricingModelType], FieldMetadata(alias="pricingModel")
21
- ] = None
22
- billing_frequency: typing_extensions.Annotated[
23
- typing.Optional[BillingFrequency], FieldMetadata(alias="billingFrequency")
24
- ] = None
25
-
26
- if IS_PYDANTIC_V2:
27
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
- else:
29
-
30
- class Config:
31
- frozen = True
32
- smart_union = True
33
- extra = pydantic.Extra.allow
@@ -1,72 +0,0 @@
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
- from .order_line_attribute_create_one import OrderLineAttributeCreateOne
10
-
11
-
12
- class OrderLineCreate(UniversalBaseModel):
13
- product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productId")] = pydantic.Field(
14
- default=None
15
- )
16
- """
17
- Paid's internal ID for the product
18
- """
19
-
20
- product_external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productExternalId")] = (
21
- pydantic.Field(default=None)
22
- )
23
- """
24
- The external ID of the product i.e. the id within your system
25
- """
26
-
27
- agent_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentId")] = pydantic.Field(
28
- default=None
29
- )
30
- """
31
- DEPRECATED: Use productId instead. Paid's internal ID for the agent/product
32
- """
33
-
34
- agent_external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentExternalId")] = (
35
- pydantic.Field(default=None)
36
- )
37
- """
38
- DEPRECATED: Use productExternalId instead. The external ID of the agent/product i.e. the id within your system
39
- """
40
-
41
- name: typing.Optional[str] = pydantic.Field(default=None)
42
- """
43
- Name of the order line
44
- """
45
-
46
- description: typing.Optional[str] = pydantic.Field(default=None)
47
- """
48
- Description of the order line
49
- """
50
-
51
- product_attribute: typing_extensions.Annotated[
52
- typing.Optional[typing.List[OrderLineAttributeCreateOne]], FieldMetadata(alias="ProductAttribute")
53
- ] = pydantic.Field(default=None)
54
- """
55
- Optional array of custom product attributes to override default pricing, allowing per customer pricing. If not provided, attributes will be auto-generated from the product definition.
56
- """
57
-
58
- agent_attributes: typing_extensions.Annotated[
59
- typing.Optional[typing.List[OrderLineAttributeCreateOne]], FieldMetadata(alias="agentAttributes")
60
- ] = pydantic.Field(default=None)
61
- """
62
- DEPRECATED: Use ProductAttribute instead. Optional array of custom agent attributes to override default pricing, allowing per customer pricing. If not provided, attributes will be auto-generated from the product definition.
63
- """
64
-
65
- if IS_PYDANTIC_V2:
66
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
67
- else:
68
-
69
- class Config:
70
- frozen = True
71
- smart_union = True
72
- extra = pydantic.Extra.allow
@@ -1,84 +0,0 @@
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
-
11
-
12
- class PaginationMeta(UniversalBaseModel):
13
- """
14
- Pagination metadata for cost traces
15
- """
16
-
17
- limit: int = pydantic.Field()
18
- """
19
- The requested limit
20
- """
21
-
22
- offset: int = pydantic.Field()
23
- """
24
- The requested offset
25
- """
26
-
27
- count: int = pydantic.Field()
28
- """
29
- Number of items returned in this response
30
- """
31
-
32
- has_more: typing_extensions.Annotated[bool, FieldMetadata(alias="hasMore")] = pydantic.Field()
33
- """
34
- Whether there are more results available
35
- """
36
-
37
- start_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startTime")] = (
38
- pydantic.Field(default=None)
39
- )
40
- """
41
- The startTime filter that was applied (if any)
42
- """
43
-
44
- end_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endTime")] = (
45
- pydantic.Field(default=None)
46
- )
47
- """
48
- The endTime filter that was applied (if any)
49
- """
50
-
51
- external_customer_id: typing_extensions.Annotated[
52
- typing.Optional[str], FieldMetadata(alias="externalCustomerId")
53
- ] = pydantic.Field(default=None)
54
- """
55
- The externalCustomerId filter that was applied (if any)
56
- """
57
-
58
- external_product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalProductId")] = (
59
- pydantic.Field(default=None)
60
- )
61
- """
62
- The externalProductId filter that was applied (if any)
63
- """
64
-
65
- external_agent_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalAgentId")] = (
66
- pydantic.Field(default=None)
67
- )
68
- """
69
- DEPRECATED: Use externalProductId instead. The externalAgentId filter that was applied (if any)
70
- """
71
-
72
- metadata: typing.Optional[str] = pydantic.Field(default=None)
73
- """
74
- The metadata filter that was applied (if any)
75
- """
76
-
77
- if IS_PYDANTIC_V2:
78
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
79
- else:
80
-
81
- class Config:
82
- frozen = True
83
- smart_union = True
84
- extra = pydantic.Extra.allow
@@ -1,58 +0,0 @@
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 .payment_method_card import PaymentMethodCard
11
- from .payment_method_type import PaymentMethodType
12
- from .payment_method_us_bank_account import PaymentMethodUsBankAccount
13
-
14
-
15
- class PaymentMethod(UniversalBaseModel):
16
- """
17
- A customer's payment method
18
- """
19
-
20
- id: typing.Optional[str] = pydantic.Field(default=None)
21
- """
22
- The payment method ID (typically from Stripe)
23
- """
24
-
25
- type: typing.Optional[PaymentMethodType] = pydantic.Field(default=None)
26
- """
27
- The type of payment method
28
- """
29
-
30
- card: typing.Optional[PaymentMethodCard] = pydantic.Field(default=None)
31
- """
32
- Card details (present when type is 'card')
33
- """
34
-
35
- us_bank_account: typing_extensions.Annotated[
36
- typing.Optional[PaymentMethodUsBankAccount], FieldMetadata(alias="usBankAccount")
37
- ] = pydantic.Field(default=None)
38
- """
39
- US bank account details (present when type is 'us_bank_account')
40
- """
41
-
42
- is_default: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isDefault")] = pydantic.Field(
43
- default=None
44
- )
45
- """
46
- Whether this is the customer's default payment method
47
- """
48
-
49
- created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
50
-
51
- if IS_PYDANTIC_V2:
52
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
53
- else:
54
-
55
- class Config:
56
- frozen = True
57
- smart_union = True
58
- extra = pydantic.Extra.allow
@@ -1,49 +0,0 @@
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 PaymentMethodCard(UniversalBaseModel):
12
- """
13
- Card details (present when type is 'card')
14
- """
15
-
16
- brand: typing.Optional[str] = pydantic.Field(default=None)
17
- """
18
- Card brand (visa, mastercard, amex, etc.)
19
- """
20
-
21
- last_4: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="last4")] = pydantic.Field(
22
- default=None
23
- )
24
- """
25
- Last 4 digits of the card number
26
- """
27
-
28
- exp_month: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="expMonth")] = pydantic.Field(
29
- default=None
30
- )
31
- """
32
- Expiration month (1-12)
33
- """
34
-
35
- exp_year: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="expYear")] = pydantic.Field(
36
- default=None
37
- )
38
- """
39
- Expiration year
40
- """
41
-
42
- if IS_PYDANTIC_V2:
43
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
44
- else:
45
-
46
- class Config:
47
- frozen = True
48
- smart_union = True
49
- extra = pydantic.Extra.allow
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- PaymentMethodType = typing.Union[typing.Literal["card", "us_bank_account", "sepa_debit"], typing.Any]
@@ -1,36 +0,0 @@
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
- from .payment_method_us_bank_account_account_type import PaymentMethodUsBankAccountAccountType
10
-
11
-
12
- class PaymentMethodUsBankAccount(UniversalBaseModel):
13
- """
14
- US bank account details (present when type is 'us_bank_account')
15
- """
16
-
17
- bank_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="bankName")] = None
18
- last_4: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="last4")] = pydantic.Field(
19
- default=None
20
- )
21
- """
22
- Last 4 digits of the account number
23
- """
24
-
25
- account_type: typing_extensions.Annotated[
26
- typing.Optional[PaymentMethodUsBankAccountAccountType], FieldMetadata(alias="accountType")
27
- ] = None
28
-
29
- if IS_PYDANTIC_V2:
30
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
- else:
32
-
33
- class Config:
34
- frozen = True
35
- smart_union = True
36
- extra = pydantic.Extra.allow
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- PaymentMethodUsBankAccountAccountType = typing.Union[typing.Literal["checking", "savings"], typing.Any]
paid/types/plan.py DELETED
@@ -1,81 +0,0 @@
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 .plan_plan_products_item import PlanPlanProductsItem
11
-
12
-
13
- class Plan(UniversalBaseModel):
14
- """
15
- A plan containing products and their attributes
16
- """
17
-
18
- id: str = pydantic.Field()
19
- """
20
- The unique identifier of the plan
21
- """
22
-
23
- organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")] = pydantic.Field()
24
- """
25
- The organization ID that owns this plan
26
- """
27
-
28
- plan_group_id: typing_extensions.Annotated[str, FieldMetadata(alias="planGroupId")] = pydantic.Field()
29
- """
30
- The plan group ID this plan belongs to
31
- """
32
-
33
- name: str = pydantic.Field()
34
- """
35
- The name of the plan
36
- """
37
-
38
- description: typing.Optional[str] = pydantic.Field(default=None)
39
- """
40
- The description of the plan
41
- """
42
-
43
- next_plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextPlanId")] = pydantic.Field(
44
- default=None
45
- )
46
- """
47
- The ID of the next plan in the sequence
48
- """
49
-
50
- prev_plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="prevPlanId")] = pydantic.Field(
51
- default=None
52
- )
53
- """
54
- The ID of the previous plan in the sequence
55
- """
56
-
57
- created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
58
- """
59
- When the plan was created
60
- """
61
-
62
- updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
63
- """
64
- When the plan was last updated
65
- """
66
-
67
- plan_products: typing_extensions.Annotated[
68
- typing.Optional[typing.List[PlanPlanProductsItem]], FieldMetadata(alias="planProducts")
69
- ] = pydantic.Field(default=None)
70
- """
71
- The products included in this plan
72
- """
73
-
74
- if IS_PYDANTIC_V2:
75
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
76
- else:
77
-
78
- class Config:
79
- frozen = True
80
- smart_union = True
81
- extra = pydantic.Extra.allow
paid/types/plan_group.py DELETED
@@ -1,60 +0,0 @@
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 .plan import Plan
11
-
12
-
13
- class PlanGroup(UniversalBaseModel):
14
- """
15
- A plan group containing multiple plans
16
- """
17
-
18
- id: str = pydantic.Field()
19
- """
20
- The unique identifier of the plan group
21
- """
22
-
23
- organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")] = pydantic.Field()
24
- """
25
- The organization ID that owns this plan group
26
- """
27
-
28
- name: str = pydantic.Field()
29
- """
30
- The name of the plan group
31
- """
32
-
33
- description: typing.Optional[str] = pydantic.Field(default=None)
34
- """
35
- The description of the plan group
36
- """
37
-
38
- created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
39
- """
40
- When the plan group was created
41
- """
42
-
43
- updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
44
- """
45
- When the plan group was last updated
46
- """
47
-
48
- plans: typing.Optional[typing.List[Plan]] = pydantic.Field(default=None)
49
- """
50
- The plans included in this plan group
51
- """
52
-
53
- if IS_PYDANTIC_V2:
54
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
55
- else:
56
-
57
- class Config:
58
- frozen = True
59
- smart_union = True
60
- extra = pydantic.Extra.allow
@@ -1,41 +0,0 @@
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 .plan_plan_products_item_plan_product_attribute_item import PlanPlanProductsItemPlanProductAttributeItem
11
- from .product import Product
12
-
13
-
14
- class PlanPlanProductsItem(UniversalBaseModel):
15
- id: typing.Optional[str] = None
16
- organization_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="organizationId")] = None
17
- plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="planId")] = None
18
- product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productId")] = None
19
- created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
20
- updated_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt")] = None
21
- product: typing.Optional[Product] = pydantic.Field(default=None)
22
- """
23
- The product associated with this plan product
24
- """
25
-
26
- plan_product_attribute: typing_extensions.Annotated[
27
- typing.Optional[typing.List[PlanPlanProductsItemPlanProductAttributeItem]],
28
- FieldMetadata(alias="planProductAttribute"),
29
- ] = pydantic.Field(default=None)
30
- """
31
- The product attributes with pricing for this plan
32
- """
33
-
34
- if IS_PYDANTIC_V2:
35
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
36
- else:
37
-
38
- class Config:
39
- frozen = True
40
- smart_union = True
41
- extra = pydantic.Extra.allow
@@ -1,34 +0,0 @@
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
-
11
-
12
- class PlanPlanProductsItemPlanProductAttributeItem(UniversalBaseModel):
13
- id: typing.Optional[str] = None
14
- organization_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="organizationId")] = None
15
- plan_product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="planProductId")] = None
16
- product_attribute_id: typing_extensions.Annotated[
17
- typing.Optional[str], FieldMetadata(alias="productAttributeId")
18
- ] = None
19
- pricing: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
20
- """
21
- The pricing configuration for this attribute
22
- """
23
-
24
- created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
25
- updated_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt")] = None
26
-
27
- if IS_PYDANTIC_V2:
28
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
- else:
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- extra = pydantic.Extra.allow
@@ -1,69 +0,0 @@
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 .plan_with_features_features_item import PlanWithFeaturesFeaturesItem
11
-
12
-
13
- class PlanWithFeatures(UniversalBaseModel):
14
- """
15
- A plan with its features (product-attribute pairs) for display
16
- """
17
-
18
- id: str = pydantic.Field()
19
- """
20
- The unique identifier of the plan
21
- """
22
-
23
- name: str = pydantic.Field()
24
- """
25
- The name of the plan
26
- """
27
-
28
- description: typing.Optional[str] = pydantic.Field(default=None)
29
- """
30
- The description of the plan
31
- """
32
-
33
- created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field()
34
- """
35
- When the plan was created
36
- """
37
-
38
- updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field()
39
- """
40
- When the plan was last updated
41
- """
42
-
43
- next_plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextPlanId")] = pydantic.Field(
44
- default=None
45
- )
46
- """
47
- The ID of the next plan in the sequence
48
- """
49
-
50
- prev_plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="prevPlanId")] = pydantic.Field(
51
- default=None
52
- )
53
- """
54
- The ID of the previous plan in the sequence
55
- """
56
-
57
- features: typing.List[PlanWithFeaturesFeaturesItem] = pydantic.Field()
58
- """
59
- The features (product-attribute pairs) included in this plan
60
- """
61
-
62
- if IS_PYDANTIC_V2:
63
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
64
- else:
65
-
66
- class Config:
67
- frozen = True
68
- smart_union = True
69
- extra = pydantic.Extra.allow
@@ -1,34 +0,0 @@
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 PlanWithFeaturesFeaturesItem(UniversalBaseModel):
12
- product_name: typing_extensions.Annotated[str, FieldMetadata(alias="productName")] = pydantic.Field()
13
- """
14
- The name of the product
15
- """
16
-
17
- attribute_name: typing_extensions.Annotated[str, FieldMetadata(alias="attributeName")] = pydantic.Field()
18
- """
19
- The name of the product attribute
20
- """
21
-
22
- pricing: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
23
- """
24
- The pricing configuration for this feature
25
- """
26
-
27
- if IS_PYDANTIC_V2:
28
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
- else:
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- extra = pydantic.Extra.allow