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
@@ -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
@@ -1,7 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- PricingModelType = typing.Union[
6
- typing.Literal["PerUnit", "VolumePricing", "GraduatedPricing", "PrepaidCredits"], typing.Any
7
- ]
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- ProductType = typing.Union[typing.Literal["agent", "product", "prepaidCreditBundle"], typing.Any]
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- ProductUpdateType = typing.Union[typing.Literal["agent", "product", "prepaidCreditBundle"], typing.Any]
paid/types/salutation.py DELETED
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- Salutation = typing.Union[typing.Literal["Mr.", "Mrs.", "Miss", "Ms.", "Dr.", "Prof."], typing.Any]
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
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- TaxExemptStatus = typing.Union[typing.Literal["none", "exempt", "reverse"], typing.Any]
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