paid-python 0.6.0__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 (140) hide show
  1. paid/__init__.py +65 -95
  2. paid/client.py +17 -494
  3. paid/contacts/client.py +415 -133
  4. paid/contacts/raw_client.py +1046 -118
  5. paid/core/client_wrapper.py +9 -10
  6. paid/customers/client.py +270 -566
  7. paid/customers/raw_client.py +731 -537
  8. paid/environment.py +1 -1
  9. paid/errors/bad_request_error.py +2 -2
  10. paid/errors/forbidden_error.py +2 -2
  11. paid/errors/internal_server_error.py +2 -2
  12. paid/errors/not_found_error.py +2 -2
  13. paid/invoices/client.py +369 -0
  14. paid/invoices/raw_client.py +692 -0
  15. paid/orders/__init__.py +0 -3
  16. paid/orders/client.py +371 -128
  17. paid/orders/raw_client.py +829 -121
  18. paid/products/__init__.py +0 -3
  19. paid/products/client.py +129 -265
  20. paid/products/raw_client.py +563 -233
  21. paid/signals/client.py +130 -0
  22. paid/signals/raw_client.py +190 -0
  23. paid/tracing/autoinstrumentation.py +12 -6
  24. paid/tracing/context_manager.py +2 -6
  25. paid/tracing/distributed_tracing.py +3 -3
  26. paid/tracing/signal.py +3 -3
  27. paid/tracing/wrappers/openai_agents/openaiAgentsHook.py +1 -1
  28. paid/types/__init__.py +62 -86
  29. paid/types/attribution.py +8 -0
  30. paid/types/{agent_attribute.py → bulk_signals_response.py} +4 -5
  31. paid/types/contact.py +12 -20
  32. paid/types/{address.py → contact_billing_address.py} +6 -7
  33. paid/types/{traces_response.py → contact_list_response.py} +5 -9
  34. paid/types/customer.py +15 -22
  35. paid/types/customer_attribution.py +8 -0
  36. paid/types/customer_billing_address.py +26 -0
  37. paid/types/{usage_summary_order.py → customer_by_external_id.py} +3 -5
  38. paid/types/{usage_summary_order_line.py → customer_by_id.py} +3 -5
  39. paid/types/customer_creation_state.py +5 -0
  40. paid/types/customer_list_response.py +22 -0
  41. paid/types/empty_response.py +17 -0
  42. paid/types/{error.py → error_response.py} +4 -7
  43. paid/types/invoice.py +57 -0
  44. paid/types/invoice_line.py +42 -0
  45. paid/types/invoice_line_payment_status.py +7 -0
  46. paid/types/invoice_lines_response.py +22 -0
  47. paid/types/invoice_list_response.py +22 -0
  48. paid/types/invoice_payment_status.py +5 -0
  49. paid/types/invoice_source.py +5 -0
  50. paid/types/invoice_status.py +7 -0
  51. paid/types/invoice_tax_status.py +7 -0
  52. paid/types/order.py +30 -29
  53. paid/types/order_creation_state.py +5 -0
  54. paid/types/order_line.py +6 -24
  55. paid/types/order_lines_response.py +22 -0
  56. paid/types/order_list_response.py +22 -0
  57. paid/types/pagination.py +24 -0
  58. paid/types/product.py +4 -29
  59. paid/types/{tier.py → product_by_external_id.py} +5 -4
  60. paid/types/{cost_amount.py → product_by_id.py} +5 -12
  61. paid/types/product_list_response.py +22 -0
  62. paid/types/signal.py +8 -34
  63. paid/types/{agent.py → update_contact_request.py} +10 -11
  64. paid/types/update_customer_request.py +38 -0
  65. paid/types/{product_update.py → update_product_request.py} +2 -12
  66. {paid_python-0.6.0.dist-info → paid_python-1.0.0a1.dist-info}/METADATA +27 -11
  67. paid_python-1.0.0a1.dist-info/RECORD +110 -0
  68. opentelemetry/instrumentation/openai/__init__.py +0 -54
  69. opentelemetry/instrumentation/openai/shared/__init__.py +0 -399
  70. opentelemetry/instrumentation/openai/shared/audio_wrappers.py +0 -247
  71. opentelemetry/instrumentation/openai/shared/chat_wrappers.py +0 -1192
  72. opentelemetry/instrumentation/openai/shared/completion_wrappers.py +0 -292
  73. opentelemetry/instrumentation/openai/shared/config.py +0 -15
  74. opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +0 -311
  75. opentelemetry/instrumentation/openai/shared/event_emitter.py +0 -108
  76. opentelemetry/instrumentation/openai/shared/event_models.py +0 -41
  77. opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +0 -68
  78. opentelemetry/instrumentation/openai/shared/span_utils.py +0 -0
  79. opentelemetry/instrumentation/openai/utils.py +0 -213
  80. opentelemetry/instrumentation/openai/v0/__init__.py +0 -176
  81. opentelemetry/instrumentation/openai/v1/__init__.py +0 -394
  82. opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +0 -329
  83. opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +0 -134
  84. opentelemetry/instrumentation/openai/v1/responses_wrappers.py +0 -1113
  85. opentelemetry/instrumentation/openai/version.py +0 -1
  86. paid/agents/client.py +0 -880
  87. paid/agents/raw_client.py +0 -785
  88. paid/orders/lines/client.py +0 -144
  89. paid/orders/lines/raw_client.py +0 -129
  90. paid/plans/__init__.py +0 -4
  91. paid/plans/client.py +0 -332
  92. paid/plans/raw_client.py +0 -464
  93. paid/products/types/__init__.py +0 -7
  94. paid/products/types/product_create_type.py +0 -5
  95. paid/traces/__init__.py +0 -4
  96. paid/traces/client.py +0 -218
  97. paid/traces/raw_client.py +0 -226
  98. paid/types/agent_price_point.py +0 -27
  99. paid/types/agent_price_point_tiers.py +0 -23
  100. paid/types/agent_update.py +0 -29
  101. paid/types/api_error.py +0 -29
  102. paid/types/billing_frequency.py +0 -5
  103. paid/types/charge_type.py +0 -5
  104. paid/types/cost_trace.py +0 -55
  105. paid/types/cost_traces_response.py +0 -26
  106. paid/types/creation_source.py +0 -5
  107. paid/types/creation_state.py +0 -5
  108. paid/types/customer_update.py +0 -40
  109. paid/types/entitlement_usage.py +0 -48
  110. paid/types/order_line_attribute.py +0 -27
  111. paid/types/order_line_attribute_create_one.py +0 -5
  112. paid/types/order_line_attribute_pricing.py +0 -33
  113. paid/types/order_line_create.py +0 -72
  114. paid/types/pagination_meta.py +0 -84
  115. paid/types/plan.py +0 -81
  116. paid/types/plan_group.py +0 -60
  117. paid/types/plan_plan_products_item.py +0 -35
  118. paid/types/plan_plan_products_item_plan_product_attribute_item.py +0 -34
  119. paid/types/price_point.py +0 -25
  120. paid/types/pricing.py +0 -31
  121. paid/types/pricing_model_type.py +0 -7
  122. paid/types/product_type.py +0 -5
  123. paid/types/product_update_type.py +0 -5
  124. paid/types/salutation.py +0 -5
  125. paid/types/signal_v_2.py +0 -56
  126. paid/types/tax_exempt_status.py +0 -5
  127. paid/types/trace.py +0 -69
  128. paid/types/usage_pagination_meta.py +0 -43
  129. paid/types/usage_summaries_response.py +0 -26
  130. paid/types/usage_summary.py +0 -121
  131. paid/usage/__init__.py +0 -7
  132. paid/usage/client.py +0 -321
  133. paid/usage/raw_client.py +0 -387
  134. paid/usage/types/__init__.py +0 -7
  135. paid/usage/types/usage_check_usage_response.py +0 -53
  136. paid_python-0.6.0.dist-info/RECORD +0 -153
  137. /paid/{agents → invoices}/__init__.py +0 -0
  138. /paid/{orders/lines → signals}/__init__.py +0 -0
  139. {paid_python-0.6.0.dist-info → paid_python-1.0.0a1.dist-info}/LICENSE +0 -0
  140. {paid_python-0.6.0.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)
@@ -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
@@ -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
- 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 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")
20
- ] = 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
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]
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]
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]
@@ -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