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.
- paid/__init__.py +65 -95
- paid/client.py +17 -494
- paid/contacts/client.py +415 -133
- paid/contacts/raw_client.py +1046 -118
- paid/core/client_wrapper.py +9 -10
- paid/customers/client.py +270 -566
- paid/customers/raw_client.py +731 -537
- paid/environment.py +1 -1
- paid/errors/bad_request_error.py +2 -2
- paid/errors/forbidden_error.py +2 -2
- paid/errors/internal_server_error.py +2 -2
- paid/errors/not_found_error.py +2 -2
- paid/invoices/client.py +369 -0
- paid/invoices/raw_client.py +692 -0
- paid/orders/__init__.py +0 -3
- paid/orders/client.py +371 -128
- paid/orders/raw_client.py +829 -121
- paid/products/__init__.py +0 -3
- paid/products/client.py +129 -265
- paid/products/raw_client.py +563 -233
- paid/signals/client.py +130 -0
- paid/signals/raw_client.py +190 -0
- paid/tracing/autoinstrumentation.py +12 -6
- paid/tracing/context_manager.py +2 -6
- paid/tracing/distributed_tracing.py +3 -3
- paid/tracing/signal.py +3 -3
- paid/tracing/wrappers/openai_agents/openaiAgentsHook.py +1 -1
- paid/types/__init__.py +62 -86
- paid/types/attribution.py +8 -0
- paid/types/{agent_attribute.py → bulk_signals_response.py} +4 -5
- paid/types/contact.py +12 -20
- paid/types/{address.py → contact_billing_address.py} +6 -7
- paid/types/{traces_response.py → contact_list_response.py} +5 -9
- paid/types/customer.py +15 -22
- paid/types/customer_attribution.py +8 -0
- paid/types/customer_billing_address.py +26 -0
- paid/types/{usage_summary_order.py → customer_by_external_id.py} +3 -5
- paid/types/{usage_summary_order_line.py → customer_by_id.py} +3 -5
- paid/types/customer_creation_state.py +5 -0
- paid/types/customer_list_response.py +22 -0
- paid/types/empty_response.py +17 -0
- paid/types/{error.py → error_response.py} +4 -7
- paid/types/invoice.py +57 -0
- paid/types/invoice_line.py +42 -0
- paid/types/invoice_line_payment_status.py +7 -0
- paid/types/invoice_lines_response.py +22 -0
- paid/types/invoice_list_response.py +22 -0
- paid/types/invoice_payment_status.py +5 -0
- paid/types/invoice_source.py +5 -0
- paid/types/invoice_status.py +7 -0
- paid/types/invoice_tax_status.py +7 -0
- paid/types/order.py +30 -29
- paid/types/order_creation_state.py +5 -0
- paid/types/order_line.py +6 -24
- paid/types/order_lines_response.py +22 -0
- paid/types/order_list_response.py +22 -0
- paid/types/pagination.py +24 -0
- paid/types/product.py +4 -29
- paid/types/{tier.py → product_by_external_id.py} +5 -4
- paid/types/{cost_amount.py → product_by_id.py} +5 -12
- paid/types/product_list_response.py +22 -0
- paid/types/signal.py +8 -34
- paid/types/{agent.py → update_contact_request.py} +10 -11
- paid/types/update_customer_request.py +38 -0
- paid/types/{product_update.py → update_product_request.py} +2 -12
- {paid_python-0.6.0.dist-info → paid_python-1.0.0a1.dist-info}/METADATA +27 -11
- paid_python-1.0.0a1.dist-info/RECORD +110 -0
- opentelemetry/instrumentation/openai/__init__.py +0 -54
- opentelemetry/instrumentation/openai/shared/__init__.py +0 -399
- opentelemetry/instrumentation/openai/shared/audio_wrappers.py +0 -247
- opentelemetry/instrumentation/openai/shared/chat_wrappers.py +0 -1192
- opentelemetry/instrumentation/openai/shared/completion_wrappers.py +0 -292
- opentelemetry/instrumentation/openai/shared/config.py +0 -15
- opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py +0 -311
- opentelemetry/instrumentation/openai/shared/event_emitter.py +0 -108
- opentelemetry/instrumentation/openai/shared/event_models.py +0 -41
- opentelemetry/instrumentation/openai/shared/image_gen_wrappers.py +0 -68
- opentelemetry/instrumentation/openai/shared/span_utils.py +0 -0
- opentelemetry/instrumentation/openai/utils.py +0 -213
- opentelemetry/instrumentation/openai/v0/__init__.py +0 -176
- opentelemetry/instrumentation/openai/v1/__init__.py +0 -394
- opentelemetry/instrumentation/openai/v1/assistant_wrappers.py +0 -329
- opentelemetry/instrumentation/openai/v1/event_handler_wrapper.py +0 -134
- opentelemetry/instrumentation/openai/v1/responses_wrappers.py +0 -1113
- opentelemetry/instrumentation/openai/version.py +0 -1
- paid/agents/client.py +0 -880
- paid/agents/raw_client.py +0 -785
- paid/orders/lines/client.py +0 -144
- paid/orders/lines/raw_client.py +0 -129
- paid/plans/__init__.py +0 -4
- paid/plans/client.py +0 -332
- paid/plans/raw_client.py +0 -464
- paid/products/types/__init__.py +0 -7
- paid/products/types/product_create_type.py +0 -5
- paid/traces/__init__.py +0 -4
- paid/traces/client.py +0 -218
- paid/traces/raw_client.py +0 -226
- paid/types/agent_price_point.py +0 -27
- paid/types/agent_price_point_tiers.py +0 -23
- paid/types/agent_update.py +0 -29
- paid/types/api_error.py +0 -29
- paid/types/billing_frequency.py +0 -5
- paid/types/charge_type.py +0 -5
- paid/types/cost_trace.py +0 -55
- paid/types/cost_traces_response.py +0 -26
- paid/types/creation_source.py +0 -5
- paid/types/creation_state.py +0 -5
- paid/types/customer_update.py +0 -40
- paid/types/entitlement_usage.py +0 -48
- paid/types/order_line_attribute.py +0 -27
- paid/types/order_line_attribute_create_one.py +0 -5
- paid/types/order_line_attribute_pricing.py +0 -33
- paid/types/order_line_create.py +0 -72
- paid/types/pagination_meta.py +0 -84
- paid/types/plan.py +0 -81
- paid/types/plan_group.py +0 -60
- paid/types/plan_plan_products_item.py +0 -35
- paid/types/plan_plan_products_item_plan_product_attribute_item.py +0 -34
- paid/types/price_point.py +0 -25
- paid/types/pricing.py +0 -31
- paid/types/pricing_model_type.py +0 -7
- paid/types/product_type.py +0 -5
- paid/types/product_update_type.py +0 -5
- paid/types/salutation.py +0 -5
- paid/types/signal_v_2.py +0 -56
- paid/types/tax_exempt_status.py +0 -5
- paid/types/trace.py +0 -69
- paid/types/usage_pagination_meta.py +0 -43
- paid/types/usage_summaries_response.py +0 -26
- paid/types/usage_summary.py +0 -121
- paid/usage/__init__.py +0 -7
- paid/usage/client.py +0 -321
- paid/usage/raw_client.py +0 -387
- paid/usage/types/__init__.py +0 -7
- paid/usage/types/usage_check_usage_response.py +0 -53
- paid_python-0.6.0.dist-info/RECORD +0 -153
- /paid/{agents → invoices}/__init__.py +0 -0
- /paid/{orders/lines → signals}/__init__.py +0 -0
- {paid_python-0.6.0.dist-info → paid_python-1.0.0a1.dist-info}/LICENSE +0 -0
- {paid_python-0.6.0.dist-info → paid_python-1.0.0a1.dist-info}/WHEEL +0 -0
paid/types/pagination_meta.py
DELETED
|
@@ -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
|
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,35 +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
|
-
|
|
12
|
-
|
|
13
|
-
class PlanPlanProductsItem(UniversalBaseModel):
|
|
14
|
-
id: typing.Optional[str] = None
|
|
15
|
-
organization_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="organizationId")] = None
|
|
16
|
-
plan_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="planId")] = None
|
|
17
|
-
product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productId")] = None
|
|
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
|
-
plan_product_attribute: typing_extensions.Annotated[
|
|
21
|
-
typing.Optional[typing.List[PlanPlanProductsItemPlanProductAttributeItem]],
|
|
22
|
-
FieldMetadata(alias="planProductAttribute"),
|
|
23
|
-
] = pydantic.Field(default=None)
|
|
24
|
-
"""
|
|
25
|
-
The product attributes with pricing for this plan
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
if IS_PYDANTIC_V2:
|
|
29
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
30
|
-
else:
|
|
31
|
-
|
|
32
|
-
class Config:
|
|
33
|
-
frozen = True
|
|
34
|
-
smart_union = True
|
|
35
|
-
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
|
paid/types/price_point.py
DELETED
|
@@ -1,25 +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 .tier import Tier
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class PricePoint(UniversalBaseModel):
|
|
13
|
-
currency: typing.Optional[str] = None
|
|
14
|
-
unit_price: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="unitPrice")] = None
|
|
15
|
-
min_quantity: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="minQuantity")] = None
|
|
16
|
-
tiers: typing.Optional[typing.List[Tier]] = None
|
|
17
|
-
|
|
18
|
-
if IS_PYDANTIC_V2:
|
|
19
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
20
|
-
else:
|
|
21
|
-
|
|
22
|
-
class Config:
|
|
23
|
-
frozen = True
|
|
24
|
-
smart_union = True
|
|
25
|
-
extra = pydantic.Extra.allow
|
paid/types/pricing.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_price_point import AgentPricePoint
|
|
10
|
-
from .billing_frequency import BillingFrequency
|
|
11
|
-
from .charge_type import ChargeType
|
|
12
|
-
from .pricing_model_type import PricingModelType
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class Pricing(UniversalBaseModel):
|
|
16
|
-
event_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="eventName")] = None
|
|
17
|
-
taxable: bool
|
|
18
|
-
credit_cost: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="creditCost")] = None
|
|
19
|
-
charge_type: typing_extensions.Annotated[ChargeType, FieldMetadata(alias="chargeType")]
|
|
20
|
-
pricing_model: typing_extensions.Annotated[PricingModelType, FieldMetadata(alias="pricingModel")]
|
|
21
|
-
billing_frequency: typing_extensions.Annotated[BillingFrequency, FieldMetadata(alias="billingFrequency")]
|
|
22
|
-
price_points: typing_extensions.Annotated[typing.Dict[str, AgentPricePoint], FieldMetadata(alias="pricePoints")]
|
|
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
|
paid/types/pricing_model_type.py
DELETED
paid/types/product_type.py
DELETED
paid/types/salutation.py
DELETED
paid/types/signal_v_2.py
DELETED
|
@@ -1,56 +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 SignalV2(UniversalBaseModel):
|
|
10
|
-
"""
|
|
11
|
-
V2 signal schema with clean field names. Use either internal IDs (product_id, customer_id) or external IDs (external_product_id, external_customer_id).
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
event_name: str = pydantic.Field()
|
|
15
|
-
"""
|
|
16
|
-
The name of the event being tracked
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
product_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
-
"""
|
|
21
|
-
Paid's internal product ID. Use either this OR external_product_id.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
external_product_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
25
|
-
"""
|
|
26
|
-
Your system's product ID. Use either this OR product_id.
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
customer_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
30
|
-
"""
|
|
31
|
-
Paid's internal customer ID. Use either this OR external_customer_id.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
external_customer_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
35
|
-
"""
|
|
36
|
-
Your system's customer ID. Use either this OR customer_id.
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
40
|
-
"""
|
|
41
|
-
Optional additional data/metadata for the signal
|
|
42
|
-
"""
|
|
43
|
-
|
|
44
|
-
idempotency_key: typing.Optional[str] = pydantic.Field(default=None)
|
|
45
|
-
"""
|
|
46
|
-
A unique key to ensure idempotent signal processing
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
if IS_PYDANTIC_V2:
|
|
50
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
51
|
-
else:
|
|
52
|
-
|
|
53
|
-
class Config:
|
|
54
|
-
frozen = True
|
|
55
|
-
smart_union = True
|
|
56
|
-
extra = pydantic.Extra.allow
|
paid/types/tax_exempt_status.py
DELETED
paid/types/trace.py
DELETED
|
@@ -1,69 +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 Trace(UniversalBaseModel):
|
|
13
|
-
"""
|
|
14
|
-
A single cost trace record with customer and product info
|
|
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: str = pydantic.Field()
|
|
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
|
-
customer_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerId")] = pydantic.Field(
|
|
49
|
-
default=None
|
|
50
|
-
)
|
|
51
|
-
"""
|
|
52
|
-
The internal customer ID associated with this trace
|
|
53
|
-
"""
|
|
54
|
-
|
|
55
|
-
product_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="productId")] = pydantic.Field(
|
|
56
|
-
default=None
|
|
57
|
-
)
|
|
58
|
-
"""
|
|
59
|
-
The product/agent ID associated with this trace (optional)
|
|
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,43 +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 UsagePaginationMeta(UniversalBaseModel):
|
|
12
|
-
"""
|
|
13
|
-
Pagination metadata for usage summaries
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
limit: int = pydantic.Field()
|
|
17
|
-
"""
|
|
18
|
-
The requested limit
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
offset: int = pydantic.Field()
|
|
22
|
-
"""
|
|
23
|
-
The requested offset
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
total: int = pydantic.Field()
|
|
27
|
-
"""
|
|
28
|
-
Total number of usage summaries available
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
has_more: typing_extensions.Annotated[bool, FieldMetadata(alias="hasMore")] = pydantic.Field()
|
|
32
|
-
"""
|
|
33
|
-
Whether there are more results available
|
|
34
|
-
"""
|
|
35
|
-
|
|
36
|
-
if IS_PYDANTIC_V2:
|
|
37
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
38
|
-
else:
|
|
39
|
-
|
|
40
|
-
class Config:
|
|
41
|
-
frozen = True
|
|
42
|
-
smart_union = True
|
|
43
|
-
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 .usage_pagination_meta import UsagePaginationMeta
|
|
8
|
-
from .usage_summary import UsageSummary
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class UsageSummariesResponse(UniversalBaseModel):
|
|
12
|
-
"""
|
|
13
|
-
Response containing usage summaries and pagination metadata
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
data: typing.List[UsageSummary]
|
|
17
|
-
pagination: UsagePaginationMeta
|
|
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
|