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/traces/raw_client.py DELETED
@@ -1,226 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import datetime as dt
4
- import typing
5
- from json.decoder import JSONDecodeError
6
-
7
- from ..core.api_error import ApiError
8
- from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
- from ..core.datetime_utils import serialize_datetime
10
- from ..core.http_response import AsyncHttpResponse, HttpResponse
11
- from ..core.pydantic_utilities import parse_obj_as
12
- from ..core.request_options import RequestOptions
13
- from ..errors.bad_request_error import BadRequestError
14
- from ..errors.forbidden_error import ForbiddenError
15
- from ..types.error import Error
16
- from ..types.traces_response import TracesResponse
17
-
18
-
19
- class RawTracesClient:
20
- def __init__(self, *, client_wrapper: SyncClientWrapper):
21
- self._client_wrapper = client_wrapper
22
-
23
- def get_traces(
24
- self,
25
- *,
26
- limit: typing.Optional[int] = None,
27
- offset: typing.Optional[int] = None,
28
- start_time: typing.Optional[dt.datetime] = None,
29
- end_time: typing.Optional[dt.datetime] = None,
30
- external_customer_id: typing.Optional[str] = None,
31
- external_product_id: typing.Optional[str] = None,
32
- external_agent_id: typing.Optional[str] = None,
33
- metadata: typing.Optional[str] = None,
34
- request_options: typing.Optional[RequestOptions] = None,
35
- ) -> HttpResponse[TracesResponse]:
36
- """
37
- Parameters
38
- ----------
39
- limit : typing.Optional[int]
40
- Maximum number of traces to return (1-1000)
41
-
42
- offset : typing.Optional[int]
43
- Number of traces to skip for pagination
44
-
45
- start_time : typing.Optional[dt.datetime]
46
- Filter traces starting from this time (ISO 8601 format)
47
-
48
- end_time : typing.Optional[dt.datetime]
49
- Filter traces up to this time (ISO 8601 format)
50
-
51
- external_customer_id : typing.Optional[str]
52
- Filter traces by external customer ID
53
-
54
- external_product_id : typing.Optional[str]
55
- Filter traces by external product ID
56
-
57
- external_agent_id : typing.Optional[str]
58
- DEPRECATED: Use externalProductId instead. Filter traces by external agent ID
59
-
60
- metadata : typing.Optional[str]
61
- Filter traces by metadata fields. Must be a valid JSON object (e.g., {"key1":"value1","key2":"value2"}). All specified fields must match (AND logic).
62
-
63
- request_options : typing.Optional[RequestOptions]
64
- Request-specific configuration.
65
-
66
- Returns
67
- -------
68
- HttpResponse[TracesResponse]
69
- Success response
70
- """
71
- _response = self._client_wrapper.httpx_client.request(
72
- "traces",
73
- method="GET",
74
- params={
75
- "limit": limit,
76
- "offset": offset,
77
- "startTime": serialize_datetime(start_time) if start_time is not None else None,
78
- "endTime": serialize_datetime(end_time) if end_time is not None else None,
79
- "externalCustomerId": external_customer_id,
80
- "externalProductId": external_product_id,
81
- "externalAgentId": external_agent_id,
82
- "metadata": metadata,
83
- },
84
- request_options=request_options,
85
- )
86
- try:
87
- if 200 <= _response.status_code < 300:
88
- _data = typing.cast(
89
- TracesResponse,
90
- parse_obj_as(
91
- type_=TracesResponse, # type: ignore
92
- object_=_response.json(),
93
- ),
94
- )
95
- return HttpResponse(response=_response, data=_data)
96
- if _response.status_code == 400:
97
- raise BadRequestError(
98
- headers=dict(_response.headers),
99
- body=typing.cast(
100
- Error,
101
- parse_obj_as(
102
- type_=Error, # type: ignore
103
- object_=_response.json(),
104
- ),
105
- ),
106
- )
107
- if _response.status_code == 403:
108
- raise ForbiddenError(
109
- headers=dict(_response.headers),
110
- body=typing.cast(
111
- Error,
112
- parse_obj_as(
113
- type_=Error, # type: ignore
114
- object_=_response.json(),
115
- ),
116
- ),
117
- )
118
- _response_json = _response.json()
119
- except JSONDecodeError:
120
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
121
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
122
-
123
-
124
- class AsyncRawTracesClient:
125
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
126
- self._client_wrapper = client_wrapper
127
-
128
- async def get_traces(
129
- self,
130
- *,
131
- limit: typing.Optional[int] = None,
132
- offset: typing.Optional[int] = None,
133
- start_time: typing.Optional[dt.datetime] = None,
134
- end_time: typing.Optional[dt.datetime] = None,
135
- external_customer_id: typing.Optional[str] = None,
136
- external_product_id: typing.Optional[str] = None,
137
- external_agent_id: typing.Optional[str] = None,
138
- metadata: typing.Optional[str] = None,
139
- request_options: typing.Optional[RequestOptions] = None,
140
- ) -> AsyncHttpResponse[TracesResponse]:
141
- """
142
- Parameters
143
- ----------
144
- limit : typing.Optional[int]
145
- Maximum number of traces to return (1-1000)
146
-
147
- offset : typing.Optional[int]
148
- Number of traces to skip for pagination
149
-
150
- start_time : typing.Optional[dt.datetime]
151
- Filter traces starting from this time (ISO 8601 format)
152
-
153
- end_time : typing.Optional[dt.datetime]
154
- Filter traces up to this time (ISO 8601 format)
155
-
156
- external_customer_id : typing.Optional[str]
157
- Filter traces by external customer ID
158
-
159
- external_product_id : typing.Optional[str]
160
- Filter traces by external product ID
161
-
162
- external_agent_id : typing.Optional[str]
163
- DEPRECATED: Use externalProductId instead. Filter traces by external agent ID
164
-
165
- metadata : typing.Optional[str]
166
- Filter traces by metadata fields. Must be a valid JSON object (e.g., {"key1":"value1","key2":"value2"}). All specified fields must match (AND logic).
167
-
168
- request_options : typing.Optional[RequestOptions]
169
- Request-specific configuration.
170
-
171
- Returns
172
- -------
173
- AsyncHttpResponse[TracesResponse]
174
- Success response
175
- """
176
- _response = await self._client_wrapper.httpx_client.request(
177
- "traces",
178
- method="GET",
179
- params={
180
- "limit": limit,
181
- "offset": offset,
182
- "startTime": serialize_datetime(start_time) if start_time is not None else None,
183
- "endTime": serialize_datetime(end_time) if end_time is not None else None,
184
- "externalCustomerId": external_customer_id,
185
- "externalProductId": external_product_id,
186
- "externalAgentId": external_agent_id,
187
- "metadata": metadata,
188
- },
189
- request_options=request_options,
190
- )
191
- try:
192
- if 200 <= _response.status_code < 300:
193
- _data = typing.cast(
194
- TracesResponse,
195
- parse_obj_as(
196
- type_=TracesResponse, # type: ignore
197
- object_=_response.json(),
198
- ),
199
- )
200
- return AsyncHttpResponse(response=_response, data=_data)
201
- if _response.status_code == 400:
202
- raise BadRequestError(
203
- headers=dict(_response.headers),
204
- body=typing.cast(
205
- Error,
206
- parse_obj_as(
207
- type_=Error, # type: ignore
208
- object_=_response.json(),
209
- ),
210
- ),
211
- )
212
- if _response.status_code == 403:
213
- raise ForbiddenError(
214
- headers=dict(_response.headers),
215
- body=typing.cast(
216
- Error,
217
- parse_obj_as(
218
- type_=Error, # type: ignore
219
- object_=_response.json(),
220
- ),
221
- ),
222
- )
223
- _response_json = _response.json()
224
- except JSONDecodeError:
225
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
226
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
paid/types/agent.py DELETED
@@ -1,31 +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 .agent_attribute import AgentAttribute
10
-
11
-
12
- class Agent(UniversalBaseModel):
13
- id: str
14
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
15
- organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
16
- name: str
17
- description: typing.Optional[str] = None
18
- active: bool
19
- agent_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentCode")] = None
20
- agent_attributes: typing_extensions.Annotated[
21
- typing.Optional[typing.List[AgentAttribute]], FieldMetadata(alias="agentAttributes")
22
- ] = None
23
-
24
- if IS_PYDANTIC_V2:
25
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
- else:
27
-
28
- class Config:
29
- frozen = True
30
- smart_union = True
31
- extra = pydantic.Extra.allow
@@ -1,27 +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 .agent_price_point_tiers import AgentPricePointTiers
10
-
11
-
12
- class AgentPricePoint(UniversalBaseModel):
13
- unit_price: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="unitPrice")] = None
14
- min_quantity: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="minQuantity")] = None
15
- included_quantity: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="includedQuantity")] = (
16
- None
17
- )
18
- tiers: typing.Optional[typing.List[AgentPricePointTiers]] = None
19
-
20
- if IS_PYDANTIC_V2:
21
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
- else:
23
-
24
- class Config:
25
- frozen = True
26
- smart_union = True
27
- extra = pydantic.Extra.allow
@@ -1,23 +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 AgentPricePointTiers(UniversalBaseModel):
12
- min_quantity: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="minQuantity")] = None
13
- max_quantity: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxQuantity")] = None
14
- unit_price: typing_extensions.Annotated[float, FieldMetadata(alias="unitPrice")]
15
-
16
- if IS_PYDANTIC_V2:
17
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
- else:
19
-
20
- class Config:
21
- frozen = True
22
- smart_union = True
23
- extra = pydantic.Extra.allow
paid/types/api_error.py DELETED
@@ -1,29 +0,0 @@
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
-
8
-
9
- class ApiError(UniversalBaseModel):
10
- """
11
- An API error response from the Paid API
12
- """
13
-
14
- message: typing.Optional[str] = pydantic.Field(default=None)
15
- """
16
- A human-readable message providing more details about the error.
17
- """
18
-
19
- code: typing.Optional[str] = None
20
- details: typing.Optional[str] = None
21
-
22
- if IS_PYDANTIC_V2:
23
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
- else:
25
-
26
- class Config:
27
- frozen = True
28
- smart_union = True
29
- 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
- BillingFrequency = typing.Union[typing.Literal["monthly", "quarterly", "annual"], typing.Any]
@@ -1,49 +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 CancelRenewalResponse(UniversalBaseModel):
13
- """
14
- Response after successfully cancelling an order's renewal
15
- """
16
-
17
- order_id: typing_extensions.Annotated[str, FieldMetadata(alias="orderId")] = pydantic.Field()
18
- """
19
- The ID of the order
20
- """
21
-
22
- amendment_id: typing_extensions.Annotated[str, FieldMetadata(alias="amendmentId")] = pydantic.Field()
23
- """
24
- The ID of the amendment record
25
- """
26
-
27
- version: int = pydantic.Field()
28
- """
29
- The new version of the order after the amendment
30
- """
31
-
32
- end_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="endDate")] = pydantic.Field()
33
- """
34
- The new end date of the order
35
- """
36
-
37
- effective_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="effectiveDate")] = pydantic.Field()
38
- """
39
- The effective date of the cancellation
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
paid/types/charge_type.py DELETED
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- ChargeType = typing.Union[typing.Literal["oneTime", "recurring", "usage", "seatBased"], typing.Any]
@@ -1,37 +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 .salutation import Salutation
10
-
11
-
12
- class ContactCreateForCustomer(UniversalBaseModel):
13
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
14
- salutation: Salutation
15
- first_name: typing_extensions.Annotated[str, FieldMetadata(alias="firstName")]
16
- last_name: typing_extensions.Annotated[str, FieldMetadata(alias="lastName")]
17
- account_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="accountName")] = None
18
- email: str
19
- phone: typing.Optional[str] = None
20
- billing_street: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="billingStreet")] = None
21
- billing_city: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="billingCity")] = None
22
- billing_state_province: typing_extensions.Annotated[
23
- typing.Optional[str], FieldMetadata(alias="billingStateProvince")
24
- ] = None
25
- billing_country: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="billingCountry")] = None
26
- billing_postal_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="billingPostalCode")] = (
27
- None
28
- )
29
-
30
- if IS_PYDANTIC_V2:
31
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
32
- else:
33
-
34
- class Config:
35
- frozen = True
36
- smart_union = True
37
- extra = pydantic.Extra.allow
paid/types/cost_trace.py DELETED
@@ -1,55 +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 .cost_amount import CostAmount
10
-
11
-
12
- class CostTrace(UniversalBaseModel):
13
- """
14
- A single cost trace record
15
- """
16
-
17
- name: str = pydantic.Field()
18
- """
19
- The name/type of the operation (e.g., "trace.openai.agents.on_agent")
20
- """
21
-
22
- vendor: str = pydantic.Field()
23
- """
24
- The vendor/provider (e.g., "openai", "anthropic", "mistral")
25
- """
26
-
27
- model: typing.Optional[str] = pydantic.Field(default=None)
28
- """
29
- The model used for the operation (e.g., "gpt-4o-mini", "claude-3-sonnet")
30
- """
31
-
32
- cost: CostAmount
33
- start_time_unix_nano: typing_extensions.Annotated[str, FieldMetadata(alias="startTimeUnixNano")] = pydantic.Field()
34
- """
35
- Unix timestamp in nanoseconds when the operation started
36
- """
37
-
38
- end_time_unix_nano: typing_extensions.Annotated[str, FieldMetadata(alias="endTimeUnixNano")] = pydantic.Field()
39
- """
40
- Unix timestamp in nanoseconds when the operation completed
41
- """
42
-
43
- attributes: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
44
- """
45
- Additional metadata about the trace (e.g., tokens, etc.)
46
- """
47
-
48
- if IS_PYDANTIC_V2:
49
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
50
- else:
51
-
52
- class Config:
53
- frozen = True
54
- smart_union = True
55
- extra = pydantic.Extra.allow
@@ -1,26 +0,0 @@
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 .cost_trace import CostTrace
8
- from .pagination_meta import PaginationMeta
9
-
10
-
11
- class CostTracesResponse(UniversalBaseModel):
12
- """
13
- Response containing cost traces and pagination metadata
14
- """
15
-
16
- traces: typing.List[CostTrace]
17
- meta: PaginationMeta
18
-
19
- if IS_PYDANTIC_V2:
20
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
- else:
22
-
23
- class Config:
24
- frozen = True
25
- smart_union = True
26
- 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
- CreationSource = typing.Union[typing.Literal["manual", "api", "crm", "other"], typing.Any]
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- CreationState = typing.Union[typing.Literal["active", "draft"], typing.Any]
@@ -1,40 +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 .address import Address
10
- from .creation_source import CreationSource
11
- from .tax_exempt_status import TaxExemptStatus
12
-
13
-
14
- class CustomerUpdate(UniversalBaseModel):
15
- name: typing.Optional[str] = None
16
- external_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="externalId")] = None
17
- phone: typing.Optional[str] = None
18
- employee_count: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="employeeCount")] = None
19
- annual_revenue: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="annualRevenue")] = None
20
- tax_exempt_status: typing_extensions.Annotated[
21
- typing.Optional[TaxExemptStatus], FieldMetadata(alias="taxExemptStatus")
22
- ] = None
23
- creation_source: typing_extensions.Annotated[
24
- typing.Optional[CreationSource], FieldMetadata(alias="creationSource")
25
- ] = None
26
- website: typing.Optional[str] = None
27
- billing_address: typing_extensions.Annotated[typing.Optional[Address], FieldMetadata(alias="billingAddress")] = None
28
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
29
- """
30
- Flexible JSON field for storing custom metadata about the customer
31
- """
32
-
33
- if IS_PYDANTIC_V2:
34
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
35
- else:
36
-
37
- class Config:
38
- frozen = True
39
- smart_union = True
40
- extra = pydantic.Extra.allow
@@ -1,48 +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 EntitlementUsage(UniversalBaseModel):
13
- """
14
- Tracks the usage of an entitlement for a customer
15
- """
16
-
17
- id: str
18
- created_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdAt")] = None
19
- updated_at: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updatedAt")] = None
20
- organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
21
- product_id: typing_extensions.Annotated[str, FieldMetadata(alias="productId")]
22
- entitlement_id: typing_extensions.Annotated[str, FieldMetadata(alias="entitlementId")]
23
- customer_id: typing_extensions.Annotated[str, FieldMetadata(alias="customerId")]
24
- start_date: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="startDate")]
25
- end_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="endDate")] = None
26
- total: int = pydantic.Field()
27
- """
28
- Total entitlement amount
29
- """
30
-
31
- available: int = pydantic.Field()
32
- """
33
- Available entitlement amount
34
- """
35
-
36
- used: int = pydantic.Field()
37
- """
38
- Used entitlement amount
39
- """
40
-
41
- if IS_PYDANTIC_V2:
42
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
43
- else:
44
-
45
- class Config:
46
- frozen = True
47
- smart_union = True
48
- extra = pydantic.Extra.allow
@@ -1,27 +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_pricing import OrderLineAttributePricing
10
-
11
-
12
- class OrderLineAttribute(UniversalBaseModel):
13
- agent_attribute_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="agentAttributeId")] = (
14
- None
15
- )
16
- quantity: typing.Optional[float] = None
17
- currency: typing.Optional[str] = None
18
- pricing: typing.Optional[OrderLineAttributePricing] = None
19
-
20
- if IS_PYDANTIC_V2:
21
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
- else:
23
-
24
- class Config:
25
- frozen = True
26
- smart_union = True
27
- 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
- OrderLineAttributeCreateOne = typing.Optional[typing.Any]