diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index d6f5f39e..127ac87b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "3.24.0"
+ ".": "4.0.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index ee8fe3fc..645b4c0b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 115
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-fee4c7438579fd72ae7c08ad11cc502da279ad3cccfe2235b18afcacc91ad0d9.yml
-openapi_spec_hash: dc9d553a388715ba22d873aee54a3ed1
-config_hash: 1e2186b09e57d7d27b6ab5c8e6410b31
+configured_endpoints: 116
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c2a4808c828c8288c5c8dfe2fdfa51d4d7c1bcc33cacc6b859d0cf4b35ce95cc.yml
+openapi_spec_hash: a2b5a1bfabbd03dd1b411791576eb502
+config_hash: 3c3524be9607afb24d2139ce26ce5389
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2499d53..01f2a1ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## 4.0.0 (2025-06-09)
+
+Full Changelog: [v3.24.0...v4.0.0](https://github.com/orbcorp/orb-python/compare/v3.24.0...v4.0.0)
+
+### ⚠ BREAKING CHANGES
+
+* **client:** breaking change to re-use types
+
+### Features
+
+* **api:** api update ([1703727](https://github.com/orbcorp/orb-python/commit/17037277fa161738f83680233c04f597741b1c1c))
+* **api:** api update ([a76a33a](https://github.com/orbcorp/orb-python/commit/a76a33a422924747a24845a5e083cdca26e59c9b))
+* **api:** manual updates ([45ce124](https://github.com/orbcorp/orb-python/commit/45ce124f58e30ccb43cc3e0d3e3ce9c28c0b54a2))
+* **client:** breaking change to re-use types ([fd639a0](https://github.com/orbcorp/orb-python/commit/fd639a083f97949fea5cdbc9c0e24b593445d44f))
+
## 3.24.0 (2025-06-04)
Full Changelog: [v3.23.0...v3.24.0](https://github.com/orbcorp/orb-python/compare/v3.23.0...v3.24.0)
diff --git a/api.md b/api.md
index b7905aed..4c44ec77 100644
--- a/api.md
+++ b/api.md
@@ -2,14 +2,148 @@
```python
from orb.types import (
+ Address,
+ AdjustmentInterval,
+ AggregatedCost,
+ Allocation,
AmountDiscount,
+ AmountDiscountInterval,
+ BillableMetricTiny,
+ BillingCycleAnchorConfiguration,
+ BillingCycleConfiguration,
BillingCycleRelativeDate,
+ BPSConfig,
+ BPSTier,
+ BulkBPSConfig,
+ BulkBPSTier,
+ BulkConfig,
+ BulkTier,
+ ChangedSubscriptionResources,
+ ConversionRateTier,
+ ConversionRateTieredConfig,
+ ConversionRateUnitConfig,
+ CouponRedemption,
+ CreditNote,
+ CreditNoteTiny,
+ CustomExpiration,
+ CustomerMinified,
+ CustomerTaxID,
+ DimensionalPriceConfiguration,
Discount,
+ FixedFeeQuantityScheduleEntry,
+ FixedFeeQuantityTransition,
+ Invoice,
InvoiceLevelDiscount,
+ InvoiceTiny,
+ ItemSlim,
+ MatrixConfig,
+ MatrixSubLineItem,
+ MatrixValue,
+ MatrixWithAllocationConfig,
+ Maximum,
+ MaximumInterval,
+ Minimum,
+ MinimumInterval,
+ MonetaryAmountDiscountAdjustment,
+ MonetaryMaximumAdjustment,
+ MonetaryMinimumAdjustment,
+ MonetaryPercentageDiscountAdjustment,
+ MonetaryUsageDiscountAdjustment,
+ NewAllocationPrice,
+ NewAmountDiscount,
+ NewBillingCycleConfiguration,
+ NewDimensionalPriceConfiguration,
+ NewFloatingBPSPrice,
+ NewFloatingBulkBPSPrice,
+ NewFloatingBulkPrice,
+ NewFloatingBulkWithProrationPrice,
+ NewFloatingCumulativeGroupedBulkPrice,
+ NewFloatingGroupedAllocationPrice,
+ NewFloatingGroupedTieredPackagePrice,
+ NewFloatingGroupedTieredPrice,
+ NewFloatingGroupedWithMeteredMinimumPrice,
+ NewFloatingGroupedWithProratedMinimumPrice,
+ NewFloatingMatrixPrice,
+ NewFloatingMatrixWithAllocationPrice,
+ NewFloatingMatrixWithDisplayNamePrice,
+ NewFloatingMaxGroupTieredPackagePrice,
+ NewFloatingPackagePrice,
+ NewFloatingPackageWithAllocationPrice,
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+ NewFloatingThresholdTotalAmountPrice,
+ NewFloatingTieredBPSPrice,
+ NewFloatingTieredPackagePrice,
+ NewFloatingTieredPackageWithMinimumPrice,
+ NewFloatingTieredPrice,
+ NewFloatingTieredWithMinimumPrice,
+ NewFloatingTieredWithProrationPrice,
+ NewFloatingUnitPrice,
+ NewFloatingUnitWithPercentPrice,
+ NewFloatingUnitWithProrationPrice,
+ NewMaximum,
+ NewMinimum,
+ NewPercentageDiscount,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanGroupedTieredPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanMatrixPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanPackagePrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanUnitWithProrationPrice,
+ NewUsageDiscount,
+ OtherSubLineItem,
+ PackageConfig,
PaginationMetadata,
+ PerPriceCost,
PercentageDiscount,
+ PercentageDiscountInterval,
+ PlanPhaseAmountDiscountAdjustment,
+ PlanPhaseMaximumAdjustment,
+ PlanPhaseMinimumAdjustment,
+ PlanPhasePercentageDiscountAdjustment,
+ PlanPhaseUsageDiscountAdjustment,
+ Price,
+ PriceInterval,
+ SubLineItemGrouping,
+ SubLineItemMatrixConfig,
+ SubscriptionChangeMinified,
+ SubscriptionMinified,
+ SubscriptionTrialInfo,
+ TaxAmount,
+ Tier,
+ TierConfig,
+ TierSubLineItem,
+ TieredBPSConfig,
+ TieredConfig,
+ TieredConversionRateConfig,
+ TransformPriceFilter,
TrialDiscount,
+ UnitConfig,
+ UnitConversionRateConfig,
UsageDiscount,
+ UsageDiscountInterval,
)
```
@@ -70,24 +204,28 @@ Methods:
# CreditNotes
-Types:
-
-```python
-from orb.types import CreditNote
-```
-
Methods:
-- client.credit_notes.create(\*\*params) -> CreditNote
-- client.credit_notes.list(\*\*params) -> SyncPage[CreditNote]
-- client.credit_notes.fetch(credit_note_id) -> CreditNote
+- client.credit_notes.create(\*\*params) -> CreditNote
+- client.credit_notes.list(\*\*params) -> SyncPage[CreditNote]
+- client.credit_notes.fetch(credit_note_id) -> CreditNote
# Customers
Types:
```python
-from orb.types import Customer
+from orb.types import (
+ AccountingProviderConfig,
+ AddressInput,
+ Customer,
+ CustomerHierarchyConfig,
+ NewAccountingSyncConfiguration,
+ NewAvalaraTaxConfiguration,
+ NewReportingConfiguration,
+ NewSphereConfiguration,
+ NewTaxJarConfiguration,
+)
```
Methods:
@@ -134,6 +272,14 @@ Types:
```python
from orb.types.customers.credits import (
+ AffectedBlock,
+ AmendmentLedgerEntry,
+ CreditBlockExpiryLedgerEntry,
+ DecrementLedgerEntry,
+ ExpirationChangeLedgerEntry,
+ IncrementLedgerEntry,
+ VoidInitiatedLedgerEntry,
+ VoidLedgerEntry,
LedgerListResponse,
LedgerCreateEntryResponse,
LedgerCreateEntryByExternalIDResponse,
@@ -154,6 +300,7 @@ Types:
```python
from orb.types.customers.credits import (
+ TopUpInvoiceSettings,
TopUpCreateResponse,
TopUpListResponse,
TopUpCreateByExternalIDResponse,
@@ -254,20 +401,20 @@ Methods:
Types:
```python
-from orb.types import Invoice, InvoiceFetchUpcomingResponse
+from orb.types import InvoiceFetchUpcomingResponse
```
Methods:
-- client.invoices.create(\*\*params) -> Invoice
-- client.invoices.update(invoice_id, \*\*params) -> Invoice
-- client.invoices.list(\*\*params) -> SyncPage[Invoice]
-- client.invoices.fetch(invoice_id) -> Invoice
+- client.invoices.create(\*\*params) -> Invoice
+- client.invoices.update(invoice_id, \*\*params) -> Invoice
+- client.invoices.list(\*\*params) -> SyncPage[Invoice]
+- client.invoices.fetch(invoice_id) -> Invoice
- client.invoices.fetch_upcoming(\*\*params) -> InvoiceFetchUpcomingResponse
-- client.invoices.issue(invoice_id, \*\*params) -> Invoice
-- client.invoices.mark_paid(invoice_id, \*\*params) -> Invoice
-- client.invoices.pay(invoice_id) -> Invoice
-- client.invoices.void(invoice_id) -> Invoice
+- client.invoices.issue(invoice_id, \*\*params) -> Invoice
+- client.invoices.mark_paid(invoice_id, \*\*params) -> Invoice
+- client.invoices.pay(invoice_id) -> Invoice
+- client.invoices.void(invoice_id) -> Invoice
# Items
@@ -329,27 +476,28 @@ Types:
```python
from orb.types import (
EvaluatePriceGroup,
- Price,
PriceEvaluateResponse,
PriceEvaluateMultipleResponse,
+ PriceEvaluatePreviewEventsResponse,
)
```
Methods:
-- client.prices.create(\*\*params) -> Price
-- client.prices.update(price_id, \*\*params) -> Price
-- client.prices.list(\*\*params) -> SyncPage[Price]
+- client.prices.create(\*\*params) -> Price
+- client.prices.update(price_id, \*\*params) -> Price
+- client.prices.list(\*\*params) -> SyncPage[Price]
- client.prices.evaluate(price_id, \*\*params) -> PriceEvaluateResponse
- client.prices.evaluate_multiple(\*\*params) -> PriceEvaluateMultipleResponse
-- client.prices.fetch(price_id) -> Price
+- client.prices.evaluate_preview_events(\*\*params) -> PriceEvaluatePreviewEventsResponse
+- client.prices.fetch(price_id) -> Price
## ExternalPriceID
Methods:
-- client.prices.external_price_id.update(external_price_id, \*\*params) -> Price
-- client.prices.external_price_id.fetch(external_price_id) -> Price
+- client.prices.external_price_id.update(external_price_id, \*\*params) -> Price
+- client.prices.external_price_id.fetch(external_price_id) -> Price
# Subscriptions
@@ -357,44 +505,62 @@ Types:
```python
from orb.types import (
+ DiscountOverride,
+ NewSubscriptionBPSPrice,
+ NewSubscriptionBulkBPSPrice,
+ NewSubscriptionBulkPrice,
+ NewSubscriptionBulkWithProrationPrice,
+ NewSubscriptionCumulativeGroupedBulkPrice,
+ NewSubscriptionGroupedAllocationPrice,
+ NewSubscriptionGroupedTieredPackagePrice,
+ NewSubscriptionGroupedTieredPrice,
+ NewSubscriptionGroupedWithMeteredMinimumPrice,
+ NewSubscriptionGroupedWithProratedMinimumPrice,
+ NewSubscriptionMatrixPrice,
+ NewSubscriptionMatrixWithAllocationPrice,
+ NewSubscriptionMatrixWithDisplayNamePrice,
+ NewSubscriptionMaxGroupTieredPackagePrice,
+ NewSubscriptionPackagePrice,
+ NewSubscriptionPackageWithAllocationPrice,
+ NewSubscriptionScalableMatrixWithTieredPricingPrice,
+ NewSubscriptionScalableMatrixWithUnitPricingPrice,
+ NewSubscriptionThresholdTotalAmountPrice,
+ NewSubscriptionTierWithProrationPrice,
+ NewSubscriptionTieredBPSPrice,
+ NewSubscriptionTieredPackagePrice,
+ NewSubscriptionTieredPackageWithMinimumPrice,
+ NewSubscriptionTieredPrice,
+ NewSubscriptionTieredWithMinimumPrice,
+ NewSubscriptionUnitPrice,
+ NewSubscriptionUnitWithPercentPrice,
+ NewSubscriptionUnitWithProrationPrice,
Subscription,
SubscriptionUsage,
Subscriptions,
- SubscriptionCreateResponse,
- SubscriptionCancelResponse,
SubscriptionFetchCostsResponse,
SubscriptionFetchScheduleResponse,
- SubscriptionPriceIntervalsResponse,
- SubscriptionRedeemCouponResponse,
- SubscriptionSchedulePlanChangeResponse,
- SubscriptionTriggerPhaseResponse,
- SubscriptionUnscheduleCancellationResponse,
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
- SubscriptionUnschedulePendingPlanChangesResponse,
- SubscriptionUpdateFixedFeeQuantityResponse,
- SubscriptionUpdateTrialResponse,
)
```
Methods:
-- client.subscriptions.create(\*\*params) -> SubscriptionCreateResponse
+- client.subscriptions.create(\*\*params) -> MutatedSubscription
- client.subscriptions.update(subscription_id, \*\*params) -> Subscription
- client.subscriptions.list(\*\*params) -> SyncPage[Subscription]
-- client.subscriptions.cancel(subscription_id, \*\*params) -> SubscriptionCancelResponse
+- client.subscriptions.cancel(subscription_id, \*\*params) -> MutatedSubscription
- client.subscriptions.fetch(subscription_id) -> Subscription
- client.subscriptions.fetch_costs(subscription_id, \*\*params) -> SubscriptionFetchCostsResponse
- client.subscriptions.fetch_schedule(subscription_id, \*\*params) -> SyncPage[SubscriptionFetchScheduleResponse]
- client.subscriptions.fetch_usage(subscription_id, \*\*params) -> SubscriptionUsage
-- client.subscriptions.price_intervals(subscription_id, \*\*params) -> SubscriptionPriceIntervalsResponse
-- client.subscriptions.redeem_coupon(subscription_id, \*\*params) -> SubscriptionRedeemCouponResponse
-- client.subscriptions.schedule_plan_change(subscription_id, \*\*params) -> SubscriptionSchedulePlanChangeResponse
-- client.subscriptions.trigger_phase(subscription_id, \*\*params) -> SubscriptionTriggerPhaseResponse
-- client.subscriptions.unschedule_cancellation(subscription_id) -> SubscriptionUnscheduleCancellationResponse
-- client.subscriptions.unschedule_fixed_fee_quantity_updates(subscription_id, \*\*params) -> SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse
-- client.subscriptions.unschedule_pending_plan_changes(subscription_id) -> SubscriptionUnschedulePendingPlanChangesResponse
-- client.subscriptions.update_fixed_fee_quantity(subscription_id, \*\*params) -> SubscriptionUpdateFixedFeeQuantityResponse
-- client.subscriptions.update_trial(subscription_id, \*\*params) -> SubscriptionUpdateTrialResponse
+- client.subscriptions.price_intervals(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.redeem_coupon(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.schedule_plan_change(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.trigger_phase(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.unschedule_cancellation(subscription_id) -> MutatedSubscription
+- client.subscriptions.unschedule_fixed_fee_quantity_updates(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.unschedule_pending_plan_changes(subscription_id) -> MutatedSubscription
+- client.subscriptions.update_fixed_fee_quantity(subscription_id, \*\*params) -> MutatedSubscription
+- client.subscriptions.update_trial(subscription_id, \*\*params) -> MutatedSubscription
# Webhooks
@@ -408,7 +574,7 @@ Methods:
Types:
```python
-from orb.types import Alert
+from orb.types import Alert, Threshold
```
Methods:
@@ -448,6 +614,7 @@ Types:
```python
from orb.types import (
+ MutatedSubscription,
SubscriptionChangeRetrieveResponse,
SubscriptionChangeApplyResponse,
SubscriptionChangeCancelResponse,
diff --git a/pyproject.toml b/pyproject.toml
index 808dd447..70da50d8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
-version = "3.24.0"
+version = "4.0.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/orb/_version.py b/src/orb/_version.py
index 7956ed6e..f6f2ef77 100644
--- a/src/orb/_version.py
+++ b/src/orb/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "orb"
-__version__ = "3.24.0" # x-release-please-version
+__version__ = "4.0.0" # x-release-please-version
diff --git a/src/orb/resources/alerts.py b/src/orb/resources/alerts.py
index 45847cdf..bf2c62a4 100644
--- a/src/orb/resources/alerts.py
+++ b/src/orb/resources/alerts.py
@@ -26,6 +26,7 @@
from ..pagination import SyncPage, AsyncPage
from ..types.alert import Alert
from .._base_client import AsyncPaginator, make_request_options
+from ..types.threshold_param import ThresholdParam
__all__ = ["Alerts", "AsyncAlerts"]
@@ -87,7 +88,7 @@ def update(
self,
alert_configuration_id: str,
*,
- thresholds: Iterable[alert_update_params.Threshold],
+ thresholds: Iterable[ThresholdParam],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -213,7 +214,7 @@ def create_for_customer(
*,
currency: str,
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
- thresholds: Optional[Iterable[alert_create_for_customer_params.Threshold]] | NotGiven = NOT_GIVEN,
+ thresholds: Optional[Iterable[ThresholdParam]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -278,7 +279,7 @@ def create_for_external_customer(
*,
currency: str,
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
- thresholds: Optional[Iterable[alert_create_for_external_customer_params.Threshold]] | NotGiven = NOT_GIVEN,
+ thresholds: Optional[Iterable[ThresholdParam]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -343,7 +344,7 @@ def create_for_subscription(
self,
subscription_id: str,
*,
- thresholds: Iterable[alert_create_for_subscription_params.Threshold],
+ thresholds: Iterable[ThresholdParam],
type: Literal["usage_exceeded", "cost_exceeded"],
metric_id: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -562,7 +563,7 @@ async def update(
self,
alert_configuration_id: str,
*,
- thresholds: Iterable[alert_update_params.Threshold],
+ thresholds: Iterable[ThresholdParam],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -688,7 +689,7 @@ async def create_for_customer(
*,
currency: str,
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
- thresholds: Optional[Iterable[alert_create_for_customer_params.Threshold]] | NotGiven = NOT_GIVEN,
+ thresholds: Optional[Iterable[ThresholdParam]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -753,7 +754,7 @@ async def create_for_external_customer(
*,
currency: str,
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
- thresholds: Optional[Iterable[alert_create_for_external_customer_params.Threshold]] | NotGiven = NOT_GIVEN,
+ thresholds: Optional[Iterable[ThresholdParam]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -818,7 +819,7 @@ async def create_for_subscription(
self,
subscription_id: str,
*,
- thresholds: Iterable[alert_create_for_subscription_params.Threshold],
+ thresholds: Iterable[ThresholdParam],
type: Literal["usage_exceeded", "cost_exceeded"],
metric_id: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py
index 5ff4ba21..778e3ff5 100644
--- a/src/orb/resources/credit_notes.py
+++ b/src/orb/resources/credit_notes.py
@@ -17,7 +17,7 @@
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..pagination import SyncPage, AsyncPage
from .._base_client import AsyncPaginator, make_request_options
-from ..types.credit_note import CreditNote
+from ..types.shared.credit_note import CreditNote
__all__ = ["CreditNotes", "AsyncCreditNotes"]
diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py
index d784e615..f51a8c03 100644
--- a/src/orb/resources/customers/customers.py
+++ b/src/orb/resources/customers/customers.py
@@ -47,6 +47,11 @@
BalanceTransactionsWithStreamingResponse,
AsyncBalanceTransactionsWithStreamingResponse,
)
+from ...types.address_input_param import AddressInputParam
+from ...types.shared_params.customer_tax_id import CustomerTaxID
+from ...types.customer_hierarchy_config_param import CustomerHierarchyConfigParam
+from ...types.new_reporting_configuration_param import NewReportingConfigurationParam
+from ...types.new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
__all__ = ["Customers", "AsyncCustomers"]
@@ -88,23 +93,22 @@ def create(
*,
email: str,
name: str,
- accounting_sync_configuration: Optional[customer_create_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_create_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_create_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_create_params.ReportingConfiguration] | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_create_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_create_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_create_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
timezone: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -321,25 +325,24 @@ def update(
self,
customer_id: str,
*,
- accounting_sync_configuration: Optional[customer_update_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_update_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_update_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_update_params.ReportingConfiguration] | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_update_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_update_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_update_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -832,26 +835,24 @@ def update_by_external_id(
self,
id: str,
*,
- accounting_sync_configuration: Optional[customer_update_by_external_id_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_update_by_external_id_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_update_by_external_id_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_update_by_external_id_params.ReportingConfiguration]
- | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_update_by_external_id_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_update_by_external_id_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_update_by_external_id_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1091,23 +1092,22 @@ async def create(
*,
email: str,
name: str,
- accounting_sync_configuration: Optional[customer_create_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_create_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_create_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_create_params.ReportingConfiguration] | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_create_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_create_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_create_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
timezone: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1324,25 +1324,24 @@ async def update(
self,
customer_id: str,
*,
- accounting_sync_configuration: Optional[customer_update_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_update_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_update_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_update_params.ReportingConfiguration] | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_update_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_update_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_update_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1835,26 +1834,24 @@ async def update_by_external_id(
self,
id: str,
*,
- accounting_sync_configuration: Optional[customer_update_by_external_id_params.AccountingSyncConfiguration]
- | NotGiven = NOT_GIVEN,
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam] | NotGiven = NOT_GIVEN,
additional_emails: Optional[List[str]] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_address: Optional[customer_update_by_external_id_params.BillingAddress] | NotGiven = NOT_GIVEN,
+ billing_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- hierarchy: Optional[customer_update_by_external_id_params.Hierarchy] | NotGiven = NOT_GIVEN,
+ hierarchy: Optional[CustomerHierarchyConfigParam] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
payment_provider_id: Optional[str] | NotGiven = NOT_GIVEN,
- reporting_configuration: Optional[customer_update_by_external_id_params.ReportingConfiguration]
- | NotGiven = NOT_GIVEN,
- shipping_address: Optional[customer_update_by_external_id_params.ShippingAddress] | NotGiven = NOT_GIVEN,
+ reporting_configuration: Optional[NewReportingConfigurationParam] | NotGiven = NOT_GIVEN,
+ shipping_address: Optional[AddressInputParam] | NotGiven = NOT_GIVEN,
tax_configuration: Optional[customer_update_by_external_id_params.TaxConfiguration] | NotGiven = NOT_GIVEN,
- tax_id: Optional[customer_update_by_external_id_params.TaxID] | NotGiven = NOT_GIVEN,
+ tax_id: Optional[CustomerTaxID] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py
index 46b1426c..494b0dab 100644
--- a/src/orb/resources/invoices.py
+++ b/src/orb/resources/invoices.py
@@ -24,7 +24,7 @@
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..pagination import SyncPage, AsyncPage
from .._base_client import AsyncPaginator, make_request_options
-from ..types.invoice import Invoice
+from ..types.shared.invoice import Invoice
from ..types.shared_params.discount import Discount
from ..types.invoice_fetch_upcoming_response import InvoiceFetchUpcomingResponse
diff --git a/src/orb/resources/prices/external_price_id.py b/src/orb/resources/prices/external_price_id.py
index f9c2a7b2..52e8d20a 100644
--- a/src/orb/resources/prices/external_price_id.py
+++ b/src/orb/resources/prices/external_price_id.py
@@ -12,9 +12,9 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
-from ...types.price import Price
from ..._base_client import make_request_options
from ...types.prices import external_price_id_update_params
+from ...types.shared.price import Price
__all__ = ["ExternalPriceID", "AsyncExternalPriceID"]
diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py
index 8b38da43..2c93ca17 100644
--- a/src/orb/resources/prices/prices.py
+++ b/src/orb/resources/prices/prices.py
@@ -15,6 +15,7 @@
price_update_params,
price_evaluate_params,
price_evaluate_multiple_params,
+ price_evaluate_preview_events_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import required_args, maybe_transform, async_maybe_transform
@@ -22,7 +23,6 @@
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncPage, AsyncPage
-from ...types.price import Price
from ..._base_client import AsyncPaginator, make_request_options
from .external_price_id import (
ExternalPriceID,
@@ -32,8 +32,21 @@
ExternalPriceIDWithStreamingResponse,
AsyncExternalPriceIDWithStreamingResponse,
)
+from ...types.shared.price import Price
from ...types.price_evaluate_response import PriceEvaluateResponse
+from ...types.shared_params.bps_config import BPSConfig
+from ...types.shared_params.bulk_config import BulkConfig
+from ...types.shared_params.unit_config import UnitConfig
+from ...types.shared_params.matrix_config import MatrixConfig
+from ...types.shared_params.tiered_config import TieredConfig
+from ...types.shared_params.package_config import PackageConfig
+from ...types.shared_params.bulk_bps_config import BulkBPSConfig
+from ...types.shared_params.tiered_bps_config import TieredBPSConfig
from ...types.price_evaluate_multiple_response import PriceEvaluateMultipleResponse
+from ...types.price_evaluate_preview_events_response import PriceEvaluatePreviewEventsResponse
+from ...types.shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig
+from ...types.shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from ...types.shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
__all__ = ["Prices", "AsyncPrices"]
@@ -71,19 +84,18 @@ def create(
item_id: str,
model_type: Literal["unit"],
name: str,
- unit_config: price_create_params.NewFloatingUnitPriceUnitConfig,
+ unit_config: UnitConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -125,6 +137,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -162,21 +176,18 @@ def create(
item_id: str,
model_type: Literal["package"],
name: str,
- package_config: price_create_params.NewFloatingPackagePricePackageConfig,
+ package_config: PackageConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -218,6 +229,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -253,23 +266,20 @@ def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
- matrix_config: price_create_params.NewFloatingMatrixPriceMatrixConfig,
+ matrix_config: MatrixConfig,
model_type: Literal["matrix"],
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -311,6 +321,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -346,27 +358,20 @@ def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
- matrix_with_allocation_config: price_create_params.NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig,
+ matrix_with_allocation_config: MatrixWithAllocationConfig,
model_type: Literal["matrix_with_allocation"],
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixWithAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -408,6 +413,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -445,21 +452,18 @@ def create(
item_id: str,
model_type: Literal["tiered"],
name: str,
- tiered_config: price_create_params.NewFloatingTieredPriceTieredConfig,
+ tiered_config: TieredConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -501,6 +505,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -538,23 +544,18 @@ def create(
item_id: str,
model_type: Literal["tiered_bps"],
name: str,
- tiered_bps_config: price_create_params.NewFloatingTieredBpsPriceTieredBpsConfig,
+ tiered_bps_config: TieredBPSConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredBpsPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredBpsPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -596,6 +597,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -628,7 +631,7 @@ def create(
def create(
self,
*,
- bps_config: price_create_params.NewFloatingBpsPriceBpsConfig,
+ bps_config: BPSConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -636,16 +639,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingBpsPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -687,6 +689,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -719,7 +723,7 @@ def create(
def create(
self,
*,
- bulk_bps_config: price_create_params.NewFloatingBulkBpsPriceBulkBpsConfig,
+ bulk_bps_config: BulkBPSConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -727,18 +731,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingBulkBpsPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -780,6 +781,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -812,7 +815,7 @@ def create(
def create(
self,
*,
- bulk_config: price_create_params.NewFloatingBulkPriceBulkConfig,
+ bulk_config: BulkConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -820,16 +823,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingBulkPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -871,6 +873,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -911,22 +915,15 @@ def create(
threshold_total_amount_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingThresholdTotalAmountPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -968,6 +965,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1008,22 +1007,15 @@ def create(
tiered_package_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1065,6 +1057,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1105,22 +1099,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedTieredPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1162,6 +1149,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1202,22 +1191,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMaxGroupTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1259,6 +1241,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1299,22 +1283,15 @@ def create(
tiered_with_minimum_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredWithMinimumPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1356,6 +1333,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1396,22 +1375,15 @@ def create(
package_with_allocation_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingPackageWithAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1453,6 +1425,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1493,22 +1467,17 @@ def create(
tiered_package_with_minimum_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingTieredPackageWithMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1550,6 +1519,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1590,22 +1561,15 @@ def create(
unit_with_percent_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitWithPercentPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1647,6 +1611,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1687,22 +1653,15 @@ def create(
tiered_with_proration_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1744,6 +1703,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1784,22 +1745,15 @@ def create(
unit_with_proration_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1841,6 +1795,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1881,22 +1837,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1938,6 +1887,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -1978,22 +1929,17 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2035,6 +1981,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2075,22 +2023,17 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2132,6 +2075,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2172,22 +2117,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixWithDisplayNamePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2229,6 +2167,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2269,22 +2209,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2326,6 +2259,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2366,22 +2301,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2423,6 +2351,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2463,22 +2393,17 @@ def create(
scalable_matrix_with_unit_pricing_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2520,6 +2445,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2560,22 +2487,17 @@ def create(
scalable_matrix_with_tiered_pricing_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2617,6 +2539,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2657,22 +2581,15 @@ def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2714,6 +2631,8 @@ def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -2807,29 +2726,27 @@ def create(
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"],
name: str,
- unit_config: price_create_params.NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN,
+ unit_config: UnitConfig | NotGiven = NOT_GIVEN,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
- package_config: price_create_params.NewFloatingPackagePricePackageConfig | NotGiven = NOT_GIVEN,
- matrix_config: price_create_params.NewFloatingMatrixPriceMatrixConfig | NotGiven = NOT_GIVEN,
- matrix_with_allocation_config: price_create_params.NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
- | NotGiven = NOT_GIVEN,
- tiered_config: price_create_params.NewFloatingTieredPriceTieredConfig | NotGiven = NOT_GIVEN,
- tiered_bps_config: price_create_params.NewFloatingTieredBpsPriceTieredBpsConfig | NotGiven = NOT_GIVEN,
- bps_config: price_create_params.NewFloatingBpsPriceBpsConfig | NotGiven = NOT_GIVEN,
- bulk_bps_config: price_create_params.NewFloatingBulkBpsPriceBulkBpsConfig | NotGiven = NOT_GIVEN,
- bulk_config: price_create_params.NewFloatingBulkPriceBulkConfig | NotGiven = NOT_GIVEN,
+ package_config: PackageConfig | NotGiven = NOT_GIVEN,
+ matrix_config: MatrixConfig | NotGiven = NOT_GIVEN,
+ matrix_with_allocation_config: MatrixWithAllocationConfig | NotGiven = NOT_GIVEN,
+ tiered_config: TieredConfig | NotGiven = NOT_GIVEN,
+ tiered_bps_config: TieredBPSConfig | NotGiven = NOT_GIVEN,
+ bps_config: BPSConfig | NotGiven = NOT_GIVEN,
+ bulk_bps_config: BulkBPSConfig | NotGiven = NOT_GIVEN,
+ bulk_config: BulkConfig | NotGiven = NOT_GIVEN,
threshold_total_amount_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
grouped_tiered_config: Dict[str, object] | NotGiven = NOT_GIVEN,
@@ -2873,6 +2790,7 @@ def create(
"billed_in_advance": billed_in_advance,
"billing_cycle_configuration": billing_cycle_configuration,
"conversion_rate": conversion_rate,
+ "conversion_rate_config": conversion_rate_config,
"dimensional_price_configuration": dimensional_price_configuration,
"external_price_id": external_price_id,
"fixed_price_quantity": fixed_price_quantity,
@@ -3124,7 +3042,6 @@ def evaluate_multiple(
timeframe_end: Union[str, datetime],
timeframe_start: Union[str, datetime],
customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- events: Optional[Iterable[price_evaluate_multiple_params.Event]] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
price_evaluations: Iterable[price_evaluate_multiple_params.PriceEvaluation] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -3137,23 +3054,14 @@ def evaluate_multiple(
) -> PriceEvaluateMultipleResponse:
"""
This endpoint is used to evaluate the output of price(s) for a given customer
- and time range over either ingested events or preview events. It enables
- filtering and grouping the output using
+ and time range over ingested events. It enables filtering and grouping the
+ output using
[computed properties](/extensibility/advanced-metrics#computed-properties),
supporting the following workflows:
1. Showing detailed usage and costs to the end customer.
2. Auditing subtotals on invoice line items.
- Prices may either reference existing prices in your Orb account or be defined
- inline in the request body. Up to 100 prices can be evaluated in a single
- request.
-
- Price evaluation by default uses ingested events, but you can also provide a
- list of preview events to use instead. Up to 500 preview events can be provided
- in a single request. When using ingested events, the start of the time range
- must be no more than 100 days ago.
-
For these workflows, the expressiveness of computed properties in both the
filters and grouping is critical. For example, if you'd like to show your
customer their usage grouped by hour and another property, you can do so with
@@ -3163,9 +3071,17 @@ def evaluate_multiple(
with the following `filter`:
`my_property = 'foo' AND my_other_property = 'bar'`.
- The length of the results must be no greater than 1000. Note that this is a POST
- endpoint rather than a GET endpoint because it employs a JSON body rather than
- query parameters.
+ Prices may either reference existing prices in your Orb account or be defined
+ inline in the request body. Up to 100 prices can be evaluated in a single
+ request.
+
+ Prices are evaluated on ingested events and the start of the time range must be
+ no more than 100 days ago. To evaluate based off a set of provided events, the
+ [evaluate preview events](/api-reference/price/evaluate-preview-events) endpoint
+ can be used instead.
+
+ Note that this is a POST endpoint rather than a GET endpoint because it employs
+ a JSON body rather than query parameters.
Args:
timeframe_end: The exclusive upper bound for event timestamps
@@ -3174,8 +3090,6 @@ def evaluate_multiple(
customer_id: The ID of the customer to which this evaluation is scoped.
- events: Optional list of preview events to use instead of actual usage data (max 500)
-
external_customer_id: The external customer ID of the customer to which this evaluation is scoped.
price_evaluations: List of prices to evaluate (max 100)
@@ -3197,7 +3111,6 @@ def evaluate_multiple(
"timeframe_end": timeframe_end,
"timeframe_start": timeframe_start,
"customer_id": customer_id,
- "events": events,
"external_customer_id": external_customer_id,
"price_evaluations": price_evaluations,
},
@@ -3213,6 +3126,89 @@ def evaluate_multiple(
cast_to=PriceEvaluateMultipleResponse,
)
+ def evaluate_preview_events(
+ self,
+ *,
+ timeframe_end: Union[str, datetime],
+ timeframe_start: Union[str, datetime],
+ customer_id: Optional[str] | NotGiven = NOT_GIVEN,
+ events: Iterable[price_evaluate_preview_events_params.Event] | NotGiven = NOT_GIVEN,
+ external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
+ price_evaluations: Iterable[price_evaluate_preview_events_params.PriceEvaluation] | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ idempotency_key: str | None = None,
+ ) -> PriceEvaluatePreviewEventsResponse:
+ """
+ This endpoint evaluates prices on preview events instead of actual usage, making
+ it ideal for building price calculators and cost estimation tools. You can
+ filter and group results using
+ [computed properties](/extensibility/advanced-metrics#computed-properties) to
+ analyze pricing across different dimensions.
+
+ Prices may either reference existing prices in your Orb account or be defined
+ inline in the request body. The endpoint has the following limitations:
+
+ 1. Up to 100 prices can be evaluated in a single request.
+ 2. Up to 500 preview events can be provided in a single request.
+
+ A top-level customer_id is required to evaluate the preview events.
+ Additionally, all events without a customer_id will have the top-level
+ customer_id added.
+
+ Note that this is a POST endpoint rather than a GET endpoint because it employs
+ a JSON body rather than query parameters.
+
+ Args:
+ timeframe_end: The exclusive upper bound for event timestamps
+
+ timeframe_start: The inclusive lower bound for event timestamps
+
+ customer_id: The ID of the customer to which this evaluation is scoped.
+
+ events: List of preview events to use instead of actual usage data
+
+ external_customer_id: The external customer ID of the customer to which this evaluation is scoped.
+
+ price_evaluations: List of prices to evaluate (max 100)
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ return self._post(
+ "/prices/evaluate_preview_events",
+ body=maybe_transform(
+ {
+ "timeframe_end": timeframe_end,
+ "timeframe_start": timeframe_start,
+ "customer_id": customer_id,
+ "events": events,
+ "external_customer_id": external_customer_id,
+ "price_evaluations": price_evaluations,
+ },
+ price_evaluate_preview_events_params.PriceEvaluatePreviewEventsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=PriceEvaluatePreviewEventsResponse,
+ )
+
def fetch(
self,
price_id: str,
@@ -3283,19 +3279,18 @@ async def create(
item_id: str,
model_type: Literal["unit"],
name: str,
- unit_config: price_create_params.NewFloatingUnitPriceUnitConfig,
+ unit_config: UnitConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3337,6 +3332,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3374,21 +3371,18 @@ async def create(
item_id: str,
model_type: Literal["package"],
name: str,
- package_config: price_create_params.NewFloatingPackagePricePackageConfig,
+ package_config: PackageConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingPackagePriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3430,6 +3424,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3465,23 +3461,20 @@ async def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
- matrix_config: price_create_params.NewFloatingMatrixPriceMatrixConfig,
+ matrix_config: MatrixConfig,
model_type: Literal["matrix"],
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingMatrixPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3523,6 +3516,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3558,27 +3553,20 @@ async def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
- matrix_with_allocation_config: price_create_params.NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig,
+ matrix_with_allocation_config: MatrixWithAllocationConfig,
model_type: Literal["matrix_with_allocation"],
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixWithAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3620,6 +3608,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3657,21 +3647,18 @@ async def create(
item_id: str,
model_type: Literal["tiered"],
name: str,
- tiered_config: price_create_params.NewFloatingTieredPriceTieredConfig,
+ tiered_config: TieredConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingTieredPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3713,6 +3700,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3750,23 +3739,18 @@ async def create(
item_id: str,
model_type: Literal["tiered_bps"],
name: str,
- tiered_bps_config: price_create_params.NewFloatingTieredBpsPriceTieredBpsConfig,
+ tiered_bps_config: TieredBPSConfig,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingTieredBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredBpsPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredBpsPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3808,6 +3792,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3840,7 +3826,7 @@ async def create(
async def create(
self,
*,
- bps_config: price_create_params.NewFloatingBpsPriceBpsConfig,
+ bps_config: BPSConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -3848,16 +3834,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingBpsPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBpsPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3899,6 +3884,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -3931,7 +3918,7 @@ async def create(
async def create(
self,
*,
- bulk_bps_config: price_create_params.NewFloatingBulkBpsPriceBulkBpsConfig,
+ bulk_bps_config: BulkBPSConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -3939,18 +3926,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingBulkBpsPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkBPSPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBulkBpsPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3992,6 +3976,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4024,7 +4010,7 @@ async def create(
async def create(
self,
*,
- bulk_config: price_create_params.NewFloatingBulkPriceBulkConfig,
+ bulk_config: BulkConfig,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
@@ -4032,16 +4018,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingBulkPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingBulkPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4083,6 +4068,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4123,22 +4110,15 @@ async def create(
threshold_total_amount_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingThresholdTotalAmountPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4180,6 +4160,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4220,22 +4202,15 @@ async def create(
tiered_package_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4277,6 +4252,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4317,22 +4294,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedTieredPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4374,6 +4344,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4414,22 +4386,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMaxGroupTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4471,6 +4436,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4511,22 +4478,15 @@ async def create(
tiered_with_minimum_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredWithMinimumPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4568,6 +4528,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4608,22 +4570,15 @@ async def create(
package_with_allocation_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingPackageWithAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4665,6 +4620,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4705,22 +4662,17 @@ async def create(
tiered_package_with_minimum_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingTieredPackageWithMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4762,6 +4714,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4802,22 +4756,15 @@ async def create(
unit_with_percent_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitWithPercentPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4859,6 +4806,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4899,22 +4848,15 @@ async def create(
tiered_with_proration_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingTieredWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -4956,6 +4898,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -4996,22 +4940,15 @@ async def create(
unit_with_proration_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5053,6 +4990,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5093,22 +5032,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedAllocationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5150,6 +5082,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5190,22 +5124,17 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingGroupedWithProratedMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5247,6 +5176,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5287,22 +5218,17 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5344,6 +5270,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5384,22 +5312,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingMatrixWithDisplayNamePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5441,6 +5362,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5481,22 +5404,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingBulkWithProrationPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5538,6 +5454,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5578,22 +5496,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingGroupedTieredPackagePriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5635,6 +5546,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5675,22 +5588,17 @@ async def create(
scalable_matrix_with_unit_pricing_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5732,6 +5640,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5772,22 +5682,17 @@ async def create(
scalable_matrix_with_tiered_pricing_config: Dict[str, object],
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
+ conversion_rate_config: Optional[
+ price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig
]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5829,6 +5734,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -5869,22 +5776,15 @@ async def create(
name: str,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[
- price_create_params.NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -5926,6 +5826,8 @@ async def create(
conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
+ conversion_rate_config: The configuration for the rate of the price currency to the invoicing currency.
+
dimensional_price_configuration: For dimensional price: specifies a price group and dimension values
external_price_id: An alias for the price.
@@ -6019,29 +5921,27 @@ async def create(
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"],
name: str,
- unit_config: price_create_params.NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN,
+ unit_config: UnitConfig | NotGiven = NOT_GIVEN,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
billed_in_advance: Optional[bool] | NotGiven = NOT_GIVEN,
- billing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceBillingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | NotGiven = NOT_GIVEN,
- dimensional_price_configuration: Optional[price_create_params.NewFloatingUnitPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[price_create_params.NewFloatingUnitPriceConversionRateConfig]
| NotGiven = NOT_GIVEN,
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | NotGiven = NOT_GIVEN,
external_price_id: Optional[str] | NotGiven = NOT_GIVEN,
fixed_price_quantity: Optional[float] | NotGiven = NOT_GIVEN,
invoice_grouping_key: Optional[str] | NotGiven = NOT_GIVEN,
- invoicing_cycle_configuration: Optional[price_create_params.NewFloatingUnitPriceInvoicingCycleConfiguration]
- | NotGiven = NOT_GIVEN,
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
- package_config: price_create_params.NewFloatingPackagePricePackageConfig | NotGiven = NOT_GIVEN,
- matrix_config: price_create_params.NewFloatingMatrixPriceMatrixConfig | NotGiven = NOT_GIVEN,
- matrix_with_allocation_config: price_create_params.NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
- | NotGiven = NOT_GIVEN,
- tiered_config: price_create_params.NewFloatingTieredPriceTieredConfig | NotGiven = NOT_GIVEN,
- tiered_bps_config: price_create_params.NewFloatingTieredBpsPriceTieredBpsConfig | NotGiven = NOT_GIVEN,
- bps_config: price_create_params.NewFloatingBpsPriceBpsConfig | NotGiven = NOT_GIVEN,
- bulk_bps_config: price_create_params.NewFloatingBulkBpsPriceBulkBpsConfig | NotGiven = NOT_GIVEN,
- bulk_config: price_create_params.NewFloatingBulkPriceBulkConfig | NotGiven = NOT_GIVEN,
+ package_config: PackageConfig | NotGiven = NOT_GIVEN,
+ matrix_config: MatrixConfig | NotGiven = NOT_GIVEN,
+ matrix_with_allocation_config: MatrixWithAllocationConfig | NotGiven = NOT_GIVEN,
+ tiered_config: TieredConfig | NotGiven = NOT_GIVEN,
+ tiered_bps_config: TieredBPSConfig | NotGiven = NOT_GIVEN,
+ bps_config: BPSConfig | NotGiven = NOT_GIVEN,
+ bulk_bps_config: BulkBPSConfig | NotGiven = NOT_GIVEN,
+ bulk_config: BulkConfig | NotGiven = NOT_GIVEN,
threshold_total_amount_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
grouped_tiered_config: Dict[str, object] | NotGiven = NOT_GIVEN,
@@ -6085,6 +5985,7 @@ async def create(
"billed_in_advance": billed_in_advance,
"billing_cycle_configuration": billing_cycle_configuration,
"conversion_rate": conversion_rate,
+ "conversion_rate_config": conversion_rate_config,
"dimensional_price_configuration": dimensional_price_configuration,
"external_price_id": external_price_id,
"fixed_price_quantity": fixed_price_quantity,
@@ -6336,7 +6237,6 @@ async def evaluate_multiple(
timeframe_end: Union[str, datetime],
timeframe_start: Union[str, datetime],
customer_id: Optional[str] | NotGiven = NOT_GIVEN,
- events: Optional[Iterable[price_evaluate_multiple_params.Event]] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
price_evaluations: Iterable[price_evaluate_multiple_params.PriceEvaluation] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -6349,23 +6249,14 @@ async def evaluate_multiple(
) -> PriceEvaluateMultipleResponse:
"""
This endpoint is used to evaluate the output of price(s) for a given customer
- and time range over either ingested events or preview events. It enables
- filtering and grouping the output using
+ and time range over ingested events. It enables filtering and grouping the
+ output using
[computed properties](/extensibility/advanced-metrics#computed-properties),
supporting the following workflows:
1. Showing detailed usage and costs to the end customer.
2. Auditing subtotals on invoice line items.
- Prices may either reference existing prices in your Orb account or be defined
- inline in the request body. Up to 100 prices can be evaluated in a single
- request.
-
- Price evaluation by default uses ingested events, but you can also provide a
- list of preview events to use instead. Up to 500 preview events can be provided
- in a single request. When using ingested events, the start of the time range
- must be no more than 100 days ago.
-
For these workflows, the expressiveness of computed properties in both the
filters and grouping is critical. For example, if you'd like to show your
customer their usage grouped by hour and another property, you can do so with
@@ -6375,9 +6266,17 @@ async def evaluate_multiple(
with the following `filter`:
`my_property = 'foo' AND my_other_property = 'bar'`.
- The length of the results must be no greater than 1000. Note that this is a POST
- endpoint rather than a GET endpoint because it employs a JSON body rather than
- query parameters.
+ Prices may either reference existing prices in your Orb account or be defined
+ inline in the request body. Up to 100 prices can be evaluated in a single
+ request.
+
+ Prices are evaluated on ingested events and the start of the time range must be
+ no more than 100 days ago. To evaluate based off a set of provided events, the
+ [evaluate preview events](/api-reference/price/evaluate-preview-events) endpoint
+ can be used instead.
+
+ Note that this is a POST endpoint rather than a GET endpoint because it employs
+ a JSON body rather than query parameters.
Args:
timeframe_end: The exclusive upper bound for event timestamps
@@ -6386,8 +6285,6 @@ async def evaluate_multiple(
customer_id: The ID of the customer to which this evaluation is scoped.
- events: Optional list of preview events to use instead of actual usage data (max 500)
-
external_customer_id: The external customer ID of the customer to which this evaluation is scoped.
price_evaluations: List of prices to evaluate (max 100)
@@ -6409,7 +6306,6 @@ async def evaluate_multiple(
"timeframe_end": timeframe_end,
"timeframe_start": timeframe_start,
"customer_id": customer_id,
- "events": events,
"external_customer_id": external_customer_id,
"price_evaluations": price_evaluations,
},
@@ -6425,6 +6321,89 @@ async def evaluate_multiple(
cast_to=PriceEvaluateMultipleResponse,
)
+ async def evaluate_preview_events(
+ self,
+ *,
+ timeframe_end: Union[str, datetime],
+ timeframe_start: Union[str, datetime],
+ customer_id: Optional[str] | NotGiven = NOT_GIVEN,
+ events: Iterable[price_evaluate_preview_events_params.Event] | NotGiven = NOT_GIVEN,
+ external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
+ price_evaluations: Iterable[price_evaluate_preview_events_params.PriceEvaluation] | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ idempotency_key: str | None = None,
+ ) -> PriceEvaluatePreviewEventsResponse:
+ """
+ This endpoint evaluates prices on preview events instead of actual usage, making
+ it ideal for building price calculators and cost estimation tools. You can
+ filter and group results using
+ [computed properties](/extensibility/advanced-metrics#computed-properties) to
+ analyze pricing across different dimensions.
+
+ Prices may either reference existing prices in your Orb account or be defined
+ inline in the request body. The endpoint has the following limitations:
+
+ 1. Up to 100 prices can be evaluated in a single request.
+ 2. Up to 500 preview events can be provided in a single request.
+
+ A top-level customer_id is required to evaluate the preview events.
+ Additionally, all events without a customer_id will have the top-level
+ customer_id added.
+
+ Note that this is a POST endpoint rather than a GET endpoint because it employs
+ a JSON body rather than query parameters.
+
+ Args:
+ timeframe_end: The exclusive upper bound for event timestamps
+
+ timeframe_start: The inclusive lower bound for event timestamps
+
+ customer_id: The ID of the customer to which this evaluation is scoped.
+
+ events: List of preview events to use instead of actual usage data
+
+ external_customer_id: The external customer ID of the customer to which this evaluation is scoped.
+
+ price_evaluations: List of prices to evaluate (max 100)
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ return await self._post(
+ "/prices/evaluate_preview_events",
+ body=await async_maybe_transform(
+ {
+ "timeframe_end": timeframe_end,
+ "timeframe_start": timeframe_start,
+ "customer_id": customer_id,
+ "events": events,
+ "external_customer_id": external_customer_id,
+ "price_evaluations": price_evaluations,
+ },
+ price_evaluate_preview_events_params.PriceEvaluatePreviewEventsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=PriceEvaluatePreviewEventsResponse,
+ )
+
async def fetch(
self,
price_id: str,
@@ -6481,6 +6460,9 @@ def __init__(self, prices: Prices) -> None:
self.evaluate_multiple = _legacy_response.to_raw_response_wrapper(
prices.evaluate_multiple,
)
+ self.evaluate_preview_events = _legacy_response.to_raw_response_wrapper(
+ prices.evaluate_preview_events,
+ )
self.fetch = _legacy_response.to_raw_response_wrapper(
prices.fetch,
)
@@ -6509,6 +6491,9 @@ def __init__(self, prices: AsyncPrices) -> None:
self.evaluate_multiple = _legacy_response.async_to_raw_response_wrapper(
prices.evaluate_multiple,
)
+ self.evaluate_preview_events = _legacy_response.async_to_raw_response_wrapper(
+ prices.evaluate_preview_events,
+ )
self.fetch = _legacy_response.async_to_raw_response_wrapper(
prices.fetch,
)
@@ -6537,6 +6522,9 @@ def __init__(self, prices: Prices) -> None:
self.evaluate_multiple = to_streamed_response_wrapper(
prices.evaluate_multiple,
)
+ self.evaluate_preview_events = to_streamed_response_wrapper(
+ prices.evaluate_preview_events,
+ )
self.fetch = to_streamed_response_wrapper(
prices.fetch,
)
@@ -6565,6 +6553,9 @@ def __init__(self, prices: AsyncPrices) -> None:
self.evaluate_multiple = async_to_streamed_response_wrapper(
prices.evaluate_multiple,
)
+ self.evaluate_preview_events = async_to_streamed_response_wrapper(
+ prices.evaluate_preview_events,
+ )
self.fetch = async_to_streamed_response_wrapper(
prices.fetch,
)
diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py
index d4981291..11d99e98 100644
--- a/src/orb/resources/subscriptions.py
+++ b/src/orb/resources/subscriptions.py
@@ -34,23 +34,10 @@
from .._base_client import AsyncPaginator, make_request_options
from ..types.subscription import Subscription
from ..types.subscription_usage import SubscriptionUsage
-from ..types.subscription_cancel_response import SubscriptionCancelResponse
-from ..types.subscription_create_response import SubscriptionCreateResponse
+from ..types.mutated_subscription import MutatedSubscription
from ..types.subscription_fetch_costs_response import SubscriptionFetchCostsResponse
-from ..types.subscription_update_trial_response import SubscriptionUpdateTrialResponse
-from ..types.subscription_redeem_coupon_response import SubscriptionRedeemCouponResponse
-from ..types.subscription_trigger_phase_response import SubscriptionTriggerPhaseResponse
from ..types.subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse
-from ..types.subscription_price_intervals_response import SubscriptionPriceIntervalsResponse
-from ..types.subscription_schedule_plan_change_response import SubscriptionSchedulePlanChangeResponse
-from ..types.subscription_unschedule_cancellation_response import SubscriptionUnscheduleCancellationResponse
-from ..types.subscription_update_fixed_fee_quantity_response import SubscriptionUpdateFixedFeeQuantityResponse
-from ..types.subscription_unschedule_pending_plan_changes_response import (
- SubscriptionUnschedulePendingPlanChangesResponse,
-)
-from ..types.subscription_unschedule_fixed_fee_quantity_updates_response import (
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
-)
+from ..types.shared_params.billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration
__all__ = ["Subscriptions", "AsyncSubscriptions"]
@@ -83,8 +70,7 @@ def create(
align_billing_with_subscription_start_date: bool | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
aws_region: Optional[str] | NotGiven = NOT_GIVEN,
- billing_cycle_anchor_configuration: Optional[subscription_create_params.BillingCycleAnchorConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_anchor_configuration: Optional[BillingCycleAnchorConfiguration] | NotGiven = NOT_GIVEN,
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
@@ -119,7 +105,7 @@ def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionCreateResponse:
+ ) -> MutatedSubscription:
"""A subscription represents the purchase of a plan by a customer.
The customer is
@@ -514,7 +500,7 @@ def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionCreateResponse,
+ cast_to=MutatedSubscription,
)
def update(
@@ -678,7 +664,7 @@ def cancel(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionCancelResponse:
+ ) -> MutatedSubscription:
"""This endpoint can be used to cancel an existing subscription.
It returns the
@@ -782,7 +768,7 @@ def cancel(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionCancelResponse,
+ cast_to=MutatedSubscription,
)
def fetch(
@@ -1241,7 +1227,7 @@ def price_intervals(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionPriceIntervalsResponse:
+ ) -> MutatedSubscription:
"""
This endpoint is used to add and edit subscription
[price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By
@@ -1360,7 +1346,7 @@ def price_intervals(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionPriceIntervalsResponse,
+ cast_to=MutatedSubscription,
)
def redeem_coupon(
@@ -1379,7 +1365,7 @@ def redeem_coupon(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionRedeemCouponResponse:
+ ) -> MutatedSubscription:
"""
Redeem a coupon effective at a given time.
@@ -1426,7 +1412,7 @@ def redeem_coupon(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionRedeemCouponResponse,
+ cast_to=MutatedSubscription,
)
def schedule_plan_change(
@@ -1441,10 +1427,7 @@ def schedule_plan_change(
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
| NotGiven = NOT_GIVEN,
- billing_cycle_anchor_configuration: Optional[
- subscription_schedule_plan_change_params.BillingCycleAnchorConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_anchor_configuration: Optional[BillingCycleAnchorConfiguration] | NotGiven = NOT_GIVEN,
change_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
@@ -1474,7 +1457,7 @@ def schedule_plan_change(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionSchedulePlanChangeResponse:
+ ) -> MutatedSubscription:
"""This endpoint can be used to change an existing subscription's plan.
It returns
@@ -1792,7 +1775,7 @@ def schedule_plan_change(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionSchedulePlanChangeResponse,
+ cast_to=MutatedSubscription,
)
def trigger_phase(
@@ -1808,7 +1791,7 @@ def trigger_phase(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionTriggerPhaseResponse:
+ ) -> MutatedSubscription:
"""
Manually trigger a phase, effective the given date (or the current time, if not
specified).
@@ -1849,7 +1832,7 @@ def trigger_phase(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionTriggerPhaseResponse,
+ cast_to=MutatedSubscription,
)
def unschedule_cancellation(
@@ -1863,7 +1846,7 @@ def unschedule_cancellation(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnscheduleCancellationResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to unschedule any pending cancellations for a
subscription.
@@ -1894,7 +1877,7 @@ def unschedule_cancellation(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnscheduleCancellationResponse,
+ cast_to=MutatedSubscription,
)
def unschedule_fixed_fee_quantity_updates(
@@ -1909,7 +1892,7 @@ def unschedule_fixed_fee_quantity_updates(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to clear scheduled updates to the quantity for a fixed
fee.
@@ -1945,7 +1928,7 @@ def unschedule_fixed_fee_quantity_updates(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
+ cast_to=MutatedSubscription,
)
def unschedule_pending_plan_changes(
@@ -1959,7 +1942,7 @@ def unschedule_pending_plan_changes(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnschedulePendingPlanChangesResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to unschedule any pending plan changes on an existing
subscription. When called, all upcoming plan changes will be unscheduled.
@@ -1986,7 +1969,7 @@ def unschedule_pending_plan_changes(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnschedulePendingPlanChangesResponse,
+ cast_to=MutatedSubscription,
)
def update_fixed_fee_quantity(
@@ -2005,7 +1988,7 @@ def update_fixed_fee_quantity(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUpdateFixedFeeQuantityResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to update the quantity for a fixed fee.
@@ -2068,7 +2051,7 @@ def update_fixed_fee_quantity(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUpdateFixedFeeQuantityResponse,
+ cast_to=MutatedSubscription,
)
def update_trial(
@@ -2084,7 +2067,7 @@ def update_trial(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUpdateTrialResponse:
+ ) -> MutatedSubscription:
"""This endpoint is used to update the trial end date for a subscription.
The new
@@ -2141,7 +2124,7 @@ def update_trial(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUpdateTrialResponse,
+ cast_to=MutatedSubscription,
)
@@ -2173,8 +2156,7 @@ async def create(
align_billing_with_subscription_start_date: bool | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
aws_region: Optional[str] | NotGiven = NOT_GIVEN,
- billing_cycle_anchor_configuration: Optional[subscription_create_params.BillingCycleAnchorConfiguration]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_anchor_configuration: Optional[BillingCycleAnchorConfiguration] | NotGiven = NOT_GIVEN,
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
currency: Optional[str] | NotGiven = NOT_GIVEN,
@@ -2209,7 +2191,7 @@ async def create(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionCreateResponse:
+ ) -> MutatedSubscription:
"""A subscription represents the purchase of a plan by a customer.
The customer is
@@ -2604,7 +2586,7 @@ async def create(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionCreateResponse,
+ cast_to=MutatedSubscription,
)
async def update(
@@ -2768,7 +2750,7 @@ async def cancel(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionCancelResponse:
+ ) -> MutatedSubscription:
"""This endpoint can be used to cancel an existing subscription.
It returns the
@@ -2872,7 +2854,7 @@ async def cancel(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionCancelResponse,
+ cast_to=MutatedSubscription,
)
async def fetch(
@@ -3331,7 +3313,7 @@ async def price_intervals(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionPriceIntervalsResponse:
+ ) -> MutatedSubscription:
"""
This endpoint is used to add and edit subscription
[price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By
@@ -3450,7 +3432,7 @@ async def price_intervals(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionPriceIntervalsResponse,
+ cast_to=MutatedSubscription,
)
async def redeem_coupon(
@@ -3469,7 +3451,7 @@ async def redeem_coupon(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionRedeemCouponResponse:
+ ) -> MutatedSubscription:
"""
Redeem a coupon effective at a given time.
@@ -3516,7 +3498,7 @@ async def redeem_coupon(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionRedeemCouponResponse,
+ cast_to=MutatedSubscription,
)
async def schedule_plan_change(
@@ -3531,10 +3513,7 @@ async def schedule_plan_change(
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
| NotGiven = NOT_GIVEN,
- billing_cycle_anchor_configuration: Optional[
- subscription_schedule_plan_change_params.BillingCycleAnchorConfiguration
- ]
- | NotGiven = NOT_GIVEN,
+ billing_cycle_anchor_configuration: Optional[BillingCycleAnchorConfiguration] | NotGiven = NOT_GIVEN,
change_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
@@ -3564,7 +3543,7 @@ async def schedule_plan_change(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionSchedulePlanChangeResponse:
+ ) -> MutatedSubscription:
"""This endpoint can be used to change an existing subscription's plan.
It returns
@@ -3882,7 +3861,7 @@ async def schedule_plan_change(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionSchedulePlanChangeResponse,
+ cast_to=MutatedSubscription,
)
async def trigger_phase(
@@ -3898,7 +3877,7 @@ async def trigger_phase(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionTriggerPhaseResponse:
+ ) -> MutatedSubscription:
"""
Manually trigger a phase, effective the given date (or the current time, if not
specified).
@@ -3939,7 +3918,7 @@ async def trigger_phase(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionTriggerPhaseResponse,
+ cast_to=MutatedSubscription,
)
async def unschedule_cancellation(
@@ -3953,7 +3932,7 @@ async def unschedule_cancellation(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnscheduleCancellationResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to unschedule any pending cancellations for a
subscription.
@@ -3984,7 +3963,7 @@ async def unschedule_cancellation(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnscheduleCancellationResponse,
+ cast_to=MutatedSubscription,
)
async def unschedule_fixed_fee_quantity_updates(
@@ -3999,7 +3978,7 @@ async def unschedule_fixed_fee_quantity_updates(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to clear scheduled updates to the quantity for a fixed
fee.
@@ -4035,7 +4014,7 @@ async def unschedule_fixed_fee_quantity_updates(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
+ cast_to=MutatedSubscription,
)
async def unschedule_pending_plan_changes(
@@ -4049,7 +4028,7 @@ async def unschedule_pending_plan_changes(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUnschedulePendingPlanChangesResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to unschedule any pending plan changes on an existing
subscription. When called, all upcoming plan changes will be unscheduled.
@@ -4076,7 +4055,7 @@ async def unschedule_pending_plan_changes(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUnschedulePendingPlanChangesResponse,
+ cast_to=MutatedSubscription,
)
async def update_fixed_fee_quantity(
@@ -4095,7 +4074,7 @@ async def update_fixed_fee_quantity(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUpdateFixedFeeQuantityResponse:
+ ) -> MutatedSubscription:
"""
This endpoint can be used to update the quantity for a fixed fee.
@@ -4158,7 +4137,7 @@ async def update_fixed_fee_quantity(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUpdateFixedFeeQuantityResponse,
+ cast_to=MutatedSubscription,
)
async def update_trial(
@@ -4174,7 +4153,7 @@ async def update_trial(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> SubscriptionUpdateTrialResponse:
+ ) -> MutatedSubscription:
"""This endpoint is used to update the trial end date for a subscription.
The new
@@ -4231,7 +4210,7 @@ async def update_trial(
timeout=timeout,
idempotency_key=idempotency_key,
),
- cast_to=SubscriptionUpdateTrialResponse,
+ cast_to=MutatedSubscription,
)
diff --git a/src/orb/types/__init__.py b/src/orb/types/__init__.py
index 3105fa6c..a71f2f45 100644
--- a/src/orb/types/__init__.py
+++ b/src/orb/types/__init__.py
@@ -5,25 +5,158 @@
from .item import Item as Item
from .plan import Plan as Plan
from .alert import Alert as Alert
-from .price import Price as Price
from .coupon import Coupon as Coupon
from .shared import (
+ Tier as Tier,
+ Price as Price,
+ Address as Address,
+ BPSTier as BPSTier,
+ Invoice as Invoice,
+ Maximum as Maximum,
+ Minimum as Minimum,
+ BulkTier as BulkTier,
Discount as Discount,
+ ItemSlim as ItemSlim,
+ BPSConfig as BPSConfig,
+ TaxAmount as TaxAmount,
+ Allocation as Allocation,
+ BulkConfig as BulkConfig,
+ CreditNote as CreditNote,
+ NewMaximum as NewMaximum,
+ NewMinimum as NewMinimum,
+ TierConfig as TierConfig,
+ UnitConfig as UnitConfig,
+ BulkBPSTier as BulkBPSTier,
+ InvoiceTiny as InvoiceTiny,
+ MatrixValue as MatrixValue,
+ MatrixConfig as MatrixConfig,
+ PerPriceCost as PerPriceCost,
+ TieredConfig as TieredConfig,
+ BulkBPSConfig as BulkBPSConfig,
+ CustomerTaxID as CustomerTaxID,
+ PackageConfig as PackageConfig,
+ PriceInterval as PriceInterval,
TrialDiscount as TrialDiscount,
UsageDiscount as UsageDiscount,
+ AggregatedCost as AggregatedCost,
AmountDiscount as AmountDiscount,
+ CreditNoteTiny as CreditNoteTiny,
+ MaximumInterval as MaximumInterval,
+ MinimumInterval as MinimumInterval,
+ NewPlanBPSPrice as NewPlanBPSPrice,
+ TieredBPSConfig as TieredBPSConfig,
+ TierSubLineItem as TierSubLineItem,
+ CouponRedemption as CouponRedemption,
+ CustomerMinified as CustomerMinified,
+ CustomExpiration as CustomExpiration,
+ NewPlanBulkPrice as NewPlanBulkPrice,
+ NewPlanUnitPrice as NewPlanUnitPrice,
+ NewUsageDiscount as NewUsageDiscount,
+ OtherSubLineItem as OtherSubLineItem,
+ MatrixSubLineItem as MatrixSubLineItem,
+ NewAmountDiscount as NewAmountDiscount,
+ AdjustmentInterval as AdjustmentInterval,
+ BillableMetricTiny as BillableMetricTiny,
+ ConversionRateTier as ConversionRateTier,
+ NewAllocationPrice as NewAllocationPrice,
+ NewPlanMatrixPrice as NewPlanMatrixPrice,
+ NewPlanTieredPrice as NewPlanTieredPrice,
PaginationMetadata as PaginationMetadata,
PercentageDiscount as PercentageDiscount,
+ NewFloatingBPSPrice as NewFloatingBPSPrice,
+ NewPlanBulkBPSPrice as NewPlanBulkBPSPrice,
+ NewPlanPackagePrice as NewPlanPackagePrice,
+ SubLineItemGrouping as SubLineItemGrouping,
InvoiceLevelDiscount as InvoiceLevelDiscount,
+ NewFloatingBulkPrice as NewFloatingBulkPrice,
+ NewFloatingUnitPrice as NewFloatingUnitPrice,
+ SubscriptionMinified as SubscriptionMinified,
+ TransformPriceFilter as TransformPriceFilter,
+ NewPercentageDiscount as NewPercentageDiscount,
+ NewPlanTieredBPSPrice as NewPlanTieredBPSPrice,
+ SubscriptionTrialInfo as SubscriptionTrialInfo,
+ UsageDiscountInterval as UsageDiscountInterval,
+ AmountDiscountInterval as AmountDiscountInterval,
+ NewFloatingMatrixPrice as NewFloatingMatrixPrice,
+ NewFloatingTieredPrice as NewFloatingTieredPrice,
+ NewFloatingBulkBPSPrice as NewFloatingBulkBPSPrice,
+ NewFloatingPackagePrice as NewFloatingPackagePrice,
+ SubLineItemMatrixConfig as SubLineItemMatrixConfig,
BillingCycleRelativeDate as BillingCycleRelativeDate,
+ ConversionRateUnitConfig as ConversionRateUnitConfig,
+ UnitConversionRateConfig as UnitConversionRateConfig,
+ BillingCycleConfiguration as BillingCycleConfiguration,
+ MonetaryMaximumAdjustment as MonetaryMaximumAdjustment,
+ MonetaryMinimumAdjustment as MonetaryMinimumAdjustment,
+ NewFloatingTieredBPSPrice as NewFloatingTieredBPSPrice,
+ NewPlanGroupedTieredPrice as NewPlanGroupedTieredPrice,
+ NewPlanTieredPackagePrice as NewPlanTieredPackagePrice,
+ ConversionRateTieredConfig as ConversionRateTieredConfig,
+ FixedFeeQuantityTransition as FixedFeeQuantityTransition,
+ MatrixWithAllocationConfig as MatrixWithAllocationConfig,
+ PercentageDiscountInterval as PercentageDiscountInterval,
+ PlanPhaseMaximumAdjustment as PlanPhaseMaximumAdjustment,
+ PlanPhaseMinimumAdjustment as PlanPhaseMinimumAdjustment,
+ SubscriptionChangeMinified as SubscriptionChangeMinified,
+ TieredConversionRateConfig as TieredConversionRateConfig,
+ NewPlanUnitWithPercentPrice as NewPlanUnitWithPercentPrice,
+ ChangedSubscriptionResources as ChangedSubscriptionResources,
+ NewBillingCycleConfiguration as NewBillingCycleConfiguration,
+ DimensionalPriceConfiguration as DimensionalPriceConfiguration,
+ FixedFeeQuantityScheduleEntry as FixedFeeQuantityScheduleEntry,
+ NewFloatingGroupedTieredPrice as NewFloatingGroupedTieredPrice,
+ NewFloatingTieredPackagePrice as NewFloatingTieredPackagePrice,
+ NewPlanBulkWithProrationPrice as NewPlanBulkWithProrationPrice,
+ NewPlanGroupedAllocationPrice as NewPlanGroupedAllocationPrice,
+ NewPlanTieredWithMinimumPrice as NewPlanTieredWithMinimumPrice,
+ NewPlanTierWithProrationPrice as NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice as NewPlanUnitWithProrationPrice,
+ BillingCycleAnchorConfiguration as BillingCycleAnchorConfiguration,
+ MonetaryUsageDiscountAdjustment as MonetaryUsageDiscountAdjustment,
+ NewFloatingUnitWithPercentPrice as NewFloatingUnitWithPercentPrice,
+ MonetaryAmountDiscountAdjustment as MonetaryAmountDiscountAdjustment,
+ NewDimensionalPriceConfiguration as NewDimensionalPriceConfiguration,
+ NewPlanGroupedTieredPackagePrice as NewPlanGroupedTieredPackagePrice,
+ NewPlanMatrixWithAllocationPrice as NewPlanMatrixWithAllocationPrice,
+ NewPlanThresholdTotalAmountPrice as NewPlanThresholdTotalAmountPrice,
+ PlanPhaseUsageDiscountAdjustment as PlanPhaseUsageDiscountAdjustment,
+ NewFloatingBulkWithProrationPrice as NewFloatingBulkWithProrationPrice,
+ NewFloatingGroupedAllocationPrice as NewFloatingGroupedAllocationPrice,
+ NewFloatingTieredWithMinimumPrice as NewFloatingTieredWithMinimumPrice,
+ NewFloatingUnitWithProrationPrice as NewFloatingUnitWithProrationPrice,
+ NewPlanCumulativeGroupedBulkPrice as NewPlanCumulativeGroupedBulkPrice,
+ NewPlanMatrixWithDisplayNamePrice as NewPlanMatrixWithDisplayNamePrice,
+ NewPlanMaxGroupTieredPackagePrice as NewPlanMaxGroupTieredPackagePrice,
+ NewPlanPackageWithAllocationPrice as NewPlanPackageWithAllocationPrice,
+ PlanPhaseAmountDiscountAdjustment as PlanPhaseAmountDiscountAdjustment,
+ NewFloatingTieredWithProrationPrice as NewFloatingTieredWithProrationPrice,
+ MonetaryPercentageDiscountAdjustment as MonetaryPercentageDiscountAdjustment,
+ NewFloatingGroupedTieredPackagePrice as NewFloatingGroupedTieredPackagePrice,
+ NewFloatingMatrixWithAllocationPrice as NewFloatingMatrixWithAllocationPrice,
+ NewFloatingThresholdTotalAmountPrice as NewFloatingThresholdTotalAmountPrice,
+ NewPlanTieredPackageWithMinimumPrice as NewPlanTieredPackageWithMinimumPrice,
+ NewFloatingCumulativeGroupedBulkPrice as NewFloatingCumulativeGroupedBulkPrice,
+ NewFloatingMatrixWithDisplayNamePrice as NewFloatingMatrixWithDisplayNamePrice,
+ NewFloatingMaxGroupTieredPackagePrice as NewFloatingMaxGroupTieredPackagePrice,
+ NewFloatingPackageWithAllocationPrice as NewFloatingPackageWithAllocationPrice,
+ NewPlanGroupedWithMeteredMinimumPrice as NewPlanGroupedWithMeteredMinimumPrice,
+ PlanPhasePercentageDiscountAdjustment as PlanPhasePercentageDiscountAdjustment,
+ NewPlanGroupedWithProratedMinimumPrice as NewPlanGroupedWithProratedMinimumPrice,
+ NewFloatingTieredPackageWithMinimumPrice as NewFloatingTieredPackageWithMinimumPrice,
+ NewFloatingGroupedWithMeteredMinimumPrice as NewFloatingGroupedWithMeteredMinimumPrice,
+ NewPlanScalableMatrixWithUnitPricingPrice as NewPlanScalableMatrixWithUnitPricingPrice,
+ NewFloatingGroupedWithProratedMinimumPrice as NewFloatingGroupedWithProratedMinimumPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice as NewPlanScalableMatrixWithTieredPricingPrice,
+ NewFloatingScalableMatrixWithUnitPricingPrice as NewFloatingScalableMatrixWithUnitPricingPrice,
+ NewFloatingScalableMatrixWithTieredPricingPrice as NewFloatingScalableMatrixWithTieredPricingPrice,
)
-from .invoice import Invoice as Invoice
from .customer import Customer as Customer
-from .credit_note import CreditNote as CreditNote
+from .threshold import Threshold as Threshold
from .plan_version import PlanVersion as PlanVersion
from .subscription import Subscription as Subscription
from .subscriptions import Subscriptions as Subscriptions
from .billable_metric import BillableMetric as BillableMetric
+from .threshold_param import ThresholdParam as ThresholdParam
from .item_list_params import ItemListParams as ItemListParams
from .plan_list_params import PlanListParams as PlanListParams
from .alert_list_params import AlertListParams as AlertListParams
@@ -36,6 +169,7 @@
from .plan_update_params import PlanUpdateParams as PlanUpdateParams
from .plan_version_phase import PlanVersionPhase as PlanVersionPhase
from .subscription_usage import SubscriptionUsage as SubscriptionUsage
+from .address_input_param import AddressInputParam as AddressInputParam
from .alert_enable_params import AlertEnableParams as AlertEnableParams
from .alert_update_params import AlertUpdateParams as AlertUpdateParams
from .event_ingest_params import EventIngestParams as EventIngestParams
@@ -51,6 +185,7 @@
from .invoice_issue_params import InvoiceIssueParams as InvoiceIssueParams
from .metric_create_params import MetricCreateParams as MetricCreateParams
from .metric_update_params import MetricUpdateParams as MetricUpdateParams
+from .mutated_subscription import MutatedSubscription as MutatedSubscription
from .event_ingest_response import EventIngestResponse as EventIngestResponse
from .event_search_response import EventSearchResponse as EventSearchResponse
from .event_update_response import EventUpdateResponse as EventUpdateResponse
@@ -61,6 +196,7 @@
from .customer_update_params import CustomerUpdateParams as CustomerUpdateParams
from .credit_note_list_params import CreditNoteListParams as CreditNoteListParams
from .dimensional_price_group import DimensionalPriceGroup as DimensionalPriceGroup
+from .discount_override_param import DiscountOverrideParam as DiscountOverrideParam
from .price_evaluate_response import PriceEvaluateResponse as PriceEvaluateResponse
from .top_level_ping_response import TopLevelPingResponse as TopLevelPingResponse
from .dimensional_price_groups import DimensionalPriceGroups as DimensionalPriceGroups
@@ -71,43 +207,58 @@
from .subscription_cancel_params import SubscriptionCancelParams as SubscriptionCancelParams
from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams
from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams
-from .subscription_cancel_response import SubscriptionCancelResponse as SubscriptionCancelResponse
-from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
from .invoice_fetch_upcoming_params import InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams
+from .new_sphere_configuration_param import NewSphereConfigurationParam as NewSphereConfigurationParam
from .price_evaluate_multiple_params import PriceEvaluateMultipleParams as PriceEvaluateMultipleParams
from .beta_create_plan_version_params import BetaCreatePlanVersionParams as BetaCreatePlanVersionParams
+from .customer_hierarchy_config_param import CustomerHierarchyConfigParam as CustomerHierarchyConfigParam
from .invoice_fetch_upcoming_response import InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse
from .invoice_line_item_create_params import InvoiceLineItemCreateParams as InvoiceLineItemCreateParams
+from .new_tax_jar_configuration_param import NewTaxJarConfigurationParam as NewTaxJarConfigurationParam
from .subscription_fetch_costs_params import SubscriptionFetchCostsParams as SubscriptionFetchCostsParams
from .subscription_fetch_usage_params import SubscriptionFetchUsageParams as SubscriptionFetchUsageParams
+from .accounting_provider_config_param import AccountingProviderConfigParam as AccountingProviderConfigParam
from .alert_create_for_customer_params import AlertCreateForCustomerParams as AlertCreateForCustomerParams
+from .new_subscription_bps_price_param import NewSubscriptionBPSPriceParam as NewSubscriptionBPSPriceParam
from .price_evaluate_multiple_response import PriceEvaluateMultipleResponse as PriceEvaluateMultipleResponse
from .subscription_change_apply_params import SubscriptionChangeApplyParams as SubscriptionChangeApplyParams
from .subscription_update_trial_params import SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams
from .invoice_line_item_create_response import InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse
+from .new_reporting_configuration_param import NewReportingConfigurationParam as NewReportingConfigurationParam
+from .new_subscription_bulk_price_param import NewSubscriptionBulkPriceParam as NewSubscriptionBulkPriceParam
+from .new_subscription_unit_price_param import NewSubscriptionUnitPriceParam as NewSubscriptionUnitPriceParam
from .subscription_fetch_costs_response import SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse
from .subscription_redeem_coupon_params import SubscriptionRedeemCouponParams as SubscriptionRedeemCouponParams
from .subscription_trigger_phase_params import SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams
from .subscription_change_apply_response import SubscriptionChangeApplyResponse as SubscriptionChangeApplyResponse
from .subscription_fetch_schedule_params import SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams
-from .subscription_update_trial_response import SubscriptionUpdateTrialResponse as SubscriptionUpdateTrialResponse
from .dimensional_price_group_list_params import DimensionalPriceGroupListParams as DimensionalPriceGroupListParams
+from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam as NewAvalaraTaxConfigurationParam
+from .new_subscription_matrix_price_param import NewSubscriptionMatrixPriceParam as NewSubscriptionMatrixPriceParam
+from .new_subscription_tiered_price_param import NewSubscriptionTieredPriceParam as NewSubscriptionTieredPriceParam
from .subscription_change_cancel_response import SubscriptionChangeCancelResponse as SubscriptionChangeCancelResponse
from .subscription_price_intervals_params import SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams
-from .subscription_redeem_coupon_response import SubscriptionRedeemCouponResponse as SubscriptionRedeemCouponResponse
-from .subscription_trigger_phase_response import SubscriptionTriggerPhaseResponse as SubscriptionTriggerPhaseResponse
from .alert_create_for_subscription_params import AlertCreateForSubscriptionParams as AlertCreateForSubscriptionParams
from .beta_set_default_plan_version_params import BetaSetDefaultPlanVersionParams as BetaSetDefaultPlanVersionParams
+from .new_subscription_package_price_param import NewSubscriptionPackagePriceParam as NewSubscriptionPackagePriceParam
+from .price_evaluate_preview_events_params import PriceEvaluatePreviewEventsParams as PriceEvaluatePreviewEventsParams
from .subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse
from .customer_update_by_external_id_params import CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams
from .dimensional_price_group_create_params import (
DimensionalPriceGroupCreateParams as DimensionalPriceGroupCreateParams,
)
+from .new_subscription_bulk_bps_price_param import NewSubscriptionBulkBPSPriceParam as NewSubscriptionBulkBPSPriceParam
from .subscription_change_retrieve_response import (
SubscriptionChangeRetrieveResponse as SubscriptionChangeRetrieveResponse,
)
-from .subscription_price_intervals_response import (
- SubscriptionPriceIntervalsResponse as SubscriptionPriceIntervalsResponse,
+from .price_evaluate_preview_events_response import (
+ PriceEvaluatePreviewEventsResponse as PriceEvaluatePreviewEventsResponse,
+)
+from .new_accounting_sync_configuration_param import (
+ NewAccountingSyncConfigurationParam as NewAccountingSyncConfigurationParam,
+)
+from .new_subscription_tiered_bps_price_param import (
+ NewSubscriptionTieredBPSPriceParam as NewSubscriptionTieredBPSPriceParam,
)
from .subscription_schedule_plan_change_params import (
SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams,
@@ -115,24 +266,69 @@
from .alert_create_for_external_customer_params import (
AlertCreateForExternalCustomerParams as AlertCreateForExternalCustomerParams,
)
-from .subscription_schedule_plan_change_response import (
- SubscriptionSchedulePlanChangeResponse as SubscriptionSchedulePlanChangeResponse,
+from .new_subscription_grouped_tiered_price_param import (
+ NewSubscriptionGroupedTieredPriceParam as NewSubscriptionGroupedTieredPriceParam,
)
-from .subscription_unschedule_cancellation_response import (
- SubscriptionUnscheduleCancellationResponse as SubscriptionUnscheduleCancellationResponse,
+from .new_subscription_tiered_package_price_param import (
+ NewSubscriptionTieredPackagePriceParam as NewSubscriptionTieredPackagePriceParam,
)
from .subscription_update_fixed_fee_quantity_params import (
SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams,
)
-from .subscription_update_fixed_fee_quantity_response import (
- SubscriptionUpdateFixedFeeQuantityResponse as SubscriptionUpdateFixedFeeQuantityResponse,
+from .new_subscription_unit_with_percent_price_param import (
+ NewSubscriptionUnitWithPercentPriceParam as NewSubscriptionUnitWithPercentPriceParam,
+)
+from .new_subscription_grouped_allocation_price_param import (
+ NewSubscriptionGroupedAllocationPriceParam as NewSubscriptionGroupedAllocationPriceParam,
+)
+from .new_subscription_bulk_with_proration_price_param import (
+ NewSubscriptionBulkWithProrationPriceParam as NewSubscriptionBulkWithProrationPriceParam,
+)
+from .new_subscription_tier_with_proration_price_param import (
+ NewSubscriptionTierWithProrationPriceParam as NewSubscriptionTierWithProrationPriceParam,
+)
+from .new_subscription_tiered_with_minimum_price_param import (
+ NewSubscriptionTieredWithMinimumPriceParam as NewSubscriptionTieredWithMinimumPriceParam,
+)
+from .new_subscription_unit_with_proration_price_param import (
+ NewSubscriptionUnitWithProrationPriceParam as NewSubscriptionUnitWithProrationPriceParam,
+)
+from .new_subscription_grouped_tiered_package_price_param import (
+ NewSubscriptionGroupedTieredPackagePriceParam as NewSubscriptionGroupedTieredPackagePriceParam,
+)
+from .new_subscription_matrix_with_allocation_price_param import (
+ NewSubscriptionMatrixWithAllocationPriceParam as NewSubscriptionMatrixWithAllocationPriceParam,
)
-from .subscription_unschedule_pending_plan_changes_response import (
- SubscriptionUnschedulePendingPlanChangesResponse as SubscriptionUnschedulePendingPlanChangesResponse,
+from .new_subscription_threshold_total_amount_price_param import (
+ NewSubscriptionThresholdTotalAmountPriceParam as NewSubscriptionThresholdTotalAmountPriceParam,
+)
+from .new_subscription_cumulative_grouped_bulk_price_param import (
+ NewSubscriptionCumulativeGroupedBulkPriceParam as NewSubscriptionCumulativeGroupedBulkPriceParam,
+)
+from .new_subscription_package_with_allocation_price_param import (
+ NewSubscriptionPackageWithAllocationPriceParam as NewSubscriptionPackageWithAllocationPriceParam,
+)
+from .new_subscription_matrix_with_display_name_price_param import (
+ NewSubscriptionMatrixWithDisplayNamePriceParam as NewSubscriptionMatrixWithDisplayNamePriceParam,
+)
+from .new_subscription_max_group_tiered_package_price_param import (
+ NewSubscriptionMaxGroupTieredPackagePriceParam as NewSubscriptionMaxGroupTieredPackagePriceParam,
+)
+from .new_subscription_tiered_package_with_minimum_price_param import (
+ NewSubscriptionTieredPackageWithMinimumPriceParam as NewSubscriptionTieredPackageWithMinimumPriceParam,
+)
+from .new_subscription_grouped_with_metered_minimum_price_param import (
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam as NewSubscriptionGroupedWithMeteredMinimumPriceParam,
)
from .subscription_unschedule_fixed_fee_quantity_updates_params import (
SubscriptionUnscheduleFixedFeeQuantityUpdatesParams as SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
)
-from .subscription_unschedule_fixed_fee_quantity_updates_response import (
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse as SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
+from .new_subscription_grouped_with_prorated_minimum_price_param import (
+ NewSubscriptionGroupedWithProratedMinimumPriceParam as NewSubscriptionGroupedWithProratedMinimumPriceParam,
+)
+from .new_subscription_scalable_matrix_with_unit_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam as NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+)
+from .new_subscription_scalable_matrix_with_tiered_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam as NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
)
diff --git a/src/orb/types/accounting_provider_config_param.py b/src/orb/types/accounting_provider_config_param.py
new file mode 100644
index 00000000..d344ead4
--- /dev/null
+++ b/src/orb/types/accounting_provider_config_param.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["AccountingProviderConfigParam"]
+
+
+class AccountingProviderConfigParam(TypedDict, total=False):
+ external_provider_id: Required[str]
+
+ provider_type: Required[str]
diff --git a/src/orb/types/address_input_param.py b/src/orb/types/address_input_param.py
new file mode 100644
index 00000000..c1666475
--- /dev/null
+++ b/src/orb/types/address_input_param.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import TypedDict
+
+__all__ = ["AddressInputParam"]
+
+
+class AddressInputParam(TypedDict, total=False):
+ city: Optional[str]
+
+ country: Optional[str]
+
+ line1: Optional[str]
+
+ line2: Optional[str]
+
+ postal_code: Optional[str]
+
+ state: Optional[str]
diff --git a/src/orb/types/alert.py b/src/orb/types/alert.py
index 47d5ad9f..f6669b14 100644
--- a/src/orb/types/alert.py
+++ b/src/orb/types/alert.py
@@ -5,14 +5,11 @@
from typing_extensions import Literal
from .._models import BaseModel
+from .threshold import Threshold
+from .shared.customer_minified import CustomerMinified
+from .shared.subscription_minified import SubscriptionMinified
-__all__ = ["Alert", "Customer", "Metric", "Plan", "Subscription", "Threshold", "BalanceAlertStatus"]
-
-
-class Customer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
+__all__ = ["Alert", "Metric", "Plan", "BalanceAlertStatus"]
class Metric(BaseModel):
@@ -34,19 +31,6 @@ class Plan(BaseModel):
plan_version: str
-class Subscription(BaseModel):
- id: str
-
-
-class Threshold(BaseModel):
- value: float
- """The value at which an alert will fire.
-
- For credit balance alerts, the alert will fire at or below this value. For usage
- and cost alerts, the alert will fire at or above this value.
- """
-
-
class BalanceAlertStatus(BaseModel):
in_alert: bool
"""Whether the alert is currently in-alert or not."""
@@ -65,7 +49,7 @@ class Alert(BaseModel):
currency: Optional[str] = None
"""The name of the currency the credit balance or invoice cost is denominated in."""
- customer: Optional[Customer] = None
+ customer: Optional[CustomerMinified] = None
"""The customer the alert applies to."""
enabled: bool
@@ -77,7 +61,7 @@ class Alert(BaseModel):
plan: Optional[Plan] = None
"""The plan the alert applies to."""
- subscription: Optional[Subscription] = None
+ subscription: Optional[SubscriptionMinified] = None
"""The subscription the alert applies to."""
thresholds: Optional[List[Threshold]] = None
diff --git a/src/orb/types/alert_create_for_customer_params.py b/src/orb/types/alert_create_for_customer_params.py
index 2e2c77d9..5503697d 100644
--- a/src/orb/types/alert_create_for_customer_params.py
+++ b/src/orb/types/alert_create_for_customer_params.py
@@ -5,7 +5,9 @@
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AlertCreateForCustomerParams", "Threshold"]
+from .threshold_param import ThresholdParam
+
+__all__ = ["AlertCreateForCustomerParams"]
class AlertCreateForCustomerParams(TypedDict, total=False):
@@ -15,14 +17,5 @@ class AlertCreateForCustomerParams(TypedDict, total=False):
type: Required[Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"]]
"""The type of alert to create. This must be a valid alert type."""
- thresholds: Optional[Iterable[Threshold]]
+ thresholds: Optional[Iterable[ThresholdParam]]
"""The thresholds that define the values at which the alert will be triggered."""
-
-
-class Threshold(TypedDict, total=False):
- value: Required[float]
- """The value at which an alert will fire.
-
- For credit balance alerts, the alert will fire at or below this value. For usage
- and cost alerts, the alert will fire at or above this value.
- """
diff --git a/src/orb/types/alert_create_for_external_customer_params.py b/src/orb/types/alert_create_for_external_customer_params.py
index 4c452e7f..ddca21e5 100644
--- a/src/orb/types/alert_create_for_external_customer_params.py
+++ b/src/orb/types/alert_create_for_external_customer_params.py
@@ -5,7 +5,9 @@
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AlertCreateForExternalCustomerParams", "Threshold"]
+from .threshold_param import ThresholdParam
+
+__all__ = ["AlertCreateForExternalCustomerParams"]
class AlertCreateForExternalCustomerParams(TypedDict, total=False):
@@ -15,14 +17,5 @@ class AlertCreateForExternalCustomerParams(TypedDict, total=False):
type: Required[Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"]]
"""The type of alert to create. This must be a valid alert type."""
- thresholds: Optional[Iterable[Threshold]]
+ thresholds: Optional[Iterable[ThresholdParam]]
"""The thresholds that define the values at which the alert will be triggered."""
-
-
-class Threshold(TypedDict, total=False):
- value: Required[float]
- """The value at which an alert will fire.
-
- For credit balance alerts, the alert will fire at or below this value. For usage
- and cost alerts, the alert will fire at or above this value.
- """
diff --git a/src/orb/types/alert_create_for_subscription_params.py b/src/orb/types/alert_create_for_subscription_params.py
index e91ce1ab..9b8f2208 100644
--- a/src/orb/types/alert_create_for_subscription_params.py
+++ b/src/orb/types/alert_create_for_subscription_params.py
@@ -5,11 +5,13 @@
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AlertCreateForSubscriptionParams", "Threshold"]
+from .threshold_param import ThresholdParam
+
+__all__ = ["AlertCreateForSubscriptionParams"]
class AlertCreateForSubscriptionParams(TypedDict, total=False):
- thresholds: Required[Iterable[Threshold]]
+ thresholds: Required[Iterable[ThresholdParam]]
"""The thresholds that define the values at which the alert will be triggered."""
type: Required[Literal["usage_exceeded", "cost_exceeded"]]
@@ -17,12 +19,3 @@ class AlertCreateForSubscriptionParams(TypedDict, total=False):
metric_id: Optional[str]
"""The metric to track usage for."""
-
-
-class Threshold(TypedDict, total=False):
- value: Required[float]
- """The value at which an alert will fire.
-
- For credit balance alerts, the alert will fire at or below this value. For usage
- and cost alerts, the alert will fire at or above this value.
- """
diff --git a/src/orb/types/alert_update_params.py b/src/orb/types/alert_update_params.py
index 6be6b1d2..ba10e5e8 100644
--- a/src/orb/types/alert_update_params.py
+++ b/src/orb/types/alert_update_params.py
@@ -5,18 +5,11 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-__all__ = ["AlertUpdateParams", "Threshold"]
+from .threshold_param import ThresholdParam
+
+__all__ = ["AlertUpdateParams"]
class AlertUpdateParams(TypedDict, total=False):
- thresholds: Required[Iterable[Threshold]]
+ thresholds: Required[Iterable[ThresholdParam]]
"""The thresholds that define the values at which the alert will be triggered."""
-
-
-class Threshold(TypedDict, total=False):
- value: Required[float]
- """The value at which an alert will fire.
-
- For credit balance alerts, the alert will fire at or below this value. For usage
- and cost alerts, the alert will fire at or above this value.
- """
diff --git a/src/orb/types/beta/external_plan_id_create_plan_version_params.py b/src/orb/types/beta/external_plan_id_create_plan_version_params.py
index 845d91af..2a130e0e 100644
--- a/src/orb/types/beta/external_plan_id_create_plan_version_params.py
+++ b/src/orb/types/beta/external_plan_id_create_plan_version_params.py
@@ -2,299 +2,58 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypeAlias, TypedDict
+from typing import Union, Iterable, Optional
+from typing_extensions import Required, TypeAlias, TypedDict
+
+from ..shared_params.new_maximum import NewMaximum
+from ..shared_params.new_minimum import NewMinimum
+from ..shared_params.new_plan_bps_price import NewPlanBPSPrice
+from ..shared_params.new_usage_discount import NewUsageDiscount
+from ..shared_params.new_amount_discount import NewAmountDiscount
+from ..shared_params.new_plan_bulk_price import NewPlanBulkPrice
+from ..shared_params.new_plan_unit_price import NewPlanUnitPrice
+from ..shared_params.new_allocation_price import NewAllocationPrice
+from ..shared_params.new_plan_matrix_price import NewPlanMatrixPrice
+from ..shared_params.new_plan_tiered_price import NewPlanTieredPrice
+from ..shared_params.new_plan_package_price import NewPlanPackagePrice
+from ..shared_params.new_percentage_discount import NewPercentageDiscount
+from ..shared_params.new_plan_bulk_bps_price import NewPlanBulkBPSPrice
+from ..shared_params.new_plan_tiered_bps_price import NewPlanTieredBPSPrice
+from ..shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice
+from ..shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice
+from ..shared_params.new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice
+from ..shared_params.new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice
+from ..shared_params.new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice
+from ..shared_params.new_plan_tier_with_proration_price import NewPlanTierWithProrationPrice
+from ..shared_params.new_plan_tiered_with_minimum_price import NewPlanTieredWithMinimumPrice
+from ..shared_params.new_plan_unit_with_proration_price import NewPlanUnitWithProrationPrice
+from ..shared_params.new_plan_grouped_tiered_package_price import NewPlanGroupedTieredPackagePrice
+from ..shared_params.new_plan_matrix_with_allocation_price import NewPlanMatrixWithAllocationPrice
+from ..shared_params.new_plan_threshold_total_amount_price import NewPlanThresholdTotalAmountPrice
+from ..shared_params.new_plan_cumulative_grouped_bulk_price import NewPlanCumulativeGroupedBulkPrice
+from ..shared_params.new_plan_package_with_allocation_price import NewPlanPackageWithAllocationPrice
+from ..shared_params.new_plan_matrix_with_display_name_price import NewPlanMatrixWithDisplayNamePrice
+from ..shared_params.new_plan_max_group_tiered_package_price import NewPlanMaxGroupTieredPackagePrice
+from ..shared_params.new_plan_tiered_package_with_minimum_price import NewPlanTieredPackageWithMinimumPrice
+from ..shared_params.new_plan_grouped_with_metered_minimum_price import NewPlanGroupedWithMeteredMinimumPrice
+from ..shared_params.new_plan_grouped_with_prorated_minimum_price import NewPlanGroupedWithProratedMinimumPrice
+from ..shared_params.new_plan_scalable_matrix_with_unit_pricing_price import NewPlanScalableMatrixWithUnitPricingPrice
+from ..shared_params.new_plan_scalable_matrix_with_tiered_pricing_price import (
+ NewPlanScalableMatrixWithTieredPricingPrice,
+)
__all__ = [
"ExternalPlanIDCreatePlanVersionParams",
"AddAdjustment",
"AddAdjustmentAdjustment",
- "AddAdjustmentAdjustmentNewPercentageDiscount",
- "AddAdjustmentAdjustmentNewPercentageDiscountFilter",
- "AddAdjustmentAdjustmentNewUsageDiscount",
- "AddAdjustmentAdjustmentNewUsageDiscountFilter",
- "AddAdjustmentAdjustmentNewAmountDiscount",
- "AddAdjustmentAdjustmentNewAmountDiscountFilter",
- "AddAdjustmentAdjustmentNewMinimum",
- "AddAdjustmentAdjustmentNewMinimumFilter",
- "AddAdjustmentAdjustmentNewMaximum",
- "AddAdjustmentAdjustmentNewMaximumFilter",
"AddPrice",
- "AddPriceAllocationPrice",
- "AddPriceAllocationPriceCustomExpiration",
"AddPricePrice",
- "AddPricePriceNewPlanUnitPrice",
- "AddPricePriceNewPlanUnitPriceUnitConfig",
- "AddPricePriceNewPlanUnitPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanPackagePrice",
- "AddPricePriceNewPlanPackagePricePackageConfig",
- "AddPricePriceNewPlanPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixPrice",
- "AddPricePriceNewPlanMatrixPriceMatrixConfig",
- "AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue",
- "AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPrice",
- "AddPricePriceNewPlanTieredPriceTieredConfig",
- "AddPricePriceNewPlanTieredPriceTieredConfigTier",
- "AddPricePriceNewPlanTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredBpsPrice",
- "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig",
- "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier",
- "AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBpsPrice",
- "AddPricePriceNewPlanBpsPriceBpsConfig",
- "AddPricePriceNewPlanBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkBpsPrice",
- "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig",
- "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier",
- "AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkPrice",
- "AddPricePriceNewPlanBulkPriceBulkConfig",
- "AddPricePriceNewPlanBulkPriceBulkConfigTier",
- "AddPricePriceNewPlanBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPrice",
- "AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackagePrice",
- "AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPrice",
- "AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPrice",
- "AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPrice",
- "AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTierWithProrationPrice",
- "AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPrice",
- "AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPrice",
- "AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPrice",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPrice",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePrice",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPrice",
- "AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePrice",
- "AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePrice",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPrice",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPrice",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPrice",
- "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPrice",
- "AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration",
"RemoveAdjustment",
"RemovePrice",
"ReplaceAdjustment",
"ReplaceAdjustmentAdjustment",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscount",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewUsageDiscount",
- "ReplaceAdjustmentAdjustmentNewUsageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewAmountDiscount",
- "ReplaceAdjustmentAdjustmentNewAmountDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewMinimum",
- "ReplaceAdjustmentAdjustmentNewMinimumFilter",
- "ReplaceAdjustmentAdjustmentNewMaximum",
- "ReplaceAdjustmentAdjustmentNewMaximumFilter",
"ReplacePrice",
- "ReplacePriceAllocationPrice",
- "ReplacePriceAllocationPriceCustomExpiration",
"ReplacePricePrice",
- "ReplacePricePriceNewPlanUnitPrice",
- "ReplacePricePriceNewPlanUnitPriceUnitConfig",
- "ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanPackagePrice",
- "ReplacePricePriceNewPlanPackagePricePackageConfig",
- "ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixPrice",
- "ReplacePricePriceNewPlanMatrixPriceMatrixConfig",
- "ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue",
- "ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPrice",
- "ReplacePricePriceNewPlanTieredPriceTieredConfig",
- "ReplacePricePriceNewPlanTieredPriceTieredConfigTier",
- "ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPrice",
- "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig",
- "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier",
- "ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBpsPrice",
- "ReplacePricePriceNewPlanBpsPriceBpsConfig",
- "ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPrice",
- "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig",
- "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier",
- "ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkPrice",
- "ReplacePricePriceNewPlanBulkPriceBulkConfig",
- "ReplacePricePriceNewPlanBulkPriceBulkConfigTier",
- "ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPrice",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePrice",
- "ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPrice",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPrice",
- "ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPrice",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPrice",
- "ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPrice",
- "ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPrice",
- "ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePrice",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPrice",
- "ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePrice",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePrice",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPrice",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPrice",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPrice",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPrice",
- "ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration",
]
@@ -324,220 +83,8 @@ class ExternalPlanIDCreatePlanVersionParams(TypedDict, total=False):
"""Set this new plan version as the default"""
-class AddAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
AddAdjustmentAdjustment: TypeAlias = Union[
- AddAdjustmentAdjustmentNewPercentageDiscount,
- AddAdjustmentAdjustmentNewUsageDiscount,
- AddAdjustmentAdjustmentNewAmountDiscount,
- AddAdjustmentAdjustmentNewMinimum,
- AddAdjustmentAdjustmentNewMaximum,
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
]
@@ -549,6378 +96,110 @@ class AddAdjustment(TypedDict, total=False):
"""The phase to add this adjustment to."""
-class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class AddPriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class AddPricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class AddPricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[AddPricePriceNewPlanUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class AddPricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[AddPricePriceNewPlanPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[AddPricePriceNewPlanMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class AddPricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class AddPricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[AddPricePriceNewPlanTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
+AddPricePrice: TypeAlias = Union[
+ NewPlanUnitPrice,
+ NewPlanPackagePrice,
+ NewPlanMatrixPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanGroupedTieredPrice,
+]
-class AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+class AddPrice(TypedDict, total=False):
+ allocation_price: Optional[NewAllocationPrice]
+ """The allocation price to add to the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to add this price to."""
-class AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
+ price: Optional[AddPricePrice]
+ """The price to add to the plan"""
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
+class RemoveAdjustment(TypedDict, total=False):
+ adjustment_id: Required[str]
+ """The id of the adjustment to remove from on the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to remove this adjustment from."""
-class AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+class RemovePrice(TypedDict, total=False):
+ price_id: Required[str]
+ """The id of the price to remove from the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to remove this price from."""
-class AddPricePriceNewPlanTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
- item_id: Required[str]
- """The id of the item the price will be associated with."""
+ReplaceAdjustmentAdjustment: TypeAlias = Union[
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
+]
- model_type: Required[Literal["tiered_bps"]]
- name: Required[str]
- """The name of the price."""
+class ReplaceAdjustment(TypedDict, total=False):
+ adjustment: Required[ReplaceAdjustmentAdjustment]
+ """The definition of a new adjustment to create and add to the plan."""
- tiered_bps_config: Required[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig]
+ replaces_adjustment_id: Required[str]
+ """The id of the adjustment on the plan to replace in the plan."""
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class AddPricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBpsPrice(TypedDict, total=False):
- bps_config: Required[AddPricePriceNewPlanBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class AddPricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class AddPricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkPrice(TypedDict, total=False):
- bulk_config: Required[AddPricePriceNewPlanBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-AddPricePrice: TypeAlias = Union[
- AddPricePriceNewPlanUnitPrice,
- AddPricePriceNewPlanPackagePrice,
- AddPricePriceNewPlanMatrixPrice,
- AddPricePriceNewPlanTieredPrice,
- AddPricePriceNewPlanTieredBpsPrice,
- AddPricePriceNewPlanBpsPrice,
- AddPricePriceNewPlanBulkBpsPrice,
- AddPricePriceNewPlanBulkPrice,
- AddPricePriceNewPlanThresholdTotalAmountPrice,
- AddPricePriceNewPlanTieredPackagePrice,
- AddPricePriceNewPlanTieredWithMinimumPrice,
- AddPricePriceNewPlanUnitWithPercentPrice,
- AddPricePriceNewPlanPackageWithAllocationPrice,
- AddPricePriceNewPlanTierWithProrationPrice,
- AddPricePriceNewPlanUnitWithProrationPrice,
- AddPricePriceNewPlanGroupedAllocationPrice,
- AddPricePriceNewPlanGroupedWithProratedMinimumPrice,
- AddPricePriceNewPlanGroupedWithMeteredMinimumPrice,
- AddPricePriceNewPlanMatrixWithDisplayNamePrice,
- AddPricePriceNewPlanBulkWithProrationPrice,
- AddPricePriceNewPlanGroupedTieredPackagePrice,
- AddPricePriceNewPlanMaxGroupTieredPackagePrice,
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice,
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice,
- AddPricePriceNewPlanCumulativeGroupedBulkPrice,
- AddPricePriceNewPlanTieredPackageWithMinimumPrice,
- AddPricePriceNewPlanMatrixWithAllocationPrice,
- AddPricePriceNewPlanGroupedTieredPrice,
-]
-
-
-class AddPrice(TypedDict, total=False):
- allocation_price: Optional[AddPriceAllocationPrice]
- """The allocation price to add to the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to add this price to."""
-
- price: Optional[AddPricePrice]
- """The price to add to the plan"""
-
-
-class RemoveAdjustment(TypedDict, total=False):
- adjustment_id: Required[str]
- """The id of the adjustment to remove from on the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to remove this adjustment from."""
-
-
-class RemovePrice(TypedDict, total=False):
- price_id: Required[str]
- """The id of the price to remove from the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to remove this price from."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-ReplaceAdjustmentAdjustment: TypeAlias = Union[
- ReplaceAdjustmentAdjustmentNewPercentageDiscount,
- ReplaceAdjustmentAdjustmentNewUsageDiscount,
- ReplaceAdjustmentAdjustmentNewAmountDiscount,
- ReplaceAdjustmentAdjustmentNewMinimum,
- ReplaceAdjustmentAdjustmentNewMaximum,
-]
-
-
-class ReplaceAdjustment(TypedDict, total=False):
- adjustment: Required[ReplaceAdjustmentAdjustment]
- """The definition of a new adjustment to create and add to the plan."""
-
- replaces_adjustment_id: Required[str]
- """The id of the adjustment on the plan to replace in the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to replace this adjustment from."""
-
-
-class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class ReplacePriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class ReplacePricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[ReplacePricePriceNewPlanUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[ReplacePricePriceNewPlanPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[ReplacePricePriceNewPlanMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class ReplacePricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[ReplacePricePriceNewPlanTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBpsPrice(TypedDict, total=False):
- bps_config: Required[ReplacePricePriceNewPlanBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class ReplacePricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkPrice(TypedDict, total=False):
- bulk_config: Required[ReplacePricePriceNewPlanBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
+ plan_phase_order: Optional[int]
+ """The phase to replace this adjustment from."""
ReplacePricePrice: TypeAlias = Union[
- ReplacePricePriceNewPlanUnitPrice,
- ReplacePricePriceNewPlanPackagePrice,
- ReplacePricePriceNewPlanMatrixPrice,
- ReplacePricePriceNewPlanTieredPrice,
- ReplacePricePriceNewPlanTieredBpsPrice,
- ReplacePricePriceNewPlanBpsPrice,
- ReplacePricePriceNewPlanBulkBpsPrice,
- ReplacePricePriceNewPlanBulkPrice,
- ReplacePricePriceNewPlanThresholdTotalAmountPrice,
- ReplacePricePriceNewPlanTieredPackagePrice,
- ReplacePricePriceNewPlanTieredWithMinimumPrice,
- ReplacePricePriceNewPlanUnitWithPercentPrice,
- ReplacePricePriceNewPlanPackageWithAllocationPrice,
- ReplacePricePriceNewPlanTierWithProrationPrice,
- ReplacePricePriceNewPlanUnitWithProrationPrice,
- ReplacePricePriceNewPlanGroupedAllocationPrice,
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice,
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice,
- ReplacePricePriceNewPlanMatrixWithDisplayNamePrice,
- ReplacePricePriceNewPlanBulkWithProrationPrice,
- ReplacePricePriceNewPlanGroupedTieredPackagePrice,
- ReplacePricePriceNewPlanMaxGroupTieredPackagePrice,
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice,
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice,
- ReplacePricePriceNewPlanCumulativeGroupedBulkPrice,
- ReplacePricePriceNewPlanTieredPackageWithMinimumPrice,
- ReplacePricePriceNewPlanMatrixWithAllocationPrice,
- ReplacePricePriceNewPlanGroupedTieredPrice,
+ NewPlanUnitPrice,
+ NewPlanPackagePrice,
+ NewPlanMatrixPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanGroupedTieredPrice,
]
@@ -6928,7 +207,7 @@ class ReplacePrice(TypedDict, total=False):
replaces_price_id: Required[str]
"""The id of the price on the plan to replace in the plan."""
- allocation_price: Optional[ReplacePriceAllocationPrice]
+ allocation_price: Optional[NewAllocationPrice]
"""The allocation price to add to the plan."""
plan_phase_order: Optional[int]
diff --git a/src/orb/types/beta_create_plan_version_params.py b/src/orb/types/beta_create_plan_version_params.py
index 0ff4daf4..58c710ea 100644
--- a/src/orb/types/beta_create_plan_version_params.py
+++ b/src/orb/types/beta_create_plan_version_params.py
@@ -2,299 +2,58 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypeAlias, TypedDict
+from typing import Union, Iterable, Optional
+from typing_extensions import Required, TypeAlias, TypedDict
+
+from .shared_params.new_maximum import NewMaximum
+from .shared_params.new_minimum import NewMinimum
+from .shared_params.new_plan_bps_price import NewPlanBPSPrice
+from .shared_params.new_usage_discount import NewUsageDiscount
+from .shared_params.new_amount_discount import NewAmountDiscount
+from .shared_params.new_plan_bulk_price import NewPlanBulkPrice
+from .shared_params.new_plan_unit_price import NewPlanUnitPrice
+from .shared_params.new_allocation_price import NewAllocationPrice
+from .shared_params.new_plan_matrix_price import NewPlanMatrixPrice
+from .shared_params.new_plan_tiered_price import NewPlanTieredPrice
+from .shared_params.new_plan_package_price import NewPlanPackagePrice
+from .shared_params.new_percentage_discount import NewPercentageDiscount
+from .shared_params.new_plan_bulk_bps_price import NewPlanBulkBPSPrice
+from .shared_params.new_plan_tiered_bps_price import NewPlanTieredBPSPrice
+from .shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice
+from .shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice
+from .shared_params.new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice
+from .shared_params.new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice
+from .shared_params.new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice
+from .shared_params.new_plan_tier_with_proration_price import NewPlanTierWithProrationPrice
+from .shared_params.new_plan_tiered_with_minimum_price import NewPlanTieredWithMinimumPrice
+from .shared_params.new_plan_unit_with_proration_price import NewPlanUnitWithProrationPrice
+from .shared_params.new_plan_grouped_tiered_package_price import NewPlanGroupedTieredPackagePrice
+from .shared_params.new_plan_matrix_with_allocation_price import NewPlanMatrixWithAllocationPrice
+from .shared_params.new_plan_threshold_total_amount_price import NewPlanThresholdTotalAmountPrice
+from .shared_params.new_plan_cumulative_grouped_bulk_price import NewPlanCumulativeGroupedBulkPrice
+from .shared_params.new_plan_package_with_allocation_price import NewPlanPackageWithAllocationPrice
+from .shared_params.new_plan_matrix_with_display_name_price import NewPlanMatrixWithDisplayNamePrice
+from .shared_params.new_plan_max_group_tiered_package_price import NewPlanMaxGroupTieredPackagePrice
+from .shared_params.new_plan_tiered_package_with_minimum_price import NewPlanTieredPackageWithMinimumPrice
+from .shared_params.new_plan_grouped_with_metered_minimum_price import NewPlanGroupedWithMeteredMinimumPrice
+from .shared_params.new_plan_grouped_with_prorated_minimum_price import NewPlanGroupedWithProratedMinimumPrice
+from .shared_params.new_plan_scalable_matrix_with_unit_pricing_price import NewPlanScalableMatrixWithUnitPricingPrice
+from .shared_params.new_plan_scalable_matrix_with_tiered_pricing_price import (
+ NewPlanScalableMatrixWithTieredPricingPrice,
+)
__all__ = [
"BetaCreatePlanVersionParams",
"AddAdjustment",
"AddAdjustmentAdjustment",
- "AddAdjustmentAdjustmentNewPercentageDiscount",
- "AddAdjustmentAdjustmentNewPercentageDiscountFilter",
- "AddAdjustmentAdjustmentNewUsageDiscount",
- "AddAdjustmentAdjustmentNewUsageDiscountFilter",
- "AddAdjustmentAdjustmentNewAmountDiscount",
- "AddAdjustmentAdjustmentNewAmountDiscountFilter",
- "AddAdjustmentAdjustmentNewMinimum",
- "AddAdjustmentAdjustmentNewMinimumFilter",
- "AddAdjustmentAdjustmentNewMaximum",
- "AddAdjustmentAdjustmentNewMaximumFilter",
"AddPrice",
- "AddPriceAllocationPrice",
- "AddPriceAllocationPriceCustomExpiration",
"AddPricePrice",
- "AddPricePriceNewPlanUnitPrice",
- "AddPricePriceNewPlanUnitPriceUnitConfig",
- "AddPricePriceNewPlanUnitPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanPackagePrice",
- "AddPricePriceNewPlanPackagePricePackageConfig",
- "AddPricePriceNewPlanPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixPrice",
- "AddPricePriceNewPlanMatrixPriceMatrixConfig",
- "AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue",
- "AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPrice",
- "AddPricePriceNewPlanTieredPriceTieredConfig",
- "AddPricePriceNewPlanTieredPriceTieredConfigTier",
- "AddPricePriceNewPlanTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredBpsPrice",
- "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig",
- "AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier",
- "AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBpsPrice",
- "AddPricePriceNewPlanBpsPriceBpsConfig",
- "AddPricePriceNewPlanBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkBpsPrice",
- "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig",
- "AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier",
- "AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkPrice",
- "AddPricePriceNewPlanBulkPriceBulkConfig",
- "AddPricePriceNewPlanBulkPriceBulkConfigTier",
- "AddPricePriceNewPlanBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPrice",
- "AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackagePrice",
- "AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPrice",
- "AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPrice",
- "AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPrice",
- "AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTierWithProrationPrice",
- "AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPrice",
- "AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPrice",
- "AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPrice",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPrice",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePrice",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPrice",
- "AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePrice",
- "AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePrice",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPrice",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPrice",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPrice",
- "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPrice",
- "AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration",
"RemoveAdjustment",
"RemovePrice",
"ReplaceAdjustment",
"ReplaceAdjustmentAdjustment",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscount",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewUsageDiscount",
- "ReplaceAdjustmentAdjustmentNewUsageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewAmountDiscount",
- "ReplaceAdjustmentAdjustmentNewAmountDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewMinimum",
- "ReplaceAdjustmentAdjustmentNewMinimumFilter",
- "ReplaceAdjustmentAdjustmentNewMaximum",
- "ReplaceAdjustmentAdjustmentNewMaximumFilter",
"ReplacePrice",
- "ReplacePriceAllocationPrice",
- "ReplacePriceAllocationPriceCustomExpiration",
"ReplacePricePrice",
- "ReplacePricePriceNewPlanUnitPrice",
- "ReplacePricePriceNewPlanUnitPriceUnitConfig",
- "ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanPackagePrice",
- "ReplacePricePriceNewPlanPackagePricePackageConfig",
- "ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixPrice",
- "ReplacePricePriceNewPlanMatrixPriceMatrixConfig",
- "ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue",
- "ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPrice",
- "ReplacePricePriceNewPlanTieredPriceTieredConfig",
- "ReplacePricePriceNewPlanTieredPriceTieredConfigTier",
- "ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPrice",
- "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig",
- "ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier",
- "ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBpsPrice",
- "ReplacePricePriceNewPlanBpsPriceBpsConfig",
- "ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPrice",
- "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig",
- "ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier",
- "ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkPrice",
- "ReplacePricePriceNewPlanBulkPriceBulkConfig",
- "ReplacePricePriceNewPlanBulkPriceBulkConfigTier",
- "ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPrice",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePrice",
- "ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPrice",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPrice",
- "ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPrice",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPrice",
- "ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPrice",
- "ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPrice",
- "ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePrice",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPrice",
- "ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePrice",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePrice",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPrice",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPrice",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPrice",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPrice",
- "ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration",
]
@@ -324,220 +83,8 @@ class BetaCreatePlanVersionParams(TypedDict, total=False):
"""Set this new plan version as the default"""
-class AddAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
AddAdjustmentAdjustment: TypeAlias = Union[
- AddAdjustmentAdjustmentNewPercentageDiscount,
- AddAdjustmentAdjustmentNewUsageDiscount,
- AddAdjustmentAdjustmentNewAmountDiscount,
- AddAdjustmentAdjustmentNewMinimum,
- AddAdjustmentAdjustmentNewMaximum,
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
]
@@ -549,6378 +96,110 @@ class AddAdjustment(TypedDict, total=False):
"""The phase to add this adjustment to."""
-class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class AddPriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class AddPricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class AddPricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[AddPricePriceNewPlanUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class AddPricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[AddPricePriceNewPlanPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[AddPricePriceNewPlanMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class AddPricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class AddPricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[AddPricePriceNewPlanTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
+AddPricePrice: TypeAlias = Union[
+ NewPlanUnitPrice,
+ NewPlanPackagePrice,
+ NewPlanMatrixPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanGroupedTieredPrice,
+]
-class AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+class AddPrice(TypedDict, total=False):
+ allocation_price: Optional[NewAllocationPrice]
+ """The allocation price to add to the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to add this price to."""
-class AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
+ price: Optional[AddPricePrice]
+ """The price to add to the plan"""
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
+class RemoveAdjustment(TypedDict, total=False):
+ adjustment_id: Required[str]
+ """The id of the adjustment to remove from on the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to remove this adjustment from."""
-class AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+class RemovePrice(TypedDict, total=False):
+ price_id: Required[str]
+ """The id of the price to remove from the plan."""
+ plan_phase_order: Optional[int]
+ """The phase to remove this price from."""
-class AddPricePriceNewPlanTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
- item_id: Required[str]
- """The id of the item the price will be associated with."""
+ReplaceAdjustmentAdjustment: TypeAlias = Union[
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
+]
- model_type: Required[Literal["tiered_bps"]]
- name: Required[str]
- """The name of the price."""
+class ReplaceAdjustment(TypedDict, total=False):
+ adjustment: Required[ReplaceAdjustmentAdjustment]
+ """The definition of a new adjustment to create and add to the plan."""
- tiered_bps_config: Required[AddPricePriceNewPlanTieredBpsPriceTieredBpsConfig]
+ replaces_adjustment_id: Required[str]
+ """The id of the adjustment on the plan to replace in the plan."""
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class AddPricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBpsPrice(TypedDict, total=False):
- bps_config: Required[AddPricePriceNewPlanBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[AddPricePriceNewPlanBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class AddPricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewPlanBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class AddPricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkPrice(TypedDict, total=False):
- bulk_config: Required[AddPricePriceNewPlanBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[AddPricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewPlanGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-AddPricePrice: TypeAlias = Union[
- AddPricePriceNewPlanUnitPrice,
- AddPricePriceNewPlanPackagePrice,
- AddPricePriceNewPlanMatrixPrice,
- AddPricePriceNewPlanTieredPrice,
- AddPricePriceNewPlanTieredBpsPrice,
- AddPricePriceNewPlanBpsPrice,
- AddPricePriceNewPlanBulkBpsPrice,
- AddPricePriceNewPlanBulkPrice,
- AddPricePriceNewPlanThresholdTotalAmountPrice,
- AddPricePriceNewPlanTieredPackagePrice,
- AddPricePriceNewPlanTieredWithMinimumPrice,
- AddPricePriceNewPlanUnitWithPercentPrice,
- AddPricePriceNewPlanPackageWithAllocationPrice,
- AddPricePriceNewPlanTierWithProrationPrice,
- AddPricePriceNewPlanUnitWithProrationPrice,
- AddPricePriceNewPlanGroupedAllocationPrice,
- AddPricePriceNewPlanGroupedWithProratedMinimumPrice,
- AddPricePriceNewPlanGroupedWithMeteredMinimumPrice,
- AddPricePriceNewPlanMatrixWithDisplayNamePrice,
- AddPricePriceNewPlanBulkWithProrationPrice,
- AddPricePriceNewPlanGroupedTieredPackagePrice,
- AddPricePriceNewPlanMaxGroupTieredPackagePrice,
- AddPricePriceNewPlanScalableMatrixWithUnitPricingPrice,
- AddPricePriceNewPlanScalableMatrixWithTieredPricingPrice,
- AddPricePriceNewPlanCumulativeGroupedBulkPrice,
- AddPricePriceNewPlanTieredPackageWithMinimumPrice,
- AddPricePriceNewPlanMatrixWithAllocationPrice,
- AddPricePriceNewPlanGroupedTieredPrice,
-]
-
-
-class AddPrice(TypedDict, total=False):
- allocation_price: Optional[AddPriceAllocationPrice]
- """The allocation price to add to the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to add this price to."""
-
- price: Optional[AddPricePrice]
- """The price to add to the plan"""
-
-
-class RemoveAdjustment(TypedDict, total=False):
- adjustment_id: Required[str]
- """The id of the adjustment to remove from on the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to remove this adjustment from."""
-
-
-class RemovePrice(TypedDict, total=False):
- price_id: Required[str]
- """The id of the price to remove from the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to remove this price from."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-ReplaceAdjustmentAdjustment: TypeAlias = Union[
- ReplaceAdjustmentAdjustmentNewPercentageDiscount,
- ReplaceAdjustmentAdjustmentNewUsageDiscount,
- ReplaceAdjustmentAdjustmentNewAmountDiscount,
- ReplaceAdjustmentAdjustmentNewMinimum,
- ReplaceAdjustmentAdjustmentNewMaximum,
-]
-
-
-class ReplaceAdjustment(TypedDict, total=False):
- adjustment: Required[ReplaceAdjustmentAdjustment]
- """The definition of a new adjustment to create and add to the plan."""
-
- replaces_adjustment_id: Required[str]
- """The id of the adjustment on the plan to replace in the plan."""
-
- plan_phase_order: Optional[int]
- """The phase to replace this adjustment from."""
-
-
-class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class ReplacePriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class ReplacePricePriceNewPlanUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[ReplacePricePriceNewPlanUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[ReplacePricePriceNewPlanPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[ReplacePricePriceNewPlanMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[ReplacePricePriceNewPlanMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class ReplacePricePriceNewPlanTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[ReplacePricePriceNewPlanTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[ReplacePricePriceNewPlanTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBpsPrice(TypedDict, total=False):
- bps_config: Required[ReplacePricePriceNewPlanBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[ReplacePricePriceNewPlanBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class ReplacePricePriceNewPlanBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewPlanBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkPrice(TypedDict, total=False):
- bulk_config: Required[ReplacePricePriceNewPlanBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[ReplacePricePriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewPlanGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
+ plan_phase_order: Optional[int]
+ """The phase to replace this adjustment from."""
ReplacePricePrice: TypeAlias = Union[
- ReplacePricePriceNewPlanUnitPrice,
- ReplacePricePriceNewPlanPackagePrice,
- ReplacePricePriceNewPlanMatrixPrice,
- ReplacePricePriceNewPlanTieredPrice,
- ReplacePricePriceNewPlanTieredBpsPrice,
- ReplacePricePriceNewPlanBpsPrice,
- ReplacePricePriceNewPlanBulkBpsPrice,
- ReplacePricePriceNewPlanBulkPrice,
- ReplacePricePriceNewPlanThresholdTotalAmountPrice,
- ReplacePricePriceNewPlanTieredPackagePrice,
- ReplacePricePriceNewPlanTieredWithMinimumPrice,
- ReplacePricePriceNewPlanUnitWithPercentPrice,
- ReplacePricePriceNewPlanPackageWithAllocationPrice,
- ReplacePricePriceNewPlanTierWithProrationPrice,
- ReplacePricePriceNewPlanUnitWithProrationPrice,
- ReplacePricePriceNewPlanGroupedAllocationPrice,
- ReplacePricePriceNewPlanGroupedWithProratedMinimumPrice,
- ReplacePricePriceNewPlanGroupedWithMeteredMinimumPrice,
- ReplacePricePriceNewPlanMatrixWithDisplayNamePrice,
- ReplacePricePriceNewPlanBulkWithProrationPrice,
- ReplacePricePriceNewPlanGroupedTieredPackagePrice,
- ReplacePricePriceNewPlanMaxGroupTieredPackagePrice,
- ReplacePricePriceNewPlanScalableMatrixWithUnitPricingPrice,
- ReplacePricePriceNewPlanScalableMatrixWithTieredPricingPrice,
- ReplacePricePriceNewPlanCumulativeGroupedBulkPrice,
- ReplacePricePriceNewPlanTieredPackageWithMinimumPrice,
- ReplacePricePriceNewPlanMatrixWithAllocationPrice,
- ReplacePricePriceNewPlanGroupedTieredPrice,
+ NewPlanUnitPrice,
+ NewPlanPackagePrice,
+ NewPlanMatrixPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanGroupedTieredPrice,
]
@@ -6928,7 +207,7 @@ class ReplacePrice(TypedDict, total=False):
replaces_price_id: Required[str]
"""The id of the price on the plan to replace in the plan."""
- allocation_price: Optional[ReplacePriceAllocationPrice]
+ allocation_price: Optional[NewAllocationPrice]
"""The allocation price to add to the plan."""
plan_phase_order: Optional[int]
diff --git a/src/orb/types/customer.py b/src/orb/types/customer.py
index a47f3057..44e491f5 100644
--- a/src/orb/types/customer.py
+++ b/src/orb/types/customer.py
@@ -5,224 +5,23 @@
from typing_extensions import Literal
from .._models import BaseModel
+from .shared.address import Address
+from .shared.customer_tax_id import CustomerTaxID
+from .shared.customer_minified import CustomerMinified
__all__ = [
"Customer",
- "BillingAddress",
"Hierarchy",
- "HierarchyChild",
- "HierarchyParent",
- "ShippingAddress",
- "TaxID",
"AccountingSyncConfiguration",
"AccountingSyncConfigurationAccountingProvider",
"ReportingConfiguration",
]
-class BillingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
-class HierarchyChild(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class HierarchyParent(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
class Hierarchy(BaseModel):
- children: List[HierarchyChild]
-
- parent: Optional[HierarchyParent] = None
-
-
-class ShippingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
-class TaxID(BaseModel):
- country: Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
-
- type: Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
-
- value: str
+ children: List[CustomerMinified]
+
+ parent: Optional[CustomerMinified] = None
class AccountingSyncConfigurationAccountingProvider(BaseModel):
@@ -251,7 +50,7 @@ class Customer(BaseModel):
balance: str
"""The customer's current balance in their currency."""
- billing_address: Optional[BillingAddress] = None
+ billing_address: Optional[Address] = None
created_at: datetime
@@ -304,9 +103,9 @@ class Customer(BaseModel):
portal_url: Optional[str] = None
- shipping_address: Optional[ShippingAddress] = None
+ shipping_address: Optional[Address] = None
- tax_id: Optional[TaxID] = None
+ tax_id: Optional[CustomerTaxID] = None
"""
Tax IDs are commonly required to be displayed on customer invoices, which are
added to the headers of invoices.
diff --git a/src/orb/types/customer_create_params.py b/src/orb/types/customer_create_params.py
index a7adb132..bab20a21 100644
--- a/src/orb/types/customer_create_params.py
+++ b/src/orb/types/customer_create_params.py
@@ -2,23 +2,19 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import Dict, List, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
-__all__ = [
- "CustomerCreateParams",
- "AccountingSyncConfiguration",
- "AccountingSyncConfigurationAccountingProvider",
- "BillingAddress",
- "Hierarchy",
- "ReportingConfiguration",
- "ShippingAddress",
- "TaxConfiguration",
- "TaxConfigurationNewAvalaraTaxConfiguration",
- "TaxConfigurationNewTaxJarConfiguration",
- "TaxConfigurationNewSphereConfiguration",
- "TaxID",
-]
+from .address_input_param import AddressInputParam
+from .shared_params.customer_tax_id import CustomerTaxID
+from .new_sphere_configuration_param import NewSphereConfigurationParam
+from .customer_hierarchy_config_param import CustomerHierarchyConfigParam
+from .new_tax_jar_configuration_param import NewTaxJarConfigurationParam
+from .new_reporting_configuration_param import NewReportingConfigurationParam
+from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
+from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
+
+__all__ = ["CustomerCreateParams", "TaxConfiguration"]
class CustomerCreateParams(TypedDict, total=False):
@@ -32,7 +28,7 @@ class CustomerCreateParams(TypedDict, total=False):
name: Required[str]
"""The full name of the customer"""
- accounting_sync_configuration: Optional[AccountingSyncConfiguration]
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam]
additional_emails: Optional[List[str]]
"""Additional email addresses for this customer.
@@ -47,7 +43,7 @@ class CustomerCreateParams(TypedDict, total=False):
when a payment provider is provided on customer creation.
"""
- billing_address: Optional[BillingAddress]
+ billing_address: Optional[AddressInputParam]
currency: Optional[str]
"""An ISO 4217 currency string used for the customer's invoices and balance.
@@ -64,7 +60,7 @@ class CustomerCreateParams(TypedDict, total=False):
an existing identifier in your system.
"""
- hierarchy: Optional[Hierarchy]
+ hierarchy: Optional[CustomerHierarchyConfigParam]
"""The hierarchical relationships for this customer."""
metadata: Optional[Dict[str, Optional[str]]]
@@ -87,13 +83,13 @@ class CustomerCreateParams(TypedDict, total=False):
This is used for creating charges or invoices in the external system via Orb.
"""
- reporting_configuration: Optional[ReportingConfiguration]
+ reporting_configuration: Optional[NewReportingConfigurationParam]
- shipping_address: Optional[ShippingAddress]
+ shipping_address: Optional[AddressInputParam]
tax_configuration: Optional[TaxConfiguration]
- tax_id: Optional[TaxID]
+ tax_id: Optional[CustomerTaxID]
"""
Tax IDs are commonly required to be displayed on customer invoices, which are
added to the headers of invoices.
@@ -210,249 +206,6 @@ class CustomerCreateParams(TypedDict, total=False):
"""
-class AccountingSyncConfigurationAccountingProvider(TypedDict, total=False):
- external_provider_id: Required[str]
-
- provider_type: Required[str]
-
-
-class AccountingSyncConfiguration(TypedDict, total=False):
- accounting_providers: Optional[Iterable[AccountingSyncConfigurationAccountingProvider]]
-
- excluded: Optional[bool]
-
-
-class BillingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class Hierarchy(TypedDict, total=False):
- child_customer_ids: List[str]
- """A list of child customer IDs to add to the hierarchy.
-
- The desired child customers must not already be part of another hierarchy.
- """
-
- parent_customer_id: Optional[str]
- """The ID of the parent customer in the hierarchy.
-
- The desired parent customer must not be a child of another customer.
- """
-
-
-class ReportingConfiguration(TypedDict, total=False):
- exempt: Required[bool]
-
-
-class ShippingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class TaxConfigurationNewAvalaraTaxConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["avalara"]]
-
- tax_exemption_code: Optional[str]
-
-
-class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["taxjar"]]
-
-
-class TaxConfigurationNewSphereConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["sphere"]]
-
-
TaxConfiguration: TypeAlias = Union[
- TaxConfigurationNewAvalaraTaxConfiguration,
- TaxConfigurationNewTaxJarConfiguration,
- TaxConfigurationNewSphereConfiguration,
+ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam
]
-
-
-class TaxID(TypedDict, total=False):
- country: Required[
- Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
- ]
-
- type: Required[
- Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
- ]
-
- value: Required[str]
diff --git a/src/orb/types/customer_hierarchy_config_param.py b/src/orb/types/customer_hierarchy_config_param.py
new file mode 100644
index 00000000..4022df75
--- /dev/null
+++ b/src/orb/types/customer_hierarchy_config_param.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Optional
+from typing_extensions import TypedDict
+
+__all__ = ["CustomerHierarchyConfigParam"]
+
+
+class CustomerHierarchyConfigParam(TypedDict, total=False):
+ child_customer_ids: List[str]
+ """A list of child customer IDs to add to the hierarchy.
+
+ The desired child customers must not already be part of another hierarchy.
+ """
+
+ parent_customer_id: Optional[str]
+ """The ID of the parent customer in the hierarchy.
+
+ The desired parent customer must not be a child of another customer.
+ """
diff --git a/src/orb/types/customer_update_by_external_id_params.py b/src/orb/types/customer_update_by_external_id_params.py
index b4f795ae..6a12edd0 100644
--- a/src/orb/types/customer_update_by_external_id_params.py
+++ b/src/orb/types/customer_update_by_external_id_params.py
@@ -2,27 +2,23 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypeAlias, TypedDict
-
-__all__ = [
- "CustomerUpdateByExternalIDParams",
- "AccountingSyncConfiguration",
- "AccountingSyncConfigurationAccountingProvider",
- "BillingAddress",
- "Hierarchy",
- "ReportingConfiguration",
- "ShippingAddress",
- "TaxConfiguration",
- "TaxConfigurationNewAvalaraTaxConfiguration",
- "TaxConfigurationNewTaxJarConfiguration",
- "TaxConfigurationNewSphereConfiguration",
- "TaxID",
-]
+from typing import Dict, List, Union, Optional
+from typing_extensions import Literal, TypeAlias, TypedDict
+
+from .address_input_param import AddressInputParam
+from .shared_params.customer_tax_id import CustomerTaxID
+from .new_sphere_configuration_param import NewSphereConfigurationParam
+from .customer_hierarchy_config_param import CustomerHierarchyConfigParam
+from .new_tax_jar_configuration_param import NewTaxJarConfigurationParam
+from .new_reporting_configuration_param import NewReportingConfigurationParam
+from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
+from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
+
+__all__ = ["CustomerUpdateByExternalIDParams", "TaxConfiguration"]
class CustomerUpdateByExternalIDParams(TypedDict, total=False):
- accounting_sync_configuration: Optional[AccountingSyncConfiguration]
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam]
additional_emails: Optional[List[str]]
"""Additional email addresses for this customer.
@@ -37,7 +33,7 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
when a payment provider is provided on customer creation.
"""
- billing_address: Optional[BillingAddress]
+ billing_address: Optional[AddressInputParam]
currency: Optional[str]
"""An ISO 4217 currency string used for the customer's invoices and balance.
@@ -57,7 +53,7 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
subscriptions.
"""
- hierarchy: Optional[Hierarchy]
+ hierarchy: Optional[CustomerHierarchyConfigParam]
"""The hierarchical relationships for this customer."""
metadata: Optional[Dict[str, Optional[str]]]
@@ -87,13 +83,13 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
This is used for creating charges or invoices in the external system via Orb.
"""
- reporting_configuration: Optional[ReportingConfiguration]
+ reporting_configuration: Optional[NewReportingConfigurationParam]
- shipping_address: Optional[ShippingAddress]
+ shipping_address: Optional[AddressInputParam]
tax_configuration: Optional[TaxConfiguration]
- tax_id: Optional[TaxID]
+ tax_id: Optional[CustomerTaxID]
"""
Tax IDs are commonly required to be displayed on customer invoices, which are
added to the headers of invoices.
@@ -203,249 +199,6 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
"""
-class AccountingSyncConfigurationAccountingProvider(TypedDict, total=False):
- external_provider_id: Required[str]
-
- provider_type: Required[str]
-
-
-class AccountingSyncConfiguration(TypedDict, total=False):
- accounting_providers: Optional[Iterable[AccountingSyncConfigurationAccountingProvider]]
-
- excluded: Optional[bool]
-
-
-class BillingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class Hierarchy(TypedDict, total=False):
- child_customer_ids: List[str]
- """A list of child customer IDs to add to the hierarchy.
-
- The desired child customers must not already be part of another hierarchy.
- """
-
- parent_customer_id: Optional[str]
- """The ID of the parent customer in the hierarchy.
-
- The desired parent customer must not be a child of another customer.
- """
-
-
-class ReportingConfiguration(TypedDict, total=False):
- exempt: Required[bool]
-
-
-class ShippingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class TaxConfigurationNewAvalaraTaxConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["avalara"]]
-
- tax_exemption_code: Optional[str]
-
-
-class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["taxjar"]]
-
-
-class TaxConfigurationNewSphereConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["sphere"]]
-
-
TaxConfiguration: TypeAlias = Union[
- TaxConfigurationNewAvalaraTaxConfiguration,
- TaxConfigurationNewTaxJarConfiguration,
- TaxConfigurationNewSphereConfiguration,
+ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam
]
-
-
-class TaxID(TypedDict, total=False):
- country: Required[
- Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
- ]
-
- type: Required[
- Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
- ]
-
- value: Required[str]
diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py
index 18d0fc8f..6d041950 100644
--- a/src/orb/types/customer_update_params.py
+++ b/src/orb/types/customer_update_params.py
@@ -2,27 +2,23 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypeAlias, TypedDict
-
-__all__ = [
- "CustomerUpdateParams",
- "AccountingSyncConfiguration",
- "AccountingSyncConfigurationAccountingProvider",
- "BillingAddress",
- "Hierarchy",
- "ReportingConfiguration",
- "ShippingAddress",
- "TaxConfiguration",
- "TaxConfigurationNewAvalaraTaxConfiguration",
- "TaxConfigurationNewTaxJarConfiguration",
- "TaxConfigurationNewSphereConfiguration",
- "TaxID",
-]
+from typing import Dict, List, Union, Optional
+from typing_extensions import Literal, TypeAlias, TypedDict
+
+from .address_input_param import AddressInputParam
+from .shared_params.customer_tax_id import CustomerTaxID
+from .new_sphere_configuration_param import NewSphereConfigurationParam
+from .customer_hierarchy_config_param import CustomerHierarchyConfigParam
+from .new_tax_jar_configuration_param import NewTaxJarConfigurationParam
+from .new_reporting_configuration_param import NewReportingConfigurationParam
+from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
+from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
+
+__all__ = ["CustomerUpdateParams", "TaxConfiguration"]
class CustomerUpdateParams(TypedDict, total=False):
- accounting_sync_configuration: Optional[AccountingSyncConfiguration]
+ accounting_sync_configuration: Optional[NewAccountingSyncConfigurationParam]
additional_emails: Optional[List[str]]
"""Additional email addresses for this customer.
@@ -37,7 +33,7 @@ class CustomerUpdateParams(TypedDict, total=False):
when a payment provider is provided on customer creation.
"""
- billing_address: Optional[BillingAddress]
+ billing_address: Optional[AddressInputParam]
currency: Optional[str]
"""An ISO 4217 currency string used for the customer's invoices and balance.
@@ -57,7 +53,7 @@ class CustomerUpdateParams(TypedDict, total=False):
subscriptions.
"""
- hierarchy: Optional[Hierarchy]
+ hierarchy: Optional[CustomerHierarchyConfigParam]
"""The hierarchical relationships for this customer."""
metadata: Optional[Dict[str, Optional[str]]]
@@ -87,13 +83,13 @@ class CustomerUpdateParams(TypedDict, total=False):
This is used for creating charges or invoices in the external system via Orb.
"""
- reporting_configuration: Optional[ReportingConfiguration]
+ reporting_configuration: Optional[NewReportingConfigurationParam]
- shipping_address: Optional[ShippingAddress]
+ shipping_address: Optional[AddressInputParam]
tax_configuration: Optional[TaxConfiguration]
- tax_id: Optional[TaxID]
+ tax_id: Optional[CustomerTaxID]
"""
Tax IDs are commonly required to be displayed on customer invoices, which are
added to the headers of invoices.
@@ -203,249 +199,6 @@ class CustomerUpdateParams(TypedDict, total=False):
"""
-class AccountingSyncConfigurationAccountingProvider(TypedDict, total=False):
- external_provider_id: Required[str]
-
- provider_type: Required[str]
-
-
-class AccountingSyncConfiguration(TypedDict, total=False):
- accounting_providers: Optional[Iterable[AccountingSyncConfigurationAccountingProvider]]
-
- excluded: Optional[bool]
-
-
-class BillingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class Hierarchy(TypedDict, total=False):
- child_customer_ids: List[str]
- """A list of child customer IDs to add to the hierarchy.
-
- The desired child customers must not already be part of another hierarchy.
- """
-
- parent_customer_id: Optional[str]
- """The ID of the parent customer in the hierarchy.
-
- The desired parent customer must not be a child of another customer.
- """
-
-
-class ReportingConfiguration(TypedDict, total=False):
- exempt: Required[bool]
-
-
-class ShippingAddress(TypedDict, total=False):
- city: Optional[str]
-
- country: Optional[str]
-
- line1: Optional[str]
-
- line2: Optional[str]
-
- postal_code: Optional[str]
-
- state: Optional[str]
-
-
-class TaxConfigurationNewAvalaraTaxConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["avalara"]]
-
- tax_exemption_code: Optional[str]
-
-
-class TaxConfigurationNewTaxJarConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["taxjar"]]
-
-
-class TaxConfigurationNewSphereConfiguration(TypedDict, total=False):
- tax_exempt: Required[bool]
-
- tax_provider: Required[Literal["sphere"]]
-
-
TaxConfiguration: TypeAlias = Union[
- TaxConfigurationNewAvalaraTaxConfiguration,
- TaxConfigurationNewTaxJarConfiguration,
- TaxConfigurationNewSphereConfiguration,
+ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam
]
-
-
-class TaxID(TypedDict, total=False):
- country: Required[
- Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
- ]
-
- type: Required[
- Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
- ]
-
- value: Required[str]
diff --git a/src/orb/types/customers/balance_transaction_create_response.py b/src/orb/types/customers/balance_transaction_create_response.py
index 37b07da1..96424d1f 100644
--- a/src/orb/types/customers/balance_transaction_create_response.py
+++ b/src/orb/types/customers/balance_transaction_create_response.py
@@ -5,18 +5,10 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from ..shared.invoice_tiny import InvoiceTiny
+from ..shared.credit_note_tiny import CreditNoteTiny
-__all__ = ["BalanceTransactionCreateResponse", "CreditNote", "Invoice"]
-
-
-class CreditNote(BaseModel):
- id: str
- """The id of the Credit note"""
-
-
-class Invoice(BaseModel):
- id: str
- """The Invoice id"""
+__all__ = ["BalanceTransactionCreateResponse"]
class BalanceTransactionCreateResponse(BaseModel):
@@ -41,7 +33,7 @@ class BalanceTransactionCreateResponse(BaseModel):
created_at: datetime
"""The creation time of this transaction."""
- credit_note: Optional[CreditNote] = None
+ credit_note: Optional[CreditNoteTiny] = None
description: Optional[str] = None
"""An optional description provided for manual customer balance adjustments."""
@@ -52,7 +44,7 @@ class BalanceTransactionCreateResponse(BaseModel):
customer's currency.
"""
- invoice: Optional[Invoice] = None
+ invoice: Optional[InvoiceTiny] = None
starting_balance: str
"""
diff --git a/src/orb/types/customers/balance_transaction_list_response.py b/src/orb/types/customers/balance_transaction_list_response.py
index 4f39b39d..81cb47e1 100644
--- a/src/orb/types/customers/balance_transaction_list_response.py
+++ b/src/orb/types/customers/balance_transaction_list_response.py
@@ -5,18 +5,10 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from ..shared.invoice_tiny import InvoiceTiny
+from ..shared.credit_note_tiny import CreditNoteTiny
-__all__ = ["BalanceTransactionListResponse", "CreditNote", "Invoice"]
-
-
-class CreditNote(BaseModel):
- id: str
- """The id of the Credit note"""
-
-
-class Invoice(BaseModel):
- id: str
- """The Invoice id"""
+__all__ = ["BalanceTransactionListResponse"]
class BalanceTransactionListResponse(BaseModel):
@@ -41,7 +33,7 @@ class BalanceTransactionListResponse(BaseModel):
created_at: datetime
"""The creation time of this transaction."""
- credit_note: Optional[CreditNote] = None
+ credit_note: Optional[CreditNoteTiny] = None
description: Optional[str] = None
"""An optional description provided for manual customer balance adjustments."""
@@ -52,7 +44,7 @@ class BalanceTransactionListResponse(BaseModel):
customer's currency.
"""
- invoice: Optional[Invoice] = None
+ invoice: Optional[InvoiceTiny] = None
starting_balance: str
"""
diff --git a/src/orb/types/customers/cost_list_by_external_id_response.py b/src/orb/types/customers/cost_list_by_external_id_response.py
index ff23d144..27b8ee21 100644
--- a/src/orb/types/customers/cost_list_by_external_id_response.py
+++ b/src/orb/types/customers/cost_list_by_external_id_response.py
@@ -1,44 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from datetime import datetime
+from typing import List
-from ..price import Price
from ..._models import BaseModel
+from ..shared.aggregated_cost import AggregatedCost
-__all__ = ["CostListByExternalIDResponse", "Data", "DataPerPriceCost"]
-
-
-class DataPerPriceCost(BaseModel):
- price: Price
- """The price object"""
-
- price_id: str
- """The price the cost is associated with"""
-
- subtotal: str
- """Price's contributions for the timeframe, excluding any minimums and discounts."""
-
- total: str
- """Price's contributions for the timeframe, including minimums and discounts."""
-
- quantity: Optional[float] = None
- """The price's quantity for the timeframe"""
-
-
-class Data(BaseModel):
- per_price_costs: List[DataPerPriceCost]
-
- subtotal: str
- """Total costs for the timeframe, excluding any minimums and discounts."""
-
- timeframe_end: datetime
-
- timeframe_start: datetime
-
- total: str
- """Total costs for the timeframe, including any minimums and discounts."""
+__all__ = ["CostListByExternalIDResponse"]
class CostListByExternalIDResponse(BaseModel):
- data: List[Data]
+ data: List[AggregatedCost]
diff --git a/src/orb/types/customers/cost_list_response.py b/src/orb/types/customers/cost_list_response.py
index 48921e0f..3e424b09 100644
--- a/src/orb/types/customers/cost_list_response.py
+++ b/src/orb/types/customers/cost_list_response.py
@@ -1,44 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from datetime import datetime
+from typing import List
-from ..price import Price
from ..._models import BaseModel
+from ..shared.aggregated_cost import AggregatedCost
-__all__ = ["CostListResponse", "Data", "DataPerPriceCost"]
-
-
-class DataPerPriceCost(BaseModel):
- price: Price
- """The price object"""
-
- price_id: str
- """The price the cost is associated with"""
-
- subtotal: str
- """Price's contributions for the timeframe, excluding any minimums and discounts."""
-
- total: str
- """Price's contributions for the timeframe, including minimums and discounts."""
-
- quantity: Optional[float] = None
- """The price's quantity for the timeframe"""
-
-
-class Data(BaseModel):
- per_price_costs: List[DataPerPriceCost]
-
- subtotal: str
- """Total costs for the timeframe, excluding any minimums and discounts."""
-
- timeframe_end: datetime
-
- timeframe_start: datetime
-
- total: str
- """Total costs for the timeframe, including any minimums and discounts."""
+__all__ = ["CostListResponse"]
class CostListResponse(BaseModel):
- data: List[Data]
+ data: List[AggregatedCost]
diff --git a/src/orb/types/customers/credits/__init__.py b/src/orb/types/customers/credits/__init__.py
index 9baa17d8..d5d304d6 100644
--- a/src/orb/types/customers/credits/__init__.py
+++ b/src/orb/types/customers/credits/__init__.py
@@ -2,14 +2,23 @@
from __future__ import annotations
+from .affected_block import AffectedBlock as AffectedBlock
+from .void_ledger_entry import VoidLedgerEntry as VoidLedgerEntry
from .ledger_list_params import LedgerListParams as LedgerListParams
from .top_up_list_params import TopUpListParams as TopUpListParams
from .ledger_list_response import LedgerListResponse as LedgerListResponse
from .top_up_create_params import TopUpCreateParams as TopUpCreateParams
from .top_up_list_response import TopUpListResponse as TopUpListResponse
+from .amendment_ledger_entry import AmendmentLedgerEntry as AmendmentLedgerEntry
+from .decrement_ledger_entry import DecrementLedgerEntry as DecrementLedgerEntry
+from .increment_ledger_entry import IncrementLedgerEntry as IncrementLedgerEntry
from .top_up_create_response import TopUpCreateResponse as TopUpCreateResponse
+from .top_up_invoice_settings import TopUpInvoiceSettings as TopUpInvoiceSettings
from .ledger_create_entry_params import LedgerCreateEntryParams as LedgerCreateEntryParams
+from .void_initiated_ledger_entry import VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry
from .ledger_create_entry_response import LedgerCreateEntryResponse as LedgerCreateEntryResponse
+from .expiration_change_ledger_entry import ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry
+from .credit_block_expiry_ledger_entry import CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry
from .ledger_list_by_external_id_params import LedgerListByExternalIDParams as LedgerListByExternalIDParams
from .top_up_list_by_external_id_params import TopUpListByExternalIDParams as TopUpListByExternalIDParams
from .ledger_list_by_external_id_response import LedgerListByExternalIDResponse as LedgerListByExternalIDResponse
diff --git a/src/orb/types/customers/credits/affected_block.py b/src/orb/types/customers/credits/affected_block.py
new file mode 100644
index 00000000..0009bd21
--- /dev/null
+++ b/src/orb/types/customers/credits/affected_block.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ...._models import BaseModel
+
+__all__ = ["AffectedBlock"]
+
+
+class AffectedBlock(BaseModel):
+ id: str
+
+ expiry_date: Optional[datetime] = None
+
+ per_unit_cost_basis: Optional[str] = None
diff --git a/src/orb/types/customers/credits/amendment_ledger_entry.py b/src/orb/types/customers/credits/amendment_ledger_entry.py
new file mode 100644
index 00000000..9030f9ee
--- /dev/null
+++ b/src/orb/types/customers/credits/amendment_ledger_entry.py
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["AmendmentLedgerEntry"]
+
+
+class AmendmentLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["amendment"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ starting_balance: float
diff --git a/src/orb/types/customers/credits/credit_block_expiry_ledger_entry.py b/src/orb/types/customers/credits/credit_block_expiry_ledger_entry.py
new file mode 100644
index 00000000..f13127a1
--- /dev/null
+++ b/src/orb/types/customers/credits/credit_block_expiry_ledger_entry.py
@@ -0,0 +1,45 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["CreditBlockExpiryLedgerEntry"]
+
+
+class CreditBlockExpiryLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["credit_block_expiry"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ starting_balance: float
diff --git a/src/orb/types/customers/credits/decrement_ledger_entry.py b/src/orb/types/customers/credits/decrement_ledger_entry.py
new file mode 100644
index 00000000..9373f061
--- /dev/null
+++ b/src/orb/types/customers/credits/decrement_ledger_entry.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["DecrementLedgerEntry"]
+
+
+class DecrementLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["decrement"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ starting_balance: float
+
+ event_id: Optional[str] = None
+
+ invoice_id: Optional[str] = None
+
+ price_id: Optional[str] = None
diff --git a/src/orb/types/customers/credits/expiration_change_ledger_entry.py b/src/orb/types/customers/credits/expiration_change_ledger_entry.py
new file mode 100644
index 00000000..c1cbfa21
--- /dev/null
+++ b/src/orb/types/customers/credits/expiration_change_ledger_entry.py
@@ -0,0 +1,47 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["ExpirationChangeLedgerEntry"]
+
+
+class ExpirationChangeLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["expiration_change"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ new_block_expiry_date: Optional[datetime] = None
+
+ starting_balance: float
diff --git a/src/orb/types/customers/credits/increment_ledger_entry.py b/src/orb/types/customers/credits/increment_ledger_entry.py
new file mode 100644
index 00000000..cc57d922
--- /dev/null
+++ b/src/orb/types/customers/credits/increment_ledger_entry.py
@@ -0,0 +1,49 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.invoice import Invoice
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["IncrementLedgerEntry"]
+
+
+class IncrementLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["increment"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ starting_balance: float
+
+ created_invoices: Optional[List[Invoice]] = None
+ """If the increment resulted in invoice creation, the list of created invoices"""
diff --git a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py
index 0449dc73..ff4f381f 100644
--- a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py
+++ b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_response.py
@@ -1,395 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing import Union
+from typing_extensions import Annotated, TypeAlias
from ...._utils import PropertyInfo
-from ...invoice import Invoice
-from ...._models import BaseModel
-
-__all__ = [
- "LedgerCreateEntryByExternalIDResponse",
- "IncrementLedgerEntry",
- "IncrementLedgerEntryCreditBlock",
- "IncrementLedgerEntryCustomer",
- "DecrementLedgerEntry",
- "DecrementLedgerEntryCreditBlock",
- "DecrementLedgerEntryCustomer",
- "ExpirationChangeLedgerEntry",
- "ExpirationChangeLedgerEntryCreditBlock",
- "ExpirationChangeLedgerEntryCustomer",
- "CreditBlockExpiryLedgerEntry",
- "CreditBlockExpiryLedgerEntryCreditBlock",
- "CreditBlockExpiryLedgerEntryCustomer",
- "VoidLedgerEntry",
- "VoidLedgerEntryCreditBlock",
- "VoidLedgerEntryCustomer",
- "VoidInitiatedLedgerEntry",
- "VoidInitiatedLedgerEntryCreditBlock",
- "VoidInitiatedLedgerEntryCustomer",
- "AmendmentLedgerEntry",
- "AmendmentLedgerEntryCreditBlock",
- "AmendmentLedgerEntryCustomer",
-]
-
-
-class IncrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class IncrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class IncrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: IncrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: IncrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["increment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- created_invoices: Optional[List[Invoice]] = None
- """If the increment resulted in invoice creation, the list of created invoices"""
-
-
-class DecrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class DecrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class DecrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: DecrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: DecrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["decrement"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- event_id: Optional[str] = None
-
- invoice_id: Optional[str] = None
-
- price_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: ExpirationChangeLedgerEntryCreditBlock
-
- currency: str
-
- customer: ExpirationChangeLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["expiration_change"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: Optional[datetime] = None
-
- starting_balance: float
-
-
-class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: CreditBlockExpiryLedgerEntryCreditBlock
-
- currency: str
-
- customer: CreditBlockExpiryLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["credit_block_expiry"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
-
-class VoidLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidInitiatedLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidInitiatedLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void_initiated"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: datetime
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class AmendmentLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class AmendmentLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class AmendmentLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: AmendmentLedgerEntryCreditBlock
-
- currency: str
-
- customer: AmendmentLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["amendment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
+from .void_ledger_entry import VoidLedgerEntry
+from .amendment_ledger_entry import AmendmentLedgerEntry
+from .decrement_ledger_entry import DecrementLedgerEntry
+from .increment_ledger_entry import IncrementLedgerEntry
+from .void_initiated_ledger_entry import VoidInitiatedLedgerEntry
+from .expiration_change_ledger_entry import ExpirationChangeLedgerEntry
+from .credit_block_expiry_ledger_entry import CreditBlockExpiryLedgerEntry
+
+__all__ = ["LedgerCreateEntryByExternalIDResponse"]
LedgerCreateEntryByExternalIDResponse: TypeAlias = Annotated[
Union[
diff --git a/src/orb/types/customers/credits/ledger_create_entry_response.py b/src/orb/types/customers/credits/ledger_create_entry_response.py
index 3401e8d6..69ed1993 100644
--- a/src/orb/types/customers/credits/ledger_create_entry_response.py
+++ b/src/orb/types/customers/credits/ledger_create_entry_response.py
@@ -1,395 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing import Union
+from typing_extensions import Annotated, TypeAlias
from ...._utils import PropertyInfo
-from ...invoice import Invoice
-from ...._models import BaseModel
-
-__all__ = [
- "LedgerCreateEntryResponse",
- "IncrementLedgerEntry",
- "IncrementLedgerEntryCreditBlock",
- "IncrementLedgerEntryCustomer",
- "DecrementLedgerEntry",
- "DecrementLedgerEntryCreditBlock",
- "DecrementLedgerEntryCustomer",
- "ExpirationChangeLedgerEntry",
- "ExpirationChangeLedgerEntryCreditBlock",
- "ExpirationChangeLedgerEntryCustomer",
- "CreditBlockExpiryLedgerEntry",
- "CreditBlockExpiryLedgerEntryCreditBlock",
- "CreditBlockExpiryLedgerEntryCustomer",
- "VoidLedgerEntry",
- "VoidLedgerEntryCreditBlock",
- "VoidLedgerEntryCustomer",
- "VoidInitiatedLedgerEntry",
- "VoidInitiatedLedgerEntryCreditBlock",
- "VoidInitiatedLedgerEntryCustomer",
- "AmendmentLedgerEntry",
- "AmendmentLedgerEntryCreditBlock",
- "AmendmentLedgerEntryCustomer",
-]
-
-
-class IncrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class IncrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class IncrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: IncrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: IncrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["increment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- created_invoices: Optional[List[Invoice]] = None
- """If the increment resulted in invoice creation, the list of created invoices"""
-
-
-class DecrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class DecrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class DecrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: DecrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: DecrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["decrement"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- event_id: Optional[str] = None
-
- invoice_id: Optional[str] = None
-
- price_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: ExpirationChangeLedgerEntryCreditBlock
-
- currency: str
-
- customer: ExpirationChangeLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["expiration_change"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: Optional[datetime] = None
-
- starting_balance: float
-
-
-class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: CreditBlockExpiryLedgerEntryCreditBlock
-
- currency: str
-
- customer: CreditBlockExpiryLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["credit_block_expiry"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
-
-class VoidLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidInitiatedLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidInitiatedLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void_initiated"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: datetime
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class AmendmentLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class AmendmentLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class AmendmentLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: AmendmentLedgerEntryCreditBlock
-
- currency: str
-
- customer: AmendmentLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["amendment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
+from .void_ledger_entry import VoidLedgerEntry
+from .amendment_ledger_entry import AmendmentLedgerEntry
+from .decrement_ledger_entry import DecrementLedgerEntry
+from .increment_ledger_entry import IncrementLedgerEntry
+from .void_initiated_ledger_entry import VoidInitiatedLedgerEntry
+from .expiration_change_ledger_entry import ExpirationChangeLedgerEntry
+from .credit_block_expiry_ledger_entry import CreditBlockExpiryLedgerEntry
+
+__all__ = ["LedgerCreateEntryResponse"]
LedgerCreateEntryResponse: TypeAlias = Annotated[
Union[
diff --git a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py
index 74106ef1..dd1a6df1 100644
--- a/src/orb/types/customers/credits/ledger_list_by_external_id_response.py
+++ b/src/orb/types/customers/credits/ledger_list_by_external_id_response.py
@@ -1,395 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing import Union
+from typing_extensions import Annotated, TypeAlias
from ...._utils import PropertyInfo
-from ...invoice import Invoice
-from ...._models import BaseModel
-
-__all__ = [
- "LedgerListByExternalIDResponse",
- "IncrementLedgerEntry",
- "IncrementLedgerEntryCreditBlock",
- "IncrementLedgerEntryCustomer",
- "DecrementLedgerEntry",
- "DecrementLedgerEntryCreditBlock",
- "DecrementLedgerEntryCustomer",
- "ExpirationChangeLedgerEntry",
- "ExpirationChangeLedgerEntryCreditBlock",
- "ExpirationChangeLedgerEntryCustomer",
- "CreditBlockExpiryLedgerEntry",
- "CreditBlockExpiryLedgerEntryCreditBlock",
- "CreditBlockExpiryLedgerEntryCustomer",
- "VoidLedgerEntry",
- "VoidLedgerEntryCreditBlock",
- "VoidLedgerEntryCustomer",
- "VoidInitiatedLedgerEntry",
- "VoidInitiatedLedgerEntryCreditBlock",
- "VoidInitiatedLedgerEntryCustomer",
- "AmendmentLedgerEntry",
- "AmendmentLedgerEntryCreditBlock",
- "AmendmentLedgerEntryCustomer",
-]
-
-
-class IncrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class IncrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class IncrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: IncrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: IncrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["increment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- created_invoices: Optional[List[Invoice]] = None
- """If the increment resulted in invoice creation, the list of created invoices"""
-
-
-class DecrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class DecrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class DecrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: DecrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: DecrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["decrement"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- event_id: Optional[str] = None
-
- invoice_id: Optional[str] = None
-
- price_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: ExpirationChangeLedgerEntryCreditBlock
-
- currency: str
-
- customer: ExpirationChangeLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["expiration_change"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: Optional[datetime] = None
-
- starting_balance: float
-
-
-class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: CreditBlockExpiryLedgerEntryCreditBlock
-
- currency: str
-
- customer: CreditBlockExpiryLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["credit_block_expiry"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
-
-class VoidLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidInitiatedLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidInitiatedLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void_initiated"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: datetime
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class AmendmentLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class AmendmentLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class AmendmentLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: AmendmentLedgerEntryCreditBlock
-
- currency: str
-
- customer: AmendmentLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["amendment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
+from .void_ledger_entry import VoidLedgerEntry
+from .amendment_ledger_entry import AmendmentLedgerEntry
+from .decrement_ledger_entry import DecrementLedgerEntry
+from .increment_ledger_entry import IncrementLedgerEntry
+from .void_initiated_ledger_entry import VoidInitiatedLedgerEntry
+from .expiration_change_ledger_entry import ExpirationChangeLedgerEntry
+from .credit_block_expiry_ledger_entry import CreditBlockExpiryLedgerEntry
+
+__all__ = ["LedgerListByExternalIDResponse"]
LedgerListByExternalIDResponse: TypeAlias = Annotated[
Union[
diff --git a/src/orb/types/customers/credits/ledger_list_response.py b/src/orb/types/customers/credits/ledger_list_response.py
index 6330e620..8cc43e8b 100644
--- a/src/orb/types/customers/credits/ledger_list_response.py
+++ b/src/orb/types/customers/credits/ledger_list_response.py
@@ -1,395 +1,18 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing import Union
+from typing_extensions import Annotated, TypeAlias
from ...._utils import PropertyInfo
-from ...invoice import Invoice
-from ...._models import BaseModel
-
-__all__ = [
- "LedgerListResponse",
- "IncrementLedgerEntry",
- "IncrementLedgerEntryCreditBlock",
- "IncrementLedgerEntryCustomer",
- "DecrementLedgerEntry",
- "DecrementLedgerEntryCreditBlock",
- "DecrementLedgerEntryCustomer",
- "ExpirationChangeLedgerEntry",
- "ExpirationChangeLedgerEntryCreditBlock",
- "ExpirationChangeLedgerEntryCustomer",
- "CreditBlockExpiryLedgerEntry",
- "CreditBlockExpiryLedgerEntryCreditBlock",
- "CreditBlockExpiryLedgerEntryCustomer",
- "VoidLedgerEntry",
- "VoidLedgerEntryCreditBlock",
- "VoidLedgerEntryCustomer",
- "VoidInitiatedLedgerEntry",
- "VoidInitiatedLedgerEntryCreditBlock",
- "VoidInitiatedLedgerEntryCustomer",
- "AmendmentLedgerEntry",
- "AmendmentLedgerEntryCreditBlock",
- "AmendmentLedgerEntryCustomer",
-]
-
-
-class IncrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class IncrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class IncrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: IncrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: IncrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["increment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- created_invoices: Optional[List[Invoice]] = None
- """If the increment resulted in invoice creation, the list of created invoices"""
-
-
-class DecrementLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class DecrementLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class DecrementLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: DecrementLedgerEntryCreditBlock
-
- currency: str
-
- customer: DecrementLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["decrement"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- event_id: Optional[str] = None
-
- invoice_id: Optional[str] = None
-
- price_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class ExpirationChangeLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: ExpirationChangeLedgerEntryCreditBlock
-
- currency: str
-
- customer: ExpirationChangeLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["expiration_change"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: Optional[datetime] = None
-
- starting_balance: float
-
-
-class CreditBlockExpiryLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CreditBlockExpiryLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: CreditBlockExpiryLedgerEntryCreditBlock
-
- currency: str
-
- customer: CreditBlockExpiryLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["credit_block_expiry"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
-
-class VoidLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class VoidInitiatedLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: VoidInitiatedLedgerEntryCreditBlock
-
- currency: str
-
- customer: VoidInitiatedLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["void_initiated"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- new_block_expiry_date: datetime
-
- starting_balance: float
-
- void_amount: float
-
- void_reason: Optional[str] = None
-
-
-class AmendmentLedgerEntryCreditBlock(BaseModel):
- id: str
-
- expiry_date: Optional[datetime] = None
-
- per_unit_cost_basis: Optional[str] = None
-
-
-class AmendmentLedgerEntryCustomer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class AmendmentLedgerEntry(BaseModel):
- id: str
-
- amount: float
-
- created_at: datetime
-
- credit_block: AmendmentLedgerEntryCreditBlock
-
- currency: str
-
- customer: AmendmentLedgerEntryCustomer
-
- description: Optional[str] = None
-
- ending_balance: float
-
- entry_status: Literal["committed", "pending"]
-
- entry_type: Literal["amendment"]
-
- ledger_sequence_number: int
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- starting_balance: float
-
+from .void_ledger_entry import VoidLedgerEntry
+from .amendment_ledger_entry import AmendmentLedgerEntry
+from .decrement_ledger_entry import DecrementLedgerEntry
+from .increment_ledger_entry import IncrementLedgerEntry
+from .void_initiated_ledger_entry import VoidInitiatedLedgerEntry
+from .expiration_change_ledger_entry import ExpirationChangeLedgerEntry
+from .credit_block_expiry_ledger_entry import CreditBlockExpiryLedgerEntry
+
+__all__ = ["LedgerListResponse"]
LedgerListResponse: TypeAlias = Annotated[
Union[
diff --git a/src/orb/types/customers/credits/top_up_create_by_external_id_response.py b/src/orb/types/customers/credits/top_up_create_by_external_id_response.py
index 8ca7a0a2..dfe96773 100644
--- a/src/orb/types/customers/credits/top_up_create_by_external_id_response.py
+++ b/src/orb/types/customers/credits/top_up_create_by_external_id_response.py
@@ -4,34 +4,9 @@
from typing_extensions import Literal
from ...._models import BaseModel
+from .top_up_invoice_settings import TopUpInvoiceSettings
-__all__ = ["TopUpCreateByExternalIDResponse", "InvoiceSettings"]
-
-
-class InvoiceSettings(BaseModel):
- auto_collection: bool
- """
- Whether the credits purchase invoice should auto collect with the customer's
- saved payment method.
- """
-
- net_terms: int
- """
- The net terms determines the difference between the invoice date and the issue
- date for the invoice. If you intend the invoice to be due on issue, set this
- to 0.
- """
-
- memo: Optional[str] = None
- """An optional memo to display on the invoice."""
-
- require_successful_payment: Optional[bool] = None
- """
- When true, credit blocks created by this top-up will require that the
- corresponding invoice is paid before they are drawn down from. If any topup
- block is pending payment, further automatic top-ups will be paused until the
- invoice is paid or voided.
- """
+__all__ = ["TopUpCreateByExternalIDResponse"]
class TopUpCreateByExternalIDResponse(BaseModel):
@@ -47,7 +22,7 @@ class TopUpCreateByExternalIDResponse(BaseModel):
currency.
"""
- invoice_settings: InvoiceSettings
+ invoice_settings: TopUpInvoiceSettings
"""Settings for invoices generated by triggered top-ups."""
per_unit_cost_basis: str
diff --git a/src/orb/types/customers/credits/top_up_create_response.py b/src/orb/types/customers/credits/top_up_create_response.py
index e8070c2e..7cfee71a 100644
--- a/src/orb/types/customers/credits/top_up_create_response.py
+++ b/src/orb/types/customers/credits/top_up_create_response.py
@@ -4,34 +4,9 @@
from typing_extensions import Literal
from ...._models import BaseModel
+from .top_up_invoice_settings import TopUpInvoiceSettings
-__all__ = ["TopUpCreateResponse", "InvoiceSettings"]
-
-
-class InvoiceSettings(BaseModel):
- auto_collection: bool
- """
- Whether the credits purchase invoice should auto collect with the customer's
- saved payment method.
- """
-
- net_terms: int
- """
- The net terms determines the difference between the invoice date and the issue
- date for the invoice. If you intend the invoice to be due on issue, set this
- to 0.
- """
-
- memo: Optional[str] = None
- """An optional memo to display on the invoice."""
-
- require_successful_payment: Optional[bool] = None
- """
- When true, credit blocks created by this top-up will require that the
- corresponding invoice is paid before they are drawn down from. If any topup
- block is pending payment, further automatic top-ups will be paused until the
- invoice is paid or voided.
- """
+__all__ = ["TopUpCreateResponse"]
class TopUpCreateResponse(BaseModel):
@@ -47,7 +22,7 @@ class TopUpCreateResponse(BaseModel):
currency.
"""
- invoice_settings: InvoiceSettings
+ invoice_settings: TopUpInvoiceSettings
"""Settings for invoices generated by triggered top-ups."""
per_unit_cost_basis: str
diff --git a/src/orb/types/customers/credits/top_up_invoice_settings.py b/src/orb/types/customers/credits/top_up_invoice_settings.py
new file mode 100644
index 00000000..d6446d32
--- /dev/null
+++ b/src/orb/types/customers/credits/top_up_invoice_settings.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ...._models import BaseModel
+
+__all__ = ["TopUpInvoiceSettings"]
+
+
+class TopUpInvoiceSettings(BaseModel):
+ auto_collection: bool
+ """
+ Whether the credits purchase invoice should auto collect with the customer's
+ saved payment method.
+ """
+
+ net_terms: int
+ """
+ The net terms determines the difference between the invoice date and the issue
+ date for the invoice. If you intend the invoice to be due on issue, set this
+ to 0.
+ """
+
+ memo: Optional[str] = None
+ """An optional memo to display on the invoice."""
+
+ require_successful_payment: Optional[bool] = None
+ """
+ When true, credit blocks created by this top-up will require that the
+ corresponding invoice is paid before they are drawn down from. If any topup
+ block is pending payment, further automatic top-ups will be paused until the
+ invoice is paid or voided.
+ """
diff --git a/src/orb/types/customers/credits/top_up_list_by_external_id_response.py b/src/orb/types/customers/credits/top_up_list_by_external_id_response.py
index 87785d30..4628cd40 100644
--- a/src/orb/types/customers/credits/top_up_list_by_external_id_response.py
+++ b/src/orb/types/customers/credits/top_up_list_by_external_id_response.py
@@ -4,34 +4,9 @@
from typing_extensions import Literal
from ...._models import BaseModel
+from .top_up_invoice_settings import TopUpInvoiceSettings
-__all__ = ["TopUpListByExternalIDResponse", "InvoiceSettings"]
-
-
-class InvoiceSettings(BaseModel):
- auto_collection: bool
- """
- Whether the credits purchase invoice should auto collect with the customer's
- saved payment method.
- """
-
- net_terms: int
- """
- The net terms determines the difference between the invoice date and the issue
- date for the invoice. If you intend the invoice to be due on issue, set this
- to 0.
- """
-
- memo: Optional[str] = None
- """An optional memo to display on the invoice."""
-
- require_successful_payment: Optional[bool] = None
- """
- When true, credit blocks created by this top-up will require that the
- corresponding invoice is paid before they are drawn down from. If any topup
- block is pending payment, further automatic top-ups will be paused until the
- invoice is paid or voided.
- """
+__all__ = ["TopUpListByExternalIDResponse"]
class TopUpListByExternalIDResponse(BaseModel):
@@ -47,7 +22,7 @@ class TopUpListByExternalIDResponse(BaseModel):
currency.
"""
- invoice_settings: InvoiceSettings
+ invoice_settings: TopUpInvoiceSettings
"""Settings for invoices generated by triggered top-ups."""
per_unit_cost_basis: str
diff --git a/src/orb/types/customers/credits/top_up_list_response.py b/src/orb/types/customers/credits/top_up_list_response.py
index 9b698f67..9e186bb9 100644
--- a/src/orb/types/customers/credits/top_up_list_response.py
+++ b/src/orb/types/customers/credits/top_up_list_response.py
@@ -4,34 +4,9 @@
from typing_extensions import Literal
from ...._models import BaseModel
+from .top_up_invoice_settings import TopUpInvoiceSettings
-__all__ = ["TopUpListResponse", "InvoiceSettings"]
-
-
-class InvoiceSettings(BaseModel):
- auto_collection: bool
- """
- Whether the credits purchase invoice should auto collect with the customer's
- saved payment method.
- """
-
- net_terms: int
- """
- The net terms determines the difference between the invoice date and the issue
- date for the invoice. If you intend the invoice to be due on issue, set this
- to 0.
- """
-
- memo: Optional[str] = None
- """An optional memo to display on the invoice."""
-
- require_successful_payment: Optional[bool] = None
- """
- When true, credit blocks created by this top-up will require that the
- corresponding invoice is paid before they are drawn down from. If any topup
- block is pending payment, further automatic top-ups will be paused until the
- invoice is paid or voided.
- """
+__all__ = ["TopUpListResponse"]
class TopUpListResponse(BaseModel):
@@ -47,7 +22,7 @@ class TopUpListResponse(BaseModel):
currency.
"""
- invoice_settings: InvoiceSettings
+ invoice_settings: TopUpInvoiceSettings
"""Settings for invoices generated by triggered top-ups."""
per_unit_cost_basis: str
diff --git a/src/orb/types/customers/credits/void_initiated_ledger_entry.py b/src/orb/types/customers/credits/void_initiated_ledger_entry.py
new file mode 100644
index 00000000..b5db1101
--- /dev/null
+++ b/src/orb/types/customers/credits/void_initiated_ledger_entry.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["VoidInitiatedLedgerEntry"]
+
+
+class VoidInitiatedLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["void_initiated"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ new_block_expiry_date: datetime
+
+ starting_balance: float
+
+ void_amount: float
+
+ void_reason: Optional[str] = None
diff --git a/src/orb/types/customers/credits/void_ledger_entry.py b/src/orb/types/customers/credits/void_ledger_entry.py
new file mode 100644
index 00000000..6f96717b
--- /dev/null
+++ b/src/orb/types/customers/credits/void_ledger_entry.py
@@ -0,0 +1,49 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ...._models import BaseModel
+from .affected_block import AffectedBlock
+from ...shared.customer_minified import CustomerMinified
+
+__all__ = ["VoidLedgerEntry"]
+
+
+class VoidLedgerEntry(BaseModel):
+ id: str
+
+ amount: float
+
+ created_at: datetime
+
+ credit_block: AffectedBlock
+
+ currency: str
+
+ customer: CustomerMinified
+
+ description: Optional[str] = None
+
+ ending_balance: float
+
+ entry_status: Literal["committed", "pending"]
+
+ entry_type: Literal["void"]
+
+ ledger_sequence_number: int
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ starting_balance: float
+
+ void_amount: float
+
+ void_reason: Optional[str] = None
diff --git a/src/orb/types/discount_override_param.py b/src/orb/types/discount_override_param.py
new file mode 100644
index 00000000..d9aed916
--- /dev/null
+++ b/src/orb/types/discount_override_param.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["DiscountOverrideParam"]
+
+
+class DiscountOverrideParam(TypedDict, total=False):
+ discount_type: Required[Literal["percentage", "usage", "amount"]]
+
+ amount_discount: Optional[str]
+ """Only available if discount_type is `amount`."""
+
+ percentage_discount: Optional[float]
+ """Only available if discount_type is `percentage`.
+
+ This is a number between 0 and 1.
+ """
+
+ usage_discount: Optional[float]
+ """Only available if discount_type is `usage`.
+
+ Number of usage units that this discount is for
+ """
diff --git a/src/orb/types/invoice_create_params.py b/src/orb/types/invoice_create_params.py
index c8e55475..3460c8e3 100644
--- a/src/orb/types/invoice_create_params.py
+++ b/src/orb/types/invoice_create_params.py
@@ -8,8 +8,9 @@
from .._utils import PropertyInfo
from .shared_params.discount import Discount
+from .shared_params.unit_config import UnitConfig
-__all__ = ["InvoiceCreateParams", "LineItem", "LineItemUnitConfig"]
+__all__ = ["InvoiceCreateParams", "LineItem"]
class InvoiceCreateParams(TypedDict, total=False):
@@ -69,11 +70,6 @@ class InvoiceCreateParams(TypedDict, total=False):
"""
-class LineItemUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
class LineItem(TypedDict, total=False):
end_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
"""A date string to specify the line item's end date in the customer's timezone."""
@@ -91,4 +87,4 @@ class LineItem(TypedDict, total=False):
start_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
"""A date string to specify the line item's start date in the customer's timezone."""
- unit_config: Required[LineItemUnitConfig]
+ unit_config: Required[UnitConfig]
diff --git a/src/orb/types/invoice_fetch_upcoming_response.py b/src/orb/types/invoice_fetch_upcoming_response.py
index d2b4fa6a..80871dcd 100644
--- a/src/orb/types/invoice_fetch_upcoming_response.py
+++ b/src/orb/types/invoice_fetch_upcoming_response.py
@@ -4,55 +4,38 @@
from datetime import datetime
from typing_extensions import Literal, Annotated, TypeAlias
-from .price import Price
from .._utils import PropertyInfo
from .._models import BaseModel
+from .shared.price import Price
+from .shared.address import Address
+from .shared.maximum import Maximum
+from .shared.minimum import Minimum
from .shared.discount import Discount
+from .shared.tax_amount import TaxAmount
+from .shared.invoice_tiny import InvoiceTiny
+from .shared.customer_tax_id import CustomerTaxID
+from .shared.credit_note_tiny import CreditNoteTiny
+from .shared.customer_minified import CustomerMinified
+from .shared.tier_sub_line_item import TierSubLineItem
+from .shared.other_sub_line_item import OtherSubLineItem
+from .shared.matrix_sub_line_item import MatrixSubLineItem
+from .shared.subscription_minified import SubscriptionMinified
from .shared.invoice_level_discount import InvoiceLevelDiscount
+from .shared.monetary_maximum_adjustment import MonetaryMaximumAdjustment
+from .shared.monetary_minimum_adjustment import MonetaryMinimumAdjustment
+from .shared.monetary_usage_discount_adjustment import MonetaryUsageDiscountAdjustment
+from .shared.monetary_amount_discount_adjustment import MonetaryAmountDiscountAdjustment
+from .shared.monetary_percentage_discount_adjustment import MonetaryPercentageDiscountAdjustment
__all__ = [
"InvoiceFetchUpcomingResponse",
"AutoCollection",
- "BillingAddress",
"CreditNote",
- "Customer",
"CustomerBalanceTransaction",
- "CustomerBalanceTransactionCreditNote",
- "CustomerBalanceTransactionInvoice",
- "CustomerTaxID",
"LineItem",
"LineItemAdjustment",
- "LineItemAdjustmentMonetaryUsageDiscountAdjustment",
- "LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryAmountDiscountAdjustment",
- "LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryPercentageDiscountAdjustment",
- "LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryMinimumAdjustment",
- "LineItemAdjustmentMonetaryMinimumAdjustmentFilter",
- "LineItemAdjustmentMonetaryMaximumAdjustment",
- "LineItemAdjustmentMonetaryMaximumAdjustmentFilter",
- "LineItemMaximum",
- "LineItemMaximumFilter",
- "LineItemMinimum",
- "LineItemMinimumFilter",
"LineItemSubLineItem",
- "LineItemSubLineItemMatrixSubLineItem",
- "LineItemSubLineItemMatrixSubLineItemGrouping",
- "LineItemSubLineItemMatrixSubLineItemMatrixConfig",
- "LineItemSubLineItemTierSubLineItem",
- "LineItemSubLineItemTierSubLineItemGrouping",
- "LineItemSubLineItemTierSubLineItemTierConfig",
- "LineItemSubLineItemOtherSubLineItem",
- "LineItemSubLineItemOtherSubLineItemGrouping",
- "LineItemTaxAmount",
- "Maximum",
- "MaximumFilter",
- "Minimum",
- "MinimumFilter",
"PaymentAttempt",
- "ShippingAddress",
- "Subscription",
]
@@ -81,20 +64,6 @@ class AutoCollection(BaseModel):
"""
-class BillingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
class CreditNote(BaseModel):
id: str
@@ -116,22 +85,6 @@ class CreditNote(BaseModel):
"""
-class Customer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CustomerBalanceTransactionCreditNote(BaseModel):
- id: str
- """The id of the Credit note"""
-
-
-class CustomerBalanceTransactionInvoice(BaseModel):
- id: str
- """The Invoice id"""
-
-
class CustomerBalanceTransaction(BaseModel):
id: str
"""A unique id for this transaction."""
@@ -154,7 +107,7 @@ class CustomerBalanceTransaction(BaseModel):
created_at: datetime
"""The creation time of this transaction."""
- credit_note: Optional[CustomerBalanceTransactionCreditNote] = None
+ credit_note: Optional[CreditNoteTiny] = None
description: Optional[str] = None
"""An optional description provided for manual customer balance adjustments."""
@@ -165,7 +118,7 @@ class CustomerBalanceTransaction(BaseModel):
customer's currency.
"""
- invoice: Optional[CustomerBalanceTransactionInvoice] = None
+ invoice: Optional[InvoiceTiny] = None
starting_balance: str
"""
@@ -176,531 +129,22 @@ class CustomerBalanceTransaction(BaseModel):
type: Literal["increment", "decrement"]
-class CustomerTaxID(BaseModel):
- country: Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
-
- type: Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
-
- value: str
-
-
-class LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
LineItemAdjustment: TypeAlias = Annotated[
Union[
- LineItemAdjustmentMonetaryUsageDiscountAdjustment,
- LineItemAdjustmentMonetaryAmountDiscountAdjustment,
- LineItemAdjustmentMonetaryPercentageDiscountAdjustment,
- LineItemAdjustmentMonetaryMinimumAdjustment,
- LineItemAdjustmentMonetaryMaximumAdjustment,
+ MonetaryUsageDiscountAdjustment,
+ MonetaryAmountDiscountAdjustment,
+ MonetaryPercentageDiscountAdjustment,
+ MonetaryMinimumAdjustment,
+ MonetaryMaximumAdjustment,
],
PropertyInfo(discriminator="adjustment_type"),
]
-
-class LineItemMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[LineItemMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class LineItemMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[LineItemMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class LineItemSubLineItemMatrixSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemMatrixSubLineItemMatrixConfig(BaseModel):
- dimension_values: List[Optional[str]]
- """The ordered dimension values for this line item."""
-
-
-class LineItemSubLineItemMatrixSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] = None
-
- matrix_config: LineItemSubLineItemMatrixSubLineItemMatrixConfig
-
- name: str
-
- quantity: float
-
- type: Literal["matrix"]
-
-
-class LineItemSubLineItemTierSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemTierSubLineItemTierConfig(BaseModel):
- first_unit: float
-
- last_unit: Optional[float] = None
-
- unit_amount: str
-
-
-class LineItemSubLineItemTierSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- tier_config: LineItemSubLineItemTierSubLineItemTierConfig
-
- type: Literal["tier"]
-
-
-class LineItemSubLineItemOtherSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemOtherSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- type: Literal["'null'"]
-
-
LineItemSubLineItem: TypeAlias = Annotated[
- Union[
- LineItemSubLineItemMatrixSubLineItem, LineItemSubLineItemTierSubLineItem, LineItemSubLineItemOtherSubLineItem
- ],
- PropertyInfo(discriminator="type"),
+ Union[MatrixSubLineItem, TierSubLineItem, OtherSubLineItem], PropertyInfo(discriminator="type")
]
-class LineItemTaxAmount(BaseModel):
- amount: str
- """The amount of additional tax incurred by this tax rate."""
-
- tax_rate_description: str
- """The human-readable description of the applied tax rate."""
-
- tax_rate_percentage: Optional[str] = None
- """The tax rate percentage, out of 100."""
-
-
class LineItem(BaseModel):
id: str
"""A unique ID for this line item."""
@@ -742,13 +186,13 @@ class LineItem(BaseModel):
values for this particular grouping.
"""
- maximum: Optional[LineItemMaximum] = None
+ maximum: Optional[Maximum] = None
"""This field is deprecated in favor of `adjustments`."""
maximum_amount: Optional[str] = None
"""This field is deprecated in favor of `adjustments`."""
- minimum: Optional[LineItemMinimum] = None
+ minimum: Optional[Minimum] = None
"""This field is deprecated in favor of `adjustments`."""
minimum_amount: Optional[str] = None
@@ -789,7 +233,7 @@ class LineItem(BaseModel):
subtotal: str
"""The line amount before before any adjustments."""
- tax_amounts: List[LineItemTaxAmount]
+ tax_amounts: List[TaxAmount]
"""An array of tax rates and their incurred tax amounts.
Empty if no tax integration is configured.
@@ -801,56 +245,6 @@ class LineItem(BaseModel):
"""
-class MaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Maximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Minimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
class PaymentAttempt(BaseModel):
id: str
"""The ID of the payment attempt."""
@@ -871,24 +265,6 @@ class PaymentAttempt(BaseModel):
"""Whether the payment attempt succeeded."""
-class ShippingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
-class Subscription(BaseModel):
- id: str
-
-
class InvoiceFetchUpcomingResponse(BaseModel):
id: str
@@ -900,7 +276,7 @@ class InvoiceFetchUpcomingResponse(BaseModel):
auto_collection: AutoCollection
- billing_address: Optional[BillingAddress] = None
+ billing_address: Optional[Address] = None
created_at: datetime
"""The creation time of the resource in Orb."""
@@ -911,7 +287,7 @@ class InvoiceFetchUpcomingResponse(BaseModel):
currency: str
"""An ISO 4217 currency string or `credits`"""
- customer: Customer
+ customer: CustomerMinified
customer_balance_transactions: List[CustomerBalanceTransaction]
@@ -1129,11 +505,11 @@ class InvoiceFetchUpcomingResponse(BaseModel):
scheduled to be issued.
"""
- shipping_address: Optional[ShippingAddress] = None
+ shipping_address: Optional[Address] = None
status: Literal["issued", "paid", "synced", "void", "draft"]
- subscription: Optional[Subscription] = None
+ subscription: Optional[SubscriptionMinified] = None
subtotal: str
"""The total before any discounts and minimums are applied."""
diff --git a/src/orb/types/invoice_line_item_create_response.py b/src/orb/types/invoice_line_item_create_response.py
index 3523a409..194573da 100644
--- a/src/orb/types/invoice_line_item_create_response.py
+++ b/src/orb/types/invoice_line_item_create_response.py
@@ -2,407 +2,42 @@
from typing import List, Union, Optional
from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Annotated, TypeAlias
-from .price import Price
from .._utils import PropertyInfo
from .._models import BaseModel
+from .shared.price import Price
+from .shared.maximum import Maximum
+from .shared.minimum import Minimum
from .shared.discount import Discount
-
-__all__ = [
- "InvoiceLineItemCreateResponse",
- "Adjustment",
- "AdjustmentMonetaryUsageDiscountAdjustment",
- "AdjustmentMonetaryUsageDiscountAdjustmentFilter",
- "AdjustmentMonetaryAmountDiscountAdjustment",
- "AdjustmentMonetaryAmountDiscountAdjustmentFilter",
- "AdjustmentMonetaryPercentageDiscountAdjustment",
- "AdjustmentMonetaryPercentageDiscountAdjustmentFilter",
- "AdjustmentMonetaryMinimumAdjustment",
- "AdjustmentMonetaryMinimumAdjustmentFilter",
- "AdjustmentMonetaryMaximumAdjustment",
- "AdjustmentMonetaryMaximumAdjustmentFilter",
- "Maximum",
- "MaximumFilter",
- "Minimum",
- "MinimumFilter",
- "SubLineItem",
- "SubLineItemMatrixSubLineItem",
- "SubLineItemMatrixSubLineItemGrouping",
- "SubLineItemMatrixSubLineItemMatrixConfig",
- "SubLineItemTierSubLineItem",
- "SubLineItemTierSubLineItemGrouping",
- "SubLineItemTierSubLineItemTierConfig",
- "SubLineItemOtherSubLineItem",
- "SubLineItemOtherSubLineItemGrouping",
- "TaxAmount",
-]
-
-
-class AdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentMonetaryUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentMonetaryUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentMonetaryAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentMonetaryAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentMonetaryPercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentMonetaryPercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentMonetaryMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentMonetaryMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentMonetaryMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentMonetaryMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentMonetaryMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentMonetaryMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
+from .shared.tax_amount import TaxAmount
+from .shared.tier_sub_line_item import TierSubLineItem
+from .shared.other_sub_line_item import OtherSubLineItem
+from .shared.matrix_sub_line_item import MatrixSubLineItem
+from .shared.monetary_maximum_adjustment import MonetaryMaximumAdjustment
+from .shared.monetary_minimum_adjustment import MonetaryMinimumAdjustment
+from .shared.monetary_usage_discount_adjustment import MonetaryUsageDiscountAdjustment
+from .shared.monetary_amount_discount_adjustment import MonetaryAmountDiscountAdjustment
+from .shared.monetary_percentage_discount_adjustment import MonetaryPercentageDiscountAdjustment
+
+__all__ = ["InvoiceLineItemCreateResponse", "Adjustment", "SubLineItem"]
Adjustment: TypeAlias = Annotated[
Union[
- AdjustmentMonetaryUsageDiscountAdjustment,
- AdjustmentMonetaryAmountDiscountAdjustment,
- AdjustmentMonetaryPercentageDiscountAdjustment,
- AdjustmentMonetaryMinimumAdjustment,
- AdjustmentMonetaryMaximumAdjustment,
+ MonetaryUsageDiscountAdjustment,
+ MonetaryAmountDiscountAdjustment,
+ MonetaryPercentageDiscountAdjustment,
+ MonetaryMinimumAdjustment,
+ MonetaryMaximumAdjustment,
],
PropertyInfo(discriminator="adjustment_type"),
]
-
-class MaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Maximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Minimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class SubLineItemMatrixSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class SubLineItemMatrixSubLineItemMatrixConfig(BaseModel):
- dimension_values: List[Optional[str]]
- """The ordered dimension values for this line item."""
-
-
-class SubLineItemMatrixSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[SubLineItemMatrixSubLineItemGrouping] = None
-
- matrix_config: SubLineItemMatrixSubLineItemMatrixConfig
-
- name: str
-
- quantity: float
-
- type: Literal["matrix"]
-
-
-class SubLineItemTierSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class SubLineItemTierSubLineItemTierConfig(BaseModel):
- first_unit: float
-
- last_unit: Optional[float] = None
-
- unit_amount: str
-
-
-class SubLineItemTierSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[SubLineItemTierSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- tier_config: SubLineItemTierSubLineItemTierConfig
-
- type: Literal["tier"]
-
-
-class SubLineItemOtherSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class SubLineItemOtherSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[SubLineItemOtherSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- type: Literal["'null'"]
-
-
SubLineItem: TypeAlias = Annotated[
- Union[SubLineItemMatrixSubLineItem, SubLineItemTierSubLineItem, SubLineItemOtherSubLineItem],
- PropertyInfo(discriminator="type"),
+ Union[MatrixSubLineItem, TierSubLineItem, OtherSubLineItem], PropertyInfo(discriminator="type")
]
-class TaxAmount(BaseModel):
- amount: str
- """The amount of additional tax incurred by this tax rate."""
-
- tax_rate_description: str
- """The human-readable description of the applied tax rate."""
-
- tax_rate_percentage: Optional[str] = None
- """The tax rate percentage, out of 100."""
-
-
class InvoiceLineItemCreateResponse(BaseModel):
id: str
"""A unique ID for this line item."""
diff --git a/src/orb/types/mutated_subscription.py b/src/orb/types/mutated_subscription.py
new file mode 100644
index 00000000..cdfae9ac
--- /dev/null
+++ b/src/orb/types/mutated_subscription.py
@@ -0,0 +1,172 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Union, Optional
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from .plan import Plan
+from .._utils import PropertyInfo
+from .._models import BaseModel
+from .customer import Customer
+from .shared.price_interval import PriceInterval
+from .shared.maximum_interval import MaximumInterval
+from .shared.minimum_interval import MinimumInterval
+from .shared.coupon_redemption import CouponRedemption
+from .shared.adjustment_interval import AdjustmentInterval
+from .shared.subscription_trial_info import SubscriptionTrialInfo
+from .shared.usage_discount_interval import UsageDiscountInterval
+from .shared.amount_discount_interval import AmountDiscountInterval
+from .shared.percentage_discount_interval import PercentageDiscountInterval
+from .shared.subscription_change_minified import SubscriptionChangeMinified
+from .shared.changed_subscription_resources import ChangedSubscriptionResources
+from .shared.fixed_fee_quantity_schedule_entry import FixedFeeQuantityScheduleEntry
+from .shared.billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration
+
+__all__ = ["MutatedSubscription", "DiscountInterval"]
+
+DiscountInterval: TypeAlias = Annotated[
+ Union[AmountDiscountInterval, PercentageDiscountInterval, UsageDiscountInterval],
+ PropertyInfo(discriminator="discount_type"),
+]
+
+
+class MutatedSubscription(BaseModel):
+ id: str
+
+ active_plan_phase_order: Optional[int] = None
+ """
+ The current plan phase that is active, only if the subscription's plan has
+ phases.
+ """
+
+ adjustment_intervals: List[AdjustmentInterval]
+ """
+ The adjustment intervals for this subscription sorted by the start_date of the
+ adjustment interval.
+ """
+
+ auto_collection: Optional[bool] = None
+ """
+ Determines whether issued invoices for this subscription will automatically be
+ charged with the saved payment method on the due date. This property defaults to
+ the plan's behavior. If null, defaults to the customer's setting.
+ """
+
+ billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
+
+ billing_cycle_day: int
+ """The day of the month on which the billing cycle is anchored.
+
+ If the maximum number of days in a month is greater than this value, the last
+ day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
+ means the billing period begins on the 30th.
+ """
+
+ created_at: datetime
+
+ current_billing_period_end_date: Optional[datetime] = None
+ """The end of the current billing period.
+
+ This is an exclusive timestamp, such that the instant returned is not part of
+ the billing period. Set to null for subscriptions that are not currently active.
+ """
+
+ current_billing_period_start_date: Optional[datetime] = None
+ """The start date of the current billing period.
+
+ This is an inclusive timestamp; the instant returned is exactly the beginning of
+ the billing period. Set to null if the subscription is not currently active.
+ """
+
+ customer: Customer
+ """
+ A customer is a buyer of your products, and the other party to the billing
+ relationship.
+
+ In Orb, customers are assigned system generated identifiers automatically, but
+ it's often desirable to have these match existing identifiers in your system. To
+ avoid having to denormalize Orb ID information, you can pass in an
+ `external_customer_id` with your own identifier. See
+ [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
+ information about how these aliases work in Orb.
+
+ In addition to having an identifier in your system, a customer may exist in a
+ payment provider solution like Stripe. Use the `payment_provider_id` and the
+ `payment_provider` enum field to express this mapping.
+
+ A customer also has a timezone (from the standard
+ [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
+ your account's timezone. See [Timezone localization](/essentials/timezones) for
+ information on what this timezone parameter influences within Orb.
+ """
+
+ default_invoice_memo: Optional[str] = None
+ """Determines the default memo on this subscriptions' invoices.
+
+ Note that if this is not provided, it is determined by the plan configuration.
+ """
+
+ discount_intervals: List[DiscountInterval]
+ """The discount intervals for this subscription sorted by the start_date."""
+
+ end_date: Optional[datetime] = None
+ """The date Orb stops billing for this subscription."""
+
+ fixed_fee_quantity_schedule: List[FixedFeeQuantityScheduleEntry]
+
+ invoicing_threshold: Optional[str] = None
+
+ maximum_intervals: List[MaximumInterval]
+ """The maximum intervals for this subscription sorted by the start_date."""
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum_intervals: List[MinimumInterval]
+ """The minimum intervals for this subscription sorted by the start_date."""
+
+ name: str
+ """The name of the subscription."""
+
+ net_terms: int
+ """
+ Determines the difference between the invoice issue date for subscription
+ invoices as the date that they are due. A value of `0` here represents that the
+ invoice is due on issue, whereas a value of `30` represents that the customer
+ has a month to pay the invoice.
+ """
+
+ pending_subscription_change: Optional[SubscriptionChangeMinified] = None
+ """A pending subscription change if one exists on this subscription."""
+
+ plan: Optional[Plan] = None
+ """
+ The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
+ subscribed to by a customer. Plans define the billing behavior of the
+ subscription. You can see more about how to configure prices in the
+ [Price resource](/reference/price).
+ """
+
+ price_intervals: List[PriceInterval]
+ """The price intervals for this subscription."""
+
+ redeemed_coupon: Optional[CouponRedemption] = None
+
+ start_date: datetime
+ """The date Orb starts billing for this subscription."""
+
+ status: Literal["active", "ended", "upcoming"]
+
+ trial_info: SubscriptionTrialInfo
+
+ changed_resources: Optional[ChangedSubscriptionResources] = None
+ """The resources that were changed as part of this operation.
+
+ Only present when fetched through the subscription changes API or if the
+ `include_changed_resources` parameter was passed in the request.
+ """
diff --git a/src/orb/types/new_accounting_sync_configuration_param.py b/src/orb/types/new_accounting_sync_configuration_param.py
new file mode 100644
index 00000000..0804ac38
--- /dev/null
+++ b/src/orb/types/new_accounting_sync_configuration_param.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable, Optional
+from typing_extensions import TypedDict
+
+from .accounting_provider_config_param import AccountingProviderConfigParam
+
+__all__ = ["NewAccountingSyncConfigurationParam"]
+
+
+class NewAccountingSyncConfigurationParam(TypedDict, total=False):
+ accounting_providers: Optional[Iterable[AccountingProviderConfigParam]]
+
+ excluded: Optional[bool]
diff --git a/src/orb/types/new_avalara_tax_configuration_param.py b/src/orb/types/new_avalara_tax_configuration_param.py
new file mode 100644
index 00000000..63266557
--- /dev/null
+++ b/src/orb/types/new_avalara_tax_configuration_param.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["NewAvalaraTaxConfigurationParam"]
+
+
+class NewAvalaraTaxConfigurationParam(TypedDict, total=False):
+ tax_exempt: Required[bool]
+
+ tax_provider: Required[Literal["avalara"]]
+
+ tax_exemption_code: Optional[str]
diff --git a/src/orb/types/new_reporting_configuration_param.py b/src/orb/types/new_reporting_configuration_param.py
new file mode 100644
index 00000000..d78c411a
--- /dev/null
+++ b/src/orb/types/new_reporting_configuration_param.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["NewReportingConfigurationParam"]
+
+
+class NewReportingConfigurationParam(TypedDict, total=False):
+ exempt: Required[bool]
diff --git a/src/orb/types/new_sphere_configuration_param.py b/src/orb/types/new_sphere_configuration_param.py
new file mode 100644
index 00000000..87ccc88b
--- /dev/null
+++ b/src/orb/types/new_sphere_configuration_param.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["NewSphereConfigurationParam"]
+
+
+class NewSphereConfigurationParam(TypedDict, total=False):
+ tax_exempt: Required[bool]
+
+ tax_provider: Required[Literal["sphere"]]
diff --git a/src/orb/types/new_subscription_bps_price_param.py b/src/orb/types/new_subscription_bps_price_param.py
new file mode 100644
index 00000000..d4cc3e3c
--- /dev/null
+++ b/src/orb/types/new_subscription_bps_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.bps_config import BPSConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionBPSPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionBPSPriceParam(TypedDict, total=False):
+ bps_config: Required[BPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_bulk_bps_price_param.py b/src/orb/types/new_subscription_bulk_bps_price_param.py
new file mode 100644
index 00000000..f3623e87
--- /dev/null
+++ b/src/orb/types/new_subscription_bulk_bps_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.bulk_bps_config import BulkBPSConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionBulkBPSPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionBulkBPSPriceParam(TypedDict, total=False):
+ bulk_bps_config: Required[BulkBPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_bulk_price_param.py b/src/orb/types/new_subscription_bulk_price_param.py
new file mode 100644
index 00000000..a7e05cd9
--- /dev/null
+++ b/src/orb/types/new_subscription_bulk_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.bulk_config import BulkConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionBulkPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionBulkPriceParam(TypedDict, total=False):
+ bulk_config: Required[BulkConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_bulk_with_proration_price_param.py b/src/orb/types/new_subscription_bulk_with_proration_price_param.py
new file mode 100644
index 00000000..1d58b20c
--- /dev/null
+++ b/src/orb/types/new_subscription_bulk_with_proration_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionBulkWithProrationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionBulkWithProrationPriceParam(TypedDict, total=False):
+ bulk_with_proration_config: Required[Dict[str, object]]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_cumulative_grouped_bulk_price_param.py b/src/orb/types/new_subscription_cumulative_grouped_bulk_price_param.py
new file mode 100644
index 00000000..55325a03
--- /dev/null
+++ b/src/orb/types/new_subscription_cumulative_grouped_bulk_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionCumulativeGroupedBulkPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionCumulativeGroupedBulkPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ cumulative_grouped_bulk_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["cumulative_grouped_bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_grouped_allocation_price_param.py b/src/orb/types/new_subscription_grouped_allocation_price_param.py
new file mode 100644
index 00000000..cdde4361
--- /dev/null
+++ b/src/orb/types/new_subscription_grouped_allocation_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionGroupedAllocationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionGroupedAllocationPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_allocation_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_grouped_tiered_package_price_param.py b/src/orb/types/new_subscription_grouped_tiered_package_price_param.py
new file mode 100644
index 00000000..31c9533f
--- /dev/null
+++ b/src/orb/types/new_subscription_grouped_tiered_package_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionGroupedTieredPackagePriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionGroupedTieredPackagePriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_package_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_grouped_tiered_price_param.py b/src/orb/types/new_subscription_grouped_tiered_price_param.py
new file mode 100644
index 00000000..57598cdd
--- /dev/null
+++ b/src/orb/types/new_subscription_grouped_tiered_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionGroupedTieredPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionGroupedTieredPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_grouped_with_metered_minimum_price_param.py b/src/orb/types/new_subscription_grouped_with_metered_minimum_price_param.py
new file mode 100644
index 00000000..f69e3e40
--- /dev/null
+++ b/src/orb/types/new_subscription_grouped_with_metered_minimum_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionGroupedWithMeteredMinimumPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionGroupedWithMeteredMinimumPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_with_metered_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_metered_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_grouped_with_prorated_minimum_price_param.py b/src/orb/types/new_subscription_grouped_with_prorated_minimum_price_param.py
new file mode 100644
index 00000000..314a21c2
--- /dev/null
+++ b/src/orb/types/new_subscription_grouped_with_prorated_minimum_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionGroupedWithProratedMinimumPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionGroupedWithProratedMinimumPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_with_prorated_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_prorated_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_matrix_price_param.py b/src/orb/types/new_subscription_matrix_price_param.py
new file mode 100644
index 00000000..cf708860
--- /dev/null
+++ b/src/orb/types/new_subscription_matrix_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.matrix_config import MatrixConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionMatrixPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionMatrixPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_config: Required[MatrixConfig]
+
+ model_type: Required[Literal["matrix"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_matrix_with_allocation_price_param.py b/src/orb/types/new_subscription_matrix_with_allocation_price_param.py
new file mode 100644
index 00000000..c0d81f0c
--- /dev/null
+++ b/src/orb/types/new_subscription_matrix_with_allocation_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionMatrixWithAllocationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionMatrixWithAllocationPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_allocation_config: Required[MatrixWithAllocationConfig]
+
+ model_type: Required[Literal["matrix_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_matrix_with_display_name_price_param.py b/src/orb/types/new_subscription_matrix_with_display_name_price_param.py
new file mode 100644
index 00000000..ba6156b2
--- /dev/null
+++ b/src/orb/types/new_subscription_matrix_with_display_name_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionMatrixWithDisplayNamePriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionMatrixWithDisplayNamePriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_display_name_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["matrix_with_display_name"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_max_group_tiered_package_price_param.py b/src/orb/types/new_subscription_max_group_tiered_package_price_param.py
new file mode 100644
index 00000000..c035e463
--- /dev/null
+++ b/src/orb/types/new_subscription_max_group_tiered_package_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionMaxGroupTieredPackagePriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionMaxGroupTieredPackagePriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ max_group_tiered_package_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["max_group_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_package_price_param.py b/src/orb/types/new_subscription_package_price_param.py
new file mode 100644
index 00000000..73c55ef2
--- /dev/null
+++ b/src/orb/types/new_subscription_package_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.package_config import PackageConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionPackagePriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionPackagePriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_config: Required[PackageConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_package_with_allocation_price_param.py b/src/orb/types/new_subscription_package_with_allocation_price_param.py
new file mode 100644
index 00000000..3a27d1b2
--- /dev/null
+++ b/src/orb/types/new_subscription_package_with_allocation_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionPackageWithAllocationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionPackageWithAllocationPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_with_allocation_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_scalable_matrix_with_tiered_pricing_price_param.py b/src/orb/types/new_subscription_scalable_matrix_with_tiered_pricing_price_param.py
new file mode 100644
index 00000000..e1e176cf
--- /dev/null
+++ b/src/orb/types/new_subscription_scalable_matrix_with_tiered_pricing_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionScalableMatrixWithTieredPricingPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionScalableMatrixWithTieredPricingPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py b/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py
new file mode 100644
index 00000000..b97dc6bb
--- /dev/null
+++ b/src/orb/types/new_subscription_scalable_matrix_with_unit_pricing_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionScalableMatrixWithUnitPricingPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionScalableMatrixWithUnitPricingPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_threshold_total_amount_price_param.py b/src/orb/types/new_subscription_threshold_total_amount_price_param.py
new file mode 100644
index 00000000..3f50beab
--- /dev/null
+++ b/src/orb/types/new_subscription_threshold_total_amount_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionThresholdTotalAmountPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionThresholdTotalAmountPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["threshold_total_amount"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ threshold_total_amount_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tier_with_proration_price_param.py b/src/orb/types/new_subscription_tier_with_proration_price_param.py
new file mode 100644
index 00000000..d686ac14
--- /dev/null
+++ b/src/orb/types/new_subscription_tier_with_proration_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTierWithProrationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTierWithProrationPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tiered_bps_price_param.py b/src/orb/types/new_subscription_tiered_bps_price_param.py
new file mode 100644
index 00000000..925e740d
--- /dev/null
+++ b/src/orb/types/new_subscription_tiered_bps_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.tiered_bps_config import TieredBPSConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTieredBPSPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTieredBPSPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_bps_config: Required[TieredBPSConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tiered_package_price_param.py b/src/orb/types/new_subscription_tiered_package_price_param.py
new file mode 100644
index 00000000..2e1ac7bb
--- /dev/null
+++ b/src/orb/types/new_subscription_tiered_package_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTieredPackagePriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTieredPackagePriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tiered_package_with_minimum_price_param.py b/src/orb/types/new_subscription_tiered_package_with_minimum_price_param.py
new file mode 100644
index 00000000..adf32200
--- /dev/null
+++ b/src/orb/types/new_subscription_tiered_package_with_minimum_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTieredPackageWithMinimumPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTieredPackageWithMinimumPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tiered_price_param.py b/src/orb/types/new_subscription_tiered_price_param.py
new file mode 100644
index 00000000..dc6362b8
--- /dev/null
+++ b/src/orb/types/new_subscription_tiered_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.tiered_config import TieredConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTieredPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTieredPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_config: Required[TieredConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_tiered_with_minimum_price_param.py b/src/orb/types/new_subscription_tiered_with_minimum_price_param.py
new file mode 100644
index 00000000..177ecb69
--- /dev/null
+++ b/src/orb/types/new_subscription_tiered_with_minimum_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionTieredWithMinimumPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionTieredWithMinimumPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_unit_price_param.py b/src/orb/types/new_subscription_unit_price_param.py
new file mode 100644
index 00000000..c89c05f2
--- /dev/null
+++ b/src/orb/types/new_subscription_unit_price_param.py
@@ -0,0 +1,95 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_config import UnitConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionUnitPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionUnitPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_config: Required[UnitConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_unit_with_percent_price_param.py b/src/orb/types/new_subscription_unit_with_percent_price_param.py
new file mode 100644
index 00000000..4cec16a9
--- /dev/null
+++ b/src/orb/types/new_subscription_unit_with_percent_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionUnitWithPercentPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionUnitWithPercentPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_percent"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_percent_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_subscription_unit_with_proration_price_param.py b/src/orb/types/new_subscription_unit_with_proration_price_param.py
new file mode 100644
index 00000000..587d9b96
--- /dev/null
+++ b/src/orb/types/new_subscription_unit_with_proration_price_param.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewSubscriptionUnitWithProrationPriceParam", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewSubscriptionUnitWithProrationPriceParam(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
+
+ reference_id: Optional[str]
+ """
+ A transient ID that can be used to reference this price when adding adjustments
+ in the same API call.
+ """
diff --git a/src/orb/types/new_tax_jar_configuration_param.py b/src/orb/types/new_tax_jar_configuration_param.py
new file mode 100644
index 00000000..8198161b
--- /dev/null
+++ b/src/orb/types/new_tax_jar_configuration_param.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["NewTaxJarConfigurationParam"]
+
+
+class NewTaxJarConfigurationParam(TypedDict, total=False):
+ tax_exempt: Required[bool]
+
+ tax_provider: Required[Literal["taxjar"]]
diff --git a/src/orb/types/plan.py b/src/orb/types/plan.py
index 62809a57..4dee4e7a 100644
--- a/src/orb/types/plan.py
+++ b/src/orb/types/plan.py
@@ -4,254 +4,27 @@
from datetime import datetime
from typing_extensions import Literal, Annotated, TypeAlias
-from .price import Price
from .._utils import PropertyInfo
from .._models import BaseModel
+from .shared.price import Price
+from .shared.maximum import Maximum
+from .shared.minimum import Minimum
from .shared.discount import Discount
+from .shared.plan_phase_maximum_adjustment import PlanPhaseMaximumAdjustment
+from .shared.plan_phase_minimum_adjustment import PlanPhaseMinimumAdjustment
+from .shared.plan_phase_usage_discount_adjustment import PlanPhaseUsageDiscountAdjustment
+from .shared.plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment
+from .shared.plan_phase_percentage_discount_adjustment import PlanPhasePercentageDiscountAdjustment
-__all__ = [
- "Plan",
- "Adjustment",
- "AdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BasePlan",
- "Maximum",
- "MaximumFilter",
- "Minimum",
- "MinimumFilter",
- "PlanPhase",
- "PlanPhaseMaximum",
- "PlanPhaseMaximumFilter",
- "PlanPhaseMinimum",
- "PlanPhaseMinimumFilter",
- "Product",
- "TrialConfig",
-]
-
-
-class AdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
+__all__ = ["Plan", "Adjustment", "BasePlan", "PlanPhase", "Product", "TrialConfig"]
Adjustment: TypeAlias = Annotated[
Union[
- AdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentPlanPhaseMaximumAdjustment,
+ PlanPhaseUsageDiscountAdjustment,
+ PlanPhaseAmountDiscountAdjustment,
+ PlanPhasePercentageDiscountAdjustment,
+ PlanPhaseMinimumAdjustment,
+ PlanPhaseMaximumAdjustment,
],
PropertyInfo(discriminator="adjustment_type"),
]
@@ -270,106 +43,6 @@ class BasePlan(BaseModel):
name: Optional[str] = None
-class MaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Maximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Minimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class PlanPhaseMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PlanPhaseMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[PlanPhaseMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class PlanPhaseMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PlanPhaseMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[PlanPhaseMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
class PlanPhase(BaseModel):
id: str
@@ -385,11 +58,11 @@ class PlanPhase(BaseModel):
duration_unit: Optional[Literal["daily", "monthly", "quarterly", "semi_annual", "annual"]] = None
- maximum: Optional[PlanPhaseMaximum] = None
+ maximum: Optional[Maximum] = None
maximum_amount: Optional[str] = None
- minimum: Optional[PlanPhaseMinimum] = None
+ minimum: Optional[Minimum] = None
minimum_amount: Optional[str] = None
diff --git a/src/orb/types/plan_create_params.py b/src/orb/types/plan_create_params.py
index 7964ec74..1c08ef49 100644
--- a/src/orb/types/plan_create_params.py
+++ b/src/orb/types/plan_create_params.py
@@ -2,140 +2,41 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import Dict, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
-__all__ = [
- "PlanCreateParams",
- "Price",
- "PriceNewPlanUnitPrice",
- "PriceNewPlanUnitPriceUnitConfig",
- "PriceNewPlanUnitPriceBillingCycleConfiguration",
- "PriceNewPlanUnitPriceDimensionalPriceConfiguration",
- "PriceNewPlanUnitPriceInvoicingCycleConfiguration",
- "PriceNewPlanPackagePrice",
- "PriceNewPlanPackagePricePackageConfig",
- "PriceNewPlanPackagePriceBillingCycleConfiguration",
- "PriceNewPlanPackagePriceDimensionalPriceConfiguration",
- "PriceNewPlanPackagePriceInvoicingCycleConfiguration",
- "PriceNewPlanMatrixPrice",
- "PriceNewPlanMatrixPriceMatrixConfig",
- "PriceNewPlanMatrixPriceMatrixConfigMatrixValue",
- "PriceNewPlanMatrixPriceBillingCycleConfiguration",
- "PriceNewPlanMatrixPriceDimensionalPriceConfiguration",
- "PriceNewPlanMatrixPriceInvoicingCycleConfiguration",
- "PriceNewPlanTieredPrice",
- "PriceNewPlanTieredPriceTieredConfig",
- "PriceNewPlanTieredPriceTieredConfigTier",
- "PriceNewPlanTieredPriceBillingCycleConfiguration",
- "PriceNewPlanTieredPriceDimensionalPriceConfiguration",
- "PriceNewPlanTieredPriceInvoicingCycleConfiguration",
- "PriceNewPlanTieredBpsPrice",
- "PriceNewPlanTieredBpsPriceTieredBpsConfig",
- "PriceNewPlanTieredBpsPriceTieredBpsConfigTier",
- "PriceNewPlanTieredBpsPriceBillingCycleConfiguration",
- "PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration",
- "PriceNewPlanTieredBpsPriceInvoicingCycleConfiguration",
- "PriceNewPlanBpsPrice",
- "PriceNewPlanBpsPriceBpsConfig",
- "PriceNewPlanBpsPriceBillingCycleConfiguration",
- "PriceNewPlanBpsPriceDimensionalPriceConfiguration",
- "PriceNewPlanBpsPriceInvoicingCycleConfiguration",
- "PriceNewPlanBulkBpsPrice",
- "PriceNewPlanBulkBpsPriceBulkBpsConfig",
- "PriceNewPlanBulkBpsPriceBulkBpsConfigTier",
- "PriceNewPlanBulkBpsPriceBillingCycleConfiguration",
- "PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration",
- "PriceNewPlanBulkBpsPriceInvoicingCycleConfiguration",
- "PriceNewPlanBulkPrice",
- "PriceNewPlanBulkPriceBulkConfig",
- "PriceNewPlanBulkPriceBulkConfigTier",
- "PriceNewPlanBulkPriceBillingCycleConfiguration",
- "PriceNewPlanBulkPriceDimensionalPriceConfiguration",
- "PriceNewPlanBulkPriceInvoicingCycleConfiguration",
- "PriceNewPlanThresholdTotalAmountPrice",
- "PriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration",
- "PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "PriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "PriceNewPlanTieredPackagePrice",
- "PriceNewPlanTieredPackagePriceBillingCycleConfiguration",
- "PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration",
- "PriceNewPlanTieredPackagePriceInvoicingCycleConfiguration",
- "PriceNewPlanTieredWithMinimumPrice",
- "PriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration",
- "PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration",
- "PriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration",
- "PriceNewPlanUnitWithPercentPrice",
- "PriceNewPlanUnitWithPercentPriceBillingCycleConfiguration",
- "PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration",
- "PriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration",
- "PriceNewPlanPackageWithAllocationPrice",
- "PriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration",
- "PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration",
- "PriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration",
- "PriceNewPlanTierWithProrationPrice",
- "PriceNewPlanTierWithProrationPriceBillingCycleConfiguration",
- "PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration",
- "PriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration",
- "PriceNewPlanUnitWithProrationPrice",
- "PriceNewPlanUnitWithProrationPriceBillingCycleConfiguration",
- "PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration",
- "PriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration",
- "PriceNewPlanGroupedAllocationPrice",
- "PriceNewPlanGroupedAllocationPriceBillingCycleConfiguration",
- "PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration",
- "PriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration",
- "PriceNewPlanGroupedWithProratedMinimumPrice",
- "PriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "PriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "PriceNewPlanGroupedWithMeteredMinimumPrice",
- "PriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "PriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "PriceNewPlanMatrixWithDisplayNamePrice",
- "PriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "PriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "PriceNewPlanBulkWithProrationPrice",
- "PriceNewPlanBulkWithProrationPriceBillingCycleConfiguration",
- "PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration",
- "PriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration",
- "PriceNewPlanGroupedTieredPackagePrice",
- "PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
- "PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "PriceNewPlanMaxGroupTieredPackagePrice",
- "PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "PriceNewPlanScalableMatrixWithUnitPricingPrice",
- "PriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "PriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "PriceNewPlanScalableMatrixWithTieredPricingPrice",
- "PriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "PriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "PriceNewPlanCumulativeGroupedBulkPrice",
- "PriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "PriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "PriceNewPlanTieredPackageWithMinimumPrice",
- "PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "PriceNewPlanMatrixWithAllocationPrice",
- "PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration",
- "PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "PriceNewPlanGroupedTieredPrice",
- "PriceNewPlanGroupedTieredPriceBillingCycleConfiguration",
- "PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration",
- "PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration",
-]
+from .shared_params.new_plan_bps_price import NewPlanBPSPrice
+from .shared_params.new_plan_bulk_price import NewPlanBulkPrice
+from .shared_params.new_plan_unit_price import NewPlanUnitPrice
+from .shared_params.new_plan_matrix_price import NewPlanMatrixPrice
+from .shared_params.new_plan_tiered_price import NewPlanTieredPrice
+from .shared_params.new_plan_package_price import NewPlanPackagePrice
+from .shared_params.new_plan_bulk_bps_price import NewPlanBulkBPSPrice
+from .shared_params.new_plan_tiered_bps_price import NewPlanTieredBPSPrice
+from .shared_params.new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice
+from .shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice
+from .shared_params.new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice
+from .shared_params.new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice
+from .shared_params.new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice
+from .shared_params.new_plan_tier_with_proration_price import NewPlanTierWithProrationPrice
+from .shared_params.new_plan_tiered_with_minimum_price import NewPlanTieredWithMinimumPrice
+from .shared_params.new_plan_unit_with_proration_price import NewPlanUnitWithProrationPrice
+from .shared_params.new_plan_grouped_tiered_package_price import NewPlanGroupedTieredPackagePrice
+from .shared_params.new_plan_matrix_with_allocation_price import NewPlanMatrixWithAllocationPrice
+from .shared_params.new_plan_threshold_total_amount_price import NewPlanThresholdTotalAmountPrice
+from .shared_params.new_plan_cumulative_grouped_bulk_price import NewPlanCumulativeGroupedBulkPrice
+from .shared_params.new_plan_package_with_allocation_price import NewPlanPackageWithAllocationPrice
+from .shared_params.new_plan_matrix_with_display_name_price import NewPlanMatrixWithDisplayNamePrice
+from .shared_params.new_plan_max_group_tiered_package_price import NewPlanMaxGroupTieredPackagePrice
+from .shared_params.new_plan_tiered_package_with_minimum_price import NewPlanTieredPackageWithMinimumPrice
+from .shared_params.new_plan_grouped_with_metered_minimum_price import NewPlanGroupedWithMeteredMinimumPrice
+from .shared_params.new_plan_grouped_with_prorated_minimum_price import NewPlanGroupedWithProratedMinimumPrice
+from .shared_params.new_plan_scalable_matrix_with_unit_pricing_price import NewPlanScalableMatrixWithUnitPricingPrice
+from .shared_params.new_plan_scalable_matrix_with_tiered_pricing_price import (
+ NewPlanScalableMatrixWithTieredPricingPrice,
+)
+
+__all__ = ["PlanCreateParams", "Price"]
class PlanCreateParams(TypedDict, total=False):
@@ -181,2981 +82,33 @@ class PlanCreateParams(TypedDict, total=False):
"""
-class PriceNewPlanUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class PriceNewPlanUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[PriceNewPlanUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class PriceNewPlanPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[PriceNewPlanPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class PriceNewPlanMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[PriceNewPlanMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class PriceNewPlanMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[PriceNewPlanMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class PriceNewPlanTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceNewPlanTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class PriceNewPlanTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[PriceNewPlanTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class PriceNewPlanTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceNewPlanTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class PriceNewPlanTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[PriceNewPlanTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class PriceNewPlanBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBpsPrice(TypedDict, total=False):
- bps_config: Required[PriceNewPlanBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class PriceNewPlanBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceNewPlanBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class PriceNewPlanBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[PriceNewPlanBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class PriceNewPlanBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceNewPlanBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class PriceNewPlanBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkPrice(TypedDict, total=False):
- bulk_config: Required[PriceNewPlanBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanThresholdTotalAmountPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTieredWithMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanPackageWithAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTierWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTierWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanUnitWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanGroupedAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanGroupedWithProratedMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanGroupedWithMeteredMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanMatrixWithDisplayNamePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanMatrixWithDisplayNamePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanBulkWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanGroupedTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanMaxGroupTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanScalableMatrixWithUnitPricingPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- PriceNewPlanScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanScalableMatrixWithTieredPricingPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- PriceNewPlanScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanCumulativeGroupedBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanCumulativeGroupedBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanTieredPackageWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanTieredPackageWithMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanTieredPackageWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[PriceNewPlanMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanMatrixWithAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanMatrixWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceNewPlanGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceNewPlanGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceNewPlanGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[PriceNewPlanGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceNewPlanGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
Price: TypeAlias = Union[
- PriceNewPlanUnitPrice,
- PriceNewPlanPackagePrice,
- PriceNewPlanMatrixPrice,
- PriceNewPlanTieredPrice,
- PriceNewPlanTieredBpsPrice,
- PriceNewPlanBpsPrice,
- PriceNewPlanBulkBpsPrice,
- PriceNewPlanBulkPrice,
- PriceNewPlanThresholdTotalAmountPrice,
- PriceNewPlanTieredPackagePrice,
- PriceNewPlanTieredWithMinimumPrice,
- PriceNewPlanUnitWithPercentPrice,
- PriceNewPlanPackageWithAllocationPrice,
- PriceNewPlanTierWithProrationPrice,
- PriceNewPlanUnitWithProrationPrice,
- PriceNewPlanGroupedAllocationPrice,
- PriceNewPlanGroupedWithProratedMinimumPrice,
- PriceNewPlanGroupedWithMeteredMinimumPrice,
- PriceNewPlanMatrixWithDisplayNamePrice,
- PriceNewPlanBulkWithProrationPrice,
- PriceNewPlanGroupedTieredPackagePrice,
- PriceNewPlanMaxGroupTieredPackagePrice,
- PriceNewPlanScalableMatrixWithUnitPricingPrice,
- PriceNewPlanScalableMatrixWithTieredPricingPrice,
- PriceNewPlanCumulativeGroupedBulkPrice,
- PriceNewPlanTieredPackageWithMinimumPrice,
- PriceNewPlanMatrixWithAllocationPrice,
- PriceNewPlanGroupedTieredPrice,
+ NewPlanUnitPrice,
+ NewPlanPackagePrice,
+ NewPlanMatrixPrice,
+ NewPlanTieredPrice,
+ NewPlanTieredBPSPrice,
+ NewPlanBPSPrice,
+ NewPlanBulkBPSPrice,
+ NewPlanBulkPrice,
+ NewPlanThresholdTotalAmountPrice,
+ NewPlanTieredPackagePrice,
+ NewPlanTieredWithMinimumPrice,
+ NewPlanUnitWithPercentPrice,
+ NewPlanPackageWithAllocationPrice,
+ NewPlanTierWithProrationPrice,
+ NewPlanUnitWithProrationPrice,
+ NewPlanGroupedAllocationPrice,
+ NewPlanGroupedWithProratedMinimumPrice,
+ NewPlanGroupedWithMeteredMinimumPrice,
+ NewPlanMatrixWithDisplayNamePrice,
+ NewPlanBulkWithProrationPrice,
+ NewPlanGroupedTieredPackagePrice,
+ NewPlanMaxGroupTieredPackagePrice,
+ NewPlanScalableMatrixWithUnitPricingPrice,
+ NewPlanScalableMatrixWithTieredPricingPrice,
+ NewPlanCumulativeGroupedBulkPrice,
+ NewPlanTieredPackageWithMinimumPrice,
+ NewPlanMatrixWithAllocationPrice,
+ NewPlanGroupedTieredPrice,
]
diff --git a/src/orb/types/plan_version.py b/src/orb/types/plan_version.py
index 4e4ab8ab..42e944ad 100644
--- a/src/orb/types/plan_version.py
+++ b/src/orb/types/plan_version.py
@@ -2,244 +2,27 @@
from typing import List, Union, Optional
from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Annotated, TypeAlias
-from .price import Price
from .._utils import PropertyInfo
from .._models import BaseModel
+from .shared.price import Price
from .plan_version_phase import PlanVersionPhase
+from .shared.plan_phase_maximum_adjustment import PlanPhaseMaximumAdjustment
+from .shared.plan_phase_minimum_adjustment import PlanPhaseMinimumAdjustment
+from .shared.plan_phase_usage_discount_adjustment import PlanPhaseUsageDiscountAdjustment
+from .shared.plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment
+from .shared.plan_phase_percentage_discount_adjustment import PlanPhasePercentageDiscountAdjustment
-__all__ = [
- "PlanVersion",
- "Adjustment",
- "AdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentPlanPhaseMaximumAdjustmentFilter",
-]
-
-
-class AdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
+__all__ = ["PlanVersion", "Adjustment"]
Adjustment: TypeAlias = Annotated[
Union[
- AdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentPlanPhaseMaximumAdjustment,
+ PlanPhaseUsageDiscountAdjustment,
+ PlanPhaseAmountDiscountAdjustment,
+ PlanPhasePercentageDiscountAdjustment,
+ PlanPhaseMinimumAdjustment,
+ PlanPhaseMaximumAdjustment,
],
PropertyInfo(discriminator="adjustment_type"),
]
diff --git a/src/orb/types/price.py b/src/orb/types/price.py
deleted file mode 100644
index 2282c68d..00000000
--- a/src/orb/types/price.py
+++ /dev/null
@@ -1,4689 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from pydantic import Field as FieldInfo
-
-from .._utils import PropertyInfo
-from .._models import BaseModel
-from .shared.discount import Discount
-
-__all__ = [
- "Price",
- "UnitPrice",
- "UnitPriceBillableMetric",
- "UnitPriceBillingCycleConfiguration",
- "UnitPriceCreditAllocation",
- "UnitPriceCreditAllocationCustomExpiration",
- "UnitPriceInvoicingCycleConfiguration",
- "UnitPriceItem",
- "UnitPriceMaximum",
- "UnitPriceMaximumFilter",
- "UnitPriceMinimum",
- "UnitPriceMinimumFilter",
- "UnitPriceUnitConfig",
- "UnitPriceDimensionalPriceConfiguration",
- "PackagePrice",
- "PackagePriceBillableMetric",
- "PackagePriceBillingCycleConfiguration",
- "PackagePriceCreditAllocation",
- "PackagePriceCreditAllocationCustomExpiration",
- "PackagePriceInvoicingCycleConfiguration",
- "PackagePriceItem",
- "PackagePriceMaximum",
- "PackagePriceMaximumFilter",
- "PackagePriceMinimum",
- "PackagePriceMinimumFilter",
- "PackagePricePackageConfig",
- "PackagePriceDimensionalPriceConfiguration",
- "MatrixPrice",
- "MatrixPriceBillableMetric",
- "MatrixPriceBillingCycleConfiguration",
- "MatrixPriceCreditAllocation",
- "MatrixPriceCreditAllocationCustomExpiration",
- "MatrixPriceInvoicingCycleConfiguration",
- "MatrixPriceItem",
- "MatrixPriceMatrixConfig",
- "MatrixPriceMatrixConfigMatrixValue",
- "MatrixPriceMaximum",
- "MatrixPriceMaximumFilter",
- "MatrixPriceMinimum",
- "MatrixPriceMinimumFilter",
- "MatrixPriceDimensionalPriceConfiguration",
- "TieredPrice",
- "TieredPriceBillableMetric",
- "TieredPriceBillingCycleConfiguration",
- "TieredPriceCreditAllocation",
- "TieredPriceCreditAllocationCustomExpiration",
- "TieredPriceInvoicingCycleConfiguration",
- "TieredPriceItem",
- "TieredPriceMaximum",
- "TieredPriceMaximumFilter",
- "TieredPriceMinimum",
- "TieredPriceMinimumFilter",
- "TieredPriceTieredConfig",
- "TieredPriceTieredConfigTier",
- "TieredPriceDimensionalPriceConfiguration",
- "TieredBpsPrice",
- "TieredBpsPriceBillableMetric",
- "TieredBpsPriceBillingCycleConfiguration",
- "TieredBpsPriceCreditAllocation",
- "TieredBpsPriceCreditAllocationCustomExpiration",
- "TieredBpsPriceInvoicingCycleConfiguration",
- "TieredBpsPriceItem",
- "TieredBpsPriceMaximum",
- "TieredBpsPriceMaximumFilter",
- "TieredBpsPriceMinimum",
- "TieredBpsPriceMinimumFilter",
- "TieredBpsPriceTieredBpsConfig",
- "TieredBpsPriceTieredBpsConfigTier",
- "TieredBpsPriceDimensionalPriceConfiguration",
- "BpsPrice",
- "BpsPriceBillableMetric",
- "BpsPriceBillingCycleConfiguration",
- "BpsPriceBpsConfig",
- "BpsPriceCreditAllocation",
- "BpsPriceCreditAllocationCustomExpiration",
- "BpsPriceInvoicingCycleConfiguration",
- "BpsPriceItem",
- "BpsPriceMaximum",
- "BpsPriceMaximumFilter",
- "BpsPriceMinimum",
- "BpsPriceMinimumFilter",
- "BpsPriceDimensionalPriceConfiguration",
- "BulkBpsPrice",
- "BulkBpsPriceBillableMetric",
- "BulkBpsPriceBillingCycleConfiguration",
- "BulkBpsPriceBulkBpsConfig",
- "BulkBpsPriceBulkBpsConfigTier",
- "BulkBpsPriceCreditAllocation",
- "BulkBpsPriceCreditAllocationCustomExpiration",
- "BulkBpsPriceInvoicingCycleConfiguration",
- "BulkBpsPriceItem",
- "BulkBpsPriceMaximum",
- "BulkBpsPriceMaximumFilter",
- "BulkBpsPriceMinimum",
- "BulkBpsPriceMinimumFilter",
- "BulkBpsPriceDimensionalPriceConfiguration",
- "BulkPrice",
- "BulkPriceBillableMetric",
- "BulkPriceBillingCycleConfiguration",
- "BulkPriceBulkConfig",
- "BulkPriceBulkConfigTier",
- "BulkPriceCreditAllocation",
- "BulkPriceCreditAllocationCustomExpiration",
- "BulkPriceInvoicingCycleConfiguration",
- "BulkPriceItem",
- "BulkPriceMaximum",
- "BulkPriceMaximumFilter",
- "BulkPriceMinimum",
- "BulkPriceMinimumFilter",
- "BulkPriceDimensionalPriceConfiguration",
- "ThresholdTotalAmountPrice",
- "ThresholdTotalAmountPriceBillableMetric",
- "ThresholdTotalAmountPriceBillingCycleConfiguration",
- "ThresholdTotalAmountPriceCreditAllocation",
- "ThresholdTotalAmountPriceCreditAllocationCustomExpiration",
- "ThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "ThresholdTotalAmountPriceItem",
- "ThresholdTotalAmountPriceMaximum",
- "ThresholdTotalAmountPriceMaximumFilter",
- "ThresholdTotalAmountPriceMinimum",
- "ThresholdTotalAmountPriceMinimumFilter",
- "ThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "TieredPackagePrice",
- "TieredPackagePriceBillableMetric",
- "TieredPackagePriceBillingCycleConfiguration",
- "TieredPackagePriceCreditAllocation",
- "TieredPackagePriceCreditAllocationCustomExpiration",
- "TieredPackagePriceInvoicingCycleConfiguration",
- "TieredPackagePriceItem",
- "TieredPackagePriceMaximum",
- "TieredPackagePriceMaximumFilter",
- "TieredPackagePriceMinimum",
- "TieredPackagePriceMinimumFilter",
- "TieredPackagePriceDimensionalPriceConfiguration",
- "GroupedTieredPrice",
- "GroupedTieredPriceBillableMetric",
- "GroupedTieredPriceBillingCycleConfiguration",
- "GroupedTieredPriceCreditAllocation",
- "GroupedTieredPriceCreditAllocationCustomExpiration",
- "GroupedTieredPriceInvoicingCycleConfiguration",
- "GroupedTieredPriceItem",
- "GroupedTieredPriceMaximum",
- "GroupedTieredPriceMaximumFilter",
- "GroupedTieredPriceMinimum",
- "GroupedTieredPriceMinimumFilter",
- "GroupedTieredPriceDimensionalPriceConfiguration",
- "TieredWithMinimumPrice",
- "TieredWithMinimumPriceBillableMetric",
- "TieredWithMinimumPriceBillingCycleConfiguration",
- "TieredWithMinimumPriceCreditAllocation",
- "TieredWithMinimumPriceCreditAllocationCustomExpiration",
- "TieredWithMinimumPriceInvoicingCycleConfiguration",
- "TieredWithMinimumPriceItem",
- "TieredWithMinimumPriceMaximum",
- "TieredWithMinimumPriceMaximumFilter",
- "TieredWithMinimumPriceMinimum",
- "TieredWithMinimumPriceMinimumFilter",
- "TieredWithMinimumPriceDimensionalPriceConfiguration",
- "TieredPackageWithMinimumPrice",
- "TieredPackageWithMinimumPriceBillableMetric",
- "TieredPackageWithMinimumPriceBillingCycleConfiguration",
- "TieredPackageWithMinimumPriceCreditAllocation",
- "TieredPackageWithMinimumPriceCreditAllocationCustomExpiration",
- "TieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "TieredPackageWithMinimumPriceItem",
- "TieredPackageWithMinimumPriceMaximum",
- "TieredPackageWithMinimumPriceMaximumFilter",
- "TieredPackageWithMinimumPriceMinimum",
- "TieredPackageWithMinimumPriceMinimumFilter",
- "TieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "PackageWithAllocationPrice",
- "PackageWithAllocationPriceBillableMetric",
- "PackageWithAllocationPriceBillingCycleConfiguration",
- "PackageWithAllocationPriceCreditAllocation",
- "PackageWithAllocationPriceCreditAllocationCustomExpiration",
- "PackageWithAllocationPriceInvoicingCycleConfiguration",
- "PackageWithAllocationPriceItem",
- "PackageWithAllocationPriceMaximum",
- "PackageWithAllocationPriceMaximumFilter",
- "PackageWithAllocationPriceMinimum",
- "PackageWithAllocationPriceMinimumFilter",
- "PackageWithAllocationPriceDimensionalPriceConfiguration",
- "UnitWithPercentPrice",
- "UnitWithPercentPriceBillableMetric",
- "UnitWithPercentPriceBillingCycleConfiguration",
- "UnitWithPercentPriceCreditAllocation",
- "UnitWithPercentPriceCreditAllocationCustomExpiration",
- "UnitWithPercentPriceInvoicingCycleConfiguration",
- "UnitWithPercentPriceItem",
- "UnitWithPercentPriceMaximum",
- "UnitWithPercentPriceMaximumFilter",
- "UnitWithPercentPriceMinimum",
- "UnitWithPercentPriceMinimumFilter",
- "UnitWithPercentPriceDimensionalPriceConfiguration",
- "MatrixWithAllocationPrice",
- "MatrixWithAllocationPriceBillableMetric",
- "MatrixWithAllocationPriceBillingCycleConfiguration",
- "MatrixWithAllocationPriceCreditAllocation",
- "MatrixWithAllocationPriceCreditAllocationCustomExpiration",
- "MatrixWithAllocationPriceInvoicingCycleConfiguration",
- "MatrixWithAllocationPriceItem",
- "MatrixWithAllocationPriceMatrixWithAllocationConfig",
- "MatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "MatrixWithAllocationPriceMaximum",
- "MatrixWithAllocationPriceMaximumFilter",
- "MatrixWithAllocationPriceMinimum",
- "MatrixWithAllocationPriceMinimumFilter",
- "MatrixWithAllocationPriceDimensionalPriceConfiguration",
- "TieredWithProrationPrice",
- "TieredWithProrationPriceBillableMetric",
- "TieredWithProrationPriceBillingCycleConfiguration",
- "TieredWithProrationPriceCreditAllocation",
- "TieredWithProrationPriceCreditAllocationCustomExpiration",
- "TieredWithProrationPriceInvoicingCycleConfiguration",
- "TieredWithProrationPriceItem",
- "TieredWithProrationPriceMaximum",
- "TieredWithProrationPriceMaximumFilter",
- "TieredWithProrationPriceMinimum",
- "TieredWithProrationPriceMinimumFilter",
- "TieredWithProrationPriceDimensionalPriceConfiguration",
- "UnitWithProrationPrice",
- "UnitWithProrationPriceBillableMetric",
- "UnitWithProrationPriceBillingCycleConfiguration",
- "UnitWithProrationPriceCreditAllocation",
- "UnitWithProrationPriceCreditAllocationCustomExpiration",
- "UnitWithProrationPriceInvoicingCycleConfiguration",
- "UnitWithProrationPriceItem",
- "UnitWithProrationPriceMaximum",
- "UnitWithProrationPriceMaximumFilter",
- "UnitWithProrationPriceMinimum",
- "UnitWithProrationPriceMinimumFilter",
- "UnitWithProrationPriceDimensionalPriceConfiguration",
- "GroupedAllocationPrice",
- "GroupedAllocationPriceBillableMetric",
- "GroupedAllocationPriceBillingCycleConfiguration",
- "GroupedAllocationPriceCreditAllocation",
- "GroupedAllocationPriceCreditAllocationCustomExpiration",
- "GroupedAllocationPriceInvoicingCycleConfiguration",
- "GroupedAllocationPriceItem",
- "GroupedAllocationPriceMaximum",
- "GroupedAllocationPriceMaximumFilter",
- "GroupedAllocationPriceMinimum",
- "GroupedAllocationPriceMinimumFilter",
- "GroupedAllocationPriceDimensionalPriceConfiguration",
- "GroupedWithProratedMinimumPrice",
- "GroupedWithProratedMinimumPriceBillableMetric",
- "GroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "GroupedWithProratedMinimumPriceCreditAllocation",
- "GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration",
- "GroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "GroupedWithProratedMinimumPriceItem",
- "GroupedWithProratedMinimumPriceMaximum",
- "GroupedWithProratedMinimumPriceMaximumFilter",
- "GroupedWithProratedMinimumPriceMinimum",
- "GroupedWithProratedMinimumPriceMinimumFilter",
- "GroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "GroupedWithMeteredMinimumPrice",
- "GroupedWithMeteredMinimumPriceBillableMetric",
- "GroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "GroupedWithMeteredMinimumPriceCreditAllocation",
- "GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration",
- "GroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "GroupedWithMeteredMinimumPriceItem",
- "GroupedWithMeteredMinimumPriceMaximum",
- "GroupedWithMeteredMinimumPriceMaximumFilter",
- "GroupedWithMeteredMinimumPriceMinimum",
- "GroupedWithMeteredMinimumPriceMinimumFilter",
- "GroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "MatrixWithDisplayNamePrice",
- "MatrixWithDisplayNamePriceBillableMetric",
- "MatrixWithDisplayNamePriceBillingCycleConfiguration",
- "MatrixWithDisplayNamePriceCreditAllocation",
- "MatrixWithDisplayNamePriceCreditAllocationCustomExpiration",
- "MatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "MatrixWithDisplayNamePriceItem",
- "MatrixWithDisplayNamePriceMaximum",
- "MatrixWithDisplayNamePriceMaximumFilter",
- "MatrixWithDisplayNamePriceMinimum",
- "MatrixWithDisplayNamePriceMinimumFilter",
- "MatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "BulkWithProrationPrice",
- "BulkWithProrationPriceBillableMetric",
- "BulkWithProrationPriceBillingCycleConfiguration",
- "BulkWithProrationPriceCreditAllocation",
- "BulkWithProrationPriceCreditAllocationCustomExpiration",
- "BulkWithProrationPriceInvoicingCycleConfiguration",
- "BulkWithProrationPriceItem",
- "BulkWithProrationPriceMaximum",
- "BulkWithProrationPriceMaximumFilter",
- "BulkWithProrationPriceMinimum",
- "BulkWithProrationPriceMinimumFilter",
- "BulkWithProrationPriceDimensionalPriceConfiguration",
- "GroupedTieredPackagePrice",
- "GroupedTieredPackagePriceBillableMetric",
- "GroupedTieredPackagePriceBillingCycleConfiguration",
- "GroupedTieredPackagePriceCreditAllocation",
- "GroupedTieredPackagePriceCreditAllocationCustomExpiration",
- "GroupedTieredPackagePriceInvoicingCycleConfiguration",
- "GroupedTieredPackagePriceItem",
- "GroupedTieredPackagePriceMaximum",
- "GroupedTieredPackagePriceMaximumFilter",
- "GroupedTieredPackagePriceMinimum",
- "GroupedTieredPackagePriceMinimumFilter",
- "GroupedTieredPackagePriceDimensionalPriceConfiguration",
- "MaxGroupTieredPackagePrice",
- "MaxGroupTieredPackagePriceBillableMetric",
- "MaxGroupTieredPackagePriceBillingCycleConfiguration",
- "MaxGroupTieredPackagePriceCreditAllocation",
- "MaxGroupTieredPackagePriceCreditAllocationCustomExpiration",
- "MaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "MaxGroupTieredPackagePriceItem",
- "MaxGroupTieredPackagePriceMaximum",
- "MaxGroupTieredPackagePriceMaximumFilter",
- "MaxGroupTieredPackagePriceMinimum",
- "MaxGroupTieredPackagePriceMinimumFilter",
- "MaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "ScalableMatrixWithUnitPricingPrice",
- "ScalableMatrixWithUnitPricingPriceBillableMetric",
- "ScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "ScalableMatrixWithUnitPricingPriceCreditAllocation",
- "ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration",
- "ScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "ScalableMatrixWithUnitPricingPriceItem",
- "ScalableMatrixWithUnitPricingPriceMaximum",
- "ScalableMatrixWithUnitPricingPriceMaximumFilter",
- "ScalableMatrixWithUnitPricingPriceMinimum",
- "ScalableMatrixWithUnitPricingPriceMinimumFilter",
- "ScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "ScalableMatrixWithTieredPricingPrice",
- "ScalableMatrixWithTieredPricingPriceBillableMetric",
- "ScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "ScalableMatrixWithTieredPricingPriceCreditAllocation",
- "ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration",
- "ScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "ScalableMatrixWithTieredPricingPriceItem",
- "ScalableMatrixWithTieredPricingPriceMaximum",
- "ScalableMatrixWithTieredPricingPriceMaximumFilter",
- "ScalableMatrixWithTieredPricingPriceMinimum",
- "ScalableMatrixWithTieredPricingPriceMinimumFilter",
- "ScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "CumulativeGroupedBulkPrice",
- "CumulativeGroupedBulkPriceBillableMetric",
- "CumulativeGroupedBulkPriceBillingCycleConfiguration",
- "CumulativeGroupedBulkPriceCreditAllocation",
- "CumulativeGroupedBulkPriceCreditAllocationCustomExpiration",
- "CumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "CumulativeGroupedBulkPriceItem",
- "CumulativeGroupedBulkPriceMaximum",
- "CumulativeGroupedBulkPriceMaximumFilter",
- "CumulativeGroupedBulkPriceMinimum",
- "CumulativeGroupedBulkPriceMinimumFilter",
- "CumulativeGroupedBulkPriceDimensionalPriceConfiguration",
-]
-
-
-class UnitPriceBillableMetric(BaseModel):
- id: str
-
-
-class UnitPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[UnitPriceCreditAllocationCustomExpiration] = None
-
-
-class UnitPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class UnitPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[UnitPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class UnitPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[UnitPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class UnitPriceUnitConfig(BaseModel):
- unit_amount: str
- """Rate per unit of usage"""
-
-
-class UnitPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class UnitPrice(BaseModel):
- id: str
-
- billable_metric: Optional[UnitPriceBillableMetric] = None
-
- billing_cycle_configuration: UnitPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[UnitPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[UnitPriceInvoicingCycleConfiguration] = None
-
- item: UnitPriceItem
-
- maximum: Optional[UnitPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[UnitPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["unit"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- unit_config: UnitPriceUnitConfig
-
- dimensional_price_configuration: Optional[UnitPriceDimensionalPriceConfiguration] = None
-
-
-class PackagePriceBillableMetric(BaseModel):
- id: str
-
-
-class PackagePriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackagePriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackagePriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[PackagePriceCreditAllocationCustomExpiration] = None
-
-
-class PackagePriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackagePriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class PackagePriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PackagePriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[PackagePriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class PackagePriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PackagePriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[PackagePriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class PackagePricePackageConfig(BaseModel):
- package_amount: str
- """A currency amount to rate usage by"""
-
- package_size: int
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class PackagePriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class PackagePrice(BaseModel):
- id: str
-
- billable_metric: Optional[PackagePriceBillableMetric] = None
-
- billing_cycle_configuration: PackagePriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[PackagePriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[PackagePriceInvoicingCycleConfiguration] = None
-
- item: PackagePriceItem
-
- maximum: Optional[PackagePriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[PackagePriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["package"] = FieldInfo(alias="model_type")
-
- name: str
-
- package_config: PackagePricePackageConfig
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[PackagePriceDimensionalPriceConfiguration] = None
-
-
-class MatrixPriceBillableMetric(BaseModel):
- id: str
-
-
-class MatrixPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[MatrixPriceCreditAllocationCustomExpiration] = None
-
-
-class MatrixPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class MatrixPriceMatrixConfigMatrixValue(BaseModel):
- dimension_values: List[Optional[str]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: str
- """Unit price for the specified dimension_values"""
-
-
-class MatrixPriceMatrixConfig(BaseModel):
- default_unit_amount: str
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: List[Optional[str]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: List[MatrixPriceMatrixConfigMatrixValue]
- """Matrix values for specified matrix grouping keys"""
-
-
-class MatrixPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MatrixPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MatrixPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MatrixPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class MatrixPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class MatrixPrice(BaseModel):
- id: str
-
- billable_metric: Optional[MatrixPriceBillableMetric] = None
-
- billing_cycle_configuration: MatrixPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[MatrixPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[MatrixPriceInvoicingCycleConfiguration] = None
-
- item: MatrixPriceItem
-
- matrix_config: MatrixPriceMatrixConfig
-
- maximum: Optional[MatrixPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[MatrixPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["matrix"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[MatrixPriceDimensionalPriceConfiguration] = None
-
-
-class TieredPriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredPriceCreditAllocationCustomExpiration] = None
-
-
-class TieredPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredPriceTieredConfigTier(BaseModel):
- first_unit: float
- """Exclusive tier starting value"""
-
- unit_amount: str
- """Amount per unit"""
-
- last_unit: Optional[float] = None
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class TieredPriceTieredConfig(BaseModel):
- tiers: List[TieredPriceTieredConfigTier]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class TieredPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredPrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredPriceBillableMetric] = None
-
- billing_cycle_configuration: TieredPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredPriceInvoicingCycleConfiguration] = None
-
- item: TieredPriceItem
-
- maximum: Optional[TieredPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_config: TieredPriceTieredConfig
-
- dimensional_price_configuration: Optional[TieredPriceDimensionalPriceConfiguration] = None
-
-
-class TieredBpsPriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredBpsPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredBpsPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredBpsPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredBpsPriceCreditAllocationCustomExpiration] = None
-
-
-class TieredBpsPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredBpsPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredBpsPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredBpsPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredBpsPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredBpsPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredBpsPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredBpsPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredBpsPriceTieredBpsConfigTier(BaseModel):
- bps: float
- """Per-event basis point rate"""
-
- minimum_amount: str
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str] = None
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str] = None
- """Per unit maximum to charge"""
-
-
-class TieredBpsPriceTieredBpsConfig(BaseModel):
- tiers: List[TieredBpsPriceTieredBpsConfigTier]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class TieredBpsPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredBpsPrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredBpsPriceBillableMetric] = None
-
- billing_cycle_configuration: TieredBpsPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredBpsPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredBpsPriceInvoicingCycleConfiguration] = None
-
- item: TieredBpsPriceItem
-
- maximum: Optional[TieredBpsPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredBpsPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered_bps"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_bps_config: TieredBpsPriceTieredBpsConfig
-
- dimensional_price_configuration: Optional[TieredBpsPriceDimensionalPriceConfiguration] = None
-
-
-class BpsPriceBillableMetric(BaseModel):
- id: str
-
-
-class BpsPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BpsPriceBpsConfig(BaseModel):
- bps: float
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str] = None
- """Optional currency amount maximum to cap spend per event"""
-
-
-class BpsPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BpsPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[BpsPriceCreditAllocationCustomExpiration] = None
-
-
-class BpsPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BpsPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class BpsPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BpsPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[BpsPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class BpsPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BpsPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[BpsPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class BpsPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class BpsPrice(BaseModel):
- id: str
-
- billable_metric: Optional[BpsPriceBillableMetric] = None
-
- billing_cycle_configuration: BpsPriceBillingCycleConfiguration
-
- bps_config: BpsPriceBpsConfig
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[BpsPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[BpsPriceInvoicingCycleConfiguration] = None
-
- item: BpsPriceItem
-
- maximum: Optional[BpsPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[BpsPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["bps"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[BpsPriceDimensionalPriceConfiguration] = None
-
-
-class BulkBpsPriceBillableMetric(BaseModel):
- id: str
-
-
-class BulkBpsPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkBpsPriceBulkBpsConfigTier(BaseModel):
- bps: float
- """Basis points to rate on"""
-
- maximum_amount: Optional[str] = None
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str] = None
- """The maximum amount to charge for any one event"""
-
-
-class BulkBpsPriceBulkBpsConfig(BaseModel):
- tiers: List[BulkBpsPriceBulkBpsConfigTier]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class BulkBpsPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkBpsPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[BulkBpsPriceCreditAllocationCustomExpiration] = None
-
-
-class BulkBpsPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkBpsPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class BulkBpsPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkBpsPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[BulkBpsPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class BulkBpsPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkBpsPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[BulkBpsPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class BulkBpsPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class BulkBpsPrice(BaseModel):
- id: str
-
- billable_metric: Optional[BulkBpsPriceBillableMetric] = None
-
- billing_cycle_configuration: BulkBpsPriceBillingCycleConfiguration
-
- bulk_bps_config: BulkBpsPriceBulkBpsConfig
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[BulkBpsPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[BulkBpsPriceInvoicingCycleConfiguration] = None
-
- item: BulkBpsPriceItem
-
- maximum: Optional[BulkBpsPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[BulkBpsPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["bulk_bps"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[BulkBpsPriceDimensionalPriceConfiguration] = None
-
-
-class BulkPriceBillableMetric(BaseModel):
- id: str
-
-
-class BulkPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkPriceBulkConfigTier(BaseModel):
- unit_amount: str
- """Amount per unit"""
-
- maximum_units: Optional[float] = None
- """Upper bound for this tier"""
-
-
-class BulkPriceBulkConfig(BaseModel):
- tiers: List[BulkPriceBulkConfigTier]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class BulkPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[BulkPriceCreditAllocationCustomExpiration] = None
-
-
-class BulkPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class BulkPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[BulkPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class BulkPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[BulkPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class BulkPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class BulkPrice(BaseModel):
- id: str
-
- billable_metric: Optional[BulkPriceBillableMetric] = None
-
- billing_cycle_configuration: BulkPriceBillingCycleConfiguration
-
- bulk_config: BulkPriceBulkConfig
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[BulkPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[BulkPriceInvoicingCycleConfiguration] = None
-
- item: BulkPriceItem
-
- maximum: Optional[BulkPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[BulkPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["bulk"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[BulkPriceDimensionalPriceConfiguration] = None
-
-
-class ThresholdTotalAmountPriceBillableMetric(BaseModel):
- id: str
-
-
-class ThresholdTotalAmountPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ThresholdTotalAmountPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ThresholdTotalAmountPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[ThresholdTotalAmountPriceCreditAllocationCustomExpiration] = None
-
-
-class ThresholdTotalAmountPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ThresholdTotalAmountPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class ThresholdTotalAmountPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ThresholdTotalAmountPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[ThresholdTotalAmountPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class ThresholdTotalAmountPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ThresholdTotalAmountPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[ThresholdTotalAmountPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class ThresholdTotalAmountPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class ThresholdTotalAmountPrice(BaseModel):
- id: str
-
- billable_metric: Optional[ThresholdTotalAmountPriceBillableMetric] = None
-
- billing_cycle_configuration: ThresholdTotalAmountPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[ThresholdTotalAmountPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[ThresholdTotalAmountPriceInvoicingCycleConfiguration] = None
-
- item: ThresholdTotalAmountPriceItem
-
- maximum: Optional[ThresholdTotalAmountPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[ThresholdTotalAmountPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["threshold_total_amount"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- threshold_total_amount_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[ThresholdTotalAmountPriceDimensionalPriceConfiguration] = None
-
-
-class TieredPackagePriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredPackagePriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackagePriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackagePriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredPackagePriceCreditAllocationCustomExpiration] = None
-
-
-class TieredPackagePriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackagePriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredPackagePriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPackagePriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredPackagePriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredPackagePriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPackagePriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredPackagePriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredPackagePriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredPackagePrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredPackagePriceBillableMetric] = None
-
- billing_cycle_configuration: TieredPackagePriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredPackagePriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredPackagePriceInvoicingCycleConfiguration] = None
-
- item: TieredPackagePriceItem
-
- maximum: Optional[TieredPackagePriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredPackagePriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered_package"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_package_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[TieredPackagePriceDimensionalPriceConfiguration] = None
-
-
-class GroupedTieredPriceBillableMetric(BaseModel):
- id: str
-
-
-class GroupedTieredPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[GroupedTieredPriceCreditAllocationCustomExpiration] = None
-
-
-class GroupedTieredPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class GroupedTieredPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedTieredPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[GroupedTieredPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class GroupedTieredPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedTieredPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[GroupedTieredPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class GroupedTieredPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class GroupedTieredPrice(BaseModel):
- id: str
-
- billable_metric: Optional[GroupedTieredPriceBillableMetric] = None
-
- billing_cycle_configuration: GroupedTieredPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[GroupedTieredPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- grouped_tiered_config: Dict[str, object]
-
- invoicing_cycle_configuration: Optional[GroupedTieredPriceInvoicingCycleConfiguration] = None
-
- item: GroupedTieredPriceItem
-
- maximum: Optional[GroupedTieredPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[GroupedTieredPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["grouped_tiered"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[GroupedTieredPriceDimensionalPriceConfiguration] = None
-
-
-class TieredWithMinimumPriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredWithMinimumPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithMinimumPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithMinimumPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredWithMinimumPriceCreditAllocationCustomExpiration] = None
-
-
-class TieredWithMinimumPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithMinimumPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredWithMinimumPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredWithMinimumPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredWithMinimumPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredWithMinimumPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredWithMinimumPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredWithMinimumPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredWithMinimumPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredWithMinimumPrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredWithMinimumPriceBillableMetric] = None
-
- billing_cycle_configuration: TieredWithMinimumPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredWithMinimumPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredWithMinimumPriceInvoicingCycleConfiguration] = None
-
- item: TieredWithMinimumPriceItem
-
- maximum: Optional[TieredWithMinimumPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredWithMinimumPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered_with_minimum"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_with_minimum_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[TieredWithMinimumPriceDimensionalPriceConfiguration] = None
-
-
-class TieredPackageWithMinimumPriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredPackageWithMinimumPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackageWithMinimumPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackageWithMinimumPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredPackageWithMinimumPriceCreditAllocationCustomExpiration] = None
-
-
-class TieredPackageWithMinimumPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredPackageWithMinimumPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredPackageWithMinimumPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPackageWithMinimumPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredPackageWithMinimumPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredPackageWithMinimumPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredPackageWithMinimumPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredPackageWithMinimumPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredPackageWithMinimumPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredPackageWithMinimumPrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredPackageWithMinimumPriceBillableMetric] = None
-
- billing_cycle_configuration: TieredPackageWithMinimumPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredPackageWithMinimumPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredPackageWithMinimumPriceInvoicingCycleConfiguration] = None
-
- item: TieredPackageWithMinimumPriceItem
-
- maximum: Optional[TieredPackageWithMinimumPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredPackageWithMinimumPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered_package_with_minimum"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_package_with_minimum_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[TieredPackageWithMinimumPriceDimensionalPriceConfiguration] = None
-
-
-class PackageWithAllocationPriceBillableMetric(BaseModel):
- id: str
-
-
-class PackageWithAllocationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackageWithAllocationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackageWithAllocationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[PackageWithAllocationPriceCreditAllocationCustomExpiration] = None
-
-
-class PackageWithAllocationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class PackageWithAllocationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class PackageWithAllocationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PackageWithAllocationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[PackageWithAllocationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class PackageWithAllocationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class PackageWithAllocationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[PackageWithAllocationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class PackageWithAllocationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class PackageWithAllocationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[PackageWithAllocationPriceBillableMetric] = None
-
- billing_cycle_configuration: PackageWithAllocationPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[PackageWithAllocationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[PackageWithAllocationPriceInvoicingCycleConfiguration] = None
-
- item: PackageWithAllocationPriceItem
-
- maximum: Optional[PackageWithAllocationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[PackageWithAllocationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["package_with_allocation"] = FieldInfo(alias="model_type")
-
- name: str
-
- package_with_allocation_config: Dict[str, object]
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[PackageWithAllocationPriceDimensionalPriceConfiguration] = None
-
-
-class UnitWithPercentPriceBillableMetric(BaseModel):
- id: str
-
-
-class UnitWithPercentPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithPercentPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithPercentPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[UnitWithPercentPriceCreditAllocationCustomExpiration] = None
-
-
-class UnitWithPercentPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithPercentPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class UnitWithPercentPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitWithPercentPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[UnitWithPercentPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class UnitWithPercentPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitWithPercentPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[UnitWithPercentPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class UnitWithPercentPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class UnitWithPercentPrice(BaseModel):
- id: str
-
- billable_metric: Optional[UnitWithPercentPriceBillableMetric] = None
-
- billing_cycle_configuration: UnitWithPercentPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[UnitWithPercentPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[UnitWithPercentPriceInvoicingCycleConfiguration] = None
-
- item: UnitWithPercentPriceItem
-
- maximum: Optional[UnitWithPercentPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[UnitWithPercentPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["unit_with_percent"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- unit_with_percent_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[UnitWithPercentPriceDimensionalPriceConfiguration] = None
-
-
-class MatrixWithAllocationPriceBillableMetric(BaseModel):
- id: str
-
-
-class MatrixWithAllocationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithAllocationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithAllocationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[MatrixWithAllocationPriceCreditAllocationCustomExpiration] = None
-
-
-class MatrixWithAllocationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithAllocationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class MatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(BaseModel):
- dimension_values: List[Optional[str]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: str
- """Unit price for the specified dimension_values"""
-
-
-class MatrixWithAllocationPriceMatrixWithAllocationConfig(BaseModel):
- allocation: float
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: str
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: List[Optional[str]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: List[MatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- """Matrix values for specified matrix grouping keys"""
-
-
-class MatrixWithAllocationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixWithAllocationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MatrixWithAllocationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MatrixWithAllocationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixWithAllocationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MatrixWithAllocationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class MatrixWithAllocationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class MatrixWithAllocationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[MatrixWithAllocationPriceBillableMetric] = None
-
- billing_cycle_configuration: MatrixWithAllocationPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[MatrixWithAllocationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[MatrixWithAllocationPriceInvoicingCycleConfiguration] = None
-
- item: MatrixWithAllocationPriceItem
-
- matrix_with_allocation_config: MatrixWithAllocationPriceMatrixWithAllocationConfig
-
- maximum: Optional[MatrixWithAllocationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[MatrixWithAllocationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["matrix_with_allocation"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[MatrixWithAllocationPriceDimensionalPriceConfiguration] = None
-
-
-class TieredWithProrationPriceBillableMetric(BaseModel):
- id: str
-
-
-class TieredWithProrationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithProrationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithProrationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[TieredWithProrationPriceCreditAllocationCustomExpiration] = None
-
-
-class TieredWithProrationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class TieredWithProrationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class TieredWithProrationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredWithProrationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[TieredWithProrationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class TieredWithProrationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class TieredWithProrationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[TieredWithProrationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class TieredWithProrationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class TieredWithProrationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[TieredWithProrationPriceBillableMetric] = None
-
- billing_cycle_configuration: TieredWithProrationPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[TieredWithProrationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[TieredWithProrationPriceInvoicingCycleConfiguration] = None
-
- item: TieredWithProrationPriceItem
-
- maximum: Optional[TieredWithProrationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[TieredWithProrationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["tiered_with_proration"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- tiered_with_proration_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[TieredWithProrationPriceDimensionalPriceConfiguration] = None
-
-
-class UnitWithProrationPriceBillableMetric(BaseModel):
- id: str
-
-
-class UnitWithProrationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithProrationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithProrationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[UnitWithProrationPriceCreditAllocationCustomExpiration] = None
-
-
-class UnitWithProrationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class UnitWithProrationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class UnitWithProrationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitWithProrationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[UnitWithProrationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class UnitWithProrationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class UnitWithProrationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[UnitWithProrationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class UnitWithProrationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class UnitWithProrationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[UnitWithProrationPriceBillableMetric] = None
-
- billing_cycle_configuration: UnitWithProrationPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[UnitWithProrationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[UnitWithProrationPriceInvoicingCycleConfiguration] = None
-
- item: UnitWithProrationPriceItem
-
- maximum: Optional[UnitWithProrationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[UnitWithProrationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["unit_with_proration"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- unit_with_proration_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[UnitWithProrationPriceDimensionalPriceConfiguration] = None
-
-
-class GroupedAllocationPriceBillableMetric(BaseModel):
- id: str
-
-
-class GroupedAllocationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedAllocationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedAllocationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[GroupedAllocationPriceCreditAllocationCustomExpiration] = None
-
-
-class GroupedAllocationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedAllocationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class GroupedAllocationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedAllocationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[GroupedAllocationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class GroupedAllocationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedAllocationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[GroupedAllocationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class GroupedAllocationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class GroupedAllocationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[GroupedAllocationPriceBillableMetric] = None
-
- billing_cycle_configuration: GroupedAllocationPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[GroupedAllocationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- grouped_allocation_config: Dict[str, object]
-
- invoicing_cycle_configuration: Optional[GroupedAllocationPriceInvoicingCycleConfiguration] = None
-
- item: GroupedAllocationPriceItem
-
- maximum: Optional[GroupedAllocationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[GroupedAllocationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["grouped_allocation"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[GroupedAllocationPriceDimensionalPriceConfiguration] = None
-
-
-class GroupedWithProratedMinimumPriceBillableMetric(BaseModel):
- id: str
-
-
-class GroupedWithProratedMinimumPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithProratedMinimumPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[GroupedWithProratedMinimumPriceCreditAllocationCustomExpiration] = None
-
-
-class GroupedWithProratedMinimumPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithProratedMinimumPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class GroupedWithProratedMinimumPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedWithProratedMinimumPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[GroupedWithProratedMinimumPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class GroupedWithProratedMinimumPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedWithProratedMinimumPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[GroupedWithProratedMinimumPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class GroupedWithProratedMinimumPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class GroupedWithProratedMinimumPrice(BaseModel):
- id: str
-
- billable_metric: Optional[GroupedWithProratedMinimumPriceBillableMetric] = None
-
- billing_cycle_configuration: GroupedWithProratedMinimumPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[GroupedWithProratedMinimumPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- grouped_with_prorated_minimum_config: Dict[str, object]
-
- invoicing_cycle_configuration: Optional[GroupedWithProratedMinimumPriceInvoicingCycleConfiguration] = None
-
- item: GroupedWithProratedMinimumPriceItem
-
- maximum: Optional[GroupedWithProratedMinimumPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[GroupedWithProratedMinimumPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["grouped_with_prorated_minimum"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[GroupedWithProratedMinimumPriceDimensionalPriceConfiguration] = None
-
-
-class GroupedWithMeteredMinimumPriceBillableMetric(BaseModel):
- id: str
-
-
-class GroupedWithMeteredMinimumPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithMeteredMinimumPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[GroupedWithMeteredMinimumPriceCreditAllocationCustomExpiration] = None
-
-
-class GroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedWithMeteredMinimumPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class GroupedWithMeteredMinimumPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedWithMeteredMinimumPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[GroupedWithMeteredMinimumPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class GroupedWithMeteredMinimumPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedWithMeteredMinimumPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[GroupedWithMeteredMinimumPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class GroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class GroupedWithMeteredMinimumPrice(BaseModel):
- id: str
-
- billable_metric: Optional[GroupedWithMeteredMinimumPriceBillableMetric] = None
-
- billing_cycle_configuration: GroupedWithMeteredMinimumPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[GroupedWithMeteredMinimumPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- grouped_with_metered_minimum_config: Dict[str, object]
-
- invoicing_cycle_configuration: Optional[GroupedWithMeteredMinimumPriceInvoicingCycleConfiguration] = None
-
- item: GroupedWithMeteredMinimumPriceItem
-
- maximum: Optional[GroupedWithMeteredMinimumPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[GroupedWithMeteredMinimumPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["grouped_with_metered_minimum"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[GroupedWithMeteredMinimumPriceDimensionalPriceConfiguration] = None
-
-
-class MatrixWithDisplayNamePriceBillableMetric(BaseModel):
- id: str
-
-
-class MatrixWithDisplayNamePriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithDisplayNamePriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithDisplayNamePriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[MatrixWithDisplayNamePriceCreditAllocationCustomExpiration] = None
-
-
-class MatrixWithDisplayNamePriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MatrixWithDisplayNamePriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class MatrixWithDisplayNamePriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixWithDisplayNamePriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MatrixWithDisplayNamePriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MatrixWithDisplayNamePriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MatrixWithDisplayNamePriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MatrixWithDisplayNamePriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class MatrixWithDisplayNamePriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class MatrixWithDisplayNamePrice(BaseModel):
- id: str
-
- billable_metric: Optional[MatrixWithDisplayNamePriceBillableMetric] = None
-
- billing_cycle_configuration: MatrixWithDisplayNamePriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[MatrixWithDisplayNamePriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[MatrixWithDisplayNamePriceInvoicingCycleConfiguration] = None
-
- item: MatrixWithDisplayNamePriceItem
-
- matrix_with_display_name_config: Dict[str, object]
-
- maximum: Optional[MatrixWithDisplayNamePriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[MatrixWithDisplayNamePriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["matrix_with_display_name"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[MatrixWithDisplayNamePriceDimensionalPriceConfiguration] = None
-
-
-class BulkWithProrationPriceBillableMetric(BaseModel):
- id: str
-
-
-class BulkWithProrationPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkWithProrationPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkWithProrationPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[BulkWithProrationPriceCreditAllocationCustomExpiration] = None
-
-
-class BulkWithProrationPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class BulkWithProrationPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class BulkWithProrationPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkWithProrationPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[BulkWithProrationPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class BulkWithProrationPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class BulkWithProrationPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[BulkWithProrationPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class BulkWithProrationPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class BulkWithProrationPrice(BaseModel):
- id: str
-
- billable_metric: Optional[BulkWithProrationPriceBillableMetric] = None
-
- billing_cycle_configuration: BulkWithProrationPriceBillingCycleConfiguration
-
- bulk_with_proration_config: Dict[str, object]
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[BulkWithProrationPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[BulkWithProrationPriceInvoicingCycleConfiguration] = None
-
- item: BulkWithProrationPriceItem
-
- maximum: Optional[BulkWithProrationPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[BulkWithProrationPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["bulk_with_proration"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[BulkWithProrationPriceDimensionalPriceConfiguration] = None
-
-
-class GroupedTieredPackagePriceBillableMetric(BaseModel):
- id: str
-
-
-class GroupedTieredPackagePriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPackagePriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPackagePriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[GroupedTieredPackagePriceCreditAllocationCustomExpiration] = None
-
-
-class GroupedTieredPackagePriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class GroupedTieredPackagePriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class GroupedTieredPackagePriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedTieredPackagePriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[GroupedTieredPackagePriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class GroupedTieredPackagePriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class GroupedTieredPackagePriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[GroupedTieredPackagePriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class GroupedTieredPackagePriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class GroupedTieredPackagePrice(BaseModel):
- id: str
-
- billable_metric: Optional[GroupedTieredPackagePriceBillableMetric] = None
-
- billing_cycle_configuration: GroupedTieredPackagePriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[GroupedTieredPackagePriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- grouped_tiered_package_config: Dict[str, object]
-
- invoicing_cycle_configuration: Optional[GroupedTieredPackagePriceInvoicingCycleConfiguration] = None
-
- item: GroupedTieredPackagePriceItem
-
- maximum: Optional[GroupedTieredPackagePriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[GroupedTieredPackagePriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["grouped_tiered_package"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[GroupedTieredPackagePriceDimensionalPriceConfiguration] = None
-
-
-class MaxGroupTieredPackagePriceBillableMetric(BaseModel):
- id: str
-
-
-class MaxGroupTieredPackagePriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MaxGroupTieredPackagePriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MaxGroupTieredPackagePriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[MaxGroupTieredPackagePriceCreditAllocationCustomExpiration] = None
-
-
-class MaxGroupTieredPackagePriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class MaxGroupTieredPackagePriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class MaxGroupTieredPackagePriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaxGroupTieredPackagePriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MaxGroupTieredPackagePriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MaxGroupTieredPackagePriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaxGroupTieredPackagePriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MaxGroupTieredPackagePriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class MaxGroupTieredPackagePriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class MaxGroupTieredPackagePrice(BaseModel):
- id: str
-
- billable_metric: Optional[MaxGroupTieredPackagePriceBillableMetric] = None
-
- billing_cycle_configuration: MaxGroupTieredPackagePriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[MaxGroupTieredPackagePriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[MaxGroupTieredPackagePriceInvoicingCycleConfiguration] = None
-
- item: MaxGroupTieredPackagePriceItem
-
- max_group_tiered_package_config: Dict[str, object]
-
- maximum: Optional[MaxGroupTieredPackagePriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[MaxGroupTieredPackagePriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["max_group_tiered_package"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[MaxGroupTieredPackagePriceDimensionalPriceConfiguration] = None
-
-
-class ScalableMatrixWithUnitPricingPriceBillableMetric(BaseModel):
- id: str
-
-
-class ScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithUnitPricingPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[ScalableMatrixWithUnitPricingPriceCreditAllocationCustomExpiration] = None
-
-
-class ScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithUnitPricingPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class ScalableMatrixWithUnitPricingPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ScalableMatrixWithUnitPricingPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[ScalableMatrixWithUnitPricingPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class ScalableMatrixWithUnitPricingPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ScalableMatrixWithUnitPricingPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[ScalableMatrixWithUnitPricingPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class ScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class ScalableMatrixWithUnitPricingPrice(BaseModel):
- id: str
-
- billable_metric: Optional[ScalableMatrixWithUnitPricingPriceBillableMetric] = None
-
- billing_cycle_configuration: ScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[ScalableMatrixWithUnitPricingPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[ScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration] = None
-
- item: ScalableMatrixWithUnitPricingPriceItem
-
- maximum: Optional[ScalableMatrixWithUnitPricingPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[ScalableMatrixWithUnitPricingPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["scalable_matrix_with_unit_pricing"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- scalable_matrix_with_unit_pricing_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[ScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration] = None
-
-
-class ScalableMatrixWithTieredPricingPriceBillableMetric(BaseModel):
- id: str
-
-
-class ScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithTieredPricingPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[ScalableMatrixWithTieredPricingPriceCreditAllocationCustomExpiration] = None
-
-
-class ScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class ScalableMatrixWithTieredPricingPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class ScalableMatrixWithTieredPricingPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ScalableMatrixWithTieredPricingPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[ScalableMatrixWithTieredPricingPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class ScalableMatrixWithTieredPricingPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class ScalableMatrixWithTieredPricingPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[ScalableMatrixWithTieredPricingPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class ScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class ScalableMatrixWithTieredPricingPrice(BaseModel):
- id: str
-
- billable_metric: Optional[ScalableMatrixWithTieredPricingPriceBillableMetric] = None
-
- billing_cycle_configuration: ScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[ScalableMatrixWithTieredPricingPriceCreditAllocation] = None
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[ScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration] = None
-
- item: ScalableMatrixWithTieredPricingPriceItem
-
- maximum: Optional[ScalableMatrixWithTieredPricingPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[ScalableMatrixWithTieredPricingPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["scalable_matrix_with_tiered_pricing"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- scalable_matrix_with_tiered_pricing_config: Dict[str, object]
-
- dimensional_price_configuration: Optional[ScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration] = None
-
-
-class CumulativeGroupedBulkPriceBillableMetric(BaseModel):
- id: str
-
-
-class CumulativeGroupedBulkPriceBillingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class CumulativeGroupedBulkPriceCreditAllocationCustomExpiration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class CumulativeGroupedBulkPriceCreditAllocation(BaseModel):
- allows_rollover: bool
-
- currency: str
-
- custom_expiration: Optional[CumulativeGroupedBulkPriceCreditAllocationCustomExpiration] = None
-
-
-class CumulativeGroupedBulkPriceInvoicingCycleConfiguration(BaseModel):
- duration: int
-
- duration_unit: Literal["day", "month"]
-
-
-class CumulativeGroupedBulkPriceItem(BaseModel):
- id: str
-
- name: str
-
-
-class CumulativeGroupedBulkPriceMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class CumulativeGroupedBulkPriceMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[CumulativeGroupedBulkPriceMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class CumulativeGroupedBulkPriceMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class CumulativeGroupedBulkPriceMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[CumulativeGroupedBulkPriceMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class CumulativeGroupedBulkPriceDimensionalPriceConfiguration(BaseModel):
- dimension_values: List[str]
-
- dimensional_price_group_id: str
-
-
-class CumulativeGroupedBulkPrice(BaseModel):
- id: str
-
- billable_metric: Optional[CumulativeGroupedBulkPriceBillableMetric] = None
-
- billing_cycle_configuration: CumulativeGroupedBulkPriceBillingCycleConfiguration
-
- cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
-
- conversion_rate: Optional[float] = None
-
- created_at: datetime
-
- credit_allocation: Optional[CumulativeGroupedBulkPriceCreditAllocation] = None
-
- cumulative_grouped_bulk_config: Dict[str, object]
-
- currency: str
-
- discount: Optional[Discount] = None
-
- external_price_id: Optional[str] = None
-
- fixed_price_quantity: Optional[float] = None
-
- invoicing_cycle_configuration: Optional[CumulativeGroupedBulkPriceInvoicingCycleConfiguration] = None
-
- item: CumulativeGroupedBulkPriceItem
-
- maximum: Optional[CumulativeGroupedBulkPriceMaximum] = None
-
- maximum_amount: Optional[str] = None
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum: Optional[CumulativeGroupedBulkPriceMinimum] = None
-
- minimum_amount: Optional[str] = None
-
- price_model_type: Literal["cumulative_grouped_bulk"] = FieldInfo(alias="model_type")
-
- name: str
-
- plan_phase_order: Optional[int] = None
-
- price_type: Literal["usage_price", "fixed_price"]
-
- dimensional_price_configuration: Optional[CumulativeGroupedBulkPriceDimensionalPriceConfiguration] = None
-
-
-Price: TypeAlias = Annotated[
- Union[
- UnitPrice,
- PackagePrice,
- MatrixPrice,
- TieredPrice,
- TieredBpsPrice,
- BpsPrice,
- BulkBpsPrice,
- BulkPrice,
- ThresholdTotalAmountPrice,
- TieredPackagePrice,
- GroupedTieredPrice,
- TieredWithMinimumPrice,
- TieredPackageWithMinimumPrice,
- PackageWithAllocationPrice,
- UnitWithPercentPrice,
- MatrixWithAllocationPrice,
- TieredWithProrationPrice,
- UnitWithProrationPrice,
- GroupedAllocationPrice,
- GroupedWithProratedMinimumPrice,
- GroupedWithMeteredMinimumPrice,
- MatrixWithDisplayNamePrice,
- BulkWithProrationPrice,
- GroupedTieredPackagePrice,
- MaxGroupTieredPackagePrice,
- ScalableMatrixWithUnitPricingPrice,
- ScalableMatrixWithTieredPricingPrice,
- CumulativeGroupedBulkPrice,
- ],
- PropertyInfo(discriminator="price_model_type"),
-]
diff --git a/src/orb/types/price_create_params.py b/src/orb/types/price_create_params.py
index 29a63d61..2d4e37e9 100644
--- a/src/orb/types/price_create_params.py
+++ b/src/orb/types/price_create_params.py
@@ -2,138 +2,81 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import Dict, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
+from .shared_params.bps_config import BPSConfig
+from .shared_params.bulk_config import BulkConfig
+from .shared_params.unit_config import UnitConfig
+from .shared_params.matrix_config import MatrixConfig
+from .shared_params.tiered_config import TieredConfig
+from .shared_params.package_config import PackageConfig
+from .shared_params.bulk_bps_config import BulkBPSConfig
+from .shared_params.tiered_bps_config import TieredBPSConfig
+from .shared_params.unit_conversion_rate_config import UnitConversionRateConfig
+from .shared_params.matrix_with_allocation_config import MatrixWithAllocationConfig
+from .shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
+from .shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .shared_params.new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
__all__ = [
"PriceCreateParams",
"NewFloatingUnitPrice",
- "NewFloatingUnitPriceUnitConfig",
- "NewFloatingUnitPriceBillingCycleConfiguration",
- "NewFloatingUnitPriceDimensionalPriceConfiguration",
- "NewFloatingUnitPriceInvoicingCycleConfiguration",
+ "NewFloatingUnitPriceConversionRateConfig",
"NewFloatingPackagePrice",
- "NewFloatingPackagePricePackageConfig",
- "NewFloatingPackagePriceBillingCycleConfiguration",
- "NewFloatingPackagePriceDimensionalPriceConfiguration",
- "NewFloatingPackagePriceInvoicingCycleConfiguration",
+ "NewFloatingPackagePriceConversionRateConfig",
"NewFloatingMatrixPrice",
- "NewFloatingMatrixPriceMatrixConfig",
- "NewFloatingMatrixPriceMatrixConfigMatrixValue",
- "NewFloatingMatrixPriceBillingCycleConfiguration",
- "NewFloatingMatrixPriceDimensionalPriceConfiguration",
- "NewFloatingMatrixPriceInvoicingCycleConfiguration",
+ "NewFloatingMatrixPriceConversionRateConfig",
"NewFloatingMatrixWithAllocationPrice",
- "NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration",
- "NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration",
+ "NewFloatingMatrixWithAllocationPriceConversionRateConfig",
"NewFloatingTieredPrice",
- "NewFloatingTieredPriceTieredConfig",
- "NewFloatingTieredPriceTieredConfigTier",
- "NewFloatingTieredPriceBillingCycleConfiguration",
- "NewFloatingTieredPriceDimensionalPriceConfiguration",
- "NewFloatingTieredPriceInvoicingCycleConfiguration",
- "NewFloatingTieredBpsPrice",
- "NewFloatingTieredBpsPriceTieredBpsConfig",
- "NewFloatingTieredBpsPriceTieredBpsConfigTier",
- "NewFloatingTieredBpsPriceBillingCycleConfiguration",
- "NewFloatingTieredBpsPriceDimensionalPriceConfiguration",
- "NewFloatingTieredBpsPriceInvoicingCycleConfiguration",
- "NewFloatingBpsPrice",
- "NewFloatingBpsPriceBpsConfig",
- "NewFloatingBpsPriceBillingCycleConfiguration",
- "NewFloatingBpsPriceDimensionalPriceConfiguration",
- "NewFloatingBpsPriceInvoicingCycleConfiguration",
- "NewFloatingBulkBpsPrice",
- "NewFloatingBulkBpsPriceBulkBpsConfig",
- "NewFloatingBulkBpsPriceBulkBpsConfigTier",
- "NewFloatingBulkBpsPriceBillingCycleConfiguration",
- "NewFloatingBulkBpsPriceDimensionalPriceConfiguration",
- "NewFloatingBulkBpsPriceInvoicingCycleConfiguration",
+ "NewFloatingTieredPriceConversionRateConfig",
+ "NewFloatingTieredBPSPrice",
+ "NewFloatingTieredBPSPriceConversionRateConfig",
+ "NewFloatingBPSPrice",
+ "NewFloatingBPSPriceConversionRateConfig",
+ "NewFloatingBulkBPSPrice",
+ "NewFloatingBulkBPSPriceConversionRateConfig",
"NewFloatingBulkPrice",
- "NewFloatingBulkPriceBulkConfig",
- "NewFloatingBulkPriceBulkConfigTier",
- "NewFloatingBulkPriceBillingCycleConfiguration",
- "NewFloatingBulkPriceDimensionalPriceConfiguration",
- "NewFloatingBulkPriceInvoicingCycleConfiguration",
+ "NewFloatingBulkPriceConversionRateConfig",
"NewFloatingThresholdTotalAmountPrice",
- "NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration",
- "NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration",
+ "NewFloatingThresholdTotalAmountPriceConversionRateConfig",
"NewFloatingTieredPackagePrice",
- "NewFloatingTieredPackagePriceBillingCycleConfiguration",
- "NewFloatingTieredPackagePriceDimensionalPriceConfiguration",
- "NewFloatingTieredPackagePriceInvoicingCycleConfiguration",
+ "NewFloatingTieredPackagePriceConversionRateConfig",
"NewFloatingGroupedTieredPrice",
- "NewFloatingGroupedTieredPriceBillingCycleConfiguration",
- "NewFloatingGroupedTieredPriceDimensionalPriceConfiguration",
- "NewFloatingGroupedTieredPriceInvoicingCycleConfiguration",
+ "NewFloatingGroupedTieredPriceConversionRateConfig",
"NewFloatingMaxGroupTieredPackagePrice",
- "NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
+ "NewFloatingMaxGroupTieredPackagePriceConversionRateConfig",
"NewFloatingTieredWithMinimumPrice",
- "NewFloatingTieredWithMinimumPriceBillingCycleConfiguration",
- "NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration",
- "NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration",
+ "NewFloatingTieredWithMinimumPriceConversionRateConfig",
"NewFloatingPackageWithAllocationPrice",
- "NewFloatingPackageWithAllocationPriceBillingCycleConfiguration",
- "NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration",
- "NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration",
+ "NewFloatingPackageWithAllocationPriceConversionRateConfig",
"NewFloatingTieredPackageWithMinimumPrice",
- "NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
+ "NewFloatingTieredPackageWithMinimumPriceConversionRateConfig",
"NewFloatingUnitWithPercentPrice",
- "NewFloatingUnitWithPercentPriceBillingCycleConfiguration",
- "NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration",
- "NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration",
+ "NewFloatingUnitWithPercentPriceConversionRateConfig",
"NewFloatingTieredWithProrationPrice",
- "NewFloatingTieredWithProrationPriceBillingCycleConfiguration",
- "NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration",
- "NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration",
+ "NewFloatingTieredWithProrationPriceConversionRateConfig",
"NewFloatingUnitWithProrationPrice",
- "NewFloatingUnitWithProrationPriceBillingCycleConfiguration",
- "NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration",
- "NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration",
+ "NewFloatingUnitWithProrationPriceConversionRateConfig",
"NewFloatingGroupedAllocationPrice",
- "NewFloatingGroupedAllocationPriceBillingCycleConfiguration",
- "NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration",
- "NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration",
+ "NewFloatingGroupedAllocationPriceConversionRateConfig",
"NewFloatingGroupedWithProratedMinimumPrice",
- "NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
+ "NewFloatingGroupedWithProratedMinimumPriceConversionRateConfig",
"NewFloatingGroupedWithMeteredMinimumPrice",
- "NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
+ "NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig",
"NewFloatingMatrixWithDisplayNamePrice",
- "NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
+ "NewFloatingMatrixWithDisplayNamePriceConversionRateConfig",
"NewFloatingBulkWithProrationPrice",
- "NewFloatingBulkWithProrationPriceBillingCycleConfiguration",
- "NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration",
- "NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration",
+ "NewFloatingBulkWithProrationPriceConversionRateConfig",
"NewFloatingGroupedTieredPackagePrice",
- "NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration",
- "NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration",
+ "NewFloatingGroupedTieredPackagePriceConversionRateConfig",
"NewFloatingScalableMatrixWithUnitPricingPrice",
- "NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
+ "NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig",
"NewFloatingScalableMatrixWithTieredPricingPrice",
- "NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
+ "NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig",
"NewFloatingCumulativeGroupedBulkPrice",
- "NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
+ "NewFloatingCumulativeGroupedBulkPriceConversionRateConfig",
]
@@ -152,7 +95,7 @@ class NewFloatingUnitPrice(TypedDict, total=False):
name: Required[str]
"""The name of the price."""
- unit_config: Required[NewFloatingUnitPriceUnitConfig]
+ unit_config: Required[UnitConfig]
billable_metric_id: Optional[str]
"""The id of the billable metric for the price.
@@ -166,7 +109,7 @@ class NewFloatingUnitPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingUnitPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -175,7 +118,10 @@ class NewFloatingUnitPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingUnitPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingUnitPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -190,7 +136,7 @@ class NewFloatingUnitPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingUnitPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -204,39 +150,7 @@ class NewFloatingUnitPrice(TypedDict, total=False):
"""
-class NewFloatingUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class NewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingUnitPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
class NewFloatingPackagePrice(TypedDict, total=False):
@@ -254,7 +168,7 @@ class NewFloatingPackagePrice(TypedDict, total=False):
name: Required[str]
"""The name of the price."""
- package_config: Required[NewFloatingPackagePricePackageConfig]
+ package_config: Required[PackageConfig]
billable_metric_id: Optional[str]
"""The id of the billable metric for the price.
@@ -268,7 +182,7 @@ class NewFloatingPackagePrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingPackagePriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -277,7 +191,10 @@ class NewFloatingPackagePrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingPackagePriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingPackagePriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -292,7 +209,7 @@ class NewFloatingPackagePrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingPackagePriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -306,46 +223,7 @@ class NewFloatingPackagePrice(TypedDict, total=False):
"""
-class NewFloatingPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class NewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingPackagePriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
class NewFloatingMatrixPrice(TypedDict, total=False):
@@ -358,7 +236,7 @@ class NewFloatingMatrixPrice(TypedDict, total=False):
item_id: Required[str]
"""The id of the item the price will be associated with."""
- matrix_config: Required[NewFloatingMatrixPriceMatrixConfig]
+ matrix_config: Required[MatrixConfig]
model_type: Required[Literal["matrix"]]
@@ -377,7 +255,7 @@ class NewFloatingMatrixPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingMatrixPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -386,7 +264,10 @@ class NewFloatingMatrixPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingMatrixPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingMatrixPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -401,7 +282,7 @@ class NewFloatingMatrixPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingMatrixPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -415,57 +296,7 @@ class NewFloatingMatrixPrice(TypedDict, total=False):
"""
-class NewFloatingMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class NewFloatingMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[NewFloatingMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class NewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingMatrixPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
@@ -478,7 +309,7 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
item_id: Required[str]
"""The id of the item the price will be associated with."""
- matrix_with_allocation_config: Required[NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig]
+ matrix_with_allocation_config: Required[MatrixWithAllocationConfig]
model_type: Required[Literal["matrix_with_allocation"]]
@@ -497,7 +328,7 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -506,7 +337,10 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingMatrixWithAllocationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -521,7 +355,7 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -535,60 +369,9 @@ class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
"""
-class NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class NewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingMatrixWithAllocationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingTieredPrice(TypedDict, total=False):
@@ -606,7 +389,7 @@ class NewFloatingTieredPrice(TypedDict, total=False):
name: Required[str]
"""The name of the price."""
- tiered_config: Required[NewFloatingTieredPriceTieredConfig]
+ tiered_config: Required[TieredConfig]
billable_metric_id: Optional[str]
"""The id of the billable metric for the price.
@@ -620,7 +403,7 @@ class NewFloatingTieredPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -629,7 +412,10 @@ class NewFloatingTieredPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -644,7 +430,7 @@ class NewFloatingTieredPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -658,53 +444,10 @@ class NewFloatingTieredPrice(TypedDict, total=False):
"""
-class NewFloatingTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
+NewFloatingTieredPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
- unit_amount: Required[str]
- """Amount per unit"""
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class NewFloatingTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[NewFloatingTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class NewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredBpsPrice(TypedDict, total=False):
+class NewFloatingTieredBPSPrice(TypedDict, total=False):
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
"""The cadence to bill for this price on."""
@@ -719,7 +462,7 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False):
name: Required[str]
"""The name of the price."""
- tiered_bps_config: Required[NewFloatingTieredBpsPriceTieredBpsConfig]
+ tiered_bps_config: Required[TieredBPSConfig]
billable_metric_id: Optional[str]
"""The id of the billable metric for the price.
@@ -733,7 +476,7 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredBpsPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -742,7 +485,10 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredBpsPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredBPSPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -757,7 +503,7 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredBpsPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -771,60 +517,11 @@ class NewFloatingTieredBpsPrice(TypedDict, total=False):
"""
-class NewFloatingTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class NewFloatingTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[NewFloatingTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class NewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
+NewFloatingTieredBPSPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingBpsPrice(TypedDict, total=False):
- bps_config: Required[NewFloatingBpsPriceBpsConfig]
+class NewFloatingBPSPrice(TypedDict, total=False):
+ bps_config: Required[BPSConfig]
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
"""The cadence to bill for this price on."""
@@ -852,7 +549,7 @@ class NewFloatingBpsPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingBpsPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -861,7 +558,10 @@ class NewFloatingBpsPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingBpsPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingBPSPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -876,7 +576,7 @@ class NewFloatingBpsPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingBpsPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -890,46 +590,11 @@ class NewFloatingBpsPrice(TypedDict, total=False):
"""
-class NewFloatingBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class NewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
+NewFloatingBPSPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-class NewFloatingBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[NewFloatingBulkBpsPriceBulkBpsConfig]
+class NewFloatingBulkBPSPrice(TypedDict, total=False):
+ bulk_bps_config: Required[BulkBPSConfig]
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
"""The cadence to bill for this price on."""
@@ -957,7 +622,7 @@ class NewFloatingBulkBpsPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingBulkBpsPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -966,7 +631,10 @@ class NewFloatingBulkBpsPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingBulkBpsPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingBulkBPSPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -981,7 +649,7 @@ class NewFloatingBulkBpsPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingBulkBpsPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -995,57 +663,11 @@ class NewFloatingBulkBpsPrice(TypedDict, total=False):
"""
-class NewFloatingBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class NewFloatingBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[NewFloatingBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class NewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingBulkBPSPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
class NewFloatingBulkPrice(TypedDict, total=False):
- bulk_config: Required[NewFloatingBulkPriceBulkConfig]
+ bulk_config: Required[BulkConfig]
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
"""The cadence to bill for this price on."""
@@ -1073,7 +695,7 @@ class NewFloatingBulkPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingBulkPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1082,7 +704,10 @@ class NewFloatingBulkPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingBulkPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingBulkPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1097,7 +722,7 @@ class NewFloatingBulkPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingBulkPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1111,47 +736,7 @@ class NewFloatingBulkPrice(TypedDict, total=False):
"""
-class NewFloatingBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class NewFloatingBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[NewFloatingBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class NewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingBulkPriceConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
@@ -1183,7 +768,7 @@ class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1192,7 +777,10 @@ class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingThresholdTotalAmountPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1207,7 +795,7 @@ class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1221,34 +809,9 @@ class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
"""
-class NewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingTieredPackagePrice(TypedDict, total=False):
@@ -1280,7 +843,7 @@ class NewFloatingTieredPackagePrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredPackagePriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1289,7 +852,10 @@ class NewFloatingTieredPackagePrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredPackagePriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredPackagePriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1304,7 +870,7 @@ class NewFloatingTieredPackagePrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredPackagePriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1318,34 +884,9 @@ class NewFloatingTieredPackagePrice(TypedDict, total=False):
"""
-class NewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingTieredPackagePriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingGroupedTieredPrice(TypedDict, total=False):
@@ -1377,7 +918,7 @@ class NewFloatingGroupedTieredPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingGroupedTieredPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1386,7 +927,10 @@ class NewFloatingGroupedTieredPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingGroupedTieredPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingGroupedTieredPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1401,7 +945,7 @@ class NewFloatingGroupedTieredPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingGroupedTieredPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1415,34 +959,9 @@ class NewFloatingGroupedTieredPrice(TypedDict, total=False):
"""
-class NewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingGroupedTieredPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
@@ -1474,7 +993,7 @@ class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1483,7 +1002,10 @@ class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingMaxGroupTieredPackagePriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1498,7 +1020,7 @@ class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1512,34 +1034,9 @@ class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
"""
-class NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingMaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
@@ -1571,7 +1068,7 @@ class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredWithMinimumPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1580,7 +1077,10 @@ class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredWithMinimumPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1595,7 +1095,7 @@ class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1609,34 +1109,9 @@ class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
"""
-class NewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingTieredWithMinimumPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
@@ -1668,7 +1143,7 @@ class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingPackageWithAllocationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1677,7 +1152,10 @@ class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingPackageWithAllocationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1692,7 +1170,7 @@ class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1706,34 +1184,9 @@ class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
"""
-class NewFloatingPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingPackageWithAllocationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
@@ -1765,7 +1218,7 @@ class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1774,7 +1227,10 @@ class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredPackageWithMinimumPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1789,7 +1245,7 @@ class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1803,34 +1259,9 @@ class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
"""
-class NewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingTieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
@@ -1862,7 +1293,7 @@ class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingUnitWithPercentPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1871,7 +1302,10 @@ class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingUnitWithPercentPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1886,7 +1320,7 @@ class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1900,34 +1334,9 @@ class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
"""
-class NewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingUnitWithPercentPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
@@ -1959,7 +1368,7 @@ class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingTieredWithProrationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -1968,7 +1377,10 @@ class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingTieredWithProrationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -1983,7 +1395,7 @@ class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -1997,34 +1409,9 @@ class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
"""
-class NewFloatingTieredWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingTieredWithProrationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
@@ -2056,7 +1443,7 @@ class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingUnitWithProrationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2065,7 +1452,10 @@ class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingUnitWithProrationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2080,7 +1470,7 @@ class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2094,34 +1484,9 @@ class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
"""
-class NewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingUnitWithProrationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
@@ -2153,7 +1518,7 @@ class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingGroupedAllocationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2162,7 +1527,10 @@ class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingGroupedAllocationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2177,7 +1545,7 @@ class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2191,34 +1559,9 @@ class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
"""
-class NewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingGroupedAllocationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
@@ -2250,7 +1593,7 @@ class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2259,7 +1602,10 @@ class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingGroupedWithProratedMinimumPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2274,7 +1620,7 @@ class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2288,34 +1634,9 @@ class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
"""
-class NewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingGroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
@@ -2347,7 +1668,7 @@ class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2356,7 +1677,10 @@ class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2371,7 +1695,7 @@ class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2385,34 +1709,9 @@ class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
"""
-class NewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingGroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
@@ -2444,7 +1743,7 @@ class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2453,7 +1752,10 @@ class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingMatrixWithDisplayNamePriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2468,7 +1770,7 @@ class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2482,34 +1784,9 @@ class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
"""
-class NewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingMatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
@@ -2541,7 +1818,7 @@ class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingBulkWithProrationPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2550,7 +1827,10 @@ class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingBulkWithProrationPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2565,7 +1845,7 @@ class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2579,34 +1859,9 @@ class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
"""
-class NewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingBulkWithProrationPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
@@ -2638,7 +1893,7 @@ class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2647,7 +1902,10 @@ class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingGroupedTieredPackagePriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2662,7 +1920,7 @@ class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2676,34 +1934,9 @@ class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
"""
-class NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingGroupedTieredPackagePriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
@@ -2735,7 +1968,7 @@ class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2744,9 +1977,10 @@ class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[
- NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2761,7 +1995,7 @@ class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2775,34 +2009,9 @@ class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
"""
-class NewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
@@ -2834,7 +2043,7 @@ class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2843,9 +2052,10 @@ class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[
- NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
+ conversion_rate_config: Optional[NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2860,7 +2070,7 @@ class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2874,34 +2084,9 @@ class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
"""
-class NewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
+NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
@@ -2933,7 +2118,7 @@ class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""
- billing_cycle_configuration: Optional[NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration]
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
@@ -2942,7 +2127,10 @@ class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
conversion_rate: Optional[float]
"""The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration]
+ conversion_rate_config: Optional[NewFloatingCumulativeGroupedBulkPriceConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
"""For dimensional price: specifies a price group and dimension values"""
external_price_id: Optional[str]
@@ -2957,7 +2145,7 @@ class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration]
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
"""Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.
@@ -2971,35 +2159,9 @@ class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
"""
-class NewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class NewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
+NewFloatingCumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Union[
+ UnitConversionRateConfig, TieredConversionRateConfig
+]
PriceCreateParams: TypeAlias = Union[
NewFloatingUnitPrice,
@@ -3007,9 +2169,9 @@ class NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict
NewFloatingMatrixPrice,
NewFloatingMatrixWithAllocationPrice,
NewFloatingTieredPrice,
- NewFloatingTieredBpsPrice,
- NewFloatingBpsPrice,
- NewFloatingBulkBpsPrice,
+ NewFloatingTieredBPSPrice,
+ NewFloatingBPSPrice,
+ NewFloatingBulkBPSPrice,
NewFloatingBulkPrice,
NewFloatingThresholdTotalAmountPrice,
NewFloatingTieredPackagePrice,
diff --git a/src/orb/types/price_evaluate_multiple_params.py b/src/orb/types/price_evaluate_multiple_params.py
index 5bc41e14..1a4049d2 100644
--- a/src/orb/types/price_evaluate_multiple_params.py
+++ b/src/orb/types/price_evaluate_multiple_params.py
@@ -2,145 +2,45 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import List, Union, Iterable, Optional
from datetime import datetime
-from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+from typing_extensions import Required, Annotated, TypeAlias, TypedDict
from .._utils import PropertyInfo
-
-__all__ = [
- "PriceEvaluateMultipleParams",
- "Event",
- "PriceEvaluation",
- "PriceEvaluationPrice",
- "PriceEvaluationPriceNewFloatingUnitPrice",
- "PriceEvaluationPriceNewFloatingUnitPriceUnitConfig",
- "PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingPackagePrice",
- "PriceEvaluationPriceNewFloatingPackagePricePackageConfig",
- "PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixPrice",
- "PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig",
- "PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue",
- "PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPrice",
- "PriceEvaluationPriceNewFloatingTieredPriceTieredConfig",
- "PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier",
- "PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredBpsPrice",
- "PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig",
- "PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier",
- "PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBpsPrice",
- "PriceEvaluationPriceNewFloatingBpsPriceBpsConfig",
- "PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkBpsPrice",
- "PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig",
- "PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier",
- "PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkPrice",
- "PriceEvaluationPriceNewFloatingBulkPriceBulkConfig",
- "PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier",
- "PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice",
- "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackagePrice",
- "PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPrice",
- "PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice",
- "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithMinimumPrice",
- "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingPackageWithAllocationPrice",
- "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice",
- "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithPercentPrice",
- "PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithProrationPrice",
- "PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithProrationPrice",
- "PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedAllocationPrice",
- "PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice",
- "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice",
- "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice",
- "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkWithProrationPrice",
- "PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice",
- "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice",
- "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
-]
+from .shared_params.new_floating_bps_price import NewFloatingBPSPrice
+from .shared_params.new_floating_bulk_price import NewFloatingBulkPrice
+from .shared_params.new_floating_unit_price import NewFloatingUnitPrice
+from .shared_params.new_floating_matrix_price import NewFloatingMatrixPrice
+from .shared_params.new_floating_tiered_price import NewFloatingTieredPrice
+from .shared_params.new_floating_package_price import NewFloatingPackagePrice
+from .shared_params.new_floating_bulk_bps_price import NewFloatingBulkBPSPrice
+from .shared_params.new_floating_tiered_bps_price import NewFloatingTieredBPSPrice
+from .shared_params.new_floating_grouped_tiered_price import NewFloatingGroupedTieredPrice
+from .shared_params.new_floating_tiered_package_price import NewFloatingTieredPackagePrice
+from .shared_params.new_floating_unit_with_percent_price import NewFloatingUnitWithPercentPrice
+from .shared_params.new_floating_grouped_allocation_price import NewFloatingGroupedAllocationPrice
+from .shared_params.new_floating_bulk_with_proration_price import NewFloatingBulkWithProrationPrice
+from .shared_params.new_floating_tiered_with_minimum_price import NewFloatingTieredWithMinimumPrice
+from .shared_params.new_floating_unit_with_proration_price import NewFloatingUnitWithProrationPrice
+from .shared_params.new_floating_tiered_with_proration_price import NewFloatingTieredWithProrationPrice
+from .shared_params.new_floating_grouped_tiered_package_price import NewFloatingGroupedTieredPackagePrice
+from .shared_params.new_floating_matrix_with_allocation_price import NewFloatingMatrixWithAllocationPrice
+from .shared_params.new_floating_threshold_total_amount_price import NewFloatingThresholdTotalAmountPrice
+from .shared_params.new_floating_cumulative_grouped_bulk_price import NewFloatingCumulativeGroupedBulkPrice
+from .shared_params.new_floating_package_with_allocation_price import NewFloatingPackageWithAllocationPrice
+from .shared_params.new_floating_matrix_with_display_name_price import NewFloatingMatrixWithDisplayNamePrice
+from .shared_params.new_floating_max_group_tiered_package_price import NewFloatingMaxGroupTieredPackagePrice
+from .shared_params.new_floating_tiered_package_with_minimum_price import NewFloatingTieredPackageWithMinimumPrice
+from .shared_params.new_floating_grouped_with_metered_minimum_price import NewFloatingGroupedWithMeteredMinimumPrice
+from .shared_params.new_floating_grouped_with_prorated_minimum_price import NewFloatingGroupedWithProratedMinimumPrice
+from .shared_params.new_floating_scalable_matrix_with_unit_pricing_price import (
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+)
+from .shared_params.new_floating_scalable_matrix_with_tiered_pricing_price import (
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+)
+
+__all__ = ["PriceEvaluateMultipleParams", "PriceEvaluation", "PriceEvaluationPrice"]
class PriceEvaluateMultipleParams(TypedDict, total=False):
@@ -153,9 +53,6 @@ class PriceEvaluateMultipleParams(TypedDict, total=False):
customer_id: Optional[str]
"""The ID of the customer to which this evaluation is scoped."""
- events: Optional[Iterable[Event]]
- """Optional list of preview events to use instead of actual usage data (max 500)"""
-
external_customer_id: Optional[str]
"""The external customer ID of the customer to which this evaluation is scoped."""
@@ -163,3061 +60,35 @@ class PriceEvaluateMultipleParams(TypedDict, total=False):
"""List of prices to evaluate (max 100)"""
-class Event(TypedDict, total=False):
- event_name: Required[str]
- """A name to meaningfully identify the action or event type."""
-
- properties: Required[Dict[str, object]]
- """A dictionary of custom properties.
-
- Values in this dictionary must be numeric, boolean, or strings. Nested
- dictionaries are disallowed.
- """
-
- timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
- """An ISO 8601 format date with no timezone offset (i.e.
-
- UTC). This should represent the time that usage was recorded, and is
- particularly important to attribute usage to a given billing period.
- """
-
- customer_id: Optional[str]
- """The Orb Customer identifier"""
-
- external_customer_id: Optional[str]
- """
- An alias for the Orb customer, whose mapping is specified when creating the
- customer
- """
-
-
-class PriceEvaluationPriceNewFloatingUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[PriceEvaluationPriceNewFloatingUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[PriceEvaluationPriceNewFloatingPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[PriceEvaluationPriceNewFloatingMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(
- TypedDict, total=False
-):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[
- PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
- ]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class PriceEvaluationPriceNewFloatingTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceEvaluationPriceNewFloatingTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[PriceEvaluationPriceNewFloatingTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[PriceEvaluationPriceNewFloatingTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBpsPrice(TypedDict, total=False):
- bps_config: Required[PriceEvaluationPriceNewFloatingBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[PriceEvaluationPriceNewFloatingBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class PriceEvaluationPriceNewFloatingBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[PriceEvaluationPriceNewFloatingBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkPrice(TypedDict, total=False):
- bulk_config: Required[PriceEvaluationPriceNewFloatingBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[PriceEvaluationPriceNewFloatingBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[PriceEvaluationPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingTieredWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
PriceEvaluationPrice: TypeAlias = Union[
- PriceEvaluationPriceNewFloatingUnitPrice,
- PriceEvaluationPriceNewFloatingPackagePrice,
- PriceEvaluationPriceNewFloatingMatrixPrice,
- PriceEvaluationPriceNewFloatingMatrixWithAllocationPrice,
- PriceEvaluationPriceNewFloatingTieredPrice,
- PriceEvaluationPriceNewFloatingTieredBpsPrice,
- PriceEvaluationPriceNewFloatingBpsPrice,
- PriceEvaluationPriceNewFloatingBulkBpsPrice,
- PriceEvaluationPriceNewFloatingBulkPrice,
- PriceEvaluationPriceNewFloatingThresholdTotalAmountPrice,
- PriceEvaluationPriceNewFloatingTieredPackagePrice,
- PriceEvaluationPriceNewFloatingGroupedTieredPrice,
- PriceEvaluationPriceNewFloatingMaxGroupTieredPackagePrice,
- PriceEvaluationPriceNewFloatingTieredWithMinimumPrice,
- PriceEvaluationPriceNewFloatingPackageWithAllocationPrice,
- PriceEvaluationPriceNewFloatingTieredPackageWithMinimumPrice,
- PriceEvaluationPriceNewFloatingUnitWithPercentPrice,
- PriceEvaluationPriceNewFloatingTieredWithProrationPrice,
- PriceEvaluationPriceNewFloatingUnitWithProrationPrice,
- PriceEvaluationPriceNewFloatingGroupedAllocationPrice,
- PriceEvaluationPriceNewFloatingGroupedWithProratedMinimumPrice,
- PriceEvaluationPriceNewFloatingGroupedWithMeteredMinimumPrice,
- PriceEvaluationPriceNewFloatingMatrixWithDisplayNamePrice,
- PriceEvaluationPriceNewFloatingBulkWithProrationPrice,
- PriceEvaluationPriceNewFloatingGroupedTieredPackagePrice,
- PriceEvaluationPriceNewFloatingScalableMatrixWithUnitPricingPrice,
- PriceEvaluationPriceNewFloatingScalableMatrixWithTieredPricingPrice,
- PriceEvaluationPriceNewFloatingCumulativeGroupedBulkPrice,
+ NewFloatingUnitPrice,
+ NewFloatingPackagePrice,
+ NewFloatingMatrixPrice,
+ NewFloatingMatrixWithAllocationPrice,
+ NewFloatingTieredPrice,
+ NewFloatingTieredBPSPrice,
+ NewFloatingBPSPrice,
+ NewFloatingBulkBPSPrice,
+ NewFloatingBulkPrice,
+ NewFloatingThresholdTotalAmountPrice,
+ NewFloatingTieredPackagePrice,
+ NewFloatingGroupedTieredPrice,
+ NewFloatingMaxGroupTieredPackagePrice,
+ NewFloatingTieredWithMinimumPrice,
+ NewFloatingPackageWithAllocationPrice,
+ NewFloatingTieredPackageWithMinimumPrice,
+ NewFloatingUnitWithPercentPrice,
+ NewFloatingTieredWithProrationPrice,
+ NewFloatingUnitWithProrationPrice,
+ NewFloatingGroupedAllocationPrice,
+ NewFloatingGroupedWithProratedMinimumPrice,
+ NewFloatingGroupedWithMeteredMinimumPrice,
+ NewFloatingMatrixWithDisplayNamePrice,
+ NewFloatingBulkWithProrationPrice,
+ NewFloatingGroupedTieredPackagePrice,
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+ NewFloatingCumulativeGroupedBulkPrice,
]
diff --git a/src/orb/types/price_evaluate_preview_events_params.py b/src/orb/types/price_evaluate_preview_events_params.py
new file mode 100644
index 00000000..7af54e90
--- /dev/null
+++ b/src/orb/types/price_evaluate_preview_events_params.py
@@ -0,0 +1,148 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, List, Union, Iterable, Optional
+from datetime import datetime
+from typing_extensions import Required, Annotated, TypeAlias, TypedDict
+
+from .._utils import PropertyInfo
+from .shared_params.new_floating_bps_price import NewFloatingBPSPrice
+from .shared_params.new_floating_bulk_price import NewFloatingBulkPrice
+from .shared_params.new_floating_unit_price import NewFloatingUnitPrice
+from .shared_params.new_floating_matrix_price import NewFloatingMatrixPrice
+from .shared_params.new_floating_tiered_price import NewFloatingTieredPrice
+from .shared_params.new_floating_package_price import NewFloatingPackagePrice
+from .shared_params.new_floating_bulk_bps_price import NewFloatingBulkBPSPrice
+from .shared_params.new_floating_tiered_bps_price import NewFloatingTieredBPSPrice
+from .shared_params.new_floating_grouped_tiered_price import NewFloatingGroupedTieredPrice
+from .shared_params.new_floating_tiered_package_price import NewFloatingTieredPackagePrice
+from .shared_params.new_floating_unit_with_percent_price import NewFloatingUnitWithPercentPrice
+from .shared_params.new_floating_grouped_allocation_price import NewFloatingGroupedAllocationPrice
+from .shared_params.new_floating_bulk_with_proration_price import NewFloatingBulkWithProrationPrice
+from .shared_params.new_floating_tiered_with_minimum_price import NewFloatingTieredWithMinimumPrice
+from .shared_params.new_floating_unit_with_proration_price import NewFloatingUnitWithProrationPrice
+from .shared_params.new_floating_tiered_with_proration_price import NewFloatingTieredWithProrationPrice
+from .shared_params.new_floating_grouped_tiered_package_price import NewFloatingGroupedTieredPackagePrice
+from .shared_params.new_floating_matrix_with_allocation_price import NewFloatingMatrixWithAllocationPrice
+from .shared_params.new_floating_threshold_total_amount_price import NewFloatingThresholdTotalAmountPrice
+from .shared_params.new_floating_cumulative_grouped_bulk_price import NewFloatingCumulativeGroupedBulkPrice
+from .shared_params.new_floating_package_with_allocation_price import NewFloatingPackageWithAllocationPrice
+from .shared_params.new_floating_matrix_with_display_name_price import NewFloatingMatrixWithDisplayNamePrice
+from .shared_params.new_floating_max_group_tiered_package_price import NewFloatingMaxGroupTieredPackagePrice
+from .shared_params.new_floating_tiered_package_with_minimum_price import NewFloatingTieredPackageWithMinimumPrice
+from .shared_params.new_floating_grouped_with_metered_minimum_price import NewFloatingGroupedWithMeteredMinimumPrice
+from .shared_params.new_floating_grouped_with_prorated_minimum_price import NewFloatingGroupedWithProratedMinimumPrice
+from .shared_params.new_floating_scalable_matrix_with_unit_pricing_price import (
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+)
+from .shared_params.new_floating_scalable_matrix_with_tiered_pricing_price import (
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+)
+
+__all__ = ["PriceEvaluatePreviewEventsParams", "Event", "PriceEvaluation", "PriceEvaluationPrice"]
+
+
+class PriceEvaluatePreviewEventsParams(TypedDict, total=False):
+ timeframe_end: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """The exclusive upper bound for event timestamps"""
+
+ timeframe_start: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """The inclusive lower bound for event timestamps"""
+
+ customer_id: Optional[str]
+ """The ID of the customer to which this evaluation is scoped."""
+
+ events: Iterable[Event]
+ """List of preview events to use instead of actual usage data"""
+
+ external_customer_id: Optional[str]
+ """The external customer ID of the customer to which this evaluation is scoped."""
+
+ price_evaluations: Iterable[PriceEvaluation]
+ """List of prices to evaluate (max 100)"""
+
+
+class Event(TypedDict, total=False):
+ event_name: Required[str]
+ """A name to meaningfully identify the action or event type."""
+
+ properties: Required[Dict[str, object]]
+ """A dictionary of custom properties.
+
+ Values in this dictionary must be numeric, boolean, or strings. Nested
+ dictionaries are disallowed.
+ """
+
+ timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """An ISO 8601 format date with no timezone offset (i.e.
+
+ UTC). This should represent the time that usage was recorded, and is
+ particularly important to attribute usage to a given billing period.
+ """
+
+ customer_id: Optional[str]
+ """The Orb Customer identifier"""
+
+ external_customer_id: Optional[str]
+ """
+ An alias for the Orb customer, whose mapping is specified when creating the
+ customer
+ """
+
+
+PriceEvaluationPrice: TypeAlias = Union[
+ NewFloatingUnitPrice,
+ NewFloatingPackagePrice,
+ NewFloatingMatrixPrice,
+ NewFloatingMatrixWithAllocationPrice,
+ NewFloatingTieredPrice,
+ NewFloatingTieredBPSPrice,
+ NewFloatingBPSPrice,
+ NewFloatingBulkBPSPrice,
+ NewFloatingBulkPrice,
+ NewFloatingThresholdTotalAmountPrice,
+ NewFloatingTieredPackagePrice,
+ NewFloatingGroupedTieredPrice,
+ NewFloatingMaxGroupTieredPackagePrice,
+ NewFloatingTieredWithMinimumPrice,
+ NewFloatingPackageWithAllocationPrice,
+ NewFloatingTieredPackageWithMinimumPrice,
+ NewFloatingUnitWithPercentPrice,
+ NewFloatingTieredWithProrationPrice,
+ NewFloatingUnitWithProrationPrice,
+ NewFloatingGroupedAllocationPrice,
+ NewFloatingGroupedWithProratedMinimumPrice,
+ NewFloatingGroupedWithMeteredMinimumPrice,
+ NewFloatingMatrixWithDisplayNamePrice,
+ NewFloatingBulkWithProrationPrice,
+ NewFloatingGroupedTieredPackagePrice,
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+ NewFloatingCumulativeGroupedBulkPrice,
+]
+
+
+class PriceEvaluation(TypedDict, total=False):
+ filter: Optional[str]
+ """
+ A boolean
+ [computed property](/extensibility/advanced-metrics#computed-properties) used to
+ filter the underlying billable metric
+ """
+
+ grouping_keys: List[str]
+ """
+ Properties (or
+ [computed properties](/extensibility/advanced-metrics#computed-properties)) used
+ to group the underlying billable metric
+ """
+
+ price: Optional[PriceEvaluationPrice]
+ """
+ An inline price definition to evaluate, allowing you to test price
+ configurations before adding them to Orb.
+ """
+
+ price_id: Optional[str]
+ """The ID of a price to evaluate that exists in your Orb account."""
diff --git a/src/orb/types/price_evaluate_preview_events_response.py b/src/orb/types/price_evaluate_preview_events_response.py
new file mode 100644
index 00000000..e402f053
--- /dev/null
+++ b/src/orb/types/price_evaluate_preview_events_response.py
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from .._models import BaseModel
+from .evaluate_price_group import EvaluatePriceGroup
+
+__all__ = ["PriceEvaluatePreviewEventsResponse", "Data"]
+
+
+class Data(BaseModel):
+ currency: str
+ """The currency of the price"""
+
+ price_groups: List[EvaluatePriceGroup]
+ """The computed price groups associated with input price."""
+
+ inline_price_index: Optional[int] = None
+ """The index of the inline price"""
+
+ price_id: Optional[str] = None
+ """The ID of the price"""
+
+
+class PriceEvaluatePreviewEventsResponse(BaseModel):
+ data: List[Data]
diff --git a/src/orb/types/shared/__init__.py b/src/orb/types/shared/__init__.py
index cebcd76a..5fb8f1f4 100644
--- a/src/orb/types/shared/__init__.py
+++ b/src/orb/types/shared/__init__.py
@@ -1,10 +1,202 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .tier import Tier as Tier
+from .price import Price as Price
+from .address import Address as Address
+from .invoice import Invoice as Invoice
+from .maximum import Maximum as Maximum
+from .minimum import Minimum as Minimum
+from .bps_tier import BPSTier as BPSTier
from .discount import Discount as Discount
+from .bulk_tier import BulkTier as BulkTier
+from .item_slim import ItemSlim as ItemSlim
+from .allocation import Allocation as Allocation
+from .bps_config import BPSConfig as BPSConfig
+from .tax_amount import TaxAmount as TaxAmount
+from .bulk_config import BulkConfig as BulkConfig
+from .credit_note import CreditNote as CreditNote
+from .new_maximum import NewMaximum as NewMaximum
+from .new_minimum import NewMinimum as NewMinimum
+from .tier_config import TierConfig as TierConfig
+from .unit_config import UnitConfig as UnitConfig
+from .invoice_tiny import InvoiceTiny as InvoiceTiny
+from .matrix_value import MatrixValue as MatrixValue
+from .bulk_bps_tier import BulkBPSTier as BulkBPSTier
+from .matrix_config import MatrixConfig as MatrixConfig
+from .tiered_config import TieredConfig as TieredConfig
+from .package_config import PackageConfig as PackageConfig
+from .per_price_cost import PerPriceCost as PerPriceCost
+from .price_interval import PriceInterval as PriceInterval
from .trial_discount import TrialDiscount as TrialDiscount
from .usage_discount import UsageDiscount as UsageDiscount
+from .aggregated_cost import AggregatedCost as AggregatedCost
from .amount_discount import AmountDiscount as AmountDiscount
+from .bulk_bps_config import BulkBPSConfig as BulkBPSConfig
+from .customer_tax_id import CustomerTaxID as CustomerTaxID
+from .credit_note_tiny import CreditNoteTiny as CreditNoteTiny
+from .maximum_interval import MaximumInterval as MaximumInterval
+from .minimum_interval import MinimumInterval as MinimumInterval
+from .coupon_redemption import CouponRedemption as CouponRedemption
+from .custom_expiration import CustomExpiration as CustomExpiration
+from .customer_minified import CustomerMinified as CustomerMinified
+from .tiered_bps_config import TieredBPSConfig as TieredBPSConfig
+from .new_plan_bps_price import NewPlanBPSPrice as NewPlanBPSPrice
+from .new_usage_discount import NewUsageDiscount as NewUsageDiscount
+from .tier_sub_line_item import TierSubLineItem as TierSubLineItem
+from .adjustment_interval import AdjustmentInterval as AdjustmentInterval
+from .new_amount_discount import NewAmountDiscount as NewAmountDiscount
+from .new_plan_bulk_price import NewPlanBulkPrice as NewPlanBulkPrice
+from .new_plan_unit_price import NewPlanUnitPrice as NewPlanUnitPrice
+from .other_sub_line_item import OtherSubLineItem as OtherSubLineItem
from .pagination_metadata import PaginationMetadata as PaginationMetadata
from .percentage_discount import PercentageDiscount as PercentageDiscount
+from .billable_metric_tiny import BillableMetricTiny as BillableMetricTiny
+from .conversion_rate_tier import ConversionRateTier as ConversionRateTier
+from .matrix_sub_line_item import MatrixSubLineItem as MatrixSubLineItem
+from .new_allocation_price import NewAllocationPrice as NewAllocationPrice
+from .new_plan_matrix_price import NewPlanMatrixPrice as NewPlanMatrixPrice
+from .new_plan_tiered_price import NewPlanTieredPrice as NewPlanTieredPrice
+from .subscription_minified import SubscriptionMinified as SubscriptionMinified
from .invoice_level_discount import InvoiceLevelDiscount as InvoiceLevelDiscount
+from .new_floating_bps_price import NewFloatingBPSPrice as NewFloatingBPSPrice
+from .new_plan_package_price import NewPlanPackagePrice as NewPlanPackagePrice
+from .sub_line_item_grouping import SubLineItemGrouping as SubLineItemGrouping
+from .transform_price_filter import TransformPriceFilter as TransformPriceFilter
+from .new_floating_bulk_price import NewFloatingBulkPrice as NewFloatingBulkPrice
+from .new_floating_unit_price import NewFloatingUnitPrice as NewFloatingUnitPrice
+from .new_percentage_discount import NewPercentageDiscount as NewPercentageDiscount
+from .new_plan_bulk_bps_price import NewPlanBulkBPSPrice as NewPlanBulkBPSPrice
+from .subscription_trial_info import SubscriptionTrialInfo as SubscriptionTrialInfo
+from .usage_discount_interval import UsageDiscountInterval as UsageDiscountInterval
+from .amount_discount_interval import AmountDiscountInterval as AmountDiscountInterval
+from .new_floating_matrix_price import NewFloatingMatrixPrice as NewFloatingMatrixPrice
+from .new_floating_tiered_price import NewFloatingTieredPrice as NewFloatingTieredPrice
+from .new_plan_tiered_bps_price import NewPlanTieredBPSPrice as NewPlanTieredBPSPrice
+from .new_floating_package_price import NewFloatingPackagePrice as NewFloatingPackagePrice
+from .billing_cycle_configuration import BillingCycleConfiguration as BillingCycleConfiguration
from .billing_cycle_relative_date import BillingCycleRelativeDate as BillingCycleRelativeDate
+from .conversion_rate_unit_config import ConversionRateUnitConfig as ConversionRateUnitConfig
+from .monetary_maximum_adjustment import MonetaryMaximumAdjustment as MonetaryMaximumAdjustment
+from .monetary_minimum_adjustment import MonetaryMinimumAdjustment as MonetaryMinimumAdjustment
+from .new_floating_bulk_bps_price import NewFloatingBulkBPSPrice as NewFloatingBulkBPSPrice
+from .sub_line_item_matrix_config import SubLineItemMatrixConfig as SubLineItemMatrixConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig as UnitConversionRateConfig
+from .percentage_discount_interval import PercentageDiscountInterval as PercentageDiscountInterval
+from .subscription_change_minified import SubscriptionChangeMinified as SubscriptionChangeMinified
+from .conversion_rate_tiered_config import ConversionRateTieredConfig as ConversionRateTieredConfig
+from .fixed_fee_quantity_transition import FixedFeeQuantityTransition as FixedFeeQuantityTransition
+from .matrix_with_allocation_config import MatrixWithAllocationConfig as MatrixWithAllocationConfig
+from .new_floating_tiered_bps_price import NewFloatingTieredBPSPrice as NewFloatingTieredBPSPrice
+from .new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice as NewPlanGroupedTieredPrice
+from .new_plan_tiered_package_price import NewPlanTieredPackagePrice as NewPlanTieredPackagePrice
+from .plan_phase_maximum_adjustment import PlanPhaseMaximumAdjustment as PlanPhaseMaximumAdjustment
+from .plan_phase_minimum_adjustment import PlanPhaseMinimumAdjustment as PlanPhaseMinimumAdjustment
+from .tiered_conversion_rate_config import TieredConversionRateConfig as TieredConversionRateConfig
+from .changed_subscription_resources import ChangedSubscriptionResources as ChangedSubscriptionResources
+from .dimensional_price_configuration import DimensionalPriceConfiguration as DimensionalPriceConfiguration
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration as NewBillingCycleConfiguration
+from .new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice as NewPlanUnitWithPercentPrice
+from .fixed_fee_quantity_schedule_entry import FixedFeeQuantityScheduleEntry as FixedFeeQuantityScheduleEntry
+from .new_floating_grouped_tiered_price import NewFloatingGroupedTieredPrice as NewFloatingGroupedTieredPrice
+from .new_floating_tiered_package_price import NewFloatingTieredPackagePrice as NewFloatingTieredPackagePrice
+from .new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice as NewPlanGroupedAllocationPrice
+from .billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration as BillingCycleAnchorConfiguration
+from .monetary_usage_discount_adjustment import MonetaryUsageDiscountAdjustment as MonetaryUsageDiscountAdjustment
+from .new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice as NewPlanBulkWithProrationPrice
+from .new_plan_tier_with_proration_price import NewPlanTierWithProrationPrice as NewPlanTierWithProrationPrice
+from .new_plan_tiered_with_minimum_price import NewPlanTieredWithMinimumPrice as NewPlanTieredWithMinimumPrice
+from .new_plan_unit_with_proration_price import NewPlanUnitWithProrationPrice as NewPlanUnitWithProrationPrice
+from .monetary_amount_discount_adjustment import MonetaryAmountDiscountAdjustment as MonetaryAmountDiscountAdjustment
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration as NewDimensionalPriceConfiguration
+from .new_floating_unit_with_percent_price import NewFloatingUnitWithPercentPrice as NewFloatingUnitWithPercentPrice
+from .plan_phase_usage_discount_adjustment import PlanPhaseUsageDiscountAdjustment as PlanPhaseUsageDiscountAdjustment
+from .new_floating_grouped_allocation_price import (
+ NewFloatingGroupedAllocationPrice as NewFloatingGroupedAllocationPrice,
+)
+from .new_plan_grouped_tiered_package_price import NewPlanGroupedTieredPackagePrice as NewPlanGroupedTieredPackagePrice
+from .new_plan_matrix_with_allocation_price import NewPlanMatrixWithAllocationPrice as NewPlanMatrixWithAllocationPrice
+from .new_plan_threshold_total_amount_price import NewPlanThresholdTotalAmountPrice as NewPlanThresholdTotalAmountPrice
+from .plan_phase_amount_discount_adjustment import (
+ PlanPhaseAmountDiscountAdjustment as PlanPhaseAmountDiscountAdjustment,
+)
+from .new_floating_bulk_with_proration_price import (
+ NewFloatingBulkWithProrationPrice as NewFloatingBulkWithProrationPrice,
+)
+from .new_floating_tiered_with_minimum_price import (
+ NewFloatingTieredWithMinimumPrice as NewFloatingTieredWithMinimumPrice,
+)
+from .new_floating_unit_with_proration_price import (
+ NewFloatingUnitWithProrationPrice as NewFloatingUnitWithProrationPrice,
+)
+from .new_plan_cumulative_grouped_bulk_price import (
+ NewPlanCumulativeGroupedBulkPrice as NewPlanCumulativeGroupedBulkPrice,
+)
+from .new_plan_package_with_allocation_price import (
+ NewPlanPackageWithAllocationPrice as NewPlanPackageWithAllocationPrice,
+)
+from .monetary_percentage_discount_adjustment import (
+ MonetaryPercentageDiscountAdjustment as MonetaryPercentageDiscountAdjustment,
+)
+from .new_plan_matrix_with_display_name_price import (
+ NewPlanMatrixWithDisplayNamePrice as NewPlanMatrixWithDisplayNamePrice,
+)
+from .new_plan_max_group_tiered_package_price import (
+ NewPlanMaxGroupTieredPackagePrice as NewPlanMaxGroupTieredPackagePrice,
+)
+from .new_floating_tiered_with_proration_price import (
+ NewFloatingTieredWithProrationPrice as NewFloatingTieredWithProrationPrice,
+)
+from .new_floating_grouped_tiered_package_price import (
+ NewFloatingGroupedTieredPackagePrice as NewFloatingGroupedTieredPackagePrice,
+)
+from .new_floating_matrix_with_allocation_price import (
+ NewFloatingMatrixWithAllocationPrice as NewFloatingMatrixWithAllocationPrice,
+)
+from .new_floating_threshold_total_amount_price import (
+ NewFloatingThresholdTotalAmountPrice as NewFloatingThresholdTotalAmountPrice,
+)
+from .plan_phase_percentage_discount_adjustment import (
+ PlanPhasePercentageDiscountAdjustment as PlanPhasePercentageDiscountAdjustment,
+)
+from .new_floating_cumulative_grouped_bulk_price import (
+ NewFloatingCumulativeGroupedBulkPrice as NewFloatingCumulativeGroupedBulkPrice,
+)
+from .new_floating_package_with_allocation_price import (
+ NewFloatingPackageWithAllocationPrice as NewFloatingPackageWithAllocationPrice,
+)
+from .new_plan_tiered_package_with_minimum_price import (
+ NewPlanTieredPackageWithMinimumPrice as NewPlanTieredPackageWithMinimumPrice,
+)
+from .new_floating_matrix_with_display_name_price import (
+ NewFloatingMatrixWithDisplayNamePrice as NewFloatingMatrixWithDisplayNamePrice,
+)
+from .new_floating_max_group_tiered_package_price import (
+ NewFloatingMaxGroupTieredPackagePrice as NewFloatingMaxGroupTieredPackagePrice,
+)
+from .new_plan_grouped_with_metered_minimum_price import (
+ NewPlanGroupedWithMeteredMinimumPrice as NewPlanGroupedWithMeteredMinimumPrice,
+)
+from .new_plan_grouped_with_prorated_minimum_price import (
+ NewPlanGroupedWithProratedMinimumPrice as NewPlanGroupedWithProratedMinimumPrice,
+)
+from .new_floating_tiered_package_with_minimum_price import (
+ NewFloatingTieredPackageWithMinimumPrice as NewFloatingTieredPackageWithMinimumPrice,
+)
+from .new_floating_grouped_with_metered_minimum_price import (
+ NewFloatingGroupedWithMeteredMinimumPrice as NewFloatingGroupedWithMeteredMinimumPrice,
+)
+from .new_floating_grouped_with_prorated_minimum_price import (
+ NewFloatingGroupedWithProratedMinimumPrice as NewFloatingGroupedWithProratedMinimumPrice,
+)
+from .new_plan_scalable_matrix_with_unit_pricing_price import (
+ NewPlanScalableMatrixWithUnitPricingPrice as NewPlanScalableMatrixWithUnitPricingPrice,
+)
+from .new_plan_scalable_matrix_with_tiered_pricing_price import (
+ NewPlanScalableMatrixWithTieredPricingPrice as NewPlanScalableMatrixWithTieredPricingPrice,
+)
+from .new_floating_scalable_matrix_with_unit_pricing_price import (
+ NewFloatingScalableMatrixWithUnitPricingPrice as NewFloatingScalableMatrixWithUnitPricingPrice,
+)
+from .new_floating_scalable_matrix_with_tiered_pricing_price import (
+ NewFloatingScalableMatrixWithTieredPricingPrice as NewFloatingScalableMatrixWithTieredPricingPrice,
+)
diff --git a/src/orb/types/shared/address.py b/src/orb/types/shared/address.py
new file mode 100644
index 00000000..7900b7ea
--- /dev/null
+++ b/src/orb/types/shared/address.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["Address"]
+
+
+class Address(BaseModel):
+ city: Optional[str] = None
+
+ country: Optional[str] = None
+
+ line1: Optional[str] = None
+
+ line2: Optional[str] = None
+
+ postal_code: Optional[str] = None
+
+ state: Optional[str] = None
diff --git a/src/orb/types/shared/adjustment_interval.py b/src/orb/types/shared/adjustment_interval.py
new file mode 100644
index 00000000..1a080ccd
--- /dev/null
+++ b/src/orb/types/shared/adjustment_interval.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from datetime import datetime
+from typing_extensions import Annotated, TypeAlias
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .plan_phase_maximum_adjustment import PlanPhaseMaximumAdjustment
+from .plan_phase_minimum_adjustment import PlanPhaseMinimumAdjustment
+from .plan_phase_usage_discount_adjustment import PlanPhaseUsageDiscountAdjustment
+from .plan_phase_amount_discount_adjustment import PlanPhaseAmountDiscountAdjustment
+from .plan_phase_percentage_discount_adjustment import PlanPhasePercentageDiscountAdjustment
+
+__all__ = ["AdjustmentInterval", "Adjustment"]
+
+Adjustment: TypeAlias = Annotated[
+ Union[
+ PlanPhaseUsageDiscountAdjustment,
+ PlanPhaseAmountDiscountAdjustment,
+ PlanPhasePercentageDiscountAdjustment,
+ PlanPhaseMinimumAdjustment,
+ PlanPhaseMaximumAdjustment,
+ ],
+ PropertyInfo(discriminator="adjustment_type"),
+]
+
+
+class AdjustmentInterval(BaseModel):
+ id: str
+
+ adjustment: Adjustment
+
+ applies_to_price_interval_ids: List[str]
+ """The price interval IDs that this adjustment applies to."""
+
+ end_date: Optional[datetime] = None
+ """The end date of the adjustment interval."""
+
+ start_date: datetime
+ """The start date of the adjustment interval."""
diff --git a/src/orb/types/shared/aggregated_cost.py b/src/orb/types/shared/aggregated_cost.py
new file mode 100644
index 00000000..9236fdf6
--- /dev/null
+++ b/src/orb/types/shared/aggregated_cost.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from datetime import datetime
+
+from ..._models import BaseModel
+from .per_price_cost import PerPriceCost
+
+__all__ = ["AggregatedCost"]
+
+
+class AggregatedCost(BaseModel):
+ per_price_costs: List[PerPriceCost]
+
+ subtotal: str
+ """Total costs for the timeframe, excluding any minimums and discounts."""
+
+ timeframe_end: datetime
+
+ timeframe_start: datetime
+
+ total: str
+ """Total costs for the timeframe, including any minimums and discounts."""
diff --git a/src/orb/types/shared/allocation.py b/src/orb/types/shared/allocation.py
new file mode 100644
index 00000000..05479b68
--- /dev/null
+++ b/src/orb/types/shared/allocation.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+from .custom_expiration import CustomExpiration
+
+__all__ = ["Allocation"]
+
+
+class Allocation(BaseModel):
+ allows_rollover: bool
+
+ currency: str
+
+ custom_expiration: Optional[CustomExpiration] = None
diff --git a/src/orb/types/shared/amount_discount.py b/src/orb/types/shared/amount_discount.py
index e2d3506f..c2db3e28 100644
--- a/src/orb/types/shared/amount_discount.py
+++ b/src/orb/types/shared/amount_discount.py
@@ -4,19 +4,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
-__all__ = ["AmountDiscount", "Filter"]
-
-
-class Filter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
+__all__ = ["AmountDiscount"]
class AmountDiscount(BaseModel):
@@ -31,7 +21,7 @@ class AmountDiscount(BaseModel):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[List[Filter]] = None
+ filters: Optional[List[TransformPriceFilter]] = None
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str] = None
diff --git a/src/orb/types/shared/amount_discount_interval.py b/src/orb/types/shared/amount_discount_interval.py
new file mode 100644
index 00000000..448c1e46
--- /dev/null
+++ b/src/orb/types/shared/amount_discount_interval.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["AmountDiscountInterval"]
+
+
+class AmountDiscountInterval(BaseModel):
+ amount_discount: str
+ """Only available if discount_type is `amount`."""
+
+ applies_to_price_interval_ids: List[str]
+ """The price interval ids that this discount interval applies to."""
+
+ discount_type: Literal["amount"]
+
+ end_date: Optional[datetime] = None
+ """The end date of the discount interval."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices this discount interval applies to."""
+
+ start_date: datetime
+ """The start date of the discount interval."""
diff --git a/src/orb/types/shared/billable_metric_tiny.py b/src/orb/types/shared/billable_metric_tiny.py
new file mode 100644
index 00000000..03b21c8b
--- /dev/null
+++ b/src/orb/types/shared/billable_metric_tiny.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["BillableMetricTiny"]
+
+
+class BillableMetricTiny(BaseModel):
+ id: str
diff --git a/src/orb/types/shared/billing_cycle_anchor_configuration.py b/src/orb/types/shared/billing_cycle_anchor_configuration.py
new file mode 100644
index 00000000..386d440c
--- /dev/null
+++ b/src/orb/types/shared/billing_cycle_anchor_configuration.py
@@ -0,0 +1,31 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BillingCycleAnchorConfiguration"]
+
+
+class BillingCycleAnchorConfiguration(BaseModel):
+ day: int
+ """The day of the month on which the billing cycle is anchored.
+
+ If the maximum number of days in a month is greater than this value, the last
+ day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
+ means the billing period begins on the 30th.
+ """
+
+ month: Optional[int] = None
+ """The month on which the billing cycle is anchored (e.g.
+
+ a quarterly price anchored in February would have cycles starting February, May,
+ August, and November).
+ """
+
+ year: Optional[int] = None
+ """The year on which the billing cycle is anchored (e.g.
+
+ a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
+ 2023, 2025, etc.).
+ """
diff --git a/src/orb/types/shared/billing_cycle_configuration.py b/src/orb/types/shared/billing_cycle_configuration.py
new file mode 100644
index 00000000..d66834f9
--- /dev/null
+++ b/src/orb/types/shared/billing_cycle_configuration.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["BillingCycleConfiguration"]
+
+
+class BillingCycleConfiguration(BaseModel):
+ duration: int
+
+ duration_unit: Literal["day", "month"]
diff --git a/src/orb/types/shared/bps_config.py b/src/orb/types/shared/bps_config.py
new file mode 100644
index 00000000..cf797e6c
--- /dev/null
+++ b/src/orb/types/shared/bps_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BPSConfig"]
+
+
+class BPSConfig(BaseModel):
+ bps: float
+ """Basis point take rate per event"""
+
+ per_unit_maximum: Optional[str] = None
+ """Optional currency amount maximum to cap spend per event"""
diff --git a/src/orb/types/shared/bps_tier.py b/src/orb/types/shared/bps_tier.py
new file mode 100644
index 00000000..b4bc5f66
--- /dev/null
+++ b/src/orb/types/shared/bps_tier.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BPSTier"]
+
+
+class BPSTier(BaseModel):
+ bps: float
+ """Per-event basis point rate"""
+
+ minimum_amount: str
+ """Exclusive tier starting value"""
+
+ maximum_amount: Optional[str] = None
+ """Inclusive tier ending value"""
+
+ per_unit_maximum: Optional[str] = None
+ """Per unit maximum to charge"""
diff --git a/src/orb/types/shared/bulk_bps_config.py b/src/orb/types/shared/bulk_bps_config.py
new file mode 100644
index 00000000..b054fa55
--- /dev/null
+++ b/src/orb/types/shared/bulk_bps_config.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+from .bulk_bps_tier import BulkBPSTier
+
+__all__ = ["BulkBPSConfig"]
+
+
+class BulkBPSConfig(BaseModel):
+ tiers: List[BulkBPSTier]
+ """
+ Tiers for a bulk BPS pricing model where all usage is aggregated to a single
+ tier based on total volume
+ """
diff --git a/src/orb/types/shared/bulk_bps_tier.py b/src/orb/types/shared/bulk_bps_tier.py
new file mode 100644
index 00000000..5d57d718
--- /dev/null
+++ b/src/orb/types/shared/bulk_bps_tier.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BulkBPSTier"]
+
+
+class BulkBPSTier(BaseModel):
+ bps: float
+ """Basis points to rate on"""
+
+ maximum_amount: Optional[str] = None
+ """Upper bound for tier"""
+
+ per_unit_maximum: Optional[str] = None
+ """The maximum amount to charge for any one event"""
diff --git a/src/orb/types/shared/bulk_config.py b/src/orb/types/shared/bulk_config.py
new file mode 100644
index 00000000..cc95e5c5
--- /dev/null
+++ b/src/orb/types/shared/bulk_config.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+from .bulk_tier import BulkTier
+
+__all__ = ["BulkConfig"]
+
+
+class BulkConfig(BaseModel):
+ tiers: List[BulkTier]
+ """Bulk tiers for rating based on total usage volume"""
diff --git a/src/orb/types/shared/bulk_tier.py b/src/orb/types/shared/bulk_tier.py
new file mode 100644
index 00000000..993a07e9
--- /dev/null
+++ b/src/orb/types/shared/bulk_tier.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["BulkTier"]
+
+
+class BulkTier(BaseModel):
+ unit_amount: str
+ """Amount per unit"""
+
+ maximum_units: Optional[float] = None
+ """Upper bound for this tier"""
diff --git a/src/orb/types/shared/changed_subscription_resources.py b/src/orb/types/shared/changed_subscription_resources.py
new file mode 100644
index 00000000..b198d791
--- /dev/null
+++ b/src/orb/types/shared/changed_subscription_resources.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .invoice import Invoice
+from ..._models import BaseModel
+from .credit_note import CreditNote
+
+__all__ = ["ChangedSubscriptionResources"]
+
+
+class ChangedSubscriptionResources(BaseModel):
+ created_credit_notes: List[CreditNote]
+ """The credit notes that were created as part of this operation."""
+
+ created_invoices: List[Invoice]
+ """The invoices that were created as part of this operation."""
+
+ voided_credit_notes: List[CreditNote]
+ """The credit notes that were voided as part of this operation."""
+
+ voided_invoices: List[Invoice]
+ """The invoices that were voided as part of this operation."""
diff --git a/src/orb/types/shared/conversion_rate_tier.py b/src/orb/types/shared/conversion_rate_tier.py
new file mode 100644
index 00000000..aba7a449
--- /dev/null
+++ b/src/orb/types/shared/conversion_rate_tier.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["ConversionRateTier"]
+
+
+class ConversionRateTier(BaseModel):
+ first_unit: float
+ """Exclusive tier starting value"""
+
+ unit_amount: str
+ """Amount per unit of overage"""
+
+ last_unit: Optional[float] = None
+ """Inclusive tier ending value. If null, this is treated as the last tier"""
diff --git a/src/orb/types/shared/conversion_rate_tiered_config.py b/src/orb/types/shared/conversion_rate_tiered_config.py
new file mode 100644
index 00000000..e6d4428d
--- /dev/null
+++ b/src/orb/types/shared/conversion_rate_tiered_config.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+from .conversion_rate_tier import ConversionRateTier
+
+__all__ = ["ConversionRateTieredConfig"]
+
+
+class ConversionRateTieredConfig(BaseModel):
+ tiers: List[ConversionRateTier]
+ """Tiers for rating based on total usage quantities into the specified tier"""
diff --git a/src/orb/types/shared/conversion_rate_unit_config.py b/src/orb/types/shared/conversion_rate_unit_config.py
new file mode 100644
index 00000000..f80c2145
--- /dev/null
+++ b/src/orb/types/shared/conversion_rate_unit_config.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["ConversionRateUnitConfig"]
+
+
+class ConversionRateUnitConfig(BaseModel):
+ unit_amount: str
+ """Amount per unit of overage"""
diff --git a/src/orb/types/shared/coupon_redemption.py b/src/orb/types/shared/coupon_redemption.py
new file mode 100644
index 00000000..c9918acf
--- /dev/null
+++ b/src/orb/types/shared/coupon_redemption.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["CouponRedemption"]
+
+
+class CouponRedemption(BaseModel):
+ coupon_id: str
+
+ end_date: Optional[datetime] = None
+
+ start_date: datetime
diff --git a/src/orb/types/credit_note.py b/src/orb/types/shared/credit_note.py
similarity index 86%
rename from src/orb/types/credit_note.py
rename to src/orb/types/shared/credit_note.py
index ac789c61..2b205f3f 100644
--- a/src/orb/types/credit_note.py
+++ b/src/orb/types/shared/credit_note.py
@@ -4,13 +4,13 @@
from datetime import datetime
from typing_extensions import Literal
-from .._models import BaseModel
+from ..._models import BaseModel
+from .tax_amount import TaxAmount
+from .customer_minified import CustomerMinified
__all__ = [
"CreditNote",
- "Customer",
"LineItem",
- "LineItemTaxAmount",
"LineItemDiscount",
"MaximumAmountAdjustment",
"MaximumAmountAdjustmentAppliesToPrice",
@@ -19,23 +19,6 @@
]
-class Customer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class LineItemTaxAmount(BaseModel):
- amount: str
- """The amount of additional tax incurred by this tax rate."""
-
- tax_rate_description: str
- """The human-readable description of the applied tax rate."""
-
- tax_rate_percentage: Optional[str] = None
- """The tax rate percentage, out of 100."""
-
-
class LineItemDiscount(BaseModel):
id: str
@@ -71,7 +54,7 @@ class LineItem(BaseModel):
subtotal: str
"""The amount of the line item, excluding any line item minimums and discounts."""
- tax_amounts: List[LineItemTaxAmount]
+ tax_amounts: List[TaxAmount]
"""Any tax amounts applied onto the line item."""
discounts: Optional[List[LineItemDiscount]] = None
@@ -127,7 +110,7 @@ class CreditNote(BaseModel):
credit_note_pdf: Optional[str] = None
"""A URL to a PDF of the credit note."""
- customer: Customer
+ customer: CustomerMinified
invoice_id: str
"""The id of the invoice resource that this credit note is applied to."""
diff --git a/src/orb/types/shared/credit_note_tiny.py b/src/orb/types/shared/credit_note_tiny.py
new file mode 100644
index 00000000..325c804b
--- /dev/null
+++ b/src/orb/types/shared/credit_note_tiny.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["CreditNoteTiny"]
+
+
+class CreditNoteTiny(BaseModel):
+ id: str
+ """The id of the Credit note"""
diff --git a/src/orb/types/shared/custom_expiration.py b/src/orb/types/shared/custom_expiration.py
new file mode 100644
index 00000000..76570dc2
--- /dev/null
+++ b/src/orb/types/shared/custom_expiration.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["CustomExpiration"]
+
+
+class CustomExpiration(BaseModel):
+ duration: int
+
+ duration_unit: Literal["day", "month"]
diff --git a/src/orb/types/shared/customer_minified.py b/src/orb/types/shared/customer_minified.py
new file mode 100644
index 00000000..7eab1e91
--- /dev/null
+++ b/src/orb/types/shared/customer_minified.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["CustomerMinified"]
+
+
+class CustomerMinified(BaseModel):
+ id: str
+
+ external_customer_id: Optional[str] = None
diff --git a/src/orb/types/shared/customer_tax_id.py b/src/orb/types/shared/customer_tax_id.py
new file mode 100644
index 00000000..5dab71eb
--- /dev/null
+++ b/src/orb/types/shared/customer_tax_id.py
@@ -0,0 +1,166 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["CustomerTaxID"]
+
+
+class CustomerTaxID(BaseModel):
+ country: Literal[
+ "AD",
+ "AE",
+ "AR",
+ "AT",
+ "AU",
+ "BE",
+ "BG",
+ "BH",
+ "BO",
+ "BR",
+ "CA",
+ "CH",
+ "CL",
+ "CN",
+ "CO",
+ "CR",
+ "CY",
+ "CZ",
+ "DE",
+ "DK",
+ "EE",
+ "DO",
+ "EC",
+ "EG",
+ "ES",
+ "EU",
+ "FI",
+ "FR",
+ "GB",
+ "GE",
+ "GR",
+ "HK",
+ "HR",
+ "HU",
+ "ID",
+ "IE",
+ "IL",
+ "IN",
+ "IS",
+ "IT",
+ "JP",
+ "KE",
+ "KR",
+ "KZ",
+ "LI",
+ "LT",
+ "LU",
+ "LV",
+ "MT",
+ "MX",
+ "MY",
+ "NG",
+ "NL",
+ "NO",
+ "NZ",
+ "OM",
+ "PE",
+ "PH",
+ "PL",
+ "PT",
+ "RO",
+ "RS",
+ "RU",
+ "SA",
+ "SE",
+ "SG",
+ "SI",
+ "SK",
+ "SV",
+ "TH",
+ "TR",
+ "TW",
+ "UA",
+ "US",
+ "UY",
+ "VE",
+ "VN",
+ "ZA",
+ ]
+
+ type: Literal[
+ "ad_nrt",
+ "ae_trn",
+ "ar_cuit",
+ "eu_vat",
+ "au_abn",
+ "au_arn",
+ "bg_uic",
+ "bh_vat",
+ "bo_tin",
+ "br_cnpj",
+ "br_cpf",
+ "ca_bn",
+ "ca_gst_hst",
+ "ca_pst_bc",
+ "ca_pst_mb",
+ "ca_pst_sk",
+ "ca_qst",
+ "ch_vat",
+ "cl_tin",
+ "cn_tin",
+ "co_nit",
+ "cr_tin",
+ "do_rcn",
+ "ec_ruc",
+ "eg_tin",
+ "es_cif",
+ "eu_oss_vat",
+ "gb_vat",
+ "ge_vat",
+ "hk_br",
+ "hu_tin",
+ "id_npwp",
+ "il_vat",
+ "in_gst",
+ "is_vat",
+ "jp_cn",
+ "jp_rn",
+ "jp_trn",
+ "ke_pin",
+ "kr_brn",
+ "kz_bin",
+ "li_uid",
+ "mx_rfc",
+ "my_frp",
+ "my_itn",
+ "my_sst",
+ "ng_tin",
+ "no_vat",
+ "no_voec",
+ "nz_gst",
+ "om_vat",
+ "pe_ruc",
+ "ph_tin",
+ "ro_tin",
+ "rs_pib",
+ "ru_inn",
+ "ru_kpp",
+ "sa_vat",
+ "sg_gst",
+ "sg_uen",
+ "si_tin",
+ "sv_nit",
+ "th_vat",
+ "tr_tin",
+ "tw_vat",
+ "ua_vat",
+ "us_ein",
+ "uy_ruc",
+ "ve_rif",
+ "vn_tin",
+ "za_vat",
+ ]
+
+ value: str
diff --git a/src/orb/types/shared/dimensional_price_configuration.py b/src/orb/types/shared/dimensional_price_configuration.py
new file mode 100644
index 00000000..eed85d21
--- /dev/null
+++ b/src/orb/types/shared/dimensional_price_configuration.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+
+__all__ = ["DimensionalPriceConfiguration"]
+
+
+class DimensionalPriceConfiguration(BaseModel):
+ dimension_values: List[str]
+
+ dimensional_price_group_id: str
diff --git a/src/orb/types/shared/fixed_fee_quantity_schedule_entry.py b/src/orb/types/shared/fixed_fee_quantity_schedule_entry.py
new file mode 100644
index 00000000..de32eded
--- /dev/null
+++ b/src/orb/types/shared/fixed_fee_quantity_schedule_entry.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["FixedFeeQuantityScheduleEntry"]
+
+
+class FixedFeeQuantityScheduleEntry(BaseModel):
+ end_date: Optional[datetime] = None
+
+ price_id: str
+
+ quantity: float
+
+ start_date: datetime
diff --git a/src/orb/types/shared/fixed_fee_quantity_transition.py b/src/orb/types/shared/fixed_fee_quantity_transition.py
new file mode 100644
index 00000000..60c0ac5a
--- /dev/null
+++ b/src/orb/types/shared/fixed_fee_quantity_transition.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["FixedFeeQuantityTransition"]
+
+
+class FixedFeeQuantityTransition(BaseModel):
+ effective_date: datetime
+
+ price_id: str
+
+ quantity: int
diff --git a/src/orb/types/invoice.py b/src/orb/types/shared/invoice.py
similarity index 61%
rename from src/orb/types/invoice.py
rename to src/orb/types/shared/invoice.py
index 05d91a75..c25e9812 100644
--- a/src/orb/types/invoice.py
+++ b/src/orb/types/shared/invoice.py
@@ -5,54 +5,37 @@
from typing_extensions import Literal, Annotated, TypeAlias
from .price import Price
-from .._utils import PropertyInfo
-from .._models import BaseModel
-from .shared.discount import Discount
-from .shared.invoice_level_discount import InvoiceLevelDiscount
+from .address import Address
+from .maximum import Maximum
+from .minimum import Minimum
+from ..._utils import PropertyInfo
+from .discount import Discount
+from ..._models import BaseModel
+from .tax_amount import TaxAmount
+from .invoice_tiny import InvoiceTiny
+from .customer_tax_id import CustomerTaxID
+from .credit_note_tiny import CreditNoteTiny
+from .customer_minified import CustomerMinified
+from .tier_sub_line_item import TierSubLineItem
+from .other_sub_line_item import OtherSubLineItem
+from .matrix_sub_line_item import MatrixSubLineItem
+from .subscription_minified import SubscriptionMinified
+from .invoice_level_discount import InvoiceLevelDiscount
+from .monetary_maximum_adjustment import MonetaryMaximumAdjustment
+from .monetary_minimum_adjustment import MonetaryMinimumAdjustment
+from .monetary_usage_discount_adjustment import MonetaryUsageDiscountAdjustment
+from .monetary_amount_discount_adjustment import MonetaryAmountDiscountAdjustment
+from .monetary_percentage_discount_adjustment import MonetaryPercentageDiscountAdjustment
__all__ = [
"Invoice",
"AutoCollection",
- "BillingAddress",
"CreditNote",
- "Customer",
"CustomerBalanceTransaction",
- "CustomerBalanceTransactionCreditNote",
- "CustomerBalanceTransactionInvoice",
- "CustomerTaxID",
"LineItem",
"LineItemAdjustment",
- "LineItemAdjustmentMonetaryUsageDiscountAdjustment",
- "LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryAmountDiscountAdjustment",
- "LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryPercentageDiscountAdjustment",
- "LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter",
- "LineItemAdjustmentMonetaryMinimumAdjustment",
- "LineItemAdjustmentMonetaryMinimumAdjustmentFilter",
- "LineItemAdjustmentMonetaryMaximumAdjustment",
- "LineItemAdjustmentMonetaryMaximumAdjustmentFilter",
- "LineItemMaximum",
- "LineItemMaximumFilter",
- "LineItemMinimum",
- "LineItemMinimumFilter",
"LineItemSubLineItem",
- "LineItemSubLineItemMatrixSubLineItem",
- "LineItemSubLineItemMatrixSubLineItemGrouping",
- "LineItemSubLineItemMatrixSubLineItemMatrixConfig",
- "LineItemSubLineItemTierSubLineItem",
- "LineItemSubLineItemTierSubLineItemGrouping",
- "LineItemSubLineItemTierSubLineItemTierConfig",
- "LineItemSubLineItemOtherSubLineItem",
- "LineItemSubLineItemOtherSubLineItemGrouping",
- "LineItemTaxAmount",
- "Maximum",
- "MaximumFilter",
- "Minimum",
- "MinimumFilter",
"PaymentAttempt",
- "ShippingAddress",
- "Subscription",
]
@@ -81,20 +64,6 @@ class AutoCollection(BaseModel):
"""
-class BillingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
class CreditNote(BaseModel):
id: str
@@ -116,22 +85,6 @@ class CreditNote(BaseModel):
"""
-class Customer(BaseModel):
- id: str
-
- external_customer_id: Optional[str] = None
-
-
-class CustomerBalanceTransactionCreditNote(BaseModel):
- id: str
- """The id of the Credit note"""
-
-
-class CustomerBalanceTransactionInvoice(BaseModel):
- id: str
- """The Invoice id"""
-
-
class CustomerBalanceTransaction(BaseModel):
id: str
"""A unique id for this transaction."""
@@ -154,7 +107,7 @@ class CustomerBalanceTransaction(BaseModel):
created_at: datetime
"""The creation time of this transaction."""
- credit_note: Optional[CustomerBalanceTransactionCreditNote] = None
+ credit_note: Optional[CreditNoteTiny] = None
description: Optional[str] = None
"""An optional description provided for manual customer balance adjustments."""
@@ -165,7 +118,7 @@ class CustomerBalanceTransaction(BaseModel):
customer's currency.
"""
- invoice: Optional[CustomerBalanceTransactionInvoice] = None
+ invoice: Optional[InvoiceTiny] = None
starting_balance: str
"""
@@ -176,531 +129,22 @@ class CustomerBalanceTransaction(BaseModel):
type: Literal["increment", "decrement"]
-class CustomerTaxID(BaseModel):
- country: Literal[
- "AD",
- "AE",
- "AR",
- "AT",
- "AU",
- "BE",
- "BG",
- "BH",
- "BO",
- "BR",
- "CA",
- "CH",
- "CL",
- "CN",
- "CO",
- "CR",
- "CY",
- "CZ",
- "DE",
- "DK",
- "EE",
- "DO",
- "EC",
- "EG",
- "ES",
- "EU",
- "FI",
- "FR",
- "GB",
- "GE",
- "GR",
- "HK",
- "HR",
- "HU",
- "ID",
- "IE",
- "IL",
- "IN",
- "IS",
- "IT",
- "JP",
- "KE",
- "KR",
- "KZ",
- "LI",
- "LT",
- "LU",
- "LV",
- "MT",
- "MX",
- "MY",
- "NG",
- "NL",
- "NO",
- "NZ",
- "OM",
- "PE",
- "PH",
- "PL",
- "PT",
- "RO",
- "RS",
- "RU",
- "SA",
- "SE",
- "SG",
- "SI",
- "SK",
- "SV",
- "TH",
- "TR",
- "TW",
- "UA",
- "US",
- "UY",
- "VE",
- "VN",
- "ZA",
- ]
-
- type: Literal[
- "ad_nrt",
- "ae_trn",
- "ar_cuit",
- "eu_vat",
- "au_abn",
- "au_arn",
- "bg_uic",
- "bh_vat",
- "bo_tin",
- "br_cnpj",
- "br_cpf",
- "ca_bn",
- "ca_gst_hst",
- "ca_pst_bc",
- "ca_pst_mb",
- "ca_pst_sk",
- "ca_qst",
- "ch_vat",
- "cl_tin",
- "cn_tin",
- "co_nit",
- "cr_tin",
- "do_rcn",
- "ec_ruc",
- "eg_tin",
- "es_cif",
- "eu_oss_vat",
- "gb_vat",
- "ge_vat",
- "hk_br",
- "hu_tin",
- "id_npwp",
- "il_vat",
- "in_gst",
- "is_vat",
- "jp_cn",
- "jp_rn",
- "jp_trn",
- "ke_pin",
- "kr_brn",
- "kz_bin",
- "li_uid",
- "mx_rfc",
- "my_frp",
- "my_itn",
- "my_sst",
- "ng_tin",
- "no_vat",
- "no_voec",
- "nz_gst",
- "om_vat",
- "pe_ruc",
- "ph_tin",
- "ro_tin",
- "rs_pib",
- "ru_inn",
- "ru_kpp",
- "sa_vat",
- "sg_gst",
- "sg_uen",
- "si_tin",
- "sv_nit",
- "th_vat",
- "tr_tin",
- "tw_vat",
- "ua_vat",
- "us_ein",
- "uy_ruc",
- "ve_rif",
- "vn_tin",
- "za_vat",
- ]
-
- value: str
-
-
-class LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryPercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryPercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class LineItemAdjustmentMonetaryMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemAdjustmentMonetaryMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- amount: str
- """The value applied by an adjustment."""
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[LineItemAdjustmentMonetaryMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
LineItemAdjustment: TypeAlias = Annotated[
Union[
- LineItemAdjustmentMonetaryUsageDiscountAdjustment,
- LineItemAdjustmentMonetaryAmountDiscountAdjustment,
- LineItemAdjustmentMonetaryPercentageDiscountAdjustment,
- LineItemAdjustmentMonetaryMinimumAdjustment,
- LineItemAdjustmentMonetaryMaximumAdjustment,
+ MonetaryUsageDiscountAdjustment,
+ MonetaryAmountDiscountAdjustment,
+ MonetaryPercentageDiscountAdjustment,
+ MonetaryMinimumAdjustment,
+ MonetaryMaximumAdjustment,
],
PropertyInfo(discriminator="adjustment_type"),
]
-
-class LineItemMaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemMaximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[LineItemMaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class LineItemMinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class LineItemMinimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[LineItemMinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
-class LineItemSubLineItemMatrixSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemMatrixSubLineItemMatrixConfig(BaseModel):
- dimension_values: List[Optional[str]]
- """The ordered dimension values for this line item."""
-
-
-class LineItemSubLineItemMatrixSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemMatrixSubLineItemGrouping] = None
-
- matrix_config: LineItemSubLineItemMatrixSubLineItemMatrixConfig
-
- name: str
-
- quantity: float
-
- type: Literal["matrix"]
-
-
-class LineItemSubLineItemTierSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemTierSubLineItemTierConfig(BaseModel):
- first_unit: float
-
- last_unit: Optional[float] = None
-
- unit_amount: str
-
-
-class LineItemSubLineItemTierSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemTierSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- tier_config: LineItemSubLineItemTierSubLineItemTierConfig
-
- type: Literal["tier"]
-
-
-class LineItemSubLineItemOtherSubLineItemGrouping(BaseModel):
- key: str
-
- value: Optional[str] = None
- """No value indicates the default group"""
-
-
-class LineItemSubLineItemOtherSubLineItem(BaseModel):
- amount: str
- """The total amount for this sub line item."""
-
- grouping: Optional[LineItemSubLineItemOtherSubLineItemGrouping] = None
-
- name: str
-
- quantity: float
-
- type: Literal["'null'"]
-
-
LineItemSubLineItem: TypeAlias = Annotated[
- Union[
- LineItemSubLineItemMatrixSubLineItem, LineItemSubLineItemTierSubLineItem, LineItemSubLineItemOtherSubLineItem
- ],
- PropertyInfo(discriminator="type"),
+ Union[MatrixSubLineItem, TierSubLineItem, OtherSubLineItem], PropertyInfo(discriminator="type")
]
-class LineItemTaxAmount(BaseModel):
- amount: str
- """The amount of additional tax incurred by this tax rate."""
-
- tax_rate_description: str
- """The human-readable description of the applied tax rate."""
-
- tax_rate_percentage: Optional[str] = None
- """The tax rate percentage, out of 100."""
-
-
class LineItem(BaseModel):
id: str
"""A unique ID for this line item."""
@@ -742,13 +186,13 @@ class LineItem(BaseModel):
values for this particular grouping.
"""
- maximum: Optional[LineItemMaximum] = None
+ maximum: Optional[Maximum] = None
"""This field is deprecated in favor of `adjustments`."""
maximum_amount: Optional[str] = None
"""This field is deprecated in favor of `adjustments`."""
- minimum: Optional[LineItemMinimum] = None
+ minimum: Optional[Minimum] = None
"""This field is deprecated in favor of `adjustments`."""
minimum_amount: Optional[str] = None
@@ -789,7 +233,7 @@ class LineItem(BaseModel):
subtotal: str
"""The line amount before before any adjustments."""
- tax_amounts: List[LineItemTaxAmount]
+ tax_amounts: List[TaxAmount]
"""An array of tax rates and their incurred tax amounts.
Empty if no tax integration is configured.
@@ -801,56 +245,6 @@ class LineItem(BaseModel):
"""
-class MaximumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Maximum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this maximum amount applies to.
-
- For plan/plan phase maximums, this can be a subset of prices.
- """
-
- filters: List[MaximumFilter]
- """The filters that determine which prices to apply this maximum to."""
-
- maximum_amount: str
- """Maximum amount applied"""
-
-
-class MinimumFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class Minimum(BaseModel):
- applies_to_price_ids: List[str]
- """List of price_ids that this minimum amount applies to.
-
- For plan/plan phase minimums, this can be a subset of prices.
- """
-
- filters: List[MinimumFilter]
- """The filters that determine which prices to apply this minimum to."""
-
- minimum_amount: str
- """Minimum amount applied"""
-
-
class PaymentAttempt(BaseModel):
id: str
"""The ID of the payment attempt."""
@@ -871,24 +265,6 @@ class PaymentAttempt(BaseModel):
"""Whether the payment attempt succeeded."""
-class ShippingAddress(BaseModel):
- city: Optional[str] = None
-
- country: Optional[str] = None
-
- line1: Optional[str] = None
-
- line2: Optional[str] = None
-
- postal_code: Optional[str] = None
-
- state: Optional[str] = None
-
-
-class Subscription(BaseModel):
- id: str
-
-
class Invoice(BaseModel):
id: str
@@ -900,7 +276,7 @@ class Invoice(BaseModel):
auto_collection: AutoCollection
- billing_address: Optional[BillingAddress] = None
+ billing_address: Optional[Address] = None
created_at: datetime
"""The creation time of the resource in Orb."""
@@ -911,7 +287,7 @@ class Invoice(BaseModel):
currency: str
"""An ISO 4217 currency string or `credits`"""
- customer: Customer
+ customer: CustomerMinified
customer_balance_transactions: List[CustomerBalanceTransaction]
@@ -1132,11 +508,11 @@ class Invoice(BaseModel):
scheduled to be issued.
"""
- shipping_address: Optional[ShippingAddress] = None
+ shipping_address: Optional[Address] = None
status: Literal["issued", "paid", "synced", "void", "draft"]
- subscription: Optional[Subscription] = None
+ subscription: Optional[SubscriptionMinified] = None
subtotal: str
"""The total before any discounts and minimums are applied."""
diff --git a/src/orb/types/shared/invoice_tiny.py b/src/orb/types/shared/invoice_tiny.py
new file mode 100644
index 00000000..eb0f7743
--- /dev/null
+++ b/src/orb/types/shared/invoice_tiny.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["InvoiceTiny"]
+
+
+class InvoiceTiny(BaseModel):
+ id: str
+ """The Invoice id"""
diff --git a/src/orb/types/shared/item_slim.py b/src/orb/types/shared/item_slim.py
new file mode 100644
index 00000000..c35092ea
--- /dev/null
+++ b/src/orb/types/shared/item_slim.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["ItemSlim"]
+
+
+class ItemSlim(BaseModel):
+ id: str
+
+ name: str
diff --git a/src/orb/types/shared/matrix_config.py b/src/orb/types/shared/matrix_config.py
new file mode 100644
index 00000000..dafa4699
--- /dev/null
+++ b/src/orb/types/shared/matrix_config.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+from .matrix_value import MatrixValue
+
+__all__ = ["MatrixConfig"]
+
+
+class MatrixConfig(BaseModel):
+ default_unit_amount: str
+ """Default per unit rate for any usage not bucketed into a specified matrix_value"""
+
+ dimensions: List[Optional[str]]
+ """One or two event property values to evaluate matrix groups by"""
+
+ matrix_values: List[MatrixValue]
+ """Matrix values for specified matrix grouping keys"""
diff --git a/src/orb/types/shared/matrix_sub_line_item.py b/src/orb/types/shared/matrix_sub_line_item.py
new file mode 100644
index 00000000..232ad73f
--- /dev/null
+++ b/src/orb/types/shared/matrix_sub_line_item.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .sub_line_item_grouping import SubLineItemGrouping
+from .sub_line_item_matrix_config import SubLineItemMatrixConfig
+
+__all__ = ["MatrixSubLineItem"]
+
+
+class MatrixSubLineItem(BaseModel):
+ amount: str
+ """The total amount for this sub line item."""
+
+ grouping: Optional[SubLineItemGrouping] = None
+
+ matrix_config: SubLineItemMatrixConfig
+
+ name: str
+
+ quantity: float
+
+ type: Literal["matrix"]
diff --git a/src/orb/types/shared/matrix_value.py b/src/orb/types/shared/matrix_value.py
new file mode 100644
index 00000000..4a9e9707
--- /dev/null
+++ b/src/orb/types/shared/matrix_value.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["MatrixValue"]
+
+
+class MatrixValue(BaseModel):
+ dimension_values: List[Optional[str]]
+ """One or two matrix keys to filter usage to this Matrix value by.
+
+ For example, ["region", "tier"] could be used to filter cloud usage by a cloud
+ region and an instance tier.
+ """
+
+ unit_amount: str
+ """Unit price for the specified dimension_values"""
diff --git a/src/orb/types/shared/matrix_with_allocation_config.py b/src/orb/types/shared/matrix_with_allocation_config.py
new file mode 100644
index 00000000..ef196223
--- /dev/null
+++ b/src/orb/types/shared/matrix_with_allocation_config.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+from .matrix_value import MatrixValue
+
+__all__ = ["MatrixWithAllocationConfig"]
+
+
+class MatrixWithAllocationConfig(BaseModel):
+ allocation: float
+ """Allocation to be used to calculate the price"""
+
+ default_unit_amount: str
+ """Default per unit rate for any usage not bucketed into a specified matrix_value"""
+
+ dimensions: List[Optional[str]]
+ """One or two event property values to evaluate matrix groups by"""
+
+ matrix_values: List[MatrixValue]
+ """Matrix values for specified matrix grouping keys"""
diff --git a/src/orb/types/shared/maximum.py b/src/orb/types/shared/maximum.py
new file mode 100644
index 00000000..406311c3
--- /dev/null
+++ b/src/orb/types/shared/maximum.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["Maximum"]
+
+
+class Maximum(BaseModel):
+ applies_to_price_ids: List[str]
+ """List of price_ids that this maximum amount applies to.
+
+ For plan/plan phase maximums, this can be a subset of prices.
+ """
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this maximum to."""
+
+ maximum_amount: str
+ """Maximum amount applied"""
diff --git a/src/orb/types/shared/maximum_interval.py b/src/orb/types/shared/maximum_interval.py
new file mode 100644
index 00000000..2193a269
--- /dev/null
+++ b/src/orb/types/shared/maximum_interval.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MaximumInterval"]
+
+
+class MaximumInterval(BaseModel):
+ applies_to_price_interval_ids: List[str]
+ """The price interval ids that this maximum interval applies to."""
+
+ end_date: Optional[datetime] = None
+ """The end date of the maximum interval."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices this maximum interval applies to."""
+
+ maximum_amount: str
+ """
+ The maximum amount to charge in a given billing period for the price intervals
+ this transform applies to.
+ """
+
+ start_date: datetime
+ """The start date of the maximum interval."""
diff --git a/src/orb/types/shared/minimum.py b/src/orb/types/shared/minimum.py
new file mode 100644
index 00000000..a8c00b84
--- /dev/null
+++ b/src/orb/types/shared/minimum.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["Minimum"]
+
+
+class Minimum(BaseModel):
+ applies_to_price_ids: List[str]
+ """List of price_ids that this minimum amount applies to.
+
+ For plan/plan phase minimums, this can be a subset of prices.
+ """
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this minimum to."""
+
+ minimum_amount: str
+ """Minimum amount applied"""
diff --git a/src/orb/types/shared/minimum_interval.py b/src/orb/types/shared/minimum_interval.py
new file mode 100644
index 00000000..6aaf514b
--- /dev/null
+++ b/src/orb/types/shared/minimum_interval.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MinimumInterval"]
+
+
+class MinimumInterval(BaseModel):
+ applies_to_price_interval_ids: List[str]
+ """The price interval ids that this minimum interval applies to."""
+
+ end_date: Optional[datetime] = None
+ """The end date of the minimum interval."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices this minimum interval applies to."""
+
+ minimum_amount: str
+ """
+ The minimum amount to charge in a given billing period for the price intervals
+ this minimum applies to.
+ """
+
+ start_date: datetime
+ """The start date of the minimum interval."""
diff --git a/src/orb/types/shared/monetary_amount_discount_adjustment.py b/src/orb/types/shared/monetary_amount_discount_adjustment.py
new file mode 100644
index 00000000..15f8d0b3
--- /dev/null
+++ b/src/orb/types/shared/monetary_amount_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MonetaryAmountDiscountAdjustment"]
+
+
+class MonetaryAmountDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["amount_discount"]
+
+ amount: str
+ """The value applied by an adjustment."""
+
+ amount_discount: str
+ """
+ The amount by which to discount the prices this adjustment applies to in a given
+ billing period.
+ """
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/monetary_maximum_adjustment.py b/src/orb/types/shared/monetary_maximum_adjustment.py
new file mode 100644
index 00000000..78d9477b
--- /dev/null
+++ b/src/orb/types/shared/monetary_maximum_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MonetaryMaximumAdjustment"]
+
+
+class MonetaryMaximumAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["maximum"]
+
+ amount: str
+ """The value applied by an adjustment."""
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ maximum_amount: str
+ """
+ The maximum amount to charge in a given billing period for the prices this
+ adjustment applies to.
+ """
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/monetary_minimum_adjustment.py b/src/orb/types/shared/monetary_minimum_adjustment.py
new file mode 100644
index 00000000..4e9af71b
--- /dev/null
+++ b/src/orb/types/shared/monetary_minimum_adjustment.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MonetaryMinimumAdjustment"]
+
+
+class MonetaryMinimumAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["minimum"]
+
+ amount: str
+ """The value applied by an adjustment."""
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ item_id: str
+ """The item ID that revenue from this minimum will be attributed to."""
+
+ minimum_amount: str
+ """
+ The minimum amount to charge in a given billing period for the prices this
+ adjustment applies to.
+ """
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/monetary_percentage_discount_adjustment.py b/src/orb/types/shared/monetary_percentage_discount_adjustment.py
new file mode 100644
index 00000000..6cd9525a
--- /dev/null
+++ b/src/orb/types/shared/monetary_percentage_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MonetaryPercentageDiscountAdjustment"]
+
+
+class MonetaryPercentageDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["percentage_discount"]
+
+ amount: str
+ """The value applied by an adjustment."""
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ percentage_discount: float
+ """
+ The percentage (as a value between 0 and 1) by which to discount the price
+ intervals this adjustment applies to in a given billing period.
+ """
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/monetary_usage_discount_adjustment.py b/src/orb/types/shared/monetary_usage_discount_adjustment.py
new file mode 100644
index 00000000..ce7f1074
--- /dev/null
+++ b/src/orb/types/shared/monetary_usage_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["MonetaryUsageDiscountAdjustment"]
+
+
+class MonetaryUsageDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["usage_discount"]
+
+ amount: str
+ """The value applied by an adjustment."""
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
+
+ usage_discount: float
+ """
+ The number of usage units by which to discount the price this adjustment applies
+ to in a given billing period.
+ """
diff --git a/src/orb/types/shared/new_allocation_price.py b/src/orb/types/shared/new_allocation_price.py
new file mode 100644
index 00000000..9f4e1d8e
--- /dev/null
+++ b/src/orb/types/shared/new_allocation_price.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .custom_expiration import CustomExpiration
+
+__all__ = ["NewAllocationPrice"]
+
+
+class NewAllocationPrice(BaseModel):
+ amount: str
+ """An amount of the currency to allocate to the customer at the specified cadence."""
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+ """The cadence at which to allocate the amount to the customer."""
+
+ currency: str
+ """
+ An ISO 4217 currency string or a custom pricing unit identifier in which to bill
+ this price.
+ """
+
+ custom_expiration: Optional[CustomExpiration] = None
+ """The custom expiration for the allocation."""
+
+ expires_at_end_of_cadence: Optional[bool] = None
+ """
+ Whether the allocated amount should expire at the end of the cadence or roll
+ over to the next period. Set to null if using custom_expiration.
+ """
diff --git a/src/orb/types/shared/new_amount_discount.py b/src/orb/types/shared/new_amount_discount.py
new file mode 100644
index 00000000..629ab377
--- /dev/null
+++ b/src/orb/types/shared/new_amount_discount.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewAmountDiscount"]
+
+
+class NewAmountDiscount(BaseModel):
+ adjustment_type: Literal["amount_discount"]
+
+ amount_discount: str
+
+ applies_to_all: Optional[Literal[True]] = None
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]] = None
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]] = None
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str] = None
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[List[TransformPriceFilter]] = None
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: Optional[bool] = None
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]] = None
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared/new_billing_cycle_configuration.py b/src/orb/types/shared/new_billing_cycle_configuration.py
new file mode 100644
index 00000000..35bc31b9
--- /dev/null
+++ b/src/orb/types/shared/new_billing_cycle_configuration.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["NewBillingCycleConfiguration"]
+
+
+class NewBillingCycleConfiguration(BaseModel):
+ duration: int
+ """The duration of the billing period."""
+
+ duration_unit: Literal["day", "month"]
+ """The unit of billing period duration."""
diff --git a/src/orb/types/shared/new_dimensional_price_configuration.py b/src/orb/types/shared/new_dimensional_price_configuration.py
new file mode 100644
index 00000000..00de969c
--- /dev/null
+++ b/src/orb/types/shared/new_dimensional_price_configuration.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["NewDimensionalPriceConfiguration"]
+
+
+class NewDimensionalPriceConfiguration(BaseModel):
+ dimension_values: List[str]
+ """
+ The list of dimension values matching (in order) the dimensions of the price
+ group
+ """
+
+ dimensional_price_group_id: Optional[str] = None
+ """The id of the dimensional price group to include this price in"""
+
+ external_dimensional_price_group_id: Optional[str] = None
+ """The external id of the dimensional price group to include this price in"""
diff --git a/src/orb/types/shared/new_floating_bps_price.py b/src/orb/types/shared/new_floating_bps_price.py
new file mode 100644
index 00000000..1bdd7c61
--- /dev/null
+++ b/src/orb/types/shared/new_floating_bps_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bps_config import BPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingBPSPrice(BaseModel):
+ bps_config: BPSConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_bulk_bps_price.py b/src/orb/types/shared/new_floating_bulk_bps_price.py
new file mode 100644
index 00000000..1b95e9a6
--- /dev/null
+++ b/src/orb/types/shared/new_floating_bulk_bps_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bulk_bps_config import BulkBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingBulkBPSPrice(BaseModel):
+ bulk_bps_config: BulkBPSConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_bulk_price.py b/src/orb/types/shared/new_floating_bulk_price.py
new file mode 100644
index 00000000..fdfa64bb
--- /dev/null
+++ b/src/orb/types/shared/new_floating_bulk_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bulk_config import BulkConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingBulkPrice(BaseModel):
+ bulk_config: BulkConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_bulk_with_proration_price.py b/src/orb/types/shared/new_floating_bulk_with_proration_price.py
new file mode 100644
index 00000000..581f551f
--- /dev/null
+++ b/src/orb/types/shared/new_floating_bulk_with_proration_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingBulkWithProrationPrice(BaseModel):
+ bulk_with_proration_config: Dict[str, object]
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_cumulative_grouped_bulk_price.py b/src/orb/types/shared/new_floating_cumulative_grouped_bulk_price.py
new file mode 100644
index 00000000..6a6b8ead
--- /dev/null
+++ b/src/orb/types/shared/new_floating_cumulative_grouped_bulk_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingCumulativeGroupedBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingCumulativeGroupedBulkPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ cumulative_grouped_bulk_config: Dict[str, object]
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["cumulative_grouped_bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_grouped_allocation_price.py b/src/orb/types/shared/new_floating_grouped_allocation_price.py
new file mode 100644
index 00000000..8444b429
--- /dev/null
+++ b/src/orb/types/shared/new_floating_grouped_allocation_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingGroupedAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_allocation_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_grouped_tiered_package_price.py b/src/orb/types/shared/new_floating_grouped_tiered_package_price.py
new file mode 100644
index 00000000..c3c71210
--- /dev/null
+++ b/src/orb/types/shared/new_floating_grouped_tiered_package_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingGroupedTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_tiered_package_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_grouped_tiered_price.py b/src/orb/types/shared/new_floating_grouped_tiered_price.py
new file mode 100644
index 00000000..905d4fc3
--- /dev/null
+++ b/src/orb/types/shared/new_floating_grouped_tiered_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingGroupedTieredPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_tiered_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_grouped_with_metered_minimum_price.py b/src/orb/types/shared/new_floating_grouped_with_metered_minimum_price.py
new file mode 100644
index 00000000..02f000ce
--- /dev/null
+++ b/src/orb/types/shared/new_floating_grouped_with_metered_minimum_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedWithMeteredMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingGroupedWithMeteredMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_with_metered_minimum_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_with_metered_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_grouped_with_prorated_minimum_price.py b/src/orb/types/shared/new_floating_grouped_with_prorated_minimum_price.py
new file mode 100644
index 00000000..aad0efac
--- /dev/null
+++ b/src/orb/types/shared/new_floating_grouped_with_prorated_minimum_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedWithProratedMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingGroupedWithProratedMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_with_prorated_minimum_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_with_prorated_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_matrix_price.py b/src/orb/types/shared/new_floating_matrix_price.py
new file mode 100644
index 00000000..3ce48b53
--- /dev/null
+++ b/src/orb/types/shared/new_floating_matrix_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .matrix_config import MatrixConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingMatrixPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_config: MatrixConfig
+
+ price_model_type: Literal["matrix"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_matrix_with_allocation_price.py b/src/orb/types/shared/new_floating_matrix_with_allocation_price.py
new file mode 100644
index 00000000..849f85c0
--- /dev/null
+++ b/src/orb/types/shared/new_floating_matrix_with_allocation_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingMatrixWithAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_with_allocation_config: MatrixWithAllocationConfig
+
+ price_model_type: Literal["matrix_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_matrix_with_display_name_price.py b/src/orb/types/shared/new_floating_matrix_with_display_name_price.py
new file mode 100644
index 00000000..9af7aeb6
--- /dev/null
+++ b/src/orb/types/shared/new_floating_matrix_with_display_name_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixWithDisplayNamePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingMatrixWithDisplayNamePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_with_display_name_config: Dict[str, object]
+
+ price_model_type: Literal["matrix_with_display_name"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_max_group_tiered_package_price.py b/src/orb/types/shared/new_floating_max_group_tiered_package_price.py
new file mode 100644
index 00000000..57051915
--- /dev/null
+++ b/src/orb/types/shared/new_floating_max_group_tiered_package_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMaxGroupTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingMaxGroupTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ max_group_tiered_package_config: Dict[str, object]
+
+ price_model_type: Literal["max_group_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_package_price.py b/src/orb/types/shared/new_floating_package_price.py
new file mode 100644
index 00000000..ea1d61db
--- /dev/null
+++ b/src/orb/types/shared/new_floating_package_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .package_config import PackageConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ package_config: PackageConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_package_with_allocation_price.py b/src/orb/types/shared/new_floating_package_with_allocation_price.py
new file mode 100644
index 00000000..00c38e38
--- /dev/null
+++ b/src/orb/types/shared/new_floating_package_with_allocation_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingPackageWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingPackageWithAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["package_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ package_with_allocation_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_scalable_matrix_with_tiered_pricing_price.py b/src/orb/types/shared/new_floating_scalable_matrix_with_tiered_pricing_price.py
new file mode 100644
index 00000000..4aecb772
--- /dev/null
+++ b/src/orb/types/shared/new_floating_scalable_matrix_with_tiered_pricing_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingScalableMatrixWithTieredPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingScalableMatrixWithTieredPricingPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["scalable_matrix_with_tiered_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ scalable_matrix_with_tiered_pricing_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py
new file mode 100644
index 00000000..d56955bc
--- /dev/null
+++ b/src/orb/types/shared/new_floating_scalable_matrix_with_unit_pricing_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingScalableMatrixWithUnitPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingScalableMatrixWithUnitPricingPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["scalable_matrix_with_unit_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ scalable_matrix_with_unit_pricing_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_threshold_total_amount_price.py b/src/orb/types/shared/new_floating_threshold_total_amount_price.py
new file mode 100644
index 00000000..99b0f96c
--- /dev/null
+++ b/src/orb/types/shared/new_floating_threshold_total_amount_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingThresholdTotalAmountPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingThresholdTotalAmountPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["threshold_total_amount"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ threshold_total_amount_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_bps_price.py b/src/orb/types/shared/new_floating_tiered_bps_price.py
new file mode 100644
index 00000000..836a3c0f
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_bps_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .tiered_bps_config import TieredBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredBPSPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_bps_config: TieredBPSConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_package_price.py b/src/orb/types/shared/new_floating_tiered_package_price.py
new file mode 100644
index 00000000..7969398a
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_package_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_package_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_package_with_minimum_price.py b/src/orb/types/shared/new_floating_tiered_package_with_minimum_price.py
new file mode 100644
index 00000000..7322b56c
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_package_with_minimum_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPackageWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredPackageWithMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_package_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_package_with_minimum_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_price.py b/src/orb/types/shared/new_floating_tiered_price.py
new file mode 100644
index 00000000..b1ce31a2
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .tiered_config import TieredConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_config: TieredConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_with_minimum_price.py b/src/orb/types/shared/new_floating_tiered_with_minimum_price.py
new file mode 100644
index 00000000..9ffb9eb5
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_with_minimum_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredWithMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_with_minimum_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_tiered_with_proration_price.py b/src/orb/types/shared/new_floating_tiered_with_proration_price.py
new file mode 100644
index 00000000..ed9f09bf
--- /dev/null
+++ b/src/orb/types/shared/new_floating_tiered_with_proration_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingTieredWithProrationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_with_proration_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_unit_price.py b/src/orb/types/shared/new_floating_unit_price.py
new file mode 100644
index 00000000..4bf8e721
--- /dev/null
+++ b/src/orb/types/shared/new_floating_unit_price.py
@@ -0,0 +1,91 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_config import UnitConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingUnitPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_config: UnitConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_unit_with_percent_price.py b/src/orb/types/shared/new_floating_unit_with_percent_price.py
new file mode 100644
index 00000000..6974172b
--- /dev/null
+++ b/src/orb/types/shared/new_floating_unit_with_percent_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitWithPercentPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingUnitWithPercentPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit_with_percent"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_with_percent_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_floating_unit_with_proration_price.py b/src/orb/types/shared/new_floating_unit_with_proration_price.py
new file mode 100644
index 00000000..2bc49f4c
--- /dev/null
+++ b/src/orb/types/shared/new_floating_unit_with_proration_price.py
@@ -0,0 +1,90 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewFloatingUnitWithProrationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ currency: str
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_with_proration_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_maximum.py b/src/orb/types/shared/new_maximum.py
new file mode 100644
index 00000000..4b29fe7f
--- /dev/null
+++ b/src/orb/types/shared/new_maximum.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewMaximum"]
+
+
+class NewMaximum(BaseModel):
+ adjustment_type: Literal["maximum"]
+
+ maximum_amount: str
+
+ applies_to_all: Optional[Literal[True]] = None
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]] = None
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]] = None
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str] = None
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[List[TransformPriceFilter]] = None
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: Optional[bool] = None
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]] = None
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared/new_minimum.py b/src/orb/types/shared/new_minimum.py
new file mode 100644
index 00000000..003d6c87
--- /dev/null
+++ b/src/orb/types/shared/new_minimum.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewMinimum"]
+
+
+class NewMinimum(BaseModel):
+ adjustment_type: Literal["minimum"]
+
+ item_id: str
+ """The item ID that revenue from this minimum will be attributed to."""
+
+ minimum_amount: str
+
+ applies_to_all: Optional[Literal[True]] = None
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]] = None
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]] = None
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str] = None
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[List[TransformPriceFilter]] = None
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: Optional[bool] = None
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]] = None
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared/new_percentage_discount.py b/src/orb/types/shared/new_percentage_discount.py
new file mode 100644
index 00000000..46e5d15a
--- /dev/null
+++ b/src/orb/types/shared/new_percentage_discount.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewPercentageDiscount"]
+
+
+class NewPercentageDiscount(BaseModel):
+ adjustment_type: Literal["percentage_discount"]
+
+ percentage_discount: float
+
+ applies_to_all: Optional[Literal[True]] = None
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]] = None
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]] = None
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str] = None
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[List[TransformPriceFilter]] = None
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: Optional[bool] = None
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]] = None
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared/new_plan_bps_price.py b/src/orb/types/shared/new_plan_bps_price.py
new file mode 100644
index 00000000..451dd197
--- /dev/null
+++ b/src/orb/types/shared/new_plan_bps_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bps_config import BPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanBPSPrice(BaseModel):
+ bps_config: BPSConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_bulk_bps_price.py b/src/orb/types/shared/new_plan_bulk_bps_price.py
new file mode 100644
index 00000000..145b1f76
--- /dev/null
+++ b/src/orb/types/shared/new_plan_bulk_bps_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bulk_bps_config import BulkBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanBulkBPSPrice(BaseModel):
+ bulk_bps_config: BulkBPSConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_bulk_price.py b/src/orb/types/shared/new_plan_bulk_price.py
new file mode 100644
index 00000000..6aab73c9
--- /dev/null
+++ b/src/orb/types/shared/new_plan_bulk_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .bulk_config import BulkConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanBulkPrice(BaseModel):
+ bulk_config: BulkConfig
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_bulk_with_proration_price.py b/src/orb/types/shared/new_plan_bulk_with_proration_price.py
new file mode 100644
index 00000000..62f90b5a
--- /dev/null
+++ b/src/orb/types/shared/new_plan_bulk_with_proration_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanBulkWithProrationPrice(BaseModel):
+ bulk_with_proration_config: Dict[str, object]
+
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["bulk_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_cumulative_grouped_bulk_price.py b/src/orb/types/shared/new_plan_cumulative_grouped_bulk_price.py
new file mode 100644
index 00000000..3e48f366
--- /dev/null
+++ b/src/orb/types/shared/new_plan_cumulative_grouped_bulk_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanCumulativeGroupedBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanCumulativeGroupedBulkPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ cumulative_grouped_bulk_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["cumulative_grouped_bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_grouped_allocation_price.py b/src/orb/types/shared/new_plan_grouped_allocation_price.py
new file mode 100644
index 00000000..a3a9c138
--- /dev/null
+++ b/src/orb/types/shared/new_plan_grouped_allocation_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanGroupedAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ grouped_allocation_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_grouped_tiered_package_price.py b/src/orb/types/shared/new_plan_grouped_tiered_package_price.py
new file mode 100644
index 00000000..bd6b9920
--- /dev/null
+++ b/src/orb/types/shared/new_plan_grouped_tiered_package_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanGroupedTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_package_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_grouped_tiered_price.py b/src/orb/types/shared/new_plan_grouped_tiered_price.py
new file mode 100644
index 00000000..0286abe8
--- /dev/null
+++ b/src/orb/types/shared/new_plan_grouped_tiered_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanGroupedTieredPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_grouped_with_metered_minimum_price.py b/src/orb/types/shared/new_plan_grouped_with_metered_minimum_price.py
new file mode 100644
index 00000000..29f97a50
--- /dev/null
+++ b/src/orb/types/shared/new_plan_grouped_with_metered_minimum_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedWithMeteredMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanGroupedWithMeteredMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ grouped_with_metered_minimum_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_with_metered_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_grouped_with_prorated_minimum_price.py b/src/orb/types/shared/new_plan_grouped_with_prorated_minimum_price.py
new file mode 100644
index 00000000..af882d7e
--- /dev/null
+++ b/src/orb/types/shared/new_plan_grouped_with_prorated_minimum_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedWithProratedMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanGroupedWithProratedMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ grouped_with_prorated_minimum_config: Dict[str, object]
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["grouped_with_prorated_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_matrix_price.py b/src/orb/types/shared/new_plan_matrix_price.py
new file mode 100644
index 00000000..23ce8dcd
--- /dev/null
+++ b/src/orb/types/shared/new_plan_matrix_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .matrix_config import MatrixConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanMatrixPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_config: MatrixConfig
+
+ price_model_type: Literal["matrix"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_matrix_with_allocation_price.py b/src/orb/types/shared/new_plan_matrix_with_allocation_price.py
new file mode 100644
index 00000000..32df42d7
--- /dev/null
+++ b/src/orb/types/shared/new_plan_matrix_with_allocation_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanMatrixWithAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_with_allocation_config: MatrixWithAllocationConfig
+
+ price_model_type: Literal["matrix_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_matrix_with_display_name_price.py b/src/orb/types/shared/new_plan_matrix_with_display_name_price.py
new file mode 100644
index 00000000..cb787cca
--- /dev/null
+++ b/src/orb/types/shared/new_plan_matrix_with_display_name_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixWithDisplayNamePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanMatrixWithDisplayNamePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ matrix_with_display_name_config: Dict[str, object]
+
+ price_model_type: Literal["matrix_with_display_name"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_max_group_tiered_package_price.py b/src/orb/types/shared/new_plan_max_group_tiered_package_price.py
new file mode 100644
index 00000000..b299cba5
--- /dev/null
+++ b/src/orb/types/shared/new_plan_max_group_tiered_package_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMaxGroupTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanMaxGroupTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ max_group_tiered_package_config: Dict[str, object]
+
+ price_model_type: Literal["max_group_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_package_price.py b/src/orb/types/shared/new_plan_package_price.py
new file mode 100644
index 00000000..6f541aca
--- /dev/null
+++ b/src/orb/types/shared/new_plan_package_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .package_config import PackageConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ package_config: PackageConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_package_with_allocation_price.py b/src/orb/types/shared/new_plan_package_with_allocation_price.py
new file mode 100644
index 00000000..ca4f9b7f
--- /dev/null
+++ b/src/orb/types/shared/new_plan_package_with_allocation_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanPackageWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanPackageWithAllocationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["package_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ package_with_allocation_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_scalable_matrix_with_tiered_pricing_price.py b/src/orb/types/shared/new_plan_scalable_matrix_with_tiered_pricing_price.py
new file mode 100644
index 00000000..fb242856
--- /dev/null
+++ b/src/orb/types/shared/new_plan_scalable_matrix_with_tiered_pricing_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanScalableMatrixWithTieredPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanScalableMatrixWithTieredPricingPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["scalable_matrix_with_tiered_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ scalable_matrix_with_tiered_pricing_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py
new file mode 100644
index 00000000..d79eaf54
--- /dev/null
+++ b/src/orb/types/shared/new_plan_scalable_matrix_with_unit_pricing_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanScalableMatrixWithUnitPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanScalableMatrixWithUnitPricingPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["scalable_matrix_with_unit_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ scalable_matrix_with_unit_pricing_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_threshold_total_amount_price.py b/src/orb/types/shared/new_plan_threshold_total_amount_price.py
new file mode 100644
index 00000000..0f49e3fc
--- /dev/null
+++ b/src/orb/types/shared/new_plan_threshold_total_amount_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanThresholdTotalAmountPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanThresholdTotalAmountPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["threshold_total_amount"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ threshold_total_amount_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tier_with_proration_price.py b/src/orb/types/shared/new_plan_tier_with_proration_price.py
new file mode 100644
index 00000000..abb1bec1
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tier_with_proration_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTierWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTierWithProrationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_with_proration_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tiered_bps_price.py b/src/orb/types/shared/new_plan_tiered_bps_price.py
new file mode 100644
index 00000000..e35450ce
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tiered_bps_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .tiered_bps_config import TieredBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTieredBPSPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_bps_config: TieredBPSConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tiered_package_price.py b/src/orb/types/shared/new_plan_tiered_package_price.py
new file mode 100644
index 00000000..c3398125
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tiered_package_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTieredPackagePrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_package_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tiered_package_with_minimum_price.py b/src/orb/types/shared/new_plan_tiered_package_with_minimum_price.py
new file mode 100644
index 00000000..d40bef69
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tiered_package_with_minimum_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPackageWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTieredPackageWithMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_package_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_package_with_minimum_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tiered_price.py b/src/orb/types/shared/new_plan_tiered_price.py
new file mode 100644
index 00000000..5b483c2d
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tiered_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .tiered_config import TieredConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTieredPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_config: TieredConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_tiered_with_minimum_price.py b/src/orb/types/shared/new_plan_tiered_with_minimum_price.py
new file mode 100644
index 00000000..abdcf6a8
--- /dev/null
+++ b/src/orb/types/shared/new_plan_tiered_with_minimum_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanTieredWithMinimumPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["tiered_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ tiered_with_minimum_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_unit_price.py b/src/orb/types/shared/new_plan_unit_price.py
new file mode 100644
index 00000000..39f5521e
--- /dev/null
+++ b/src/orb/types/shared/new_plan_unit_price.py
@@ -0,0 +1,94 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_config import UnitConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanUnitPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_config: UnitConfig
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_unit_with_percent_price.py b/src/orb/types/shared/new_plan_unit_with_percent_price.py
new file mode 100644
index 00000000..fad2b748
--- /dev/null
+++ b/src/orb/types/shared/new_plan_unit_with_percent_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitWithPercentPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanUnitWithPercentPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit_with_percent"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_with_percent_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_plan_unit_with_proration_price.py b/src/orb/types/shared/new_plan_unit_with_proration_price.py
new file mode 100644
index 00000000..e04a4153
--- /dev/null
+++ b/src/orb/types/shared/new_plan_unit_with_proration_price.py
@@ -0,0 +1,93 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._utils import PropertyInfo
+from ..._models import BaseModel
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class NewPlanUnitWithProrationPrice(BaseModel):
+ cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]
+ """The cadence to bill for this price on."""
+
+ item_id: str
+ """The id of the item the price will be associated with."""
+
+ price_model_type: Literal["unit_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+ """The name of the price."""
+
+ unit_with_proration_config: Dict[str, object]
+
+ billable_metric_id: Optional[str] = None
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool] = None
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float] = None
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig] = None
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str] = None
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] = None
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str] = None
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float] = None
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str] = None
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] = None
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]] = None
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared/new_usage_discount.py b/src/orb/types/shared/new_usage_discount.py
new file mode 100644
index 00000000..be7a6fb3
--- /dev/null
+++ b/src/orb/types/shared/new_usage_discount.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewUsageDiscount"]
+
+
+class NewUsageDiscount(BaseModel):
+ adjustment_type: Literal["usage_discount"]
+
+ usage_discount: float
+
+ applies_to_all: Optional[Literal[True]] = None
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]] = None
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]] = None
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str] = None
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[List[TransformPriceFilter]] = None
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: Optional[bool] = None
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]] = None
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared/other_sub_line_item.py b/src/orb/types/shared/other_sub_line_item.py
new file mode 100644
index 00000000..b8640ef3
--- /dev/null
+++ b/src/orb/types/shared/other_sub_line_item.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .sub_line_item_grouping import SubLineItemGrouping
+
+__all__ = ["OtherSubLineItem"]
+
+
+class OtherSubLineItem(BaseModel):
+ amount: str
+ """The total amount for this sub line item."""
+
+ grouping: Optional[SubLineItemGrouping] = None
+
+ name: str
+
+ quantity: float
+
+ type: Literal["'null'"]
diff --git a/src/orb/types/shared/package_config.py b/src/orb/types/shared/package_config.py
new file mode 100644
index 00000000..1ae628bc
--- /dev/null
+++ b/src/orb/types/shared/package_config.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["PackageConfig"]
+
+
+class PackageConfig(BaseModel):
+ package_amount: str
+ """A currency amount to rate usage by"""
+
+ package_size: int
+ """An integer amount to represent package size.
+
+ For example, 1000 here would divide usage by 1000 before multiplying by
+ package_amount in rating
+ """
diff --git a/src/orb/types/shared/per_price_cost.py b/src/orb/types/shared/per_price_cost.py
new file mode 100644
index 00000000..3102fffd
--- /dev/null
+++ b/src/orb/types/shared/per_price_cost.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .price import Price
+from ..._models import BaseModel
+
+__all__ = ["PerPriceCost"]
+
+
+class PerPriceCost(BaseModel):
+ price: Price
+ """The price object"""
+
+ price_id: str
+ """The price the cost is associated with"""
+
+ subtotal: str
+ """Price's contributions for the timeframe, excluding any minimums and discounts."""
+
+ total: str
+ """Price's contributions for the timeframe, including minimums and discounts."""
+
+ quantity: Optional[float] = None
+ """The price's quantity for the timeframe"""
diff --git a/src/orb/types/shared/percentage_discount.py b/src/orb/types/shared/percentage_discount.py
index 3fb86bb5..cddd4faa 100644
--- a/src/orb/types/shared/percentage_discount.py
+++ b/src/orb/types/shared/percentage_discount.py
@@ -4,19 +4,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
-__all__ = ["PercentageDiscount", "Filter"]
-
-
-class Filter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
+__all__ = ["PercentageDiscount"]
class PercentageDiscount(BaseModel):
@@ -34,7 +24,7 @@ class PercentageDiscount(BaseModel):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[List[Filter]] = None
+ filters: Optional[List[TransformPriceFilter]] = None
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str] = None
diff --git a/src/orb/types/shared/percentage_discount_interval.py b/src/orb/types/shared/percentage_discount_interval.py
new file mode 100644
index 00000000..5165d945
--- /dev/null
+++ b/src/orb/types/shared/percentage_discount_interval.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PercentageDiscountInterval"]
+
+
+class PercentageDiscountInterval(BaseModel):
+ applies_to_price_interval_ids: List[str]
+ """The price interval ids that this discount interval applies to."""
+
+ discount_type: Literal["percentage"]
+
+ end_date: Optional[datetime] = None
+ """The end date of the discount interval."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices this discount interval applies to."""
+
+ percentage_discount: float
+ """
+ Only available if discount_type is `percentage`.This is a number between 0
+ and 1.
+ """
+
+ start_date: datetime
+ """The start date of the discount interval."""
diff --git a/src/orb/types/shared/plan_phase_amount_discount_adjustment.py b/src/orb/types/shared/plan_phase_amount_discount_adjustment.py
new file mode 100644
index 00000000..8ee541a2
--- /dev/null
+++ b/src/orb/types/shared/plan_phase_amount_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PlanPhaseAmountDiscountAdjustment"]
+
+
+class PlanPhaseAmountDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["amount_discount"]
+
+ amount_discount: str
+ """
+ The amount by which to discount the prices this adjustment applies to in a given
+ billing period.
+ """
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ plan_phase_order: Optional[int] = None
+ """The plan phase in which this adjustment is active."""
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/plan_phase_maximum_adjustment.py b/src/orb/types/shared/plan_phase_maximum_adjustment.py
new file mode 100644
index 00000000..4fca488e
--- /dev/null
+++ b/src/orb/types/shared/plan_phase_maximum_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PlanPhaseMaximumAdjustment"]
+
+
+class PlanPhaseMaximumAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["maximum"]
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ maximum_amount: str
+ """
+ The maximum amount to charge in a given billing period for the prices this
+ adjustment applies to.
+ """
+
+ plan_phase_order: Optional[int] = None
+ """The plan phase in which this adjustment is active."""
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/plan_phase_minimum_adjustment.py b/src/orb/types/shared/plan_phase_minimum_adjustment.py
new file mode 100644
index 00000000..f7e56e43
--- /dev/null
+++ b/src/orb/types/shared/plan_phase_minimum_adjustment.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PlanPhaseMinimumAdjustment"]
+
+
+class PlanPhaseMinimumAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["minimum"]
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ item_id: str
+ """The item ID that revenue from this minimum will be attributed to."""
+
+ minimum_amount: str
+ """
+ The minimum amount to charge in a given billing period for the prices this
+ adjustment applies to.
+ """
+
+ plan_phase_order: Optional[int] = None
+ """The plan phase in which this adjustment is active."""
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/plan_phase_percentage_discount_adjustment.py b/src/orb/types/shared/plan_phase_percentage_discount_adjustment.py
new file mode 100644
index 00000000..6d08d827
--- /dev/null
+++ b/src/orb/types/shared/plan_phase_percentage_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PlanPhasePercentageDiscountAdjustment"]
+
+
+class PlanPhasePercentageDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["percentage_discount"]
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ percentage_discount: float
+ """
+ The percentage (as a value between 0 and 1) by which to discount the price
+ intervals this adjustment applies to in a given billing period.
+ """
+
+ plan_phase_order: Optional[int] = None
+ """The plan phase in which this adjustment is active."""
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
diff --git a/src/orb/types/shared/plan_phase_usage_discount_adjustment.py b/src/orb/types/shared/plan_phase_usage_discount_adjustment.py
new file mode 100644
index 00000000..a3bf5ce7
--- /dev/null
+++ b/src/orb/types/shared/plan_phase_usage_discount_adjustment.py
@@ -0,0 +1,39 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["PlanPhaseUsageDiscountAdjustment"]
+
+
+class PlanPhaseUsageDiscountAdjustment(BaseModel):
+ id: str
+
+ adjustment_type: Literal["usage_discount"]
+
+ applies_to_price_ids: List[str]
+ """The price IDs that this adjustment applies to."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices to apply this adjustment to."""
+
+ is_invoice_level: bool
+ """
+ True for adjustments that apply to an entire invocice, false for adjustments
+ that apply to only one price.
+ """
+
+ plan_phase_order: Optional[int] = None
+ """The plan phase in which this adjustment is active."""
+
+ reason: Optional[str] = None
+ """The reason for the adjustment."""
+
+ usage_discount: float
+ """
+ The number of usage units by which to discount the price this adjustment applies
+ to in a given billing period.
+ """
diff --git a/src/orb/types/shared/price.py b/src/orb/types/shared/price.py
new file mode 100644
index 00000000..5b856733
--- /dev/null
+++ b/src/orb/types/shared/price.py
@@ -0,0 +1,1915 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union, Optional
+from datetime import datetime
+from typing_extensions import Literal, Annotated, TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .maximum import Maximum
+from .minimum import Minimum
+from ..._utils import PropertyInfo
+from .discount import Discount
+from ..._models import BaseModel
+from .item_slim import ItemSlim
+from .allocation import Allocation
+from .bps_config import BPSConfig
+from .bulk_config import BulkConfig
+from .unit_config import UnitConfig
+from .matrix_config import MatrixConfig
+from .tiered_config import TieredConfig
+from .package_config import PackageConfig
+from .bulk_bps_config import BulkBPSConfig
+from .tiered_bps_config import TieredBPSConfig
+from .billable_metric_tiny import BillableMetricTiny
+from .billing_cycle_configuration import BillingCycleConfiguration
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .dimensional_price_configuration import DimensionalPriceConfiguration
+
+__all__ = [
+ "Price",
+ "UnitPrice",
+ "UnitPriceConversionRateConfig",
+ "PackagePrice",
+ "PackagePriceConversionRateConfig",
+ "MatrixPrice",
+ "MatrixPriceConversionRateConfig",
+ "TieredPrice",
+ "TieredPriceConversionRateConfig",
+ "TieredBPSPrice",
+ "TieredBPSPriceConversionRateConfig",
+ "BPSPrice",
+ "BPSPriceConversionRateConfig",
+ "BulkBPSPrice",
+ "BulkBPSPriceConversionRateConfig",
+ "BulkPrice",
+ "BulkPriceConversionRateConfig",
+ "ThresholdTotalAmountPrice",
+ "ThresholdTotalAmountPriceConversionRateConfig",
+ "TieredPackagePrice",
+ "TieredPackagePriceConversionRateConfig",
+ "GroupedTieredPrice",
+ "GroupedTieredPriceConversionRateConfig",
+ "TieredWithMinimumPrice",
+ "TieredWithMinimumPriceConversionRateConfig",
+ "TieredPackageWithMinimumPrice",
+ "TieredPackageWithMinimumPriceConversionRateConfig",
+ "PackageWithAllocationPrice",
+ "PackageWithAllocationPriceConversionRateConfig",
+ "UnitWithPercentPrice",
+ "UnitWithPercentPriceConversionRateConfig",
+ "MatrixWithAllocationPrice",
+ "MatrixWithAllocationPriceConversionRateConfig",
+ "TieredWithProrationPrice",
+ "TieredWithProrationPriceConversionRateConfig",
+ "UnitWithProrationPrice",
+ "UnitWithProrationPriceConversionRateConfig",
+ "GroupedAllocationPrice",
+ "GroupedAllocationPriceConversionRateConfig",
+ "GroupedWithProratedMinimumPrice",
+ "GroupedWithProratedMinimumPriceConversionRateConfig",
+ "GroupedWithMeteredMinimumPrice",
+ "GroupedWithMeteredMinimumPriceConversionRateConfig",
+ "MatrixWithDisplayNamePrice",
+ "MatrixWithDisplayNamePriceConversionRateConfig",
+ "BulkWithProrationPrice",
+ "BulkWithProrationPriceConversionRateConfig",
+ "GroupedTieredPackagePrice",
+ "GroupedTieredPackagePriceConversionRateConfig",
+ "MaxGroupTieredPackagePrice",
+ "MaxGroupTieredPackagePriceConversionRateConfig",
+ "ScalableMatrixWithUnitPricingPrice",
+ "ScalableMatrixWithUnitPricingPriceConversionRateConfig",
+ "ScalableMatrixWithTieredPricingPrice",
+ "ScalableMatrixWithTieredPricingPriceConversionRateConfig",
+ "CumulativeGroupedBulkPrice",
+ "CumulativeGroupedBulkPriceConversionRateConfig",
+]
+
+UnitPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class UnitPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[UnitPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["unit"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ unit_config: UnitConfig
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+PackagePriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class PackagePrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[PackagePriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["package"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ package_config: PackageConfig
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+MatrixPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class MatrixPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[MatrixPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ matrix_config: MatrixConfig
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["matrix"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_config: TieredConfig
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredBPSPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredBPSPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredBPSPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_bps_config: TieredBPSConfig
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+BPSPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class BPSPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ bps_config: BPSConfig
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[BPSPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["bps"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+BulkBPSPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class BulkBPSPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ bulk_bps_config: BulkBPSConfig
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[BulkBPSPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["bulk_bps"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+BulkPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class BulkPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ bulk_config: BulkConfig
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[BulkPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+ThresholdTotalAmountPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class ThresholdTotalAmountPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[ThresholdTotalAmountPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["threshold_total_amount"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ threshold_total_amount_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredPackagePriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredPackagePrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredPackagePriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_package_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+GroupedTieredPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class GroupedTieredPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[GroupedTieredPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ grouped_tiered_config: Dict[str, object]
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["grouped_tiered"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredWithMinimumPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredWithMinimumPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredWithMinimumPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_with_minimum_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredPackageWithMinimumPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredPackageWithMinimumPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredPackageWithMinimumPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered_package_with_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_package_with_minimum_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+PackageWithAllocationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class PackageWithAllocationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[PackageWithAllocationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["package_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ package_with_allocation_config: Dict[str, object]
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+UnitWithPercentPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class UnitWithPercentPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[UnitWithPercentPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["unit_with_percent"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ unit_with_percent_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+MatrixWithAllocationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class MatrixWithAllocationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[MatrixWithAllocationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ matrix_with_allocation_config: MatrixWithAllocationConfig
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["matrix_with_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+TieredWithProrationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class TieredWithProrationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[TieredWithProrationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["tiered_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ tiered_with_proration_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+UnitWithProrationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class UnitWithProrationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[UnitWithProrationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["unit_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ unit_with_proration_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+GroupedAllocationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class GroupedAllocationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[GroupedAllocationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ grouped_allocation_config: Dict[str, object]
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["grouped_allocation"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+GroupedWithProratedMinimumPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class GroupedWithProratedMinimumPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[GroupedWithProratedMinimumPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ grouped_with_prorated_minimum_config: Dict[str, object]
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["grouped_with_prorated_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+GroupedWithMeteredMinimumPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class GroupedWithMeteredMinimumPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[GroupedWithMeteredMinimumPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ grouped_with_metered_minimum_config: Dict[str, object]
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["grouped_with_metered_minimum"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+MatrixWithDisplayNamePriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class MatrixWithDisplayNamePrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[MatrixWithDisplayNamePriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ matrix_with_display_name_config: Dict[str, object]
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["matrix_with_display_name"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+BulkWithProrationPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class BulkWithProrationPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ bulk_with_proration_config: Dict[str, object]
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[BulkWithProrationPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["bulk_with_proration"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+GroupedTieredPackagePriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class GroupedTieredPackagePrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[GroupedTieredPackagePriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ grouped_tiered_package_config: Dict[str, object]
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["grouped_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+MaxGroupTieredPackagePriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class MaxGroupTieredPackagePrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[MaxGroupTieredPackagePriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ max_group_tiered_package_config: Dict[str, object]
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["max_group_tiered_package"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+ScalableMatrixWithUnitPricingPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class ScalableMatrixWithUnitPricingPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[ScalableMatrixWithUnitPricingPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["scalable_matrix_with_unit_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ scalable_matrix_with_unit_pricing_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+ScalableMatrixWithTieredPricingPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class ScalableMatrixWithTieredPricingPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[ScalableMatrixWithTieredPricingPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["scalable_matrix_with_tiered_pricing"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ scalable_matrix_with_tiered_pricing_config: Dict[str, object]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+CumulativeGroupedBulkPriceConversionRateConfig: TypeAlias = Annotated[
+ Union[UnitConversionRateConfig, TieredConversionRateConfig, None],
+ PropertyInfo(discriminator="conversion_rate_type"),
+]
+
+
+class CumulativeGroupedBulkPrice(BaseModel):
+ id: str
+
+ billable_metric: Optional[BillableMetricTiny] = None
+
+ billing_cycle_configuration: BillingCycleConfiguration
+
+ cadence: Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]
+
+ conversion_rate: Optional[float] = None
+
+ conversion_rate_config: Optional[CumulativeGroupedBulkPriceConversionRateConfig] = None
+
+ created_at: datetime
+
+ credit_allocation: Optional[Allocation] = None
+
+ cumulative_grouped_bulk_config: Dict[str, object]
+
+ currency: str
+
+ discount: Optional[Discount] = None
+
+ external_price_id: Optional[str] = None
+
+ fixed_price_quantity: Optional[float] = None
+
+ invoicing_cycle_configuration: Optional[BillingCycleConfiguration] = None
+
+ item: ItemSlim
+
+ maximum: Optional[Maximum] = None
+
+ maximum_amount: Optional[str] = None
+
+ metadata: Dict[str, str]
+ """User specified key-value pairs for the resource.
+
+ If not present, this defaults to an empty dictionary. Individual keys can be
+ removed by setting the value to `null`, and the entire metadata mapping can be
+ cleared by setting `metadata` to `null`.
+ """
+
+ minimum: Optional[Minimum] = None
+
+ minimum_amount: Optional[str] = None
+
+ price_model_type: Literal["cumulative_grouped_bulk"] = FieldInfo(alias="model_type")
+
+ name: str
+
+ plan_phase_order: Optional[int] = None
+
+ price_type: Literal["usage_price", "fixed_price"]
+
+ dimensional_price_configuration: Optional[DimensionalPriceConfiguration] = None
+
+
+Price: TypeAlias = Annotated[
+ Union[
+ UnitPrice,
+ PackagePrice,
+ MatrixPrice,
+ TieredPrice,
+ TieredBPSPrice,
+ BPSPrice,
+ BulkBPSPrice,
+ BulkPrice,
+ ThresholdTotalAmountPrice,
+ TieredPackagePrice,
+ GroupedTieredPrice,
+ TieredWithMinimumPrice,
+ TieredPackageWithMinimumPrice,
+ PackageWithAllocationPrice,
+ UnitWithPercentPrice,
+ MatrixWithAllocationPrice,
+ TieredWithProrationPrice,
+ UnitWithProrationPrice,
+ GroupedAllocationPrice,
+ GroupedWithProratedMinimumPrice,
+ GroupedWithMeteredMinimumPrice,
+ MatrixWithDisplayNamePrice,
+ BulkWithProrationPrice,
+ GroupedTieredPackagePrice,
+ MaxGroupTieredPackagePrice,
+ ScalableMatrixWithUnitPricingPrice,
+ ScalableMatrixWithTieredPricingPrice,
+ CumulativeGroupedBulkPrice,
+ ],
+ PropertyInfo(discriminator="price_model_type"),
+]
diff --git a/src/orb/types/shared/price_interval.py b/src/orb/types/shared/price_interval.py
new file mode 100644
index 00000000..e449f3bb
--- /dev/null
+++ b/src/orb/types/shared/price_interval.py
@@ -0,0 +1,73 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+
+from .price import Price
+from ..._models import BaseModel
+from .fixed_fee_quantity_transition import FixedFeeQuantityTransition
+
+__all__ = ["PriceInterval"]
+
+
+class PriceInterval(BaseModel):
+ id: str
+
+ billing_cycle_day: int
+ """The day of the month that Orb bills for this price"""
+
+ current_billing_period_end_date: Optional[datetime] = None
+ """The end of the current billing period.
+
+ This is an exclusive timestamp, such that the instant returned is exactly the
+ end of the billing period. Set to null if this price interval is not currently
+ active.
+ """
+
+ current_billing_period_start_date: Optional[datetime] = None
+ """The start date of the current billing period.
+
+ This is an inclusive timestamp; the instant returned is exactly the beginning of
+ the billing period. Set to null if this price interval is not currently active.
+ """
+
+ end_date: Optional[datetime] = None
+ """The end date of the price interval.
+
+ This is the date that Orb stops billing for this price.
+ """
+
+ filter: Optional[str] = None
+ """An additional filter to apply to usage queries."""
+
+ fixed_fee_quantity_transitions: Optional[List[FixedFeeQuantityTransition]] = None
+ """The fixed fee quantity transitions for this price interval.
+
+ This is only relevant for fixed fees.
+ """
+
+ price: Price
+ """
+ The Price resource represents a price that can be billed on a subscription,
+ resulting in a charge on an invoice in the form of an invoice line item. Prices
+ take a quantity and determine an amount to bill.
+
+ Orb supports a few different pricing models out of the box. Each of these models
+ is serialized differently in a given Price object. The model_type field
+ determines the key for the configuration object that is present.
+
+ For more on the types of prices, see
+ [the core concepts documentation](/core-concepts#plan-and-price)
+ """
+
+ start_date: datetime
+ """The start date of the price interval.
+
+ This is the date that Orb starts billing for this price.
+ """
+
+ usage_customer_ids: Optional[List[str]] = None
+ """
+ A list of customer IDs whose usage events will be aggregated and billed under
+ this price interval.
+ """
diff --git a/src/orb/types/shared/sub_line_item_grouping.py b/src/orb/types/shared/sub_line_item_grouping.py
new file mode 100644
index 00000000..d4f06014
--- /dev/null
+++ b/src/orb/types/shared/sub_line_item_grouping.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["SubLineItemGrouping"]
+
+
+class SubLineItemGrouping(BaseModel):
+ key: str
+
+ value: Optional[str] = None
+ """No value indicates the default group"""
diff --git a/src/orb/types/shared/sub_line_item_matrix_config.py b/src/orb/types/shared/sub_line_item_matrix_config.py
new file mode 100644
index 00000000..b0a11cd1
--- /dev/null
+++ b/src/orb/types/shared/sub_line_item_matrix_config.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+
+__all__ = ["SubLineItemMatrixConfig"]
+
+
+class SubLineItemMatrixConfig(BaseModel):
+ dimension_values: List[Optional[str]]
+ """The ordered dimension values for this line item."""
diff --git a/src/orb/types/shared/subscription_change_minified.py b/src/orb/types/shared/subscription_change_minified.py
new file mode 100644
index 00000000..1d9e2949
--- /dev/null
+++ b/src/orb/types/shared/subscription_change_minified.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["SubscriptionChangeMinified"]
+
+
+class SubscriptionChangeMinified(BaseModel):
+ id: str
diff --git a/src/orb/types/shared/subscription_minified.py b/src/orb/types/shared/subscription_minified.py
new file mode 100644
index 00000000..8f2ebde9
--- /dev/null
+++ b/src/orb/types/shared/subscription_minified.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["SubscriptionMinified"]
+
+
+class SubscriptionMinified(BaseModel):
+ id: str
diff --git a/src/orb/types/shared/subscription_trial_info.py b/src/orb/types/shared/subscription_trial_info.py
new file mode 100644
index 00000000..5a24174d
--- /dev/null
+++ b/src/orb/types/shared/subscription_trial_info.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["SubscriptionTrialInfo"]
+
+
+class SubscriptionTrialInfo(BaseModel):
+ end_date: Optional[datetime] = None
diff --git a/src/orb/types/shared/tax_amount.py b/src/orb/types/shared/tax_amount.py
new file mode 100644
index 00000000..64e84f2b
--- /dev/null
+++ b/src/orb/types/shared/tax_amount.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["TaxAmount"]
+
+
+class TaxAmount(BaseModel):
+ amount: str
+ """The amount of additional tax incurred by this tax rate."""
+
+ tax_rate_description: str
+ """The human-readable description of the applied tax rate."""
+
+ tax_rate_percentage: Optional[str] = None
+ """The tax rate percentage, out of 100."""
diff --git a/src/orb/types/shared/tier.py b/src/orb/types/shared/tier.py
new file mode 100644
index 00000000..28d0de52
--- /dev/null
+++ b/src/orb/types/shared/tier.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["Tier"]
+
+
+class Tier(BaseModel):
+ first_unit: float
+ """Exclusive tier starting value"""
+
+ unit_amount: str
+ """Amount per unit"""
+
+ last_unit: Optional[float] = None
+ """Inclusive tier ending value. If null, this is treated as the last tier"""
diff --git a/src/orb/types/shared/tier_config.py b/src/orb/types/shared/tier_config.py
new file mode 100644
index 00000000..0c6f71dc
--- /dev/null
+++ b/src/orb/types/shared/tier_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from ..._models import BaseModel
+
+__all__ = ["TierConfig"]
+
+
+class TierConfig(BaseModel):
+ first_unit: float
+
+ last_unit: Optional[float] = None
+
+ unit_amount: str
diff --git a/src/orb/types/shared/tier_sub_line_item.py b/src/orb/types/shared/tier_sub_line_item.py
new file mode 100644
index 00000000..9f9388cb
--- /dev/null
+++ b/src/orb/types/shared/tier_sub_line_item.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .tier_config import TierConfig
+from .sub_line_item_grouping import SubLineItemGrouping
+
+__all__ = ["TierSubLineItem"]
+
+
+class TierSubLineItem(BaseModel):
+ amount: str
+ """The total amount for this sub line item."""
+
+ grouping: Optional[SubLineItemGrouping] = None
+
+ name: str
+
+ quantity: float
+
+ tier_config: TierConfig
+
+ type: Literal["tier"]
diff --git a/src/orb/types/shared/tiered_bps_config.py b/src/orb/types/shared/tiered_bps_config.py
new file mode 100644
index 00000000..6f19158e
--- /dev/null
+++ b/src/orb/types/shared/tiered_bps_config.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .bps_tier import BPSTier
+from ..._models import BaseModel
+
+__all__ = ["TieredBPSConfig"]
+
+
+class TieredBPSConfig(BaseModel):
+ tiers: List[BPSTier]
+ """
+ Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
+ tiers
+ """
diff --git a/src/orb/types/shared/tiered_config.py b/src/orb/types/shared/tiered_config.py
new file mode 100644
index 00000000..3b2e5e8f
--- /dev/null
+++ b/src/orb/types/shared/tiered_config.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .tier import Tier
+from ..._models import BaseModel
+
+__all__ = ["TieredConfig"]
+
+
+class TieredConfig(BaseModel):
+ tiers: List[Tier]
+ """Tiers for rating based on total usage quantities into the specified tier"""
diff --git a/src/orb/types/shared/tiered_conversion_rate_config.py b/src/orb/types/shared/tiered_conversion_rate_config.py
new file mode 100644
index 00000000..5bbb9922
--- /dev/null
+++ b/src/orb/types/shared/tiered_conversion_rate_config.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .conversion_rate_tiered_config import ConversionRateTieredConfig
+
+__all__ = ["TieredConversionRateConfig"]
+
+
+class TieredConversionRateConfig(BaseModel):
+ conversion_rate_type: Literal["tiered"]
+
+ tiered_config: ConversionRateTieredConfig
diff --git a/src/orb/types/shared/transform_price_filter.py b/src/orb/types/shared/transform_price_filter.py
new file mode 100644
index 00000000..64218996
--- /dev/null
+++ b/src/orb/types/shared/transform_price_filter.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["TransformPriceFilter"]
+
+
+class TransformPriceFilter(BaseModel):
+ field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
+ """The property of the price to filter on."""
+
+ operator: Literal["includes", "excludes"]
+ """Should prices that match the filter be included or excluded."""
+
+ values: List[str]
+ """The IDs or values that match this filter."""
diff --git a/src/orb/types/shared/trial_discount.py b/src/orb/types/shared/trial_discount.py
index a39fa8dd..9f6f43fc 100644
--- a/src/orb/types/shared/trial_discount.py
+++ b/src/orb/types/shared/trial_discount.py
@@ -4,19 +4,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
-__all__ = ["TrialDiscount", "Filter"]
-
-
-class Filter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
+__all__ = ["TrialDiscount"]
class TrialDiscount(BaseModel):
@@ -28,7 +18,7 @@ class TrialDiscount(BaseModel):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[List[Filter]] = None
+ filters: Optional[List[TransformPriceFilter]] = None
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str] = None
diff --git a/src/orb/types/shared/unit_config.py b/src/orb/types/shared/unit_config.py
new file mode 100644
index 00000000..6c5cc436
--- /dev/null
+++ b/src/orb/types/shared/unit_config.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["UnitConfig"]
+
+
+class UnitConfig(BaseModel):
+ unit_amount: str
+ """Rate per unit of usage"""
diff --git a/src/orb/types/shared/unit_conversion_rate_config.py b/src/orb/types/shared/unit_conversion_rate_config.py
new file mode 100644
index 00000000..184f1c75
--- /dev/null
+++ b/src/orb/types/shared/unit_conversion_rate_config.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .conversion_rate_unit_config import ConversionRateUnitConfig
+
+__all__ = ["UnitConversionRateConfig"]
+
+
+class UnitConversionRateConfig(BaseModel):
+ conversion_rate_type: Literal["unit"]
+
+ unit_config: ConversionRateUnitConfig
diff --git a/src/orb/types/shared/usage_discount.py b/src/orb/types/shared/usage_discount.py
index 34548a0e..72b4d523 100644
--- a/src/orb/types/shared/usage_discount.py
+++ b/src/orb/types/shared/usage_discount.py
@@ -4,19 +4,9 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
-__all__ = ["UsageDiscount", "Filter"]
-
-
-class Filter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
+__all__ = ["UsageDiscount"]
class UsageDiscount(BaseModel):
@@ -34,7 +24,7 @@ class UsageDiscount(BaseModel):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[List[Filter]] = None
+ filters: Optional[List[TransformPriceFilter]] = None
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str] = None
diff --git a/src/orb/types/shared/usage_discount_interval.py b/src/orb/types/shared/usage_discount_interval.py
new file mode 100644
index 00000000..3d5b93aa
--- /dev/null
+++ b/src/orb/types/shared/usage_discount_interval.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["UsageDiscountInterval"]
+
+
+class UsageDiscountInterval(BaseModel):
+ applies_to_price_interval_ids: List[str]
+ """The price interval ids that this discount interval applies to."""
+
+ discount_type: Literal["usage"]
+
+ end_date: Optional[datetime] = None
+ """The end date of the discount interval."""
+
+ filters: List[TransformPriceFilter]
+ """The filters that determine which prices this discount interval applies to."""
+
+ start_date: datetime
+ """The start date of the discount interval."""
+
+ usage_discount: float
+ """Only available if discount_type is `usage`.
+
+ Number of usage units that this discount is for
+ """
diff --git a/src/orb/types/shared_params/__init__.py b/src/orb/types/shared_params/__init__.py
index ef0fe3ec..ea8b71ca 100644
--- a/src/orb/types/shared_params/__init__.py
+++ b/src/orb/types/shared_params/__init__.py
@@ -1,8 +1,147 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .tier import Tier as Tier
+from .bps_tier import BPSTier as BPSTier
from .discount import Discount as Discount
+from .bulk_tier import BulkTier as BulkTier
+from .bps_config import BPSConfig as BPSConfig
+from .bulk_config import BulkConfig as BulkConfig
+from .new_maximum import NewMaximum as NewMaximum
+from .new_minimum import NewMinimum as NewMinimum
+from .unit_config import UnitConfig as UnitConfig
+from .matrix_value import MatrixValue as MatrixValue
+from .bulk_bps_tier import BulkBPSTier as BulkBPSTier
+from .matrix_config import MatrixConfig as MatrixConfig
+from .tiered_config import TieredConfig as TieredConfig
+from .package_config import PackageConfig as PackageConfig
from .trial_discount import TrialDiscount as TrialDiscount
from .usage_discount import UsageDiscount as UsageDiscount
from .amount_discount import AmountDiscount as AmountDiscount
+from .bulk_bps_config import BulkBPSConfig as BulkBPSConfig
+from .customer_tax_id import CustomerTaxID as CustomerTaxID
+from .custom_expiration import CustomExpiration as CustomExpiration
+from .tiered_bps_config import TieredBPSConfig as TieredBPSConfig
+from .new_plan_bps_price import NewPlanBPSPrice as NewPlanBPSPrice
+from .new_usage_discount import NewUsageDiscount as NewUsageDiscount
+from .new_amount_discount import NewAmountDiscount as NewAmountDiscount
+from .new_plan_bulk_price import NewPlanBulkPrice as NewPlanBulkPrice
+from .new_plan_unit_price import NewPlanUnitPrice as NewPlanUnitPrice
from .percentage_discount import PercentageDiscount as PercentageDiscount
+from .conversion_rate_tier import ConversionRateTier as ConversionRateTier
+from .new_allocation_price import NewAllocationPrice as NewAllocationPrice
+from .new_plan_matrix_price import NewPlanMatrixPrice as NewPlanMatrixPrice
+from .new_plan_tiered_price import NewPlanTieredPrice as NewPlanTieredPrice
+from .new_floating_bps_price import NewFloatingBPSPrice as NewFloatingBPSPrice
+from .new_plan_package_price import NewPlanPackagePrice as NewPlanPackagePrice
+from .transform_price_filter import TransformPriceFilter as TransformPriceFilter
+from .new_floating_bulk_price import NewFloatingBulkPrice as NewFloatingBulkPrice
+from .new_floating_unit_price import NewFloatingUnitPrice as NewFloatingUnitPrice
+from .new_percentage_discount import NewPercentageDiscount as NewPercentageDiscount
+from .new_plan_bulk_bps_price import NewPlanBulkBPSPrice as NewPlanBulkBPSPrice
+from .new_floating_matrix_price import NewFloatingMatrixPrice as NewFloatingMatrixPrice
+from .new_floating_tiered_price import NewFloatingTieredPrice as NewFloatingTieredPrice
+from .new_plan_tiered_bps_price import NewPlanTieredBPSPrice as NewPlanTieredBPSPrice
+from .new_floating_package_price import NewFloatingPackagePrice as NewFloatingPackagePrice
from .billing_cycle_relative_date import BillingCycleRelativeDate as BillingCycleRelativeDate
+from .conversion_rate_unit_config import ConversionRateUnitConfig as ConversionRateUnitConfig
+from .new_floating_bulk_bps_price import NewFloatingBulkBPSPrice as NewFloatingBulkBPSPrice
+from .unit_conversion_rate_config import UnitConversionRateConfig as UnitConversionRateConfig
+from .conversion_rate_tiered_config import ConversionRateTieredConfig as ConversionRateTieredConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig as MatrixWithAllocationConfig
+from .new_floating_tiered_bps_price import NewFloatingTieredBPSPrice as NewFloatingTieredBPSPrice
+from .new_plan_grouped_tiered_price import NewPlanGroupedTieredPrice as NewPlanGroupedTieredPrice
+from .new_plan_tiered_package_price import NewPlanTieredPackagePrice as NewPlanTieredPackagePrice
+from .tiered_conversion_rate_config import TieredConversionRateConfig as TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration as NewBillingCycleConfiguration
+from .new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice as NewPlanUnitWithPercentPrice
+from .new_floating_grouped_tiered_price import NewFloatingGroupedTieredPrice as NewFloatingGroupedTieredPrice
+from .new_floating_tiered_package_price import NewFloatingTieredPackagePrice as NewFloatingTieredPackagePrice
+from .new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice as NewPlanGroupedAllocationPrice
+from .billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration as BillingCycleAnchorConfiguration
+from .new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice as NewPlanBulkWithProrationPrice
+from .new_plan_tier_with_proration_price import NewPlanTierWithProrationPrice as NewPlanTierWithProrationPrice
+from .new_plan_tiered_with_minimum_price import NewPlanTieredWithMinimumPrice as NewPlanTieredWithMinimumPrice
+from .new_plan_unit_with_proration_price import NewPlanUnitWithProrationPrice as NewPlanUnitWithProrationPrice
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration as NewDimensionalPriceConfiguration
+from .new_floating_unit_with_percent_price import NewFloatingUnitWithPercentPrice as NewFloatingUnitWithPercentPrice
+from .new_floating_grouped_allocation_price import (
+ NewFloatingGroupedAllocationPrice as NewFloatingGroupedAllocationPrice,
+)
+from .new_plan_grouped_tiered_package_price import NewPlanGroupedTieredPackagePrice as NewPlanGroupedTieredPackagePrice
+from .new_plan_matrix_with_allocation_price import NewPlanMatrixWithAllocationPrice as NewPlanMatrixWithAllocationPrice
+from .new_plan_threshold_total_amount_price import NewPlanThresholdTotalAmountPrice as NewPlanThresholdTotalAmountPrice
+from .new_floating_bulk_with_proration_price import (
+ NewFloatingBulkWithProrationPrice as NewFloatingBulkWithProrationPrice,
+)
+from .new_floating_tiered_with_minimum_price import (
+ NewFloatingTieredWithMinimumPrice as NewFloatingTieredWithMinimumPrice,
+)
+from .new_floating_unit_with_proration_price import (
+ NewFloatingUnitWithProrationPrice as NewFloatingUnitWithProrationPrice,
+)
+from .new_plan_cumulative_grouped_bulk_price import (
+ NewPlanCumulativeGroupedBulkPrice as NewPlanCumulativeGroupedBulkPrice,
+)
+from .new_plan_package_with_allocation_price import (
+ NewPlanPackageWithAllocationPrice as NewPlanPackageWithAllocationPrice,
+)
+from .new_plan_matrix_with_display_name_price import (
+ NewPlanMatrixWithDisplayNamePrice as NewPlanMatrixWithDisplayNamePrice,
+)
+from .new_plan_max_group_tiered_package_price import (
+ NewPlanMaxGroupTieredPackagePrice as NewPlanMaxGroupTieredPackagePrice,
+)
+from .new_floating_tiered_with_proration_price import (
+ NewFloatingTieredWithProrationPrice as NewFloatingTieredWithProrationPrice,
+)
+from .new_floating_grouped_tiered_package_price import (
+ NewFloatingGroupedTieredPackagePrice as NewFloatingGroupedTieredPackagePrice,
+)
+from .new_floating_matrix_with_allocation_price import (
+ NewFloatingMatrixWithAllocationPrice as NewFloatingMatrixWithAllocationPrice,
+)
+from .new_floating_threshold_total_amount_price import (
+ NewFloatingThresholdTotalAmountPrice as NewFloatingThresholdTotalAmountPrice,
+)
+from .new_floating_cumulative_grouped_bulk_price import (
+ NewFloatingCumulativeGroupedBulkPrice as NewFloatingCumulativeGroupedBulkPrice,
+)
+from .new_floating_package_with_allocation_price import (
+ NewFloatingPackageWithAllocationPrice as NewFloatingPackageWithAllocationPrice,
+)
+from .new_plan_tiered_package_with_minimum_price import (
+ NewPlanTieredPackageWithMinimumPrice as NewPlanTieredPackageWithMinimumPrice,
+)
+from .new_floating_matrix_with_display_name_price import (
+ NewFloatingMatrixWithDisplayNamePrice as NewFloatingMatrixWithDisplayNamePrice,
+)
+from .new_floating_max_group_tiered_package_price import (
+ NewFloatingMaxGroupTieredPackagePrice as NewFloatingMaxGroupTieredPackagePrice,
+)
+from .new_plan_grouped_with_metered_minimum_price import (
+ NewPlanGroupedWithMeteredMinimumPrice as NewPlanGroupedWithMeteredMinimumPrice,
+)
+from .new_plan_grouped_with_prorated_minimum_price import (
+ NewPlanGroupedWithProratedMinimumPrice as NewPlanGroupedWithProratedMinimumPrice,
+)
+from .new_floating_tiered_package_with_minimum_price import (
+ NewFloatingTieredPackageWithMinimumPrice as NewFloatingTieredPackageWithMinimumPrice,
+)
+from .new_floating_grouped_with_metered_minimum_price import (
+ NewFloatingGroupedWithMeteredMinimumPrice as NewFloatingGroupedWithMeteredMinimumPrice,
+)
+from .new_floating_grouped_with_prorated_minimum_price import (
+ NewFloatingGroupedWithProratedMinimumPrice as NewFloatingGroupedWithProratedMinimumPrice,
+)
+from .new_plan_scalable_matrix_with_unit_pricing_price import (
+ NewPlanScalableMatrixWithUnitPricingPrice as NewPlanScalableMatrixWithUnitPricingPrice,
+)
+from .new_plan_scalable_matrix_with_tiered_pricing_price import (
+ NewPlanScalableMatrixWithTieredPricingPrice as NewPlanScalableMatrixWithTieredPricingPrice,
+)
+from .new_floating_scalable_matrix_with_unit_pricing_price import (
+ NewFloatingScalableMatrixWithUnitPricingPrice as NewFloatingScalableMatrixWithUnitPricingPrice,
+)
+from .new_floating_scalable_matrix_with_tiered_pricing_price import (
+ NewFloatingScalableMatrixWithTieredPricingPrice as NewFloatingScalableMatrixWithTieredPricingPrice,
+)
diff --git a/src/orb/types/shared_params/amount_discount.py b/src/orb/types/shared_params/amount_discount.py
index 921bb48f..f3a9a023 100644
--- a/src/orb/types/shared_params/amount_discount.py
+++ b/src/orb/types/shared_params/amount_discount.py
@@ -5,18 +5,9 @@
from typing import List, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AmountDiscount", "Filter"]
+from .transform_price_filter import TransformPriceFilter
-
-class Filter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
+__all__ = ["AmountDiscount"]
class AmountDiscount(TypedDict, total=False):
@@ -31,7 +22,7 @@ class AmountDiscount(TypedDict, total=False):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[Iterable[Filter]]
+ filters: Optional[Iterable[TransformPriceFilter]]
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str]
diff --git a/src/orb/types/shared_params/billing_cycle_anchor_configuration.py b/src/orb/types/shared_params/billing_cycle_anchor_configuration.py
new file mode 100644
index 00000000..6df073fb
--- /dev/null
+++ b/src/orb/types/shared_params/billing_cycle_anchor_configuration.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BillingCycleAnchorConfiguration"]
+
+
+class BillingCycleAnchorConfiguration(TypedDict, total=False):
+ day: Required[int]
+ """The day of the month on which the billing cycle is anchored.
+
+ If the maximum number of days in a month is greater than this value, the last
+ day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
+ means the billing period begins on the 30th.
+ """
+
+ month: Optional[int]
+ """The month on which the billing cycle is anchored (e.g.
+
+ a quarterly price anchored in February would have cycles starting February, May,
+ August, and November).
+ """
+
+ year: Optional[int]
+ """The year on which the billing cycle is anchored (e.g.
+
+ a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
+ 2023, 2025, etc.).
+ """
diff --git a/src/orb/types/shared_params/bps_config.py b/src/orb/types/shared_params/bps_config.py
new file mode 100644
index 00000000..ca9aa6c5
--- /dev/null
+++ b/src/orb/types/shared_params/bps_config.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BPSConfig"]
+
+
+class BPSConfig(TypedDict, total=False):
+ bps: Required[float]
+ """Basis point take rate per event"""
+
+ per_unit_maximum: Optional[str]
+ """Optional currency amount maximum to cap spend per event"""
diff --git a/src/orb/types/shared_params/bps_tier.py b/src/orb/types/shared_params/bps_tier.py
new file mode 100644
index 00000000..0dd432c8
--- /dev/null
+++ b/src/orb/types/shared_params/bps_tier.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BPSTier"]
+
+
+class BPSTier(TypedDict, total=False):
+ bps: Required[float]
+ """Per-event basis point rate"""
+
+ minimum_amount: Required[str]
+ """Exclusive tier starting value"""
+
+ maximum_amount: Optional[str]
+ """Inclusive tier ending value"""
+
+ per_unit_maximum: Optional[str]
+ """Per unit maximum to charge"""
diff --git a/src/orb/types/shared_params/bulk_bps_config.py b/src/orb/types/shared_params/bulk_bps_config.py
new file mode 100644
index 00000000..85ce027b
--- /dev/null
+++ b/src/orb/types/shared_params/bulk_bps_config.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+from .bulk_bps_tier import BulkBPSTier
+
+__all__ = ["BulkBPSConfig"]
+
+
+class BulkBPSConfig(TypedDict, total=False):
+ tiers: Required[Iterable[BulkBPSTier]]
+ """
+ Tiers for a bulk BPS pricing model where all usage is aggregated to a single
+ tier based on total volume
+ """
diff --git a/src/orb/types/shared_params/bulk_bps_tier.py b/src/orb/types/shared_params/bulk_bps_tier.py
new file mode 100644
index 00000000..f63318e4
--- /dev/null
+++ b/src/orb/types/shared_params/bulk_bps_tier.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BulkBPSTier"]
+
+
+class BulkBPSTier(TypedDict, total=False):
+ bps: Required[float]
+ """Basis points to rate on"""
+
+ maximum_amount: Optional[str]
+ """Upper bound for tier"""
+
+ per_unit_maximum: Optional[str]
+ """The maximum amount to charge for any one event"""
diff --git a/src/orb/types/shared_params/bulk_config.py b/src/orb/types/shared_params/bulk_config.py
new file mode 100644
index 00000000..b4ca0907
--- /dev/null
+++ b/src/orb/types/shared_params/bulk_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+from .bulk_tier import BulkTier
+
+__all__ = ["BulkConfig"]
+
+
+class BulkConfig(TypedDict, total=False):
+ tiers: Required[Iterable[BulkTier]]
+ """Bulk tiers for rating based on total usage volume"""
diff --git a/src/orb/types/shared_params/bulk_tier.py b/src/orb/types/shared_params/bulk_tier.py
new file mode 100644
index 00000000..15dd5d03
--- /dev/null
+++ b/src/orb/types/shared_params/bulk_tier.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["BulkTier"]
+
+
+class BulkTier(TypedDict, total=False):
+ unit_amount: Required[str]
+ """Amount per unit"""
+
+ maximum_units: Optional[float]
+ """Upper bound for this tier"""
diff --git a/src/orb/types/shared_params/conversion_rate_tier.py b/src/orb/types/shared_params/conversion_rate_tier.py
new file mode 100644
index 00000000..8b8230a9
--- /dev/null
+++ b/src/orb/types/shared_params/conversion_rate_tier.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ConversionRateTier"]
+
+
+class ConversionRateTier(TypedDict, total=False):
+ first_unit: Required[float]
+ """Exclusive tier starting value"""
+
+ unit_amount: Required[str]
+ """Amount per unit of overage"""
+
+ last_unit: Optional[float]
+ """Inclusive tier ending value. If null, this is treated as the last tier"""
diff --git a/src/orb/types/shared_params/conversion_rate_tiered_config.py b/src/orb/types/shared_params/conversion_rate_tiered_config.py
new file mode 100644
index 00000000..bfb4362b
--- /dev/null
+++ b/src/orb/types/shared_params/conversion_rate_tiered_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+from .conversion_rate_tier import ConversionRateTier
+
+__all__ = ["ConversionRateTieredConfig"]
+
+
+class ConversionRateTieredConfig(TypedDict, total=False):
+ tiers: Required[Iterable[ConversionRateTier]]
+ """Tiers for rating based on total usage quantities into the specified tier"""
diff --git a/src/orb/types/shared_params/conversion_rate_unit_config.py b/src/orb/types/shared_params/conversion_rate_unit_config.py
new file mode 100644
index 00000000..2bb9621b
--- /dev/null
+++ b/src/orb/types/shared_params/conversion_rate_unit_config.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ConversionRateUnitConfig"]
+
+
+class ConversionRateUnitConfig(TypedDict, total=False):
+ unit_amount: Required[str]
+ """Amount per unit of overage"""
diff --git a/src/orb/types/shared_params/custom_expiration.py b/src/orb/types/shared_params/custom_expiration.py
new file mode 100644
index 00000000..cf55805f
--- /dev/null
+++ b/src/orb/types/shared_params/custom_expiration.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["CustomExpiration"]
+
+
+class CustomExpiration(TypedDict, total=False):
+ duration: Required[int]
+
+ duration_unit: Required[Literal["day", "month"]]
diff --git a/src/orb/types/shared_params/customer_tax_id.py b/src/orb/types/shared_params/customer_tax_id.py
new file mode 100644
index 00000000..8d0e14f8
--- /dev/null
+++ b/src/orb/types/shared_params/customer_tax_id.py
@@ -0,0 +1,170 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["CustomerTaxID"]
+
+
+class CustomerTaxID(TypedDict, total=False):
+ country: Required[
+ Literal[
+ "AD",
+ "AE",
+ "AR",
+ "AT",
+ "AU",
+ "BE",
+ "BG",
+ "BH",
+ "BO",
+ "BR",
+ "CA",
+ "CH",
+ "CL",
+ "CN",
+ "CO",
+ "CR",
+ "CY",
+ "CZ",
+ "DE",
+ "DK",
+ "EE",
+ "DO",
+ "EC",
+ "EG",
+ "ES",
+ "EU",
+ "FI",
+ "FR",
+ "GB",
+ "GE",
+ "GR",
+ "HK",
+ "HR",
+ "HU",
+ "ID",
+ "IE",
+ "IL",
+ "IN",
+ "IS",
+ "IT",
+ "JP",
+ "KE",
+ "KR",
+ "KZ",
+ "LI",
+ "LT",
+ "LU",
+ "LV",
+ "MT",
+ "MX",
+ "MY",
+ "NG",
+ "NL",
+ "NO",
+ "NZ",
+ "OM",
+ "PE",
+ "PH",
+ "PL",
+ "PT",
+ "RO",
+ "RS",
+ "RU",
+ "SA",
+ "SE",
+ "SG",
+ "SI",
+ "SK",
+ "SV",
+ "TH",
+ "TR",
+ "TW",
+ "UA",
+ "US",
+ "UY",
+ "VE",
+ "VN",
+ "ZA",
+ ]
+ ]
+
+ type: Required[
+ Literal[
+ "ad_nrt",
+ "ae_trn",
+ "ar_cuit",
+ "eu_vat",
+ "au_abn",
+ "au_arn",
+ "bg_uic",
+ "bh_vat",
+ "bo_tin",
+ "br_cnpj",
+ "br_cpf",
+ "ca_bn",
+ "ca_gst_hst",
+ "ca_pst_bc",
+ "ca_pst_mb",
+ "ca_pst_sk",
+ "ca_qst",
+ "ch_vat",
+ "cl_tin",
+ "cn_tin",
+ "co_nit",
+ "cr_tin",
+ "do_rcn",
+ "ec_ruc",
+ "eg_tin",
+ "es_cif",
+ "eu_oss_vat",
+ "gb_vat",
+ "ge_vat",
+ "hk_br",
+ "hu_tin",
+ "id_npwp",
+ "il_vat",
+ "in_gst",
+ "is_vat",
+ "jp_cn",
+ "jp_rn",
+ "jp_trn",
+ "ke_pin",
+ "kr_brn",
+ "kz_bin",
+ "li_uid",
+ "mx_rfc",
+ "my_frp",
+ "my_itn",
+ "my_sst",
+ "ng_tin",
+ "no_vat",
+ "no_voec",
+ "nz_gst",
+ "om_vat",
+ "pe_ruc",
+ "ph_tin",
+ "ro_tin",
+ "rs_pib",
+ "ru_inn",
+ "ru_kpp",
+ "sa_vat",
+ "sg_gst",
+ "sg_uen",
+ "si_tin",
+ "sv_nit",
+ "th_vat",
+ "tr_tin",
+ "tw_vat",
+ "ua_vat",
+ "us_ein",
+ "uy_ruc",
+ "ve_rif",
+ "vn_tin",
+ "za_vat",
+ ]
+ ]
+
+ value: Required[str]
diff --git a/src/orb/types/shared_params/matrix_config.py b/src/orb/types/shared_params/matrix_config.py
new file mode 100644
index 00000000..e0534d71
--- /dev/null
+++ b/src/orb/types/shared_params/matrix_config.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Required, TypedDict
+
+from .matrix_value import MatrixValue
+
+__all__ = ["MatrixConfig"]
+
+
+class MatrixConfig(TypedDict, total=False):
+ default_unit_amount: Required[str]
+ """Default per unit rate for any usage not bucketed into a specified matrix_value"""
+
+ dimensions: Required[List[Optional[str]]]
+ """One or two event property values to evaluate matrix groups by"""
+
+ matrix_values: Required[Iterable[MatrixValue]]
+ """Matrix values for specified matrix grouping keys"""
diff --git a/src/orb/types/shared_params/matrix_value.py b/src/orb/types/shared_params/matrix_value.py
new file mode 100644
index 00000000..51d5c5a0
--- /dev/null
+++ b/src/orb/types/shared_params/matrix_value.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["MatrixValue"]
+
+
+class MatrixValue(TypedDict, total=False):
+ dimension_values: Required[List[Optional[str]]]
+ """One or two matrix keys to filter usage to this Matrix value by.
+
+ For example, ["region", "tier"] could be used to filter cloud usage by a cloud
+ region and an instance tier.
+ """
+
+ unit_amount: Required[str]
+ """Unit price for the specified dimension_values"""
diff --git a/src/orb/types/shared_params/matrix_with_allocation_config.py b/src/orb/types/shared_params/matrix_with_allocation_config.py
new file mode 100644
index 00000000..43011306
--- /dev/null
+++ b/src/orb/types/shared_params/matrix_with_allocation_config.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Required, TypedDict
+
+from .matrix_value import MatrixValue
+
+__all__ = ["MatrixWithAllocationConfig"]
+
+
+class MatrixWithAllocationConfig(TypedDict, total=False):
+ allocation: Required[float]
+ """Allocation to be used to calculate the price"""
+
+ default_unit_amount: Required[str]
+ """Default per unit rate for any usage not bucketed into a specified matrix_value"""
+
+ dimensions: Required[List[Optional[str]]]
+ """One or two event property values to evaluate matrix groups by"""
+
+ matrix_values: Required[Iterable[MatrixValue]]
+ """Matrix values for specified matrix grouping keys"""
diff --git a/src/orb/types/shared_params/new_allocation_price.py b/src/orb/types/shared_params/new_allocation_price.py
new file mode 100644
index 00000000..b0dcca50
--- /dev/null
+++ b/src/orb/types/shared_params/new_allocation_price.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .custom_expiration import CustomExpiration
+
+__all__ = ["NewAllocationPrice"]
+
+
+class NewAllocationPrice(TypedDict, total=False):
+ amount: Required[str]
+ """An amount of the currency to allocate to the customer at the specified cadence."""
+
+ cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
+ """The cadence at which to allocate the amount to the customer."""
+
+ currency: Required[str]
+ """
+ An ISO 4217 currency string or a custom pricing unit identifier in which to bill
+ this price.
+ """
+
+ custom_expiration: Optional[CustomExpiration]
+ """The custom expiration for the allocation."""
+
+ expires_at_end_of_cadence: Optional[bool]
+ """
+ Whether the allocated amount should expire at the end of the cadence or roll
+ over to the next period. Set to null if using custom_expiration.
+ """
diff --git a/src/orb/types/shared_params/new_amount_discount.py b/src/orb/types/shared_params/new_amount_discount.py
new file mode 100644
index 00000000..897c0b12
--- /dev/null
+++ b/src/orb/types/shared_params/new_amount_discount.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewAmountDiscount"]
+
+
+class NewAmountDiscount(TypedDict, total=False):
+ adjustment_type: Required[Literal["amount_discount"]]
+
+ amount_discount: Required[str]
+
+ applies_to_all: Optional[Literal[True]]
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]]
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]]
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str]
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[Iterable[TransformPriceFilter]]
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: bool
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared_params/new_billing_cycle_configuration.py b/src/orb/types/shared_params/new_billing_cycle_configuration.py
new file mode 100644
index 00000000..bb63dabb
--- /dev/null
+++ b/src/orb/types/shared_params/new_billing_cycle_configuration.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["NewBillingCycleConfiguration"]
+
+
+class NewBillingCycleConfiguration(TypedDict, total=False):
+ duration: Required[int]
+ """The duration of the billing period."""
+
+ duration_unit: Required[Literal["day", "month"]]
+ """The unit of billing period duration."""
diff --git a/src/orb/types/shared_params/new_dimensional_price_configuration.py b/src/orb/types/shared_params/new_dimensional_price_configuration.py
new file mode 100644
index 00000000..5c13b0c9
--- /dev/null
+++ b/src/orb/types/shared_params/new_dimensional_price_configuration.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["NewDimensionalPriceConfiguration"]
+
+
+class NewDimensionalPriceConfiguration(TypedDict, total=False):
+ dimension_values: Required[List[str]]
+ """
+ The list of dimension values matching (in order) the dimensions of the price
+ group
+ """
+
+ dimensional_price_group_id: Optional[str]
+ """The id of the dimensional price group to include this price in"""
+
+ external_dimensional_price_group_id: Optional[str]
+ """The external id of the dimensional price group to include this price in"""
diff --git a/src/orb/types/shared_params/new_floating_bps_price.py b/src/orb/types/shared_params/new_floating_bps_price.py
new file mode 100644
index 00000000..58f4be5d
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_bps_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bps_config import BPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingBPSPrice(TypedDict, total=False):
+ bps_config: Required[BPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_bulk_bps_price.py b/src/orb/types/shared_params/new_floating_bulk_bps_price.py
new file mode 100644
index 00000000..6840841c
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_bulk_bps_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bulk_bps_config import BulkBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingBulkBPSPrice(TypedDict, total=False):
+ bulk_bps_config: Required[BulkBPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_bulk_price.py b/src/orb/types/shared_params/new_floating_bulk_price.py
new file mode 100644
index 00000000..8dd8368f
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_bulk_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bulk_config import BulkConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingBulkPrice(TypedDict, total=False):
+ bulk_config: Required[BulkConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_bulk_with_proration_price.py b/src/orb/types/shared_params/new_floating_bulk_with_proration_price.py
new file mode 100644
index 00000000..9730e26d
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_bulk_with_proration_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingBulkWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingBulkWithProrationPrice(TypedDict, total=False):
+ bulk_with_proration_config: Required[Dict[str, object]]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_cumulative_grouped_bulk_price.py b/src/orb/types/shared_params/new_floating_cumulative_grouped_bulk_price.py
new file mode 100644
index 00000000..643c1192
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_cumulative_grouped_bulk_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingCumulativeGroupedBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ cumulative_grouped_bulk_config: Required[Dict[str, object]]
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["cumulative_grouped_bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_grouped_allocation_price.py b/src/orb/types/shared_params/new_floating_grouped_allocation_price.py
new file mode 100644
index 00000000..d5d8ae7e
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_grouped_allocation_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingGroupedAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_allocation_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_grouped_tiered_package_price.py b/src/orb/types/shared_params/new_floating_grouped_tiered_package_price.py
new file mode 100644
index 00000000..3ea5c778
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_grouped_tiered_package_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_tiered_package_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_grouped_tiered_price.py b/src/orb/types/shared_params/new_floating_grouped_tiered_price.py
new file mode 100644
index 00000000..e3982b75
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_grouped_tiered_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingGroupedTieredPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_tiered_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_grouped_with_metered_minimum_price.py b/src/orb/types/shared_params/new_floating_grouped_with_metered_minimum_price.py
new file mode 100644
index 00000000..5a13cbd2
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_grouped_with_metered_minimum_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedWithMeteredMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_with_metered_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_metered_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_grouped_with_prorated_minimum_price.py b/src/orb/types/shared_params/new_floating_grouped_with_prorated_minimum_price.py
new file mode 100644
index 00000000..17a28adf
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_grouped_with_prorated_minimum_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingGroupedWithProratedMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ grouped_with_prorated_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_prorated_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_matrix_price.py b/src/orb/types/shared_params/new_floating_matrix_price.py
new file mode 100644
index 00000000..0d385711
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_matrix_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .matrix_config import MatrixConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingMatrixPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_config: Required[MatrixConfig]
+
+ model_type: Required[Literal["matrix"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_matrix_with_allocation_price.py b/src/orb/types/shared_params/new_floating_matrix_with_allocation_price.py
new file mode 100644
index 00000000..c0cb4fca
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_matrix_with_allocation_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_allocation_config: Required[MatrixWithAllocationConfig]
+
+ model_type: Required[Literal["matrix_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_matrix_with_display_name_price.py b/src/orb/types/shared_params/new_floating_matrix_with_display_name_price.py
new file mode 100644
index 00000000..ed2c78be
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_matrix_with_display_name_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMatrixWithDisplayNamePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_display_name_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["matrix_with_display_name"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_max_group_tiered_package_price.py b/src/orb/types/shared_params/new_floating_max_group_tiered_package_price.py
new file mode 100644
index 00000000..69aa79d2
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_max_group_tiered_package_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingMaxGroupTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ max_group_tiered_package_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["max_group_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_package_price.py b/src/orb/types/shared_params/new_floating_package_price.py
new file mode 100644
index 00000000..81d880ae
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_package_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .package_config import PackageConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_config: Required[PackageConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_package_with_allocation_price.py b/src/orb/types/shared_params/new_floating_package_with_allocation_price.py
new file mode 100644
index 00000000..c80a6a9c
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_package_with_allocation_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingPackageWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingPackageWithAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_with_allocation_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_scalable_matrix_with_tiered_pricing_price.py b/src/orb/types/shared_params/new_floating_scalable_matrix_with_tiered_pricing_price.py
new file mode 100644
index 00000000..62b6a382
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_scalable_matrix_with_tiered_pricing_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingScalableMatrixWithTieredPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py
new file mode 100644
index 00000000..cc01eaa7
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_scalable_matrix_with_unit_pricing_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingScalableMatrixWithUnitPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_threshold_total_amount_price.py b/src/orb/types/shared_params/new_floating_threshold_total_amount_price.py
new file mode 100644
index 00000000..0518b963
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_threshold_total_amount_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingThresholdTotalAmountPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["threshold_total_amount"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ threshold_total_amount_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_bps_price.py b/src/orb/types/shared_params/new_floating_tiered_bps_price.py
new file mode 100644
index 00000000..2e4cc40e
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_bps_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .tiered_bps_config import TieredBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredBPSPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_bps_config: Required[TieredBPSConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_package_price.py b/src/orb/types/shared_params/new_floating_tiered_package_price.py
new file mode 100644
index 00000000..685cb715
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_package_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_package_with_minimum_price.py b/src/orb/types/shared_params/new_floating_tiered_package_with_minimum_price.py
new file mode 100644
index 00000000..9acd9994
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_package_with_minimum_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPackageWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_price.py b/src/orb/types/shared_params/new_floating_tiered_price.py
new file mode 100644
index 00000000..cf67d2f0
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .tiered_config import TieredConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_config: Required[TieredConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_with_minimum_price.py b/src/orb/types/shared_params/new_floating_tiered_with_minimum_price.py
new file mode 100644
index 00000000..0999c68b
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_with_minimum_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredWithMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_tiered_with_proration_price.py b/src/orb/types/shared_params/new_floating_tiered_with_proration_price.py
new file mode 100644
index 00000000..0e281ad6
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_tiered_with_proration_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingTieredWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingTieredWithProrationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_unit_price.py b/src/orb/types/shared_params/new_floating_unit_price.py
new file mode 100644
index 00000000..8c77f12b
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_unit_price.py
@@ -0,0 +1,86 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_config import UnitConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingUnitPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_config: Required[UnitConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_unit_with_percent_price.py b/src/orb/types/shared_params/new_floating_unit_with_percent_price.py
new file mode 100644
index 00000000..5af3737e
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_unit_with_percent_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitWithPercentPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingUnitWithPercentPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_percent"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_percent_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_floating_unit_with_proration_price.py b/src/orb/types/shared_params/new_floating_unit_with_proration_price.py
new file mode 100644
index 00000000..49351964
--- /dev/null
+++ b/src/orb/types/shared_params/new_floating_unit_with_proration_price.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewFloatingUnitWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewFloatingUnitWithProrationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ currency: Required[str]
+ """An ISO 4217 currency string for which this price is billed in."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_maximum.py b/src/orb/types/shared_params/new_maximum.py
new file mode 100644
index 00000000..d48ef79c
--- /dev/null
+++ b/src/orb/types/shared_params/new_maximum.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewMaximum"]
+
+
+class NewMaximum(TypedDict, total=False):
+ adjustment_type: Required[Literal["maximum"]]
+
+ maximum_amount: Required[str]
+
+ applies_to_all: Optional[Literal[True]]
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]]
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]]
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str]
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[Iterable[TransformPriceFilter]]
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: bool
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared_params/new_minimum.py b/src/orb/types/shared_params/new_minimum.py
new file mode 100644
index 00000000..1ef634ec
--- /dev/null
+++ b/src/orb/types/shared_params/new_minimum.py
@@ -0,0 +1,43 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewMinimum"]
+
+
+class NewMinimum(TypedDict, total=False):
+ adjustment_type: Required[Literal["minimum"]]
+
+ item_id: Required[str]
+ """The item ID that revenue from this minimum will be attributed to."""
+
+ minimum_amount: Required[str]
+
+ applies_to_all: Optional[Literal[True]]
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]]
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]]
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str]
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[Iterable[TransformPriceFilter]]
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: bool
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared_params/new_percentage_discount.py b/src/orb/types/shared_params/new_percentage_discount.py
new file mode 100644
index 00000000..7bef4f38
--- /dev/null
+++ b/src/orb/types/shared_params/new_percentage_discount.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewPercentageDiscount"]
+
+
+class NewPercentageDiscount(TypedDict, total=False):
+ adjustment_type: Required[Literal["percentage_discount"]]
+
+ percentage_discount: Required[float]
+
+ applies_to_all: Optional[Literal[True]]
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]]
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]]
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str]
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[Iterable[TransformPriceFilter]]
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: bool
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared_params/new_plan_bps_price.py b/src/orb/types/shared_params/new_plan_bps_price.py
new file mode 100644
index 00000000..fcabd457
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_bps_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bps_config import BPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanBPSPrice(TypedDict, total=False):
+ bps_config: Required[BPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_bulk_bps_price.py b/src/orb/types/shared_params/new_plan_bulk_bps_price.py
new file mode 100644
index 00000000..531e7371
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_bulk_bps_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bulk_bps_config import BulkBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanBulkBPSPrice(TypedDict, total=False):
+ bulk_bps_config: Required[BulkBPSConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_bulk_price.py b/src/orb/types/shared_params/new_plan_bulk_price.py
new file mode 100644
index 00000000..3edb1584
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_bulk_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .bulk_config import BulkConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanBulkPrice(TypedDict, total=False):
+ bulk_config: Required[BulkConfig]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_bulk_with_proration_price.py b/src/orb/types/shared_params/new_plan_bulk_with_proration_price.py
new file mode 100644
index 00000000..c30f7e39
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_bulk_with_proration_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanBulkWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanBulkWithProrationPrice(TypedDict, total=False):
+ bulk_with_proration_config: Required[Dict[str, object]]
+
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["bulk_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_cumulative_grouped_bulk_price.py b/src/orb/types/shared_params/new_plan_cumulative_grouped_bulk_price.py
new file mode 100644
index 00000000..af851f4a
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_cumulative_grouped_bulk_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanCumulativeGroupedBulkPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanCumulativeGroupedBulkPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ cumulative_grouped_bulk_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["cumulative_grouped_bulk"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_grouped_allocation_price.py b/src/orb/types/shared_params/new_plan_grouped_allocation_price.py
new file mode 100644
index 00000000..873a9bc6
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_grouped_allocation_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanGroupedAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_allocation_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_grouped_tiered_package_price.py b/src/orb/types/shared_params/new_plan_grouped_tiered_package_price.py
new file mode 100644
index 00000000..98de19ff
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_grouped_tiered_package_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanGroupedTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_package_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_grouped_tiered_price.py b/src/orb/types/shared_params/new_plan_grouped_tiered_price.py
new file mode 100644
index 00000000..2fbc66d5
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_grouped_tiered_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanGroupedTieredPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_tiered_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_grouped_with_metered_minimum_price.py b/src/orb/types/shared_params/new_plan_grouped_with_metered_minimum_price.py
new file mode 100644
index 00000000..8627f703
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_grouped_with_metered_minimum_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedWithMeteredMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanGroupedWithMeteredMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_with_metered_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_metered_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_grouped_with_prorated_minimum_price.py b/src/orb/types/shared_params/new_plan_grouped_with_prorated_minimum_price.py
new file mode 100644
index 00000000..2bdf29ff
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_grouped_with_prorated_minimum_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanGroupedWithProratedMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanGroupedWithProratedMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ grouped_with_prorated_minimum_config: Required[Dict[str, object]]
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["grouped_with_prorated_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_matrix_price.py b/src/orb/types/shared_params/new_plan_matrix_price.py
new file mode 100644
index 00000000..b65a8f4b
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_matrix_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .matrix_config import MatrixConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanMatrixPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_config: Required[MatrixConfig]
+
+ model_type: Required[Literal["matrix"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_matrix_with_allocation_price.py b/src/orb/types/shared_params/new_plan_matrix_with_allocation_price.py
new file mode 100644
index 00000000..bfd0cab7
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_matrix_with_allocation_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .matrix_with_allocation_config import MatrixWithAllocationConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanMatrixWithAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_allocation_config: Required[MatrixWithAllocationConfig]
+
+ model_type: Required[Literal["matrix_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_matrix_with_display_name_price.py b/src/orb/types/shared_params/new_plan_matrix_with_display_name_price.py
new file mode 100644
index 00000000..43bb73ee
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_matrix_with_display_name_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMatrixWithDisplayNamePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanMatrixWithDisplayNamePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ matrix_with_display_name_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["matrix_with_display_name"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_max_group_tiered_package_price.py b/src/orb/types/shared_params/new_plan_max_group_tiered_package_price.py
new file mode 100644
index 00000000..c9100746
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_max_group_tiered_package_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanMaxGroupTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanMaxGroupTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ max_group_tiered_package_config: Required[Dict[str, object]]
+
+ model_type: Required[Literal["max_group_tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_package_price.py b/src/orb/types/shared_params/new_plan_package_price.py
new file mode 100644
index 00000000..b315f03b
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_package_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .package_config import PackageConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_config: Required[PackageConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_package_with_allocation_price.py b/src/orb/types/shared_params/new_plan_package_with_allocation_price.py
new file mode 100644
index 00000000..1eef2c0e
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_package_with_allocation_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanPackageWithAllocationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanPackageWithAllocationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["package_with_allocation"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ package_with_allocation_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_scalable_matrix_with_tiered_pricing_price.py b/src/orb/types/shared_params/new_plan_scalable_matrix_with_tiered_pricing_price.py
new file mode 100644
index 00000000..d9121714
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_scalable_matrix_with_tiered_pricing_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanScalableMatrixWithTieredPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py b/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py
new file mode 100644
index 00000000..b58738f8
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_scalable_matrix_with_unit_pricing_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanScalableMatrixWithUnitPricingPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_threshold_total_amount_price.py b/src/orb/types/shared_params/new_plan_threshold_total_amount_price.py
new file mode 100644
index 00000000..a7f1f3db
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_threshold_total_amount_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanThresholdTotalAmountPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanThresholdTotalAmountPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["threshold_total_amount"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ threshold_total_amount_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tier_with_proration_price.py b/src/orb/types/shared_params/new_plan_tier_with_proration_price.py
new file mode 100644
index 00000000..243fb99c
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tier_with_proration_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTierWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTierWithProrationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tiered_bps_price.py b/src/orb/types/shared_params/new_plan_tiered_bps_price.py
new file mode 100644
index 00000000..d96e07ee
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tiered_bps_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .tiered_bps_config import TieredBPSConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredBPSPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTieredBPSPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_bps"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_bps_config: Required[TieredBPSConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tiered_package_price.py b/src/orb/types/shared_params/new_plan_tiered_package_price.py
new file mode 100644
index 00000000..0ef773ac
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tiered_package_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPackagePrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTieredPackagePrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tiered_package_with_minimum_price.py b/src/orb/types/shared_params/new_plan_tiered_package_with_minimum_price.py
new file mode 100644
index 00000000..251fc01d
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tiered_package_with_minimum_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPackageWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTieredPackageWithMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_package_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_package_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tiered_price.py b/src/orb/types/shared_params/new_plan_tiered_price.py
new file mode 100644
index 00000000..598c0d48
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tiered_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .tiered_config import TieredConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTieredPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_config: Required[TieredConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_tiered_with_minimum_price.py b/src/orb/types/shared_params/new_plan_tiered_with_minimum_price.py
new file mode 100644
index 00000000..61b8636f
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_tiered_with_minimum_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanTieredWithMinimumPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanTieredWithMinimumPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["tiered_with_minimum"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ tiered_with_minimum_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_unit_price.py b/src/orb/types/shared_params/new_plan_unit_price.py
new file mode 100644
index 00000000..ec3b698c
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_unit_price.py
@@ -0,0 +1,89 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_config import UnitConfig
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanUnitPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_config: Required[UnitConfig]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_unit_with_percent_price.py b/src/orb/types/shared_params/new_plan_unit_with_percent_price.py
new file mode 100644
index 00000000..6db2bcb6
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_unit_with_percent_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitWithPercentPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanUnitWithPercentPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_percent"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_percent_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_plan_unit_with_proration_price.py b/src/orb/types/shared_params/new_plan_unit_with_proration_price.py
new file mode 100644
index 00000000..4cf6159a
--- /dev/null
+++ b/src/orb/types/shared_params/new_plan_unit_with_proration_price.py
@@ -0,0 +1,88 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
+
+from .unit_conversion_rate_config import UnitConversionRateConfig
+from .tiered_conversion_rate_config import TieredConversionRateConfig
+from .new_billing_cycle_configuration import NewBillingCycleConfiguration
+from .new_dimensional_price_configuration import NewDimensionalPriceConfiguration
+
+__all__ = ["NewPlanUnitWithProrationPrice", "ConversionRateConfig"]
+
+ConversionRateConfig: TypeAlias = Union[UnitConversionRateConfig, TieredConversionRateConfig]
+
+
+class NewPlanUnitWithProrationPrice(TypedDict, total=False):
+ cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
+ """The cadence to bill for this price on."""
+
+ item_id: Required[str]
+ """The id of the item the price will be associated with."""
+
+ model_type: Required[Literal["unit_with_proration"]]
+
+ name: Required[str]
+ """The name of the price."""
+
+ unit_with_proration_config: Required[Dict[str, object]]
+
+ billable_metric_id: Optional[str]
+ """The id of the billable metric for the price.
+
+ Only needed if the price is usage-based.
+ """
+
+ billed_in_advance: Optional[bool]
+ """
+ If the Price represents a fixed cost, the price will be billed in-advance if
+ this is true, and in-arrears if this is false.
+ """
+
+ billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """
+ For custom cadence: specifies the duration of the billing period in days or
+ months.
+ """
+
+ conversion_rate: Optional[float]
+ """The per unit conversion rate of the price currency to the invoicing currency."""
+
+ conversion_rate_config: Optional[ConversionRateConfig]
+ """The configuration for the rate of the price currency to the invoicing currency."""
+
+ currency: Optional[str]
+ """
+ An ISO 4217 currency string, or custom pricing unit identifier, in which this
+ price is billed.
+ """
+
+ dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
+ """For dimensional price: specifies a price group and dimension values"""
+
+ external_price_id: Optional[str]
+ """An alias for the price."""
+
+ fixed_price_quantity: Optional[float]
+ """
+ If the Price represents a fixed cost, this represents the quantity of units
+ applied.
+ """
+
+ invoice_grouping_key: Optional[str]
+ """The property used to group this price on an invoice"""
+
+ invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
+ """Within each billing cycle, specifies the cadence at which invoices are produced.
+
+ If unspecified, a single invoice is produced per billing cycle.
+ """
+
+ metadata: Optional[Dict[str, Optional[str]]]
+ """User-specified key/value pairs for the resource.
+
+ Individual keys can be removed by setting the value to `null`, and the entire
+ metadata mapping can be cleared by setting `metadata` to `null`.
+ """
diff --git a/src/orb/types/shared_params/new_usage_discount.py b/src/orb/types/shared_params/new_usage_discount.py
new file mode 100644
index 00000000..16b3b8de
--- /dev/null
+++ b/src/orb/types/shared_params/new_usage_discount.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .transform_price_filter import TransformPriceFilter
+
+__all__ = ["NewUsageDiscount"]
+
+
+class NewUsageDiscount(TypedDict, total=False):
+ adjustment_type: Required[Literal["usage_discount"]]
+
+ usage_discount: Required[float]
+
+ applies_to_all: Optional[Literal[True]]
+ """If set, the adjustment will apply to every price on the subscription."""
+
+ applies_to_item_ids: Optional[List[str]]
+ """The set of item IDs to which this adjustment applies."""
+
+ applies_to_price_ids: Optional[List[str]]
+ """The set of price IDs to which this adjustment applies."""
+
+ currency: Optional[str]
+ """If set, only prices in the specified currency will have the adjustment applied."""
+
+ filters: Optional[Iterable[TransformPriceFilter]]
+ """A list of filters that determine which prices this adjustment will apply to."""
+
+ is_invoice_level: bool
+ """When false, this adjustment will be applied to a single price.
+
+ Otherwise, it will be applied at the invoice level, possibly to multiple prices.
+ """
+
+ price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
+ """If set, only prices of the specified type will have the adjustment applied."""
diff --git a/src/orb/types/shared_params/package_config.py b/src/orb/types/shared_params/package_config.py
new file mode 100644
index 00000000..ad4f51be
--- /dev/null
+++ b/src/orb/types/shared_params/package_config.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["PackageConfig"]
+
+
+class PackageConfig(TypedDict, total=False):
+ package_amount: Required[str]
+ """A currency amount to rate usage by"""
+
+ package_size: Required[int]
+ """An integer amount to represent package size.
+
+ For example, 1000 here would divide usage by 1000 before multiplying by
+ package_amount in rating
+ """
diff --git a/src/orb/types/shared_params/percentage_discount.py b/src/orb/types/shared_params/percentage_discount.py
index 7468db3b..9d41a3a3 100644
--- a/src/orb/types/shared_params/percentage_discount.py
+++ b/src/orb/types/shared_params/percentage_discount.py
@@ -5,18 +5,9 @@
from typing import List, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["PercentageDiscount", "Filter"]
+from .transform_price_filter import TransformPriceFilter
-
-class Filter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
+__all__ = ["PercentageDiscount"]
class PercentageDiscount(TypedDict, total=False):
@@ -34,7 +25,7 @@ class PercentageDiscount(TypedDict, total=False):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[Iterable[Filter]]
+ filters: Optional[Iterable[TransformPriceFilter]]
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str]
diff --git a/src/orb/types/shared_params/tier.py b/src/orb/types/shared_params/tier.py
new file mode 100644
index 00000000..e8583e37
--- /dev/null
+++ b/src/orb/types/shared_params/tier.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["Tier"]
+
+
+class Tier(TypedDict, total=False):
+ first_unit: Required[float]
+ """Exclusive tier starting value"""
+
+ unit_amount: Required[str]
+ """Amount per unit"""
+
+ last_unit: Optional[float]
+ """Inclusive tier ending value. If null, this is treated as the last tier"""
diff --git a/src/orb/types/shared_params/tiered_bps_config.py b/src/orb/types/shared_params/tiered_bps_config.py
new file mode 100644
index 00000000..1f636ff2
--- /dev/null
+++ b/src/orb/types/shared_params/tiered_bps_config.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+from .bps_tier import BPSTier
+
+__all__ = ["TieredBPSConfig"]
+
+
+class TieredBPSConfig(TypedDict, total=False):
+ tiers: Required[Iterable[BPSTier]]
+ """
+ Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
+ tiers
+ """
diff --git a/src/orb/types/shared_params/tiered_config.py b/src/orb/types/shared_params/tiered_config.py
new file mode 100644
index 00000000..d4272b32
--- /dev/null
+++ b/src/orb/types/shared_params/tiered_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, TypedDict
+
+from .tier import Tier
+
+__all__ = ["TieredConfig"]
+
+
+class TieredConfig(TypedDict, total=False):
+ tiers: Required[Iterable[Tier]]
+ """Tiers for rating based on total usage quantities into the specified tier"""
diff --git a/src/orb/types/shared_params/tiered_conversion_rate_config.py b/src/orb/types/shared_params/tiered_conversion_rate_config.py
new file mode 100644
index 00000000..23775799
--- /dev/null
+++ b/src/orb/types/shared_params/tiered_conversion_rate_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+from .conversion_rate_tiered_config import ConversionRateTieredConfig
+
+__all__ = ["TieredConversionRateConfig"]
+
+
+class TieredConversionRateConfig(TypedDict, total=False):
+ conversion_rate_type: Required[Literal["tiered"]]
+
+ tiered_config: Required[ConversionRateTieredConfig]
diff --git a/src/orb/types/shared_params/transform_price_filter.py b/src/orb/types/shared_params/transform_price_filter.py
new file mode 100644
index 00000000..81298270
--- /dev/null
+++ b/src/orb/types/shared_params/transform_price_filter.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List
+from typing_extensions import Literal, Required, TypedDict
+
+__all__ = ["TransformPriceFilter"]
+
+
+class TransformPriceFilter(TypedDict, total=False):
+ field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
+ """The property of the price to filter on."""
+
+ operator: Required[Literal["includes", "excludes"]]
+ """Should prices that match the filter be included or excluded."""
+
+ values: Required[List[str]]
+ """The IDs or values that match this filter."""
diff --git a/src/orb/types/shared_params/trial_discount.py b/src/orb/types/shared_params/trial_discount.py
index 7777fe40..012c87b6 100644
--- a/src/orb/types/shared_params/trial_discount.py
+++ b/src/orb/types/shared_params/trial_discount.py
@@ -5,18 +5,9 @@
from typing import List, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["TrialDiscount", "Filter"]
+from .transform_price_filter import TransformPriceFilter
-
-class Filter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
+__all__ = ["TrialDiscount"]
class TrialDiscount(TypedDict, total=False):
@@ -28,7 +19,7 @@ class TrialDiscount(TypedDict, total=False):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[Iterable[Filter]]
+ filters: Optional[Iterable[TransformPriceFilter]]
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str]
diff --git a/src/orb/types/shared_params/unit_config.py b/src/orb/types/shared_params/unit_config.py
new file mode 100644
index 00000000..a677a6dc
--- /dev/null
+++ b/src/orb/types/shared_params/unit_config.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["UnitConfig"]
+
+
+class UnitConfig(TypedDict, total=False):
+ unit_amount: Required[str]
+ """Rate per unit of usage"""
diff --git a/src/orb/types/shared_params/unit_conversion_rate_config.py b/src/orb/types/shared_params/unit_conversion_rate_config.py
new file mode 100644
index 00000000..9798904b
--- /dev/null
+++ b/src/orb/types/shared_params/unit_conversion_rate_config.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, TypedDict
+
+from .conversion_rate_unit_config import ConversionRateUnitConfig
+
+__all__ = ["UnitConversionRateConfig"]
+
+
+class UnitConversionRateConfig(TypedDict, total=False):
+ conversion_rate_type: Required[Literal["unit"]]
+
+ unit_config: Required[ConversionRateUnitConfig]
diff --git a/src/orb/types/shared_params/usage_discount.py b/src/orb/types/shared_params/usage_discount.py
index d3007ec8..7df2679b 100644
--- a/src/orb/types/shared_params/usage_discount.py
+++ b/src/orb/types/shared_params/usage_discount.py
@@ -5,18 +5,9 @@
from typing import List, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["UsageDiscount", "Filter"]
+from .transform_price_filter import TransformPriceFilter
-
-class Filter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
+__all__ = ["UsageDiscount"]
class UsageDiscount(TypedDict, total=False):
@@ -34,7 +25,7 @@ class UsageDiscount(TypedDict, total=False):
For plan/plan phase discounts, this can be a subset of prices.
"""
- filters: Optional[Iterable[Filter]]
+ filters: Optional[Iterable[TransformPriceFilter]]
"""The filters that determine which prices to apply this discount to."""
reason: Optional[str]
diff --git a/src/orb/types/subscription.py b/src/orb/types/subscription.py
index 0f5ad87f..0d92273c 100644
--- a/src/orb/types/subscription.py
+++ b/src/orb/types/subscription.py
@@ -5,570 +5,30 @@
from typing_extensions import Literal, Annotated, TypeAlias
from .plan import Plan
-from .price import Price
from .._utils import PropertyInfo
from .._models import BaseModel
from .customer import Customer
-
-__all__ = [
- "Subscription",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
+from .shared.price_interval import PriceInterval
+from .shared.maximum_interval import MaximumInterval
+from .shared.minimum_interval import MinimumInterval
+from .shared.coupon_redemption import CouponRedemption
+from .shared.adjustment_interval import AdjustmentInterval
+from .shared.subscription_trial_info import SubscriptionTrialInfo
+from .shared.usage_discount_interval import UsageDiscountInterval
+from .shared.amount_discount_interval import AmountDiscountInterval
+from .shared.percentage_discount_interval import PercentageDiscountInterval
+from .shared.subscription_change_minified import SubscriptionChangeMinified
+from .shared.fixed_fee_quantity_schedule_entry import FixedFeeQuantityScheduleEntry
+from .shared.billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration
+
+__all__ = ["Subscription", "DiscountInterval"]
DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
+ Union[AmountDiscountInterval, PercentageDiscountInterval, UsageDiscountInterval],
PropertyInfo(discriminator="discount_type"),
]
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
class Subscription(BaseModel):
id: str
@@ -651,7 +111,7 @@ class Subscription(BaseModel):
end_date: Optional[datetime] = None
"""The date Orb stops billing for this subscription."""
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
+ fixed_fee_quantity_schedule: List[FixedFeeQuantityScheduleEntry]
invoicing_threshold: Optional[str] = None
@@ -680,7 +140,7 @@ class Subscription(BaseModel):
has a month to pay the invoice.
"""
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
+ pending_subscription_change: Optional[SubscriptionChangeMinified] = None
"""A pending subscription change if one exists on this subscription."""
plan: Optional[Plan] = None
@@ -694,11 +154,11 @@ class Subscription(BaseModel):
price_intervals: List[PriceInterval]
"""The price intervals for this subscription."""
- redeemed_coupon: Optional[RedeemedCoupon] = None
+ redeemed_coupon: Optional[CouponRedemption] = None
start_date: datetime
"""The date Orb starts billing for this subscription."""
status: Literal["active", "ended", "upcoming"]
- trial_info: TrialInfo
+ trial_info: SubscriptionTrialInfo
diff --git a/src/orb/types/subscription_cancel_response.py b/src/orb/types/subscription_cancel_response.py
deleted file mode 100644
index 13afd7e8..00000000
--- a/src/orb/types/subscription_cancel_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionCancelResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionCancelResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_change_apply_response.py b/src/orb/types/subscription_change_apply_response.py
index 95b15e2c..17127e75 100644
--- a/src/orb/types/subscription_change_apply_response.py
+++ b/src/orb/types/subscription_change_apply_response.py
@@ -1,732 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
+from typing import Optional
from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Literal
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
+from .mutated_subscription import MutatedSubscription
-__all__ = [
- "SubscriptionChangeApplyResponse",
- "Subscription",
- "SubscriptionAdjustmentInterval",
- "SubscriptionAdjustmentIntervalAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "SubscriptionBillingCycleAnchorConfiguration",
- "SubscriptionDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountIntervalFilter",
- "SubscriptionDiscountIntervalPercentageDiscountInterval",
- "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter",
- "SubscriptionDiscountIntervalUsageDiscountInterval",
- "SubscriptionDiscountIntervalUsageDiscountIntervalFilter",
- "SubscriptionFixedFeeQuantitySchedule",
- "SubscriptionMaximumInterval",
- "SubscriptionMaximumIntervalFilter",
- "SubscriptionMinimumInterval",
- "SubscriptionMinimumIntervalFilter",
- "SubscriptionPendingSubscriptionChange",
- "SubscriptionPriceInterval",
- "SubscriptionPriceIntervalFixedFeeQuantityTransition",
- "SubscriptionRedeemedCoupon",
- "SubscriptionTrialInfo",
- "SubscriptionChangedResources",
-]
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-SubscriptionAdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class SubscriptionAdjustmentInterval(BaseModel):
- id: str
-
- adjustment: SubscriptionAdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class SubscriptionBillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-SubscriptionDiscountInterval: TypeAlias = Annotated[
- Union[
- SubscriptionDiscountIntervalAmountDiscountInterval,
- SubscriptionDiscountIntervalPercentageDiscountInterval,
- SubscriptionDiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class SubscriptionFixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class SubscriptionMaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[SubscriptionMaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class SubscriptionMinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[SubscriptionMinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class SubscriptionPendingSubscriptionChange(BaseModel):
- id: str
-
-
-class SubscriptionPriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class SubscriptionPriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[SubscriptionPriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class SubscriptionRedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class SubscriptionTrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class SubscriptionChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class Subscription(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[SubscriptionAdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: SubscriptionBillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[SubscriptionDiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[SubscriptionFixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[SubscriptionMaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[SubscriptionMinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[SubscriptionPriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[SubscriptionRedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: SubscriptionTrialInfo
-
- changed_resources: Optional[SubscriptionChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
+__all__ = ["SubscriptionChangeApplyResponse"]
class SubscriptionChangeApplyResponse(BaseModel):
@@ -739,7 +20,7 @@ class SubscriptionChangeApplyResponse(BaseModel):
status: Literal["pending", "applied", "cancelled"]
- subscription: Optional[Subscription] = None
+ subscription: Optional[MutatedSubscription] = None
applied_at: Optional[datetime] = None
"""When this change was applied."""
diff --git a/src/orb/types/subscription_change_cancel_response.py b/src/orb/types/subscription_change_cancel_response.py
index 963563f3..5f097370 100644
--- a/src/orb/types/subscription_change_cancel_response.py
+++ b/src/orb/types/subscription_change_cancel_response.py
@@ -1,732 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
+from typing import Optional
from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Literal
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
+from .mutated_subscription import MutatedSubscription
-__all__ = [
- "SubscriptionChangeCancelResponse",
- "Subscription",
- "SubscriptionAdjustmentInterval",
- "SubscriptionAdjustmentIntervalAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "SubscriptionBillingCycleAnchorConfiguration",
- "SubscriptionDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountIntervalFilter",
- "SubscriptionDiscountIntervalPercentageDiscountInterval",
- "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter",
- "SubscriptionDiscountIntervalUsageDiscountInterval",
- "SubscriptionDiscountIntervalUsageDiscountIntervalFilter",
- "SubscriptionFixedFeeQuantitySchedule",
- "SubscriptionMaximumInterval",
- "SubscriptionMaximumIntervalFilter",
- "SubscriptionMinimumInterval",
- "SubscriptionMinimumIntervalFilter",
- "SubscriptionPendingSubscriptionChange",
- "SubscriptionPriceInterval",
- "SubscriptionPriceIntervalFixedFeeQuantityTransition",
- "SubscriptionRedeemedCoupon",
- "SubscriptionTrialInfo",
- "SubscriptionChangedResources",
-]
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-SubscriptionAdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class SubscriptionAdjustmentInterval(BaseModel):
- id: str
-
- adjustment: SubscriptionAdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class SubscriptionBillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-SubscriptionDiscountInterval: TypeAlias = Annotated[
- Union[
- SubscriptionDiscountIntervalAmountDiscountInterval,
- SubscriptionDiscountIntervalPercentageDiscountInterval,
- SubscriptionDiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class SubscriptionFixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class SubscriptionMaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[SubscriptionMaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class SubscriptionMinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[SubscriptionMinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class SubscriptionPendingSubscriptionChange(BaseModel):
- id: str
-
-
-class SubscriptionPriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class SubscriptionPriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[SubscriptionPriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class SubscriptionRedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class SubscriptionTrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class SubscriptionChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class Subscription(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[SubscriptionAdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: SubscriptionBillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[SubscriptionDiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[SubscriptionFixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[SubscriptionMaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[SubscriptionMinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[SubscriptionPriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[SubscriptionRedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: SubscriptionTrialInfo
-
- changed_resources: Optional[SubscriptionChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
+__all__ = ["SubscriptionChangeCancelResponse"]
class SubscriptionChangeCancelResponse(BaseModel):
@@ -739,7 +20,7 @@ class SubscriptionChangeCancelResponse(BaseModel):
status: Literal["pending", "applied", "cancelled"]
- subscription: Optional[Subscription] = None
+ subscription: Optional[MutatedSubscription] = None
applied_at: Optional[datetime] = None
"""When this change was applied."""
diff --git a/src/orb/types/subscription_change_retrieve_response.py b/src/orb/types/subscription_change_retrieve_response.py
index 3beed64f..70d8e63f 100644
--- a/src/orb/types/subscription_change_retrieve_response.py
+++ b/src/orb/types/subscription_change_retrieve_response.py
@@ -1,732 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List, Union, Optional
+from typing import Optional
from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
+from typing_extensions import Literal
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
+from .mutated_subscription import MutatedSubscription
-__all__ = [
- "SubscriptionChangeRetrieveResponse",
- "Subscription",
- "SubscriptionAdjustmentInterval",
- "SubscriptionAdjustmentIntervalAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "SubscriptionBillingCycleAnchorConfiguration",
- "SubscriptionDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountInterval",
- "SubscriptionDiscountIntervalAmountDiscountIntervalFilter",
- "SubscriptionDiscountIntervalPercentageDiscountInterval",
- "SubscriptionDiscountIntervalPercentageDiscountIntervalFilter",
- "SubscriptionDiscountIntervalUsageDiscountInterval",
- "SubscriptionDiscountIntervalUsageDiscountIntervalFilter",
- "SubscriptionFixedFeeQuantitySchedule",
- "SubscriptionMaximumInterval",
- "SubscriptionMaximumIntervalFilter",
- "SubscriptionMinimumInterval",
- "SubscriptionMinimumIntervalFilter",
- "SubscriptionPendingSubscriptionChange",
- "SubscriptionPriceInterval",
- "SubscriptionPriceIntervalFixedFeeQuantityTransition",
- "SubscriptionRedeemedCoupon",
- "SubscriptionTrialInfo",
- "SubscriptionChangedResources",
-]
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-SubscriptionAdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- SubscriptionAdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class SubscriptionAdjustmentInterval(BaseModel):
- id: str
-
- adjustment: SubscriptionAdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class SubscriptionBillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class SubscriptionDiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionDiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[SubscriptionDiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-SubscriptionDiscountInterval: TypeAlias = Annotated[
- Union[
- SubscriptionDiscountIntervalAmountDiscountInterval,
- SubscriptionDiscountIntervalPercentageDiscountInterval,
- SubscriptionDiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class SubscriptionFixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class SubscriptionMaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[SubscriptionMaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class SubscriptionMinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class SubscriptionMinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[SubscriptionMinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class SubscriptionPendingSubscriptionChange(BaseModel):
- id: str
-
-
-class SubscriptionPriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class SubscriptionPriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[SubscriptionPriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class SubscriptionRedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class SubscriptionTrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class SubscriptionChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class Subscription(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[SubscriptionAdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: SubscriptionBillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[SubscriptionDiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[SubscriptionFixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[SubscriptionMaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[SubscriptionMinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[SubscriptionPendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[SubscriptionPriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[SubscriptionRedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: SubscriptionTrialInfo
-
- changed_resources: Optional[SubscriptionChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
+__all__ = ["SubscriptionChangeRetrieveResponse"]
class SubscriptionChangeRetrieveResponse(BaseModel):
@@ -739,7 +20,7 @@ class SubscriptionChangeRetrieveResponse(BaseModel):
status: Literal["pending", "applied", "cancelled"]
- subscription: Optional[Subscription] = None
+ subscription: Optional[MutatedSubscription] = None
applied_at: Optional[datetime] = None
"""When this change was applied."""
diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py
index 3ba01736..4be3ffee 100644
--- a/src/orb/types/subscription_create_params.py
+++ b/src/orb/types/subscription_create_params.py
@@ -7,300 +7,63 @@
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
from .._utils import PropertyInfo
+from .discount_override_param import DiscountOverrideParam
+from .shared_params.new_maximum import NewMaximum
+from .shared_params.new_minimum import NewMinimum
+from .new_subscription_bps_price_param import NewSubscriptionBPSPriceParam
+from .shared_params.new_usage_discount import NewUsageDiscount
+from .new_subscription_bulk_price_param import NewSubscriptionBulkPriceParam
+from .new_subscription_unit_price_param import NewSubscriptionUnitPriceParam
+from .shared_params.new_amount_discount import NewAmountDiscount
+from .shared_params.new_allocation_price import NewAllocationPrice
+from .new_subscription_matrix_price_param import NewSubscriptionMatrixPriceParam
+from .new_subscription_tiered_price_param import NewSubscriptionTieredPriceParam
+from .new_subscription_package_price_param import NewSubscriptionPackagePriceParam
+from .new_subscription_bulk_bps_price_param import NewSubscriptionBulkBPSPriceParam
+from .shared_params.new_percentage_discount import NewPercentageDiscount
+from .new_subscription_tiered_bps_price_param import NewSubscriptionTieredBPSPriceParam
+from .new_subscription_grouped_tiered_price_param import NewSubscriptionGroupedTieredPriceParam
+from .new_subscription_tiered_package_price_param import NewSubscriptionTieredPackagePriceParam
+from .new_subscription_unit_with_percent_price_param import NewSubscriptionUnitWithPercentPriceParam
+from .new_subscription_grouped_allocation_price_param import NewSubscriptionGroupedAllocationPriceParam
+from .new_subscription_bulk_with_proration_price_param import NewSubscriptionBulkWithProrationPriceParam
+from .new_subscription_tier_with_proration_price_param import NewSubscriptionTierWithProrationPriceParam
+from .new_subscription_tiered_with_minimum_price_param import NewSubscriptionTieredWithMinimumPriceParam
+from .new_subscription_unit_with_proration_price_param import NewSubscriptionUnitWithProrationPriceParam
+from .shared_params.billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration
+from .new_subscription_grouped_tiered_package_price_param import NewSubscriptionGroupedTieredPackagePriceParam
+from .new_subscription_matrix_with_allocation_price_param import NewSubscriptionMatrixWithAllocationPriceParam
+from .new_subscription_threshold_total_amount_price_param import NewSubscriptionThresholdTotalAmountPriceParam
+from .new_subscription_cumulative_grouped_bulk_price_param import NewSubscriptionCumulativeGroupedBulkPriceParam
+from .new_subscription_package_with_allocation_price_param import NewSubscriptionPackageWithAllocationPriceParam
+from .new_subscription_matrix_with_display_name_price_param import NewSubscriptionMatrixWithDisplayNamePriceParam
+from .new_subscription_max_group_tiered_package_price_param import NewSubscriptionMaxGroupTieredPackagePriceParam
+from .new_subscription_tiered_package_with_minimum_price_param import NewSubscriptionTieredPackageWithMinimumPriceParam
+from .new_subscription_grouped_with_metered_minimum_price_param import (
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+)
+from .new_subscription_grouped_with_prorated_minimum_price_param import (
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+)
+from .new_subscription_scalable_matrix_with_unit_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+)
+from .new_subscription_scalable_matrix_with_tiered_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+)
__all__ = [
"SubscriptionCreateParams",
"AddAdjustment",
"AddAdjustmentAdjustment",
- "AddAdjustmentAdjustmentNewPercentageDiscount",
- "AddAdjustmentAdjustmentNewPercentageDiscountFilter",
- "AddAdjustmentAdjustmentNewUsageDiscount",
- "AddAdjustmentAdjustmentNewUsageDiscountFilter",
- "AddAdjustmentAdjustmentNewAmountDiscount",
- "AddAdjustmentAdjustmentNewAmountDiscountFilter",
- "AddAdjustmentAdjustmentNewMinimum",
- "AddAdjustmentAdjustmentNewMinimumFilter",
- "AddAdjustmentAdjustmentNewMaximum",
- "AddAdjustmentAdjustmentNewMaximumFilter",
"AddPrice",
- "AddPriceAllocationPrice",
- "AddPriceAllocationPriceCustomExpiration",
- "AddPriceDiscount",
"AddPricePrice",
- "AddPricePriceNewSubscriptionUnitPrice",
- "AddPricePriceNewSubscriptionUnitPriceUnitConfig",
- "AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackagePrice",
- "AddPricePriceNewSubscriptionPackagePricePackageConfig",
- "AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixPrice",
- "AddPricePriceNewSubscriptionMatrixPriceMatrixConfig",
- "AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue",
- "AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPrice",
- "AddPricePriceNewSubscriptionTieredPriceTieredConfig",
- "AddPricePriceNewSubscriptionTieredPriceTieredConfigTier",
- "AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPrice",
- "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig",
- "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier",
- "AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBpsPrice",
- "AddPricePriceNewSubscriptionBpsPriceBpsConfig",
- "AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPrice",
- "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig",
- "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier",
- "AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkPrice",
- "AddPricePriceNewSubscriptionBulkPriceBulkConfig",
- "AddPricePriceNewSubscriptionBulkPriceBulkConfigTier",
- "AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPrice",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePrice",
- "AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPrice",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPrice",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPrice",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPrice",
- "AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPrice",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPrice",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPrice",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePrice",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPrice",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPrice",
- "AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration",
- "BillingCycleAnchorConfiguration",
"RemoveAdjustment",
"RemovePrice",
"ReplaceAdjustment",
"ReplaceAdjustmentAdjustment",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscount",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewUsageDiscount",
- "ReplaceAdjustmentAdjustmentNewUsageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewAmountDiscount",
- "ReplaceAdjustmentAdjustmentNewAmountDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewMinimum",
- "ReplaceAdjustmentAdjustmentNewMinimumFilter",
- "ReplaceAdjustmentAdjustmentNewMaximum",
- "ReplaceAdjustmentAdjustmentNewMaximumFilter",
"ReplacePrice",
- "ReplacePriceAllocationPrice",
- "ReplacePriceAllocationPriceCustomExpiration",
- "ReplacePriceDiscount",
"ReplacePricePrice",
- "ReplacePricePriceNewSubscriptionUnitPrice",
- "ReplacePricePriceNewSubscriptionUnitPriceUnitConfig",
- "ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePrice",
- "ReplacePricePriceNewSubscriptionPackagePricePackageConfig",
- "ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPrice",
- "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig",
- "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue",
- "ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPrice",
- "ReplacePricePriceNewSubscriptionTieredPriceTieredConfig",
- "ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier",
- "ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPrice",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPrice",
- "ReplacePricePriceNewSubscriptionBpsPriceBpsConfig",
- "ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPrice",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPrice",
- "ReplacePricePriceNewSubscriptionBulkPriceBulkConfig",
- "ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier",
- "ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPrice",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPrice",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPrice",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPrice",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPrice",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPrice",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPrice",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPrice",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration",
]
@@ -473,220 +236,8 @@ class SubscriptionCreateParams(TypedDict, total=False):
"""
-class AddAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
AddAdjustmentAdjustment: TypeAlias = Union[
- AddAdjustmentAdjustmentNewPercentageDiscount,
- AddAdjustmentAdjustmentNewUsageDiscount,
- AddAdjustmentAdjustmentNewAmountDiscount,
- AddAdjustmentAdjustmentNewMinimum,
- AddAdjustmentAdjustmentNewMaximum,
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
]
@@ -713,6950 +264,142 @@ class AddAdjustment(TypedDict, total=False):
"""
-class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class AddPriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class AddPriceDiscount(TypedDict, total=False):
- discount_type: Required[Literal["percentage", "usage", "amount"]]
-
- amount_discount: Optional[str]
- """Only available if discount_type is `amount`."""
-
- percentage_discount: Optional[float]
- """Only available if discount_type is `percentage`.
-
- This is a number between 0 and 1.
- """
-
- usage_discount: Optional[float]
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-class AddPricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[AddPricePriceNewSubscriptionUnitPriceUnitConfig]
+AddPricePrice: TypeAlias = Union[
+ NewSubscriptionUnitPriceParam,
+ NewSubscriptionPackagePriceParam,
+ NewSubscriptionMatrixPriceParam,
+ NewSubscriptionTieredPriceParam,
+ NewSubscriptionTieredBPSPriceParam,
+ NewSubscriptionBPSPriceParam,
+ NewSubscriptionBulkBPSPriceParam,
+ NewSubscriptionBulkPriceParam,
+ NewSubscriptionThresholdTotalAmountPriceParam,
+ NewSubscriptionTieredPackagePriceParam,
+ NewSubscriptionTieredWithMinimumPriceParam,
+ NewSubscriptionUnitWithPercentPriceParam,
+ NewSubscriptionPackageWithAllocationPriceParam,
+ NewSubscriptionTierWithProrationPriceParam,
+ NewSubscriptionUnitWithProrationPriceParam,
+ NewSubscriptionGroupedAllocationPriceParam,
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+ NewSubscriptionBulkWithProrationPriceParam,
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+ NewSubscriptionCumulativeGroupedBulkPriceParam,
+ NewSubscriptionMaxGroupTieredPackagePriceParam,
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+ NewSubscriptionMatrixWithDisplayNamePriceParam,
+ NewSubscriptionGroupedTieredPackagePriceParam,
+ NewSubscriptionMatrixWithAllocationPriceParam,
+ NewSubscriptionTieredPackageWithMinimumPriceParam,
+ NewSubscriptionGroupedTieredPriceParam,
+]
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
- Only needed if the price is usage-based.
- """
+class AddPrice(TypedDict, total=False):
+ allocation_price: Optional[NewAllocationPrice]
+ """The definition of a new allocation price to create and add to the subscription."""
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ discounts: Optional[Iterable[DiscountOverrideParam]]
+ """[DEPRECATED] Use add_adjustments instead.
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
+ The subscription's discounts for this price.
"""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
+ end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """The end date of the price interval.
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
+ This is the date that the price will stop billing on the subscription. If null,
+ billing will end when the phase or subscription ends.
"""
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
+ """The external price id of the price to add to the subscription."""
- package_size: Required[int]
- """An integer amount to represent package size.
+ maximum_amount: Optional[str]
+ """[DEPRECATED] Use add_adjustments instead.
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
+ The subscription's maximum amount for this price.
"""
+ minimum_amount: Optional[str]
+ """[DEPRECATED] Use add_adjustments instead.
-class AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
+ The subscription's minimum amount for this price.
"""
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[AddPricePriceNewSubscriptionPackagePricePackageConfig]
+ plan_phase_order: Optional[int]
+ """The phase to add this price to."""
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
+ price: Optional[AddPricePrice]
+ """The definition of a new price to create and add to the subscription."""
- Only needed if the price is usage-based.
- """
+ price_id: Optional[str]
+ """The id of the price to add to the subscription."""
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """The start date of the price interval.
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
+ This is the date that the price will start billing on the subscription. If null,
+ billing will start when the phase or subscription starts.
"""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
+class RemoveAdjustment(TypedDict, total=False):
+ adjustment_id: Required[str]
+ """The id of the adjustment to remove on the subscription."""
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
+class RemovePrice(TypedDict, total=False):
external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
+ """The external price id of the price to remove on the subscription."""
- matrix_config: Required[AddPricePriceNewSubscriptionMatrixPriceMatrixConfig]
+ price_id: Optional[str]
+ """The id of the price to remove on the subscription."""
- model_type: Required[Literal["matrix"]]
- name: Required[str]
- """The name of the price."""
+ReplaceAdjustmentAdjustment: TypeAlias = Union[
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
+]
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
- Only needed if the price is usage-based.
- """
+class ReplaceAdjustment(TypedDict, total=False):
+ adjustment: Required[ReplaceAdjustmentAdjustment]
+ """The definition of a new adjustment to create and add to the subscription."""
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[AddPricePriceNewSubscriptionTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBpsPrice(TypedDict, total=False):
- bps_config: Required[AddPricePriceNewSubscriptionBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkPrice(TypedDict, total=False):
- bulk_config: Required[AddPricePriceNewSubscriptionBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(
- TypedDict, total=False
-):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig
- ]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-AddPricePrice: TypeAlias = Union[
- AddPricePriceNewSubscriptionUnitPrice,
- AddPricePriceNewSubscriptionPackagePrice,
- AddPricePriceNewSubscriptionMatrixPrice,
- AddPricePriceNewSubscriptionTieredPrice,
- AddPricePriceNewSubscriptionTieredBpsPrice,
- AddPricePriceNewSubscriptionBpsPrice,
- AddPricePriceNewSubscriptionBulkBpsPrice,
- AddPricePriceNewSubscriptionBulkPrice,
- AddPricePriceNewSubscriptionThresholdTotalAmountPrice,
- AddPricePriceNewSubscriptionTieredPackagePrice,
- AddPricePriceNewSubscriptionTieredWithMinimumPrice,
- AddPricePriceNewSubscriptionUnitWithPercentPrice,
- AddPricePriceNewSubscriptionPackageWithAllocationPrice,
- AddPricePriceNewSubscriptionTierWithProrationPrice,
- AddPricePriceNewSubscriptionUnitWithProrationPrice,
- AddPricePriceNewSubscriptionGroupedAllocationPrice,
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice,
- AddPricePriceNewSubscriptionBulkWithProrationPrice,
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice,
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice,
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice,
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice,
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice,
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice,
- AddPricePriceNewSubscriptionGroupedTieredPackagePrice,
- AddPricePriceNewSubscriptionMatrixWithAllocationPrice,
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice,
- AddPricePriceNewSubscriptionGroupedTieredPrice,
-]
-
-
-class AddPrice(TypedDict, total=False):
- allocation_price: Optional[AddPriceAllocationPrice]
- """The definition of a new allocation price to create and add to the subscription."""
-
- discounts: Optional[Iterable[AddPriceDiscount]]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's discounts for this price.
- """
-
- end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
- """The end date of the price interval.
-
- This is the date that the price will stop billing on the subscription. If null,
- billing will end when the phase or subscription ends.
- """
-
- external_price_id: Optional[str]
- """The external price id of the price to add to the subscription."""
-
- maximum_amount: Optional[str]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's maximum amount for this price.
- """
-
- minimum_amount: Optional[str]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's minimum amount for this price.
- """
-
- plan_phase_order: Optional[int]
- """The phase to add this price to."""
-
- price: Optional[AddPricePrice]
- """The definition of a new price to create and add to the subscription."""
-
- price_id: Optional[str]
- """The id of the price to add to the subscription."""
-
- start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
- """The start date of the price interval.
-
- This is the date that the price will start billing on the subscription. If null,
- billing will start when the phase or subscription starts.
- """
-
-
-class BillingCycleAnchorConfiguration(TypedDict, total=False):
- day: Required[int]
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int]
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int]
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class RemoveAdjustment(TypedDict, total=False):
- adjustment_id: Required[str]
- """The id of the adjustment to remove on the subscription."""
-
-
-class RemovePrice(TypedDict, total=False):
- external_price_id: Optional[str]
- """The external price id of the price to remove on the subscription."""
-
- price_id: Optional[str]
- """The id of the price to remove on the subscription."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-ReplaceAdjustmentAdjustment: TypeAlias = Union[
- ReplaceAdjustmentAdjustmentNewPercentageDiscount,
- ReplaceAdjustmentAdjustmentNewUsageDiscount,
- ReplaceAdjustmentAdjustmentNewAmountDiscount,
- ReplaceAdjustmentAdjustmentNewMinimum,
- ReplaceAdjustmentAdjustmentNewMaximum,
-]
-
-
-class ReplaceAdjustment(TypedDict, total=False):
- adjustment: Required[ReplaceAdjustmentAdjustment]
- """The definition of a new adjustment to create and add to the subscription."""
-
- replaces_adjustment_id: Required[str]
- """The id of the adjustment on the plan to replace in the subscription."""
-
-
-class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class ReplacePriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class ReplacePriceDiscount(TypedDict, total=False):
- discount_type: Required[Literal["percentage", "usage", "amount"]]
-
- amount_discount: Optional[str]
- """Only available if discount_type is `amount`."""
-
- percentage_discount: Optional[float]
- """Only available if discount_type is `percentage`.
-
- This is a number between 0 and 1.
- """
-
- usage_discount: Optional[float]
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False):
- bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False):
- bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(
- TypedDict, total=False
-):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig
- ]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
+ replaces_adjustment_id: Required[str]
+ """The id of the adjustment on the plan to replace in the subscription."""
ReplacePricePrice: TypeAlias = Union[
- ReplacePricePriceNewSubscriptionUnitPrice,
- ReplacePricePriceNewSubscriptionPackagePrice,
- ReplacePricePriceNewSubscriptionMatrixPrice,
- ReplacePricePriceNewSubscriptionTieredPrice,
- ReplacePricePriceNewSubscriptionTieredBpsPrice,
- ReplacePricePriceNewSubscriptionBpsPrice,
- ReplacePricePriceNewSubscriptionBulkBpsPrice,
- ReplacePricePriceNewSubscriptionBulkPrice,
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice,
- ReplacePricePriceNewSubscriptionTieredPackagePrice,
- ReplacePricePriceNewSubscriptionTieredWithMinimumPrice,
- ReplacePricePriceNewSubscriptionUnitWithPercentPrice,
- ReplacePricePriceNewSubscriptionPackageWithAllocationPrice,
- ReplacePricePriceNewSubscriptionTierWithProrationPrice,
- ReplacePricePriceNewSubscriptionUnitWithProrationPrice,
- ReplacePricePriceNewSubscriptionGroupedAllocationPrice,
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice,
- ReplacePricePriceNewSubscriptionBulkWithProrationPrice,
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice,
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice,
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice,
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice,
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice,
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice,
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice,
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice,
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice,
- ReplacePricePriceNewSubscriptionGroupedTieredPrice,
+ NewSubscriptionUnitPriceParam,
+ NewSubscriptionPackagePriceParam,
+ NewSubscriptionMatrixPriceParam,
+ NewSubscriptionTieredPriceParam,
+ NewSubscriptionTieredBPSPriceParam,
+ NewSubscriptionBPSPriceParam,
+ NewSubscriptionBulkBPSPriceParam,
+ NewSubscriptionBulkPriceParam,
+ NewSubscriptionThresholdTotalAmountPriceParam,
+ NewSubscriptionTieredPackagePriceParam,
+ NewSubscriptionTieredWithMinimumPriceParam,
+ NewSubscriptionUnitWithPercentPriceParam,
+ NewSubscriptionPackageWithAllocationPriceParam,
+ NewSubscriptionTierWithProrationPriceParam,
+ NewSubscriptionUnitWithProrationPriceParam,
+ NewSubscriptionGroupedAllocationPriceParam,
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+ NewSubscriptionBulkWithProrationPriceParam,
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+ NewSubscriptionCumulativeGroupedBulkPriceParam,
+ NewSubscriptionMaxGroupTieredPackagePriceParam,
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+ NewSubscriptionMatrixWithDisplayNamePriceParam,
+ NewSubscriptionGroupedTieredPackagePriceParam,
+ NewSubscriptionMatrixWithAllocationPriceParam,
+ NewSubscriptionTieredPackageWithMinimumPriceParam,
+ NewSubscriptionGroupedTieredPriceParam,
]
@@ -7664,10 +407,10 @@ class ReplacePrice(TypedDict, total=False):
replaces_price_id: Required[str]
"""The id of the price on the plan to replace in the subscription."""
- allocation_price: Optional[ReplacePriceAllocationPrice]
+ allocation_price: Optional[NewAllocationPrice]
"""The definition of a new allocation price to create and add to the subscription."""
- discounts: Optional[Iterable[ReplacePriceDiscount]]
+ discounts: Optional[Iterable[DiscountOverrideParam]]
"""[DEPRECATED] Use add_adjustments instead.
The subscription's discounts for the replacement price.
diff --git a/src/orb/types/subscription_create_response.py b/src/orb/types/subscription_create_response.py
deleted file mode 100644
index 1746a98a..00000000
--- a/src/orb/types/subscription_create_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionCreateResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionCreateResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_fetch_costs_response.py b/src/orb/types/subscription_fetch_costs_response.py
index 64d9c0be..511a594c 100644
--- a/src/orb/types/subscription_fetch_costs_response.py
+++ b/src/orb/types/subscription_fetch_costs_response.py
@@ -1,44 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from datetime import datetime
+from typing import List
-from .price import Price
from .._models import BaseModel
+from .shared.aggregated_cost import AggregatedCost
-__all__ = ["SubscriptionFetchCostsResponse", "Data", "DataPerPriceCost"]
-
-
-class DataPerPriceCost(BaseModel):
- price: Price
- """The price object"""
-
- price_id: str
- """The price the cost is associated with"""
-
- subtotal: str
- """Price's contributions for the timeframe, excluding any minimums and discounts."""
-
- total: str
- """Price's contributions for the timeframe, including minimums and discounts."""
-
- quantity: Optional[float] = None
- """The price's quantity for the timeframe"""
-
-
-class Data(BaseModel):
- per_price_costs: List[DataPerPriceCost]
-
- subtotal: str
- """Total costs for the timeframe, excluding any minimums and discounts."""
-
- timeframe_end: datetime
-
- timeframe_start: datetime
-
- total: str
- """Total costs for the timeframe, including any minimums and discounts."""
+__all__ = ["SubscriptionFetchCostsResponse"]
class SubscriptionFetchCostsResponse(BaseModel):
- data: List[Data]
+ data: List[AggregatedCost]
diff --git a/src/orb/types/subscription_price_intervals_params.py b/src/orb/types/subscription_price_intervals_params.py
index f34b7ff2..a709d7ea 100644
--- a/src/orb/types/subscription_price_intervals_params.py
+++ b/src/orb/types/subscription_price_intervals_params.py
@@ -2,163 +2,62 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import List, Union, Iterable, Optional
from datetime import datetime
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
from .._utils import PropertyInfo
+from .shared_params.new_maximum import NewMaximum
+from .shared_params.new_minimum import NewMinimum
+from .shared_params.new_usage_discount import NewUsageDiscount
+from .shared_params.new_amount_discount import NewAmountDiscount
from .shared.billing_cycle_relative_date import BillingCycleRelativeDate
+from .shared_params.new_allocation_price import NewAllocationPrice
+from .shared_params.new_floating_bps_price import NewFloatingBPSPrice
+from .shared_params.new_floating_bulk_price import NewFloatingBulkPrice
+from .shared_params.new_floating_unit_price import NewFloatingUnitPrice
+from .shared_params.new_percentage_discount import NewPercentageDiscount
+from .shared_params.new_floating_matrix_price import NewFloatingMatrixPrice
+from .shared_params.new_floating_tiered_price import NewFloatingTieredPrice
+from .shared_params.new_floating_package_price import NewFloatingPackagePrice
+from .shared_params.new_floating_bulk_bps_price import NewFloatingBulkBPSPrice
+from .shared_params.new_floating_tiered_bps_price import NewFloatingTieredBPSPrice
+from .shared_params.new_floating_grouped_tiered_price import NewFloatingGroupedTieredPrice
+from .shared_params.new_floating_tiered_package_price import NewFloatingTieredPackagePrice
+from .shared_params.new_floating_unit_with_percent_price import NewFloatingUnitWithPercentPrice
+from .shared_params.new_floating_grouped_allocation_price import NewFloatingGroupedAllocationPrice
+from .shared_params.new_floating_bulk_with_proration_price import NewFloatingBulkWithProrationPrice
+from .shared_params.new_floating_tiered_with_minimum_price import NewFloatingTieredWithMinimumPrice
+from .shared_params.new_floating_unit_with_proration_price import NewFloatingUnitWithProrationPrice
+from .shared_params.new_floating_tiered_with_proration_price import NewFloatingTieredWithProrationPrice
+from .shared_params.new_floating_grouped_tiered_package_price import NewFloatingGroupedTieredPackagePrice
+from .shared_params.new_floating_matrix_with_allocation_price import NewFloatingMatrixWithAllocationPrice
+from .shared_params.new_floating_threshold_total_amount_price import NewFloatingThresholdTotalAmountPrice
+from .shared_params.new_floating_cumulative_grouped_bulk_price import NewFloatingCumulativeGroupedBulkPrice
+from .shared_params.new_floating_package_with_allocation_price import NewFloatingPackageWithAllocationPrice
+from .shared_params.new_floating_matrix_with_display_name_price import NewFloatingMatrixWithDisplayNamePrice
+from .shared_params.new_floating_max_group_tiered_package_price import NewFloatingMaxGroupTieredPackagePrice
+from .shared_params.new_floating_tiered_package_with_minimum_price import NewFloatingTieredPackageWithMinimumPrice
+from .shared_params.new_floating_grouped_with_metered_minimum_price import NewFloatingGroupedWithMeteredMinimumPrice
+from .shared_params.new_floating_grouped_with_prorated_minimum_price import NewFloatingGroupedWithProratedMinimumPrice
+from .shared_params.new_floating_scalable_matrix_with_unit_pricing_price import (
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+)
+from .shared_params.new_floating_scalable_matrix_with_tiered_pricing_price import (
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+)
__all__ = [
"SubscriptionPriceIntervalsParams",
"Add",
- "AddAllocationPrice",
- "AddAllocationPriceCustomExpiration",
"AddDiscount",
"AddDiscountAmountDiscountCreationParams",
"AddDiscountPercentageDiscountCreationParams",
"AddDiscountUsageDiscountCreationParams",
"AddFixedFeeQuantityTransition",
"AddPrice",
- "AddPriceNewFloatingUnitPrice",
- "AddPriceNewFloatingUnitPriceUnitConfig",
- "AddPriceNewFloatingUnitPriceBillingCycleConfiguration",
- "AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingUnitPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingPackagePrice",
- "AddPriceNewFloatingPackagePricePackageConfig",
- "AddPriceNewFloatingPackagePriceBillingCycleConfiguration",
- "AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingPackagePriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingMatrixPrice",
- "AddPriceNewFloatingMatrixPriceMatrixConfig",
- "AddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue",
- "AddPriceNewFloatingMatrixPriceBillingCycleConfiguration",
- "AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingMatrixWithAllocationPrice",
- "AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "AddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredPrice",
- "AddPriceNewFloatingTieredPriceTieredConfig",
- "AddPriceNewFloatingTieredPriceTieredConfigTier",
- "AddPriceNewFloatingTieredPriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredBpsPrice",
- "AddPriceNewFloatingTieredBpsPriceTieredBpsConfig",
- "AddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier",
- "AddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingBpsPrice",
- "AddPriceNewFloatingBpsPriceBpsConfig",
- "AddPriceNewFloatingBpsPriceBillingCycleConfiguration",
- "AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingBpsPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingBulkBpsPrice",
- "AddPriceNewFloatingBulkBpsPriceBulkBpsConfig",
- "AddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier",
- "AddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration",
- "AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingBulkPrice",
- "AddPriceNewFloatingBulkPriceBulkConfig",
- "AddPriceNewFloatingBulkPriceBulkConfigTier",
- "AddPriceNewFloatingBulkPriceBillingCycleConfiguration",
- "AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingBulkPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingThresholdTotalAmountPrice",
- "AddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration",
- "AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredPackagePrice",
- "AddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingGroupedTieredPrice",
- "AddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration",
- "AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingMaxGroupTieredPackagePrice",
- "AddPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredWithMinimumPrice",
- "AddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingPackageWithAllocationPrice",
- "AddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredPackageWithMinimumPrice",
- "AddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingUnitWithPercentPrice",
- "AddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration",
- "AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingTieredWithProrationPrice",
- "AddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingUnitWithProrationPrice",
- "AddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingGroupedAllocationPrice",
- "AddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingGroupedWithProratedMinimumPrice",
- "AddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingGroupedWithMeteredMinimumPrice",
- "AddPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingMatrixWithDisplayNamePrice",
- "AddPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingBulkWithProrationPrice",
- "AddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration",
- "AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingGroupedTieredPackagePrice",
- "AddPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration",
- "AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingScalableMatrixWithUnitPricingPrice",
- "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingScalableMatrixWithTieredPricingPrice",
- "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "AddPriceNewFloatingCumulativeGroupedBulkPrice",
- "AddPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "AddPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
"AddAdjustment",
"AddAdjustmentAdjustment",
- "AddAdjustmentAdjustmentNewPercentageDiscount",
- "AddAdjustmentAdjustmentNewPercentageDiscountFilter",
- "AddAdjustmentAdjustmentNewUsageDiscount",
- "AddAdjustmentAdjustmentNewUsageDiscountFilter",
- "AddAdjustmentAdjustmentNewAmountDiscount",
- "AddAdjustmentAdjustmentNewAmountDiscountFilter",
- "AddAdjustmentAdjustmentNewMinimum",
- "AddAdjustmentAdjustmentNewMinimumFilter",
- "AddAdjustmentAdjustmentNewMaximum",
- "AddAdjustmentAdjustmentNewMaximumFilter",
"Edit",
"EditFixedFeeQuantityTransition",
"EditAdjustment",
@@ -186,2996 +85,77 @@ class SubscriptionPriceIntervalsParams(TypedDict, total=False):
"""A list of adjustments to edit on the subscription."""
-class AddAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class AddAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[AddAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class AddDiscountAmountDiscountCreationParams(TypedDict, total=False):
- amount_discount: Required[float]
- """Only available if discount_type is `amount`."""
-
- discount_type: Required[Literal["amount"]]
-
-
-class AddDiscountPercentageDiscountCreationParams(TypedDict, total=False):
- discount_type: Required[Literal["percentage"]]
-
- percentage_discount: Required[float]
- """Only available if discount_type is `percentage`.
-
- This is a number between 0 and 1.
- """
-
-
-class AddDiscountUsageDiscountCreationParams(TypedDict, total=False):
- discount_type: Required[Literal["usage"]]
-
- usage_discount: Required[float]
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for.
- """
-
-
-AddDiscount: TypeAlias = Union[
- AddDiscountAmountDiscountCreationParams,
- AddDiscountPercentageDiscountCreationParams,
- AddDiscountUsageDiscountCreationParams,
-]
-
-
-class AddFixedFeeQuantityTransition(TypedDict, total=False):
- effective_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
- """The date that the fixed fee quantity transition should take effect."""
-
- quantity: Required[int]
- """The quantity of the fixed fee quantity transition."""
-
-
-class AddPriceNewFloatingUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class AddPriceNewFloatingUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[AddPriceNewFloatingUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class AddPriceNewFloatingPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[AddPriceNewFloatingPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPriceNewFloatingMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPriceNewFloatingMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[AddPriceNewFloatingMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[AddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingMatrixWithAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class AddPriceNewFloatingTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPriceNewFloatingTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class AddPriceNewFloatingTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[AddPriceNewFloatingTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class AddPriceNewFloatingTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class AddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[AddPriceNewFloatingTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class AddPriceNewFloatingBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBpsPrice(TypedDict, total=False):
- bps_config: Required[AddPriceNewFloatingBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class AddPriceNewFloatingBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class AddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[AddPriceNewFloatingBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class AddPriceNewFloatingBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPriceNewFloatingBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class AddPriceNewFloatingBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkPrice(TypedDict, total=False):
- bulk_config: Required[AddPriceNewFloatingBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingThresholdTotalAmountPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingTieredWithMinimumPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingUnitWithPercentPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingTieredWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingTieredWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingUnitWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedAllocationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingGroupedWithMeteredMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPriceNewFloatingGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingMatrixWithDisplayNamePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingMatrixWithDisplayNamePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingBulkWithProrationPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPriceNewFloatingGroupedTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[AddPriceNewFloatingGroupedTieredPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPriceNewFloatingScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
-
-class AddPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPriceNewFloatingCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- currency: Required[str]
- """An ISO 4217 currency string for which this price is billed in."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
+class AddDiscountAmountDiscountCreationParams(TypedDict, total=False):
+ amount_discount: Required[float]
+ """Only available if discount_type is `amount`."""
- name: Required[str]
- """The name of the price."""
+ discount_type: Required[Literal["amount"]]
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
- Only needed if the price is usage-based.
- """
+class AddDiscountPercentageDiscountCreationParams(TypedDict, total=False):
+ discount_type: Required[Literal["percentage"]]
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ percentage_discount: Required[float]
+ """Only available if discount_type is `percentage`.
- billing_cycle_configuration: Optional[AddPriceNewFloatingCumulativeGroupedBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
+ This is a number between 0 and 1.
"""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
- dimensional_price_configuration: Optional[
- AddPriceNewFloatingCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
+class AddDiscountUsageDiscountCreationParams(TypedDict, total=False):
+ discount_type: Required[Literal["usage"]]
- external_price_id: Optional[str]
- """An alias for the price."""
+ usage_discount: Required[float]
+ """Only available if discount_type is `usage`.
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
+ Number of usage units that this discount is for.
"""
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
- invoicing_cycle_configuration: Optional[AddPriceNewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
+AddDiscount: TypeAlias = Union[
+ AddDiscountAmountDiscountCreationParams,
+ AddDiscountPercentageDiscountCreationParams,
+ AddDiscountUsageDiscountCreationParams,
+]
- If unspecified, a single invoice is produced per billing cycle.
- """
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
+class AddFixedFeeQuantityTransition(TypedDict, total=False):
+ effective_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """The date that the fixed fee quantity transition should take effect."""
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
+ quantity: Required[int]
+ """The quantity of the fixed fee quantity transition."""
AddPrice: TypeAlias = Union[
- AddPriceNewFloatingUnitPrice,
- AddPriceNewFloatingPackagePrice,
- AddPriceNewFloatingMatrixPrice,
- AddPriceNewFloatingMatrixWithAllocationPrice,
- AddPriceNewFloatingTieredPrice,
- AddPriceNewFloatingTieredBpsPrice,
- AddPriceNewFloatingBpsPrice,
- AddPriceNewFloatingBulkBpsPrice,
- AddPriceNewFloatingBulkPrice,
- AddPriceNewFloatingThresholdTotalAmountPrice,
- AddPriceNewFloatingTieredPackagePrice,
- AddPriceNewFloatingGroupedTieredPrice,
- AddPriceNewFloatingMaxGroupTieredPackagePrice,
- AddPriceNewFloatingTieredWithMinimumPrice,
- AddPriceNewFloatingPackageWithAllocationPrice,
- AddPriceNewFloatingTieredPackageWithMinimumPrice,
- AddPriceNewFloatingUnitWithPercentPrice,
- AddPriceNewFloatingTieredWithProrationPrice,
- AddPriceNewFloatingUnitWithProrationPrice,
- AddPriceNewFloatingGroupedAllocationPrice,
- AddPriceNewFloatingGroupedWithProratedMinimumPrice,
- AddPriceNewFloatingGroupedWithMeteredMinimumPrice,
- AddPriceNewFloatingMatrixWithDisplayNamePrice,
- AddPriceNewFloatingBulkWithProrationPrice,
- AddPriceNewFloatingGroupedTieredPackagePrice,
- AddPriceNewFloatingScalableMatrixWithUnitPricingPrice,
- AddPriceNewFloatingScalableMatrixWithTieredPricingPrice,
- AddPriceNewFloatingCumulativeGroupedBulkPrice,
+ NewFloatingUnitPrice,
+ NewFloatingPackagePrice,
+ NewFloatingMatrixPrice,
+ NewFloatingMatrixWithAllocationPrice,
+ NewFloatingTieredPrice,
+ NewFloatingTieredBPSPrice,
+ NewFloatingBPSPrice,
+ NewFloatingBulkBPSPrice,
+ NewFloatingBulkPrice,
+ NewFloatingThresholdTotalAmountPrice,
+ NewFloatingTieredPackagePrice,
+ NewFloatingGroupedTieredPrice,
+ NewFloatingMaxGroupTieredPackagePrice,
+ NewFloatingTieredWithMinimumPrice,
+ NewFloatingPackageWithAllocationPrice,
+ NewFloatingTieredPackageWithMinimumPrice,
+ NewFloatingUnitWithPercentPrice,
+ NewFloatingTieredWithProrationPrice,
+ NewFloatingUnitWithProrationPrice,
+ NewFloatingGroupedAllocationPrice,
+ NewFloatingGroupedWithProratedMinimumPrice,
+ NewFloatingGroupedWithMeteredMinimumPrice,
+ NewFloatingMatrixWithDisplayNamePrice,
+ NewFloatingBulkWithProrationPrice,
+ NewFloatingGroupedTieredPackagePrice,
+ NewFloatingScalableMatrixWithUnitPricingPrice,
+ NewFloatingScalableMatrixWithTieredPricingPrice,
+ NewFloatingCumulativeGroupedBulkPrice,
]
@@ -3188,7 +168,7 @@ class Add(TypedDict, total=False):
This is the date that the price will start billing on the subscription.
"""
- allocation_price: Optional[AddAllocationPrice]
+ allocation_price: Optional[NewAllocationPrice]
"""The definition of a new allocation price to create and add to the subscription."""
discounts: Optional[Iterable[AddDiscount]]
@@ -3243,220 +223,8 @@ class Add(TypedDict, total=False):
"""
-class AddAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
AddAdjustmentAdjustment: TypeAlias = Union[
- AddAdjustmentAdjustmentNewPercentageDiscount,
- AddAdjustmentAdjustmentNewUsageDiscount,
- AddAdjustmentAdjustmentNewAmountDiscount,
- AddAdjustmentAdjustmentNewMinimum,
- AddAdjustmentAdjustmentNewMaximum,
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
]
diff --git a/src/orb/types/subscription_price_intervals_response.py b/src/orb/types/subscription_price_intervals_response.py
deleted file mode 100644
index cb5fbe8f..00000000
--- a/src/orb/types/subscription_price_intervals_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionPriceIntervalsResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionPriceIntervalsResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_redeem_coupon_response.py b/src/orb/types/subscription_redeem_coupon_response.py
deleted file mode 100644
index e0c0d5bd..00000000
--- a/src/orb/types/subscription_redeem_coupon_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionRedeemCouponResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionRedeemCouponResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py
index 9dc350e3..40044636 100644
--- a/src/orb/types/subscription_schedule_plan_change_params.py
+++ b/src/orb/types/subscription_schedule_plan_change_params.py
@@ -2,305 +2,68 @@
from __future__ import annotations
-from typing import Dict, List, Union, Iterable, Optional
+from typing import List, Union, Iterable, Optional
from datetime import datetime
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
from .._utils import PropertyInfo
+from .discount_override_param import DiscountOverrideParam
+from .shared_params.new_maximum import NewMaximum
+from .shared_params.new_minimum import NewMinimum
+from .new_subscription_bps_price_param import NewSubscriptionBPSPriceParam
+from .shared_params.new_usage_discount import NewUsageDiscount
+from .new_subscription_bulk_price_param import NewSubscriptionBulkPriceParam
+from .new_subscription_unit_price_param import NewSubscriptionUnitPriceParam
+from .shared_params.new_amount_discount import NewAmountDiscount
+from .shared_params.new_allocation_price import NewAllocationPrice
+from .new_subscription_matrix_price_param import NewSubscriptionMatrixPriceParam
+from .new_subscription_tiered_price_param import NewSubscriptionTieredPriceParam
+from .new_subscription_package_price_param import NewSubscriptionPackagePriceParam
+from .new_subscription_bulk_bps_price_param import NewSubscriptionBulkBPSPriceParam
+from .shared_params.new_percentage_discount import NewPercentageDiscount
+from .new_subscription_tiered_bps_price_param import NewSubscriptionTieredBPSPriceParam
+from .new_subscription_grouped_tiered_price_param import NewSubscriptionGroupedTieredPriceParam
+from .new_subscription_tiered_package_price_param import NewSubscriptionTieredPackagePriceParam
+from .new_subscription_unit_with_percent_price_param import NewSubscriptionUnitWithPercentPriceParam
+from .new_subscription_grouped_allocation_price_param import NewSubscriptionGroupedAllocationPriceParam
+from .new_subscription_bulk_with_proration_price_param import NewSubscriptionBulkWithProrationPriceParam
+from .new_subscription_tier_with_proration_price_param import NewSubscriptionTierWithProrationPriceParam
+from .new_subscription_tiered_with_minimum_price_param import NewSubscriptionTieredWithMinimumPriceParam
+from .new_subscription_unit_with_proration_price_param import NewSubscriptionUnitWithProrationPriceParam
+from .shared_params.billing_cycle_anchor_configuration import BillingCycleAnchorConfiguration
+from .new_subscription_grouped_tiered_package_price_param import NewSubscriptionGroupedTieredPackagePriceParam
+from .new_subscription_matrix_with_allocation_price_param import NewSubscriptionMatrixWithAllocationPriceParam
+from .new_subscription_threshold_total_amount_price_param import NewSubscriptionThresholdTotalAmountPriceParam
+from .new_subscription_cumulative_grouped_bulk_price_param import NewSubscriptionCumulativeGroupedBulkPriceParam
+from .new_subscription_package_with_allocation_price_param import NewSubscriptionPackageWithAllocationPriceParam
+from .new_subscription_matrix_with_display_name_price_param import NewSubscriptionMatrixWithDisplayNamePriceParam
+from .new_subscription_max_group_tiered_package_price_param import NewSubscriptionMaxGroupTieredPackagePriceParam
+from .new_subscription_tiered_package_with_minimum_price_param import NewSubscriptionTieredPackageWithMinimumPriceParam
+from .new_subscription_grouped_with_metered_minimum_price_param import (
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+)
+from .new_subscription_grouped_with_prorated_minimum_price_param import (
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+)
+from .new_subscription_scalable_matrix_with_unit_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+)
+from .new_subscription_scalable_matrix_with_tiered_pricing_price_param import (
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+)
__all__ = [
"SubscriptionSchedulePlanChangeParams",
"AddAdjustment",
"AddAdjustmentAdjustment",
- "AddAdjustmentAdjustmentNewPercentageDiscount",
- "AddAdjustmentAdjustmentNewPercentageDiscountFilter",
- "AddAdjustmentAdjustmentNewUsageDiscount",
- "AddAdjustmentAdjustmentNewUsageDiscountFilter",
- "AddAdjustmentAdjustmentNewAmountDiscount",
- "AddAdjustmentAdjustmentNewAmountDiscountFilter",
- "AddAdjustmentAdjustmentNewMinimum",
- "AddAdjustmentAdjustmentNewMinimumFilter",
- "AddAdjustmentAdjustmentNewMaximum",
- "AddAdjustmentAdjustmentNewMaximumFilter",
"AddPrice",
- "AddPriceAllocationPrice",
- "AddPriceAllocationPriceCustomExpiration",
- "AddPriceDiscount",
"AddPricePrice",
- "AddPricePriceNewSubscriptionUnitPrice",
- "AddPricePriceNewSubscriptionUnitPriceUnitConfig",
- "AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackagePrice",
- "AddPricePriceNewSubscriptionPackagePricePackageConfig",
- "AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixPrice",
- "AddPricePriceNewSubscriptionMatrixPriceMatrixConfig",
- "AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue",
- "AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPrice",
- "AddPricePriceNewSubscriptionTieredPriceTieredConfig",
- "AddPricePriceNewSubscriptionTieredPriceTieredConfigTier",
- "AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPrice",
- "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig",
- "AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier",
- "AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBpsPrice",
- "AddPricePriceNewSubscriptionBpsPriceBpsConfig",
- "AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPrice",
- "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig",
- "AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier",
- "AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkPrice",
- "AddPricePriceNewSubscriptionBulkPriceBulkConfig",
- "AddPricePriceNewSubscriptionBulkPriceBulkConfigTier",
- "AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPrice",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePrice",
- "AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPrice",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPrice",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPrice",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPrice",
- "AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPrice",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPrice",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPrice",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePrice",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPrice",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPrice",
- "AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration",
- "AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration",
- "BillingCycleAnchorConfiguration",
"RemoveAdjustment",
"RemovePrice",
"ReplaceAdjustment",
"ReplaceAdjustmentAdjustment",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscount",
- "ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewUsageDiscount",
- "ReplaceAdjustmentAdjustmentNewUsageDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewAmountDiscount",
- "ReplaceAdjustmentAdjustmentNewAmountDiscountFilter",
- "ReplaceAdjustmentAdjustmentNewMinimum",
- "ReplaceAdjustmentAdjustmentNewMinimumFilter",
- "ReplaceAdjustmentAdjustmentNewMaximum",
- "ReplaceAdjustmentAdjustmentNewMaximumFilter",
"ReplacePrice",
- "ReplacePriceAllocationPrice",
- "ReplacePriceAllocationPriceCustomExpiration",
- "ReplacePriceDiscount",
"ReplacePricePrice",
- "ReplacePricePriceNewSubscriptionUnitPrice",
- "ReplacePricePriceNewSubscriptionUnitPriceUnitConfig",
- "ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePrice",
- "ReplacePricePriceNewSubscriptionPackagePricePackageConfig",
- "ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPrice",
- "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig",
- "ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue",
- "ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPrice",
- "ReplacePricePriceNewSubscriptionTieredPriceTieredConfig",
- "ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier",
- "ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPrice",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPrice",
- "ReplacePricePriceNewSubscriptionBpsPriceBpsConfig",
- "ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPrice",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPrice",
- "ReplacePricePriceNewSubscriptionBulkPriceBulkConfig",
- "ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier",
- "ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPrice",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPrice",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPrice",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPrice",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPrice",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPrice",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPrice",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPrice",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration",
- "ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration",
]
@@ -461,220 +224,8 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False):
"""
-class AddAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class AddAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class AddAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[AddAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
AddAdjustmentAdjustment: TypeAlias = Union[
- AddAdjustmentAdjustmentNewPercentageDiscount,
- AddAdjustmentAdjustmentNewUsageDiscount,
- AddAdjustmentAdjustmentNewAmountDiscount,
- AddAdjustmentAdjustmentNewMinimum,
- AddAdjustmentAdjustmentNewMaximum,
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
]
@@ -701,6950 +252,142 @@ class AddAdjustment(TypedDict, total=False):
"""
-class AddPriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class AddPriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[AddPriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class AddPriceDiscount(TypedDict, total=False):
- discount_type: Required[Literal["percentage", "usage", "amount"]]
-
- amount_discount: Optional[str]
- """Only available if discount_type is `amount`."""
-
- percentage_discount: Optional[float]
- """Only available if discount_type is `percentage`.
-
- This is a number between 0 and 1.
- """
-
- usage_discount: Optional[float]
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-class AddPricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[AddPricePriceNewSubscriptionUnitPriceUnitConfig]
+AddPricePrice: TypeAlias = Union[
+ NewSubscriptionUnitPriceParam,
+ NewSubscriptionPackagePriceParam,
+ NewSubscriptionMatrixPriceParam,
+ NewSubscriptionTieredPriceParam,
+ NewSubscriptionTieredBPSPriceParam,
+ NewSubscriptionBPSPriceParam,
+ NewSubscriptionBulkBPSPriceParam,
+ NewSubscriptionBulkPriceParam,
+ NewSubscriptionThresholdTotalAmountPriceParam,
+ NewSubscriptionTieredPackagePriceParam,
+ NewSubscriptionTieredWithMinimumPriceParam,
+ NewSubscriptionUnitWithPercentPriceParam,
+ NewSubscriptionPackageWithAllocationPriceParam,
+ NewSubscriptionTierWithProrationPriceParam,
+ NewSubscriptionUnitWithProrationPriceParam,
+ NewSubscriptionGroupedAllocationPriceParam,
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+ NewSubscriptionBulkWithProrationPriceParam,
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+ NewSubscriptionCumulativeGroupedBulkPriceParam,
+ NewSubscriptionMaxGroupTieredPackagePriceParam,
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+ NewSubscriptionMatrixWithDisplayNamePriceParam,
+ NewSubscriptionGroupedTieredPackagePriceParam,
+ NewSubscriptionMatrixWithAllocationPriceParam,
+ NewSubscriptionTieredPackageWithMinimumPriceParam,
+ NewSubscriptionGroupedTieredPriceParam,
+]
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
- Only needed if the price is usage-based.
- """
+class AddPrice(TypedDict, total=False):
+ allocation_price: Optional[NewAllocationPrice]
+ """The definition of a new allocation price to create and add to the subscription."""
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ discounts: Optional[Iterable[DiscountOverrideParam]]
+ """[DEPRECATED] Use add_adjustments instead.
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
+ The subscription's discounts for this price.
"""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
+ end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """The end date of the price interval.
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
+ This is the date that the price will stop billing on the subscription. If null,
+ billing will end when the phase or subscription ends.
"""
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
+ """The external price id of the price to add to the subscription."""
- package_size: Required[int]
- """An integer amount to represent package size.
+ maximum_amount: Optional[str]
+ """[DEPRECATED] Use add_adjustments instead.
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
+ The subscription's maximum amount for this price.
"""
+ minimum_amount: Optional[str]
+ """[DEPRECATED] Use add_adjustments instead.
-class AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
+ The subscription's minimum amount for this price.
"""
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[AddPricePriceNewSubscriptionPackagePricePackageConfig]
+ plan_phase_order: Optional[int]
+ """The phase to add this price to."""
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
+ price: Optional[AddPricePrice]
+ """The definition of a new price to create and add to the subscription."""
- Only needed if the price is usage-based.
- """
+ price_id: Optional[str]
+ """The id of the price to add to the subscription."""
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """The start date of the price interval.
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
+ This is the date that the price will start billing on the subscription. If null,
+ billing will start when the phase or subscription starts.
"""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
+class RemoveAdjustment(TypedDict, total=False):
+ adjustment_id: Required[str]
+ """The id of the adjustment to remove on the subscription."""
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
+class RemovePrice(TypedDict, total=False):
external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[AddPricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[AddPricePriceNewSubscriptionMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
+ """The external price id of the price to remove on the subscription."""
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
+ price_id: Optional[str]
+ """The id of the price to remove on the subscription."""
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
+ReplaceAdjustmentAdjustment: TypeAlias = Union[
+ NewPercentageDiscount, NewUsageDiscount, NewAmountDiscount, NewMinimum, NewMaximum
+]
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
- external_price_id: Optional[str]
- """An alias for the price."""
+class ReplaceAdjustment(TypedDict, total=False):
+ adjustment: Required[ReplaceAdjustmentAdjustment]
+ """The definition of a new adjustment to create and add to the subscription."""
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[AddPricePriceNewSubscriptionTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[AddPricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBpsPrice(TypedDict, total=False):
- bps_config: Required[AddPricePriceNewSubscriptionBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[AddPricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[AddPricePriceNewSubscriptionBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkPrice(TypedDict, total=False):
- bulk_config: Required[AddPricePriceNewSubscriptionBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(
- TypedDict, total=False
-):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig
- ]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class AddPricePriceNewSubscriptionGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- AddPricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[AddPricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-AddPricePrice: TypeAlias = Union[
- AddPricePriceNewSubscriptionUnitPrice,
- AddPricePriceNewSubscriptionPackagePrice,
- AddPricePriceNewSubscriptionMatrixPrice,
- AddPricePriceNewSubscriptionTieredPrice,
- AddPricePriceNewSubscriptionTieredBpsPrice,
- AddPricePriceNewSubscriptionBpsPrice,
- AddPricePriceNewSubscriptionBulkBpsPrice,
- AddPricePriceNewSubscriptionBulkPrice,
- AddPricePriceNewSubscriptionThresholdTotalAmountPrice,
- AddPricePriceNewSubscriptionTieredPackagePrice,
- AddPricePriceNewSubscriptionTieredWithMinimumPrice,
- AddPricePriceNewSubscriptionUnitWithPercentPrice,
- AddPricePriceNewSubscriptionPackageWithAllocationPrice,
- AddPricePriceNewSubscriptionTierWithProrationPrice,
- AddPricePriceNewSubscriptionUnitWithProrationPrice,
- AddPricePriceNewSubscriptionGroupedAllocationPrice,
- AddPricePriceNewSubscriptionGroupedWithProratedMinimumPrice,
- AddPricePriceNewSubscriptionBulkWithProrationPrice,
- AddPricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice,
- AddPricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice,
- AddPricePriceNewSubscriptionCumulativeGroupedBulkPrice,
- AddPricePriceNewSubscriptionMaxGroupTieredPackagePrice,
- AddPricePriceNewSubscriptionGroupedWithMeteredMinimumPrice,
- AddPricePriceNewSubscriptionMatrixWithDisplayNamePrice,
- AddPricePriceNewSubscriptionGroupedTieredPackagePrice,
- AddPricePriceNewSubscriptionMatrixWithAllocationPrice,
- AddPricePriceNewSubscriptionTieredPackageWithMinimumPrice,
- AddPricePriceNewSubscriptionGroupedTieredPrice,
-]
-
-
-class AddPrice(TypedDict, total=False):
- allocation_price: Optional[AddPriceAllocationPrice]
- """The definition of a new allocation price to create and add to the subscription."""
-
- discounts: Optional[Iterable[AddPriceDiscount]]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's discounts for this price.
- """
-
- end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
- """The end date of the price interval.
-
- This is the date that the price will stop billing on the subscription. If null,
- billing will end when the phase or subscription ends.
- """
-
- external_price_id: Optional[str]
- """The external price id of the price to add to the subscription."""
-
- maximum_amount: Optional[str]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's maximum amount for this price.
- """
-
- minimum_amount: Optional[str]
- """[DEPRECATED] Use add_adjustments instead.
-
- The subscription's minimum amount for this price.
- """
-
- plan_phase_order: Optional[int]
- """The phase to add this price to."""
-
- price: Optional[AddPricePrice]
- """The definition of a new price to create and add to the subscription."""
-
- price_id: Optional[str]
- """The id of the price to add to the subscription."""
-
- start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
- """The start date of the price interval.
-
- This is the date that the price will start billing on the subscription. If null,
- billing will start when the phase or subscription starts.
- """
-
-
-class BillingCycleAnchorConfiguration(TypedDict, total=False):
- day: Required[int]
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int]
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int]
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class RemoveAdjustment(TypedDict, total=False):
- adjustment_id: Required[str]
- """The id of the adjustment to remove on the subscription."""
-
-
-class RemovePrice(TypedDict, total=False):
- external_price_id: Optional[str]
- """The external price id of the price to remove on the subscription."""
-
- price_id: Optional[str]
- """The id of the price to remove on the subscription."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["percentage_discount"]]
-
- percentage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewPercentageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewUsageDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["usage_discount"]]
-
- usage_discount: Required[float]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewUsageDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscountFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewAmountDiscount(TypedDict, total=False):
- adjustment_type: Required[Literal["amount_discount"]]
-
- amount_discount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewAmountDiscountFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMinimum(TypedDict, total=False):
- adjustment_type: Required[Literal["minimum"]]
-
- item_id: Required[str]
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMinimumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximumFilter(TypedDict, total=False):
- field: Required[Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]]
- """The property of the price to filter on."""
-
- operator: Required[Literal["includes", "excludes"]]
- """Should prices that match the filter be included or excluded."""
-
- values: Required[List[str]]
- """The IDs or values that match this filter."""
-
-
-class ReplaceAdjustmentAdjustmentNewMaximum(TypedDict, total=False):
- adjustment_type: Required[Literal["maximum"]]
-
- maximum_amount: Required[str]
-
- applies_to_all: Optional[Literal[True]]
- """If set, the adjustment will apply to every price on the subscription."""
-
- applies_to_item_ids: Optional[List[str]]
- """The set of item IDs to which this adjustment applies."""
-
- applies_to_price_ids: Optional[List[str]]
- """The set of price IDs to which this adjustment applies."""
-
- currency: Optional[str]
- """If set, only prices in the specified currency will have the adjustment applied."""
-
- filters: Optional[Iterable[ReplaceAdjustmentAdjustmentNewMaximumFilter]]
- """A list of filters that determine which prices this adjustment will apply to."""
-
- is_invoice_level: bool
- """When false, this adjustment will be applied to a single price.
-
- Otherwise, it will be applied at the invoice level, possibly to multiple prices.
- """
-
- price_type: Optional[Literal["usage", "fixed_in_advance", "fixed_in_arrears", "fixed", "in_arrears"]]
- """If set, only prices of the specified type will have the adjustment applied."""
-
-
-ReplaceAdjustmentAdjustment: TypeAlias = Union[
- ReplaceAdjustmentAdjustmentNewPercentageDiscount,
- ReplaceAdjustmentAdjustmentNewUsageDiscount,
- ReplaceAdjustmentAdjustmentNewAmountDiscount,
- ReplaceAdjustmentAdjustmentNewMinimum,
- ReplaceAdjustmentAdjustmentNewMaximum,
-]
-
-
-class ReplaceAdjustment(TypedDict, total=False):
- adjustment: Required[ReplaceAdjustmentAdjustment]
- """The definition of a new adjustment to create and add to the subscription."""
-
- replaces_adjustment_id: Required[str]
- """The id of the adjustment on the plan to replace in the subscription."""
-
-
-class ReplacePriceAllocationPriceCustomExpiration(TypedDict, total=False):
- duration: Required[int]
-
- duration_unit: Required[Literal["day", "month"]]
-
-
-class ReplacePriceAllocationPrice(TypedDict, total=False):
- amount: Required[str]
- """An amount of the currency to allocate to the customer at the specified cadence."""
-
- cadence: Required[Literal["one_time", "monthly", "quarterly", "semi_annual", "annual", "custom"]]
- """The cadence at which to allocate the amount to the customer."""
-
- currency: Required[str]
- """
- An ISO 4217 currency string or a custom pricing unit identifier in which to bill
- this price.
- """
-
- custom_expiration: Optional[ReplacePriceAllocationPriceCustomExpiration]
- """The custom expiration for the allocation."""
-
- expires_at_end_of_cadence: Optional[bool]
- """
- Whether the allocated amount should expire at the end of the cadence or roll
- over to the next period. Set to null if using custom_expiration.
- """
-
-
-class ReplacePriceDiscount(TypedDict, total=False):
- discount_type: Required[Literal["percentage", "usage", "amount"]]
-
- amount_discount: Optional[str]
- """Only available if discount_type is `amount`."""
-
- percentage_discount: Optional[float]
- """Only available if discount_type is `percentage`.
-
- This is a number between 0 and 1.
- """
-
- usage_discount: Optional[float]
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceUnitConfig(TypedDict, total=False):
- unit_amount: Required[str]
- """Rate per unit of usage"""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_config: Required[ReplacePricePriceNewSubscriptionUnitPriceUnitConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionPackagePricePackageConfig(TypedDict, total=False):
- package_amount: Required[str]
- """A currency amount to rate usage by"""
-
- package_size: Required[int]
- """An integer amount to represent package size.
-
- For example, 1000 here would divide usage by 1000 before multiplying by
- package_amount in rating
- """
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_config: Required[ReplacePricePriceNewSubscriptionPackagePricePackageConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionPackagePriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue(TypedDict, total=False):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig(TypedDict, total=False):
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[Iterable[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfigMatrixValue]]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_config: Required[ReplacePricePriceNewSubscriptionMatrixPriceMatrixConfig]
-
- model_type: Required[Literal["matrix"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionMatrixPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier(TypedDict, total=False):
- first_unit: Required[float]
- """Exclusive tier starting value"""
-
- unit_amount: Required[str]
- """Amount per unit"""
-
- last_unit: Optional[float]
- """Inclusive tier ending value. If null, this is treated as the last tier"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceTieredConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredPriceTieredConfigTier]]
- """Tiers for rating based on total usage quantities into the specified tier"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_config: Required[ReplacePricePriceNewSubscriptionTieredPriceTieredConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Per-event basis point rate"""
-
- minimum_amount: Required[str]
- """Exclusive tier starting value"""
-
- maximum_amount: Optional[str]
- """Inclusive tier ending value"""
-
- per_unit_maximum: Optional[str]
- """Per unit maximum to charge"""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfigTier]]
- """
- Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
- tiers
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredBpsPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_bps_config: Required[ReplacePricePriceNewSubscriptionTieredBpsPriceTieredBpsConfig]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredBpsPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceBpsConfig(TypedDict, total=False):
- bps: Required[float]
- """Basis point take rate per event"""
-
- per_unit_maximum: Optional[str]
- """Optional currency amount maximum to cap spend per event"""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBpsPrice(TypedDict, total=False):
- bps_config: Required[ReplacePricePriceNewSubscriptionBpsPriceBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier(TypedDict, total=False):
- bps: Required[float]
- """Basis points to rate on"""
-
- maximum_amount: Optional[str]
- """Upper bound for tier"""
-
- per_unit_maximum: Optional[str]
- """The maximum amount to charge for any one event"""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfigTier]]
- """
- Tiers for a bulk BPS pricing model where all usage is aggregated to a single
- tier based on total volume
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkBpsPrice(TypedDict, total=False):
- bulk_bps_config: Required[ReplacePricePriceNewSubscriptionBulkBpsPriceBulkBpsConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_bps"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkBpsPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier(TypedDict, total=False):
- unit_amount: Required[str]
- """Amount per unit"""
-
- maximum_units: Optional[float]
- """Upper bound for this tier"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBulkConfig(TypedDict, total=False):
- tiers: Required[Iterable[ReplacePricePriceNewSubscriptionBulkPriceBulkConfigTier]]
- """Bulk tiers for rating based on total usage volume"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkPrice(TypedDict, total=False):
- bulk_config: Required[ReplacePricePriceNewSubscriptionBulkPriceBulkConfig]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceDimensionalPriceConfiguration]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionBulkPriceInvoicingCycleConfiguration]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["threshold_total_amount"]]
-
- name: Required[str]
- """The name of the price."""
-
- threshold_total_amount_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionTieredPackagePriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithPercentPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_percent"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_percent_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionUnitWithPercentPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithPercentPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithPercentPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionPackageWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["package_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- package_with_allocation_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionPackageWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTierWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTierWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionUnitWithProrationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["unit_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- unit_with_proration_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionUnitWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_allocation_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_prorated_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_prorated_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False):
- bulk_with_proration_config: Required[Dict[str, object]]
-
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["bulk_with_proration"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionBulkWithProrationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_unit_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_unit_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration(
- TypedDict, total=False
-):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["scalable_matrix_with_tiered_pricing"]]
-
- name: Required[str]
- """The name of the price."""
-
- scalable_matrix_with_tiered_pricing_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- cumulative_grouped_bulk_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["cumulative_grouped_bulk"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- max_group_tiered_package_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["max_group_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_with_metered_minimum_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_with_metered_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_display_name_config: Required[Dict[str, object]]
-
- model_type: Required[Literal["matrix_with_display_name"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_package_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered_package"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue(
- TypedDict, total=False
-):
- dimension_values: Required[List[Optional[str]]]
- """One or two matrix keys to filter usage to this Matrix value by.
-
- For example, ["region", "tier"] could be used to filter cloud usage by a cloud
- region and an instance tier.
- """
-
- unit_amount: Required[str]
- """Unit price for the specified dimension_values"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig(TypedDict, total=False):
- allocation: Required[float]
- """Allocation to be used to calculate the price"""
-
- default_unit_amount: Required[str]
- """Default per unit rate for any usage not bucketed into a specified matrix_value"""
-
- dimensions: Required[List[Optional[str]]]
- """One or two event property values to evaluate matrix groups by"""
-
- matrix_values: Required[
- Iterable[ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue]
- ]
- """Matrix values for specified matrix grouping keys"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- matrix_with_allocation_config: Required[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceMatrixWithAllocationConfig
- ]
-
- model_type: Required[Literal["matrix_with_allocation"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration(
- TypedDict, total=False
-):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["tiered_package_with_minimum"]]
-
- name: Required[str]
- """The name of the price."""
-
- tiered_package_with_minimum_config: Required[Dict[str, object]]
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceBillingCycleConfiguration
- ]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration(TypedDict, total=False):
- dimension_values: Required[List[str]]
- """
- The list of dimension values matching (in order) the dimensions of the price
- group
- """
-
- dimensional_price_group_id: Optional[str]
- """The id of the dimensional price group to include this price in"""
-
- external_dimensional_price_group_id: Optional[str]
- """The external id of the dimensional price group to include this price in"""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
- duration: Required[int]
- """The duration of the billing period."""
-
- duration_unit: Required[Literal["day", "month"]]
- """The unit of billing period duration."""
-
-
-class ReplacePricePriceNewSubscriptionGroupedTieredPrice(TypedDict, total=False):
- cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
- """The cadence to bill for this price on."""
-
- grouped_tiered_config: Required[Dict[str, object]]
-
- item_id: Required[str]
- """The id of the item the price will be associated with."""
-
- model_type: Required[Literal["grouped_tiered"]]
-
- name: Required[str]
- """The name of the price."""
-
- billable_metric_id: Optional[str]
- """The id of the billable metric for the price.
-
- Only needed if the price is usage-based.
- """
-
- billed_in_advance: Optional[bool]
- """
- If the Price represents a fixed cost, the price will be billed in-advance if
- this is true, and in-arrears if this is false.
- """
-
- billing_cycle_configuration: Optional[ReplacePricePriceNewSubscriptionGroupedTieredPriceBillingCycleConfiguration]
- """
- For custom cadence: specifies the duration of the billing period in days or
- months.
- """
-
- conversion_rate: Optional[float]
- """The per unit conversion rate of the price currency to the invoicing currency."""
-
- currency: Optional[str]
- """
- An ISO 4217 currency string, or custom pricing unit identifier, in which this
- price is billed.
- """
-
- dimensional_price_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPriceDimensionalPriceConfiguration
- ]
- """For dimensional price: specifies a price group and dimension values"""
-
- external_price_id: Optional[str]
- """An alias for the price."""
-
- fixed_price_quantity: Optional[float]
- """
- If the Price represents a fixed cost, this represents the quantity of units
- applied.
- """
-
- invoice_grouping_key: Optional[str]
- """The property used to group this price on an invoice"""
-
- invoicing_cycle_configuration: Optional[
- ReplacePricePriceNewSubscriptionGroupedTieredPriceInvoicingCycleConfiguration
- ]
- """Within each billing cycle, specifies the cadence at which invoices are produced.
-
- If unspecified, a single invoice is produced per billing cycle.
- """
-
- metadata: Optional[Dict[str, Optional[str]]]
- """User-specified key/value pairs for the resource.
-
- Individual keys can be removed by setting the value to `null`, and the entire
- metadata mapping can be cleared by setting `metadata` to `null`.
- """
-
- reference_id: Optional[str]
- """
- A transient ID that can be used to reference this price when adding adjustments
- in the same API call.
- """
+ replaces_adjustment_id: Required[str]
+ """The id of the adjustment on the plan to replace in the subscription."""
ReplacePricePrice: TypeAlias = Union[
- ReplacePricePriceNewSubscriptionUnitPrice,
- ReplacePricePriceNewSubscriptionPackagePrice,
- ReplacePricePriceNewSubscriptionMatrixPrice,
- ReplacePricePriceNewSubscriptionTieredPrice,
- ReplacePricePriceNewSubscriptionTieredBpsPrice,
- ReplacePricePriceNewSubscriptionBpsPrice,
- ReplacePricePriceNewSubscriptionBulkBpsPrice,
- ReplacePricePriceNewSubscriptionBulkPrice,
- ReplacePricePriceNewSubscriptionThresholdTotalAmountPrice,
- ReplacePricePriceNewSubscriptionTieredPackagePrice,
- ReplacePricePriceNewSubscriptionTieredWithMinimumPrice,
- ReplacePricePriceNewSubscriptionUnitWithPercentPrice,
- ReplacePricePriceNewSubscriptionPackageWithAllocationPrice,
- ReplacePricePriceNewSubscriptionTierWithProrationPrice,
- ReplacePricePriceNewSubscriptionUnitWithProrationPrice,
- ReplacePricePriceNewSubscriptionGroupedAllocationPrice,
- ReplacePricePriceNewSubscriptionGroupedWithProratedMinimumPrice,
- ReplacePricePriceNewSubscriptionBulkWithProrationPrice,
- ReplacePricePriceNewSubscriptionScalableMatrixWithUnitPricingPrice,
- ReplacePricePriceNewSubscriptionScalableMatrixWithTieredPricingPrice,
- ReplacePricePriceNewSubscriptionCumulativeGroupedBulkPrice,
- ReplacePricePriceNewSubscriptionMaxGroupTieredPackagePrice,
- ReplacePricePriceNewSubscriptionGroupedWithMeteredMinimumPrice,
- ReplacePricePriceNewSubscriptionMatrixWithDisplayNamePrice,
- ReplacePricePriceNewSubscriptionGroupedTieredPackagePrice,
- ReplacePricePriceNewSubscriptionMatrixWithAllocationPrice,
- ReplacePricePriceNewSubscriptionTieredPackageWithMinimumPrice,
- ReplacePricePriceNewSubscriptionGroupedTieredPrice,
+ NewSubscriptionUnitPriceParam,
+ NewSubscriptionPackagePriceParam,
+ NewSubscriptionMatrixPriceParam,
+ NewSubscriptionTieredPriceParam,
+ NewSubscriptionTieredBPSPriceParam,
+ NewSubscriptionBPSPriceParam,
+ NewSubscriptionBulkBPSPriceParam,
+ NewSubscriptionBulkPriceParam,
+ NewSubscriptionThresholdTotalAmountPriceParam,
+ NewSubscriptionTieredPackagePriceParam,
+ NewSubscriptionTieredWithMinimumPriceParam,
+ NewSubscriptionUnitWithPercentPriceParam,
+ NewSubscriptionPackageWithAllocationPriceParam,
+ NewSubscriptionTierWithProrationPriceParam,
+ NewSubscriptionUnitWithProrationPriceParam,
+ NewSubscriptionGroupedAllocationPriceParam,
+ NewSubscriptionGroupedWithProratedMinimumPriceParam,
+ NewSubscriptionBulkWithProrationPriceParam,
+ NewSubscriptionScalableMatrixWithUnitPricingPriceParam,
+ NewSubscriptionScalableMatrixWithTieredPricingPriceParam,
+ NewSubscriptionCumulativeGroupedBulkPriceParam,
+ NewSubscriptionMaxGroupTieredPackagePriceParam,
+ NewSubscriptionGroupedWithMeteredMinimumPriceParam,
+ NewSubscriptionMatrixWithDisplayNamePriceParam,
+ NewSubscriptionGroupedTieredPackagePriceParam,
+ NewSubscriptionMatrixWithAllocationPriceParam,
+ NewSubscriptionTieredPackageWithMinimumPriceParam,
+ NewSubscriptionGroupedTieredPriceParam,
]
@@ -7652,10 +395,10 @@ class ReplacePrice(TypedDict, total=False):
replaces_price_id: Required[str]
"""The id of the price on the plan to replace in the subscription."""
- allocation_price: Optional[ReplacePriceAllocationPrice]
+ allocation_price: Optional[NewAllocationPrice]
"""The definition of a new allocation price to create and add to the subscription."""
- discounts: Optional[Iterable[ReplacePriceDiscount]]
+ discounts: Optional[Iterable[DiscountOverrideParam]]
"""[DEPRECATED] Use add_adjustments instead.
The subscription's discounts for the replacement price.
diff --git a/src/orb/types/subscription_schedule_plan_change_response.py b/src/orb/types/subscription_schedule_plan_change_response.py
deleted file mode 100644
index 0d870e1b..00000000
--- a/src/orb/types/subscription_schedule_plan_change_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionSchedulePlanChangeResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionSchedulePlanChangeResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_trigger_phase_response.py b/src/orb/types/subscription_trigger_phase_response.py
deleted file mode 100644
index e2cfe96c..00000000
--- a/src/orb/types/subscription_trigger_phase_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionTriggerPhaseResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionTriggerPhaseResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_unschedule_cancellation_response.py b/src/orb/types/subscription_unschedule_cancellation_response.py
deleted file mode 100644
index 59594047..00000000
--- a/src/orb/types/subscription_unschedule_cancellation_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionUnscheduleCancellationResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionUnscheduleCancellationResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py b/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py
deleted file mode 100644
index 12b36a1a..00000000
--- a/src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_unschedule_pending_plan_changes_response.py b/src/orb/types/subscription_unschedule_pending_plan_changes_response.py
deleted file mode 100644
index 84f15eb2..00000000
--- a/src/orb/types/subscription_unschedule_pending_plan_changes_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionUnschedulePendingPlanChangesResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionUnschedulePendingPlanChangesResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_update_fixed_fee_quantity_response.py b/src/orb/types/subscription_update_fixed_fee_quantity_response.py
deleted file mode 100644
index 73e50df2..00000000
--- a/src/orb/types/subscription_update_fixed_fee_quantity_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionUpdateFixedFeeQuantityResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionUpdateFixedFeeQuantityResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/subscription_update_trial_response.py b/src/orb/types/subscription_update_trial_response.py
deleted file mode 100644
index f06a5192..00000000
--- a/src/orb/types/subscription_update_trial_response.py
+++ /dev/null
@@ -1,728 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Dict, List, Union, Optional
-from datetime import datetime
-from typing_extensions import Literal, Annotated, TypeAlias
-
-from .plan import Plan
-from .price import Price
-from .._utils import PropertyInfo
-from .invoice import Invoice
-from .._models import BaseModel
-from .customer import Customer
-from .credit_note import CreditNote
-
-__all__ = [
- "SubscriptionUpdateTrialResponse",
- "AdjustmentInterval",
- "AdjustmentIntervalAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment",
- "AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter",
- "BillingCycleAnchorConfiguration",
- "DiscountInterval",
- "DiscountIntervalAmountDiscountInterval",
- "DiscountIntervalAmountDiscountIntervalFilter",
- "DiscountIntervalPercentageDiscountInterval",
- "DiscountIntervalPercentageDiscountIntervalFilter",
- "DiscountIntervalUsageDiscountInterval",
- "DiscountIntervalUsageDiscountIntervalFilter",
- "FixedFeeQuantitySchedule",
- "MaximumInterval",
- "MaximumIntervalFilter",
- "MinimumInterval",
- "MinimumIntervalFilter",
- "PendingSubscriptionChange",
- "PriceInterval",
- "PriceIntervalFixedFeeQuantityTransition",
- "RedeemedCoupon",
- "TrialInfo",
- "ChangedResources",
-]
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["usage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
- usage_discount: float
- """
- The number of usage units by which to discount the price this adjustment applies
- to in a given billing period.
- """
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["amount_discount"]
-
- amount_discount: str
- """
- The amount by which to discount the prices this adjustment applies to in a given
- billing period.
- """
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["percentage_discount"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- percentage_discount: float
- """
- The percentage (as a value between 0 and 1) by which to discount the price
- intervals this adjustment applies to in a given billing period.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["minimum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- item_id: str
- """The item ID that revenue from this minimum will be attributed to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment(BaseModel):
- id: str
-
- adjustment_type: Literal["maximum"]
-
- applies_to_price_ids: List[str]
- """The price IDs that this adjustment applies to."""
-
- filters: List[AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustmentFilter]
- """The filters that determine which prices to apply this adjustment to."""
-
- is_invoice_level: bool
- """
- True for adjustments that apply to an entire invocice, false for adjustments
- that apply to only one price.
- """
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the prices this
- adjustment applies to.
- """
-
- plan_phase_order: Optional[int] = None
- """The plan phase in which this adjustment is active."""
-
- reason: Optional[str] = None
- """The reason for the adjustment."""
-
-
-AdjustmentIntervalAdjustment: TypeAlias = Annotated[
- Union[
- AdjustmentIntervalAdjustmentPlanPhaseUsageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseAmountDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhasePercentageDiscountAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMinimumAdjustment,
- AdjustmentIntervalAdjustmentPlanPhaseMaximumAdjustment,
- ],
- PropertyInfo(discriminator="adjustment_type"),
-]
-
-
-class AdjustmentInterval(BaseModel):
- id: str
-
- adjustment: AdjustmentIntervalAdjustment
-
- applies_to_price_interval_ids: List[str]
- """The price interval IDs that this adjustment applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the adjustment interval."""
-
- start_date: datetime
- """The start date of the adjustment interval."""
-
-
-class BillingCycleAnchorConfiguration(BaseModel):
- day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- month: Optional[int] = None
- """The month on which the billing cycle is anchored (e.g.
-
- a quarterly price anchored in February would have cycles starting February, May,
- August, and November).
- """
-
- year: Optional[int] = None
- """The year on which the billing cycle is anchored (e.g.
-
- a 2 year billing cycle anchored on 2021 would have cycles starting on 2021,
- 2023, 2025, etc.).
- """
-
-
-class DiscountIntervalAmountDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalAmountDiscountInterval(BaseModel):
- amount_discount: str
- """Only available if discount_type is `amount`."""
-
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["amount"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalAmountDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalPercentageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalPercentageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["percentage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalPercentageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- percentage_discount: float
- """
- Only available if discount_type is `percentage`.This is a number between 0
- and 1.
- """
-
- start_date: datetime
- """The start date of the discount interval."""
-
-
-class DiscountIntervalUsageDiscountIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class DiscountIntervalUsageDiscountInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this discount interval applies to."""
-
- discount_type: Literal["usage"]
-
- end_date: Optional[datetime] = None
- """The end date of the discount interval."""
-
- filters: List[DiscountIntervalUsageDiscountIntervalFilter]
- """The filters that determine which prices this discount interval applies to."""
-
- start_date: datetime
- """The start date of the discount interval."""
-
- usage_discount: float
- """Only available if discount_type is `usage`.
-
- Number of usage units that this discount is for
- """
-
-
-DiscountInterval: TypeAlias = Annotated[
- Union[
- DiscountIntervalAmountDiscountInterval,
- DiscountIntervalPercentageDiscountInterval,
- DiscountIntervalUsageDiscountInterval,
- ],
- PropertyInfo(discriminator="discount_type"),
-]
-
-
-class FixedFeeQuantitySchedule(BaseModel):
- end_date: Optional[datetime] = None
-
- price_id: str
-
- quantity: float
-
- start_date: datetime
-
-
-class MaximumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MaximumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this maximum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the maximum interval."""
-
- filters: List[MaximumIntervalFilter]
- """The filters that determine which prices this maximum interval applies to."""
-
- maximum_amount: str
- """
- The maximum amount to charge in a given billing period for the price intervals
- this transform applies to.
- """
-
- start_date: datetime
- """The start date of the maximum interval."""
-
-
-class MinimumIntervalFilter(BaseModel):
- field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
- """The property of the price to filter on."""
-
- operator: Literal["includes", "excludes"]
- """Should prices that match the filter be included or excluded."""
-
- values: List[str]
- """The IDs or values that match this filter."""
-
-
-class MinimumInterval(BaseModel):
- applies_to_price_interval_ids: List[str]
- """The price interval ids that this minimum interval applies to."""
-
- end_date: Optional[datetime] = None
- """The end date of the minimum interval."""
-
- filters: List[MinimumIntervalFilter]
- """The filters that determine which prices this minimum interval applies to."""
-
- minimum_amount: str
- """
- The minimum amount to charge in a given billing period for the price intervals
- this minimum applies to.
- """
-
- start_date: datetime
- """The start date of the minimum interval."""
-
-
-class PendingSubscriptionChange(BaseModel):
- id: str
-
-
-class PriceIntervalFixedFeeQuantityTransition(BaseModel):
- effective_date: datetime
-
- price_id: str
-
- quantity: int
-
-
-class PriceInterval(BaseModel):
- id: str
-
- billing_cycle_day: int
- """The day of the month that Orb bills for this price"""
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is exactly the
- end of the billing period. Set to null if this price interval is not currently
- active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if this price interval is not currently active.
- """
-
- end_date: Optional[datetime] = None
- """The end date of the price interval.
-
- This is the date that Orb stops billing for this price.
- """
-
- filter: Optional[str] = None
- """An additional filter to apply to usage queries."""
-
- fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
- """The fixed fee quantity transitions for this price interval.
-
- This is only relevant for fixed fees.
- """
-
- price: Price
- """
- The Price resource represents a price that can be billed on a subscription,
- resulting in a charge on an invoice in the form of an invoice line item. Prices
- take a quantity and determine an amount to bill.
-
- Orb supports a few different pricing models out of the box. Each of these models
- is serialized differently in a given Price object. The model_type field
- determines the key for the configuration object that is present.
-
- For more on the types of prices, see
- [the core concepts documentation](/core-concepts#plan-and-price)
- """
-
- start_date: datetime
- """The start date of the price interval.
-
- This is the date that Orb starts billing for this price.
- """
-
- usage_customer_ids: Optional[List[str]] = None
- """
- A list of customer IDs whose usage events will be aggregated and billed under
- this price interval.
- """
-
-
-class RedeemedCoupon(BaseModel):
- coupon_id: str
-
- end_date: Optional[datetime] = None
-
- start_date: datetime
-
-
-class TrialInfo(BaseModel):
- end_date: Optional[datetime] = None
-
-
-class ChangedResources(BaseModel):
- created_credit_notes: List[CreditNote]
- """The credit notes that were created as part of this operation."""
-
- created_invoices: List[Invoice]
- """The invoices that were created as part of this operation."""
-
- voided_credit_notes: List[CreditNote]
- """The credit notes that were voided as part of this operation."""
-
- voided_invoices: List[Invoice]
- """The invoices that were voided as part of this operation."""
-
-
-class SubscriptionUpdateTrialResponse(BaseModel):
- id: str
-
- active_plan_phase_order: Optional[int] = None
- """
- The current plan phase that is active, only if the subscription's plan has
- phases.
- """
-
- adjustment_intervals: List[AdjustmentInterval]
- """
- The adjustment intervals for this subscription sorted by the start_date of the
- adjustment interval.
- """
-
- auto_collection: Optional[bool] = None
- """
- Determines whether issued invoices for this subscription will automatically be
- charged with the saved payment method on the due date. This property defaults to
- the plan's behavior. If null, defaults to the customer's setting.
- """
-
- billing_cycle_anchor_configuration: BillingCycleAnchorConfiguration
-
- billing_cycle_day: int
- """The day of the month on which the billing cycle is anchored.
-
- If the maximum number of days in a month is greater than this value, the last
- day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April
- means the billing period begins on the 30th.
- """
-
- created_at: datetime
-
- current_billing_period_end_date: Optional[datetime] = None
- """The end of the current billing period.
-
- This is an exclusive timestamp, such that the instant returned is not part of
- the billing period. Set to null for subscriptions that are not currently active.
- """
-
- current_billing_period_start_date: Optional[datetime] = None
- """The start date of the current billing period.
-
- This is an inclusive timestamp; the instant returned is exactly the beginning of
- the billing period. Set to null if the subscription is not currently active.
- """
-
- customer: Customer
- """
- A customer is a buyer of your products, and the other party to the billing
- relationship.
-
- In Orb, customers are assigned system generated identifiers automatically, but
- it's often desirable to have these match existing identifiers in your system. To
- avoid having to denormalize Orb ID information, you can pass in an
- `external_customer_id` with your own identifier. See
- [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
- information about how these aliases work in Orb.
-
- In addition to having an identifier in your system, a customer may exist in a
- payment provider solution like Stripe. Use the `payment_provider_id` and the
- `payment_provider` enum field to express this mapping.
-
- A customer also has a timezone (from the standard
- [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
- your account's timezone. See [Timezone localization](/essentials/timezones) for
- information on what this timezone parameter influences within Orb.
- """
-
- default_invoice_memo: Optional[str] = None
- """Determines the default memo on this subscriptions' invoices.
-
- Note that if this is not provided, it is determined by the plan configuration.
- """
-
- discount_intervals: List[DiscountInterval]
- """The discount intervals for this subscription sorted by the start_date."""
-
- end_date: Optional[datetime] = None
- """The date Orb stops billing for this subscription."""
-
- fixed_fee_quantity_schedule: List[FixedFeeQuantitySchedule]
-
- invoicing_threshold: Optional[str] = None
-
- maximum_intervals: List[MaximumInterval]
- """The maximum intervals for this subscription sorted by the start_date."""
-
- metadata: Dict[str, str]
- """User specified key-value pairs for the resource.
-
- If not present, this defaults to an empty dictionary. Individual keys can be
- removed by setting the value to `null`, and the entire metadata mapping can be
- cleared by setting `metadata` to `null`.
- """
-
- minimum_intervals: List[MinimumInterval]
- """The minimum intervals for this subscription sorted by the start_date."""
-
- name: str
- """The name of the subscription."""
-
- net_terms: int
- """
- Determines the difference between the invoice issue date for subscription
- invoices as the date that they are due. A value of `0` here represents that the
- invoice is due on issue, whereas a value of `30` represents that the customer
- has a month to pay the invoice.
- """
-
- pending_subscription_change: Optional[PendingSubscriptionChange] = None
- """A pending subscription change if one exists on this subscription."""
-
- plan: Optional[Plan] = None
- """
- The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
- subscribed to by a customer. Plans define the billing behavior of the
- subscription. You can see more about how to configure prices in the
- [Price resource](/reference/price).
- """
-
- price_intervals: List[PriceInterval]
- """The price intervals for this subscription."""
-
- redeemed_coupon: Optional[RedeemedCoupon] = None
-
- start_date: datetime
- """The date Orb starts billing for this subscription."""
-
- status: Literal["active", "ended", "upcoming"]
-
- trial_info: TrialInfo
-
- changed_resources: Optional[ChangedResources] = None
- """The resources that were changed as part of this operation.
-
- Only present when fetched through the subscription changes API or if the
- `include_changed_resources` parameter was passed in the request.
- """
diff --git a/src/orb/types/threshold.py b/src/orb/types/threshold.py
new file mode 100644
index 00000000..41cacd44
--- /dev/null
+++ b/src/orb/types/threshold.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["Threshold"]
+
+
+class Threshold(BaseModel):
+ value: float
+ """The value at which an alert will fire.
+
+ For credit balance alerts, the alert will fire at or below this value. For usage
+ and cost alerts, the alert will fire at or above this value.
+ """
diff --git a/src/orb/types/threshold_param.py b/src/orb/types/threshold_param.py
new file mode 100644
index 00000000..0ff3e877
--- /dev/null
+++ b/src/orb/types/threshold_param.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ThresholdParam"]
+
+
+class ThresholdParam(TypedDict, total=False):
+ value: Required[float]
+ """The value at which an alert will fire.
+
+ For credit balance alerts, the alert will fire at or below this value. For usage
+ and cost alerts, the alert will fire at or above this value.
+ """
diff --git a/tests/api_resources/beta/test_external_plan_id.py b/tests/api_resources/beta/test_external_plan_id.py
index a569d90a..fe98d6fc 100644
--- a/tests/api_resources/beta/test_external_plan_id.py
+++ b/tests/api_resources/beta/test_external_plan_id.py
@@ -78,6 +78,10 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -157,6 +161,10 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -367,6 +375,10 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -446,6 +458,10 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
diff --git a/tests/api_resources/prices/test_external_price_id.py b/tests/api_resources/prices/test_external_price_id.py
index cfee75ae..24ad301a 100644
--- a/tests/api_resources/prices/test_external_price_id.py
+++ b/tests/api_resources/prices/test_external_price_id.py
@@ -8,8 +8,8 @@
import pytest
from orb import Orb, AsyncOrb
-from orb.types import Price
from tests.utils import assert_matches_type
+from orb.types.shared import Price
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py
index fd995dab..6d0e3e8e 100644
--- a/tests/api_resources/test_beta.py
+++ b/tests/api_resources/test_beta.py
@@ -78,6 +78,10 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -157,6 +161,10 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -367,6 +375,10 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -446,6 +458,10 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
diff --git a/tests/api_resources/test_credit_notes.py b/tests/api_resources/test_credit_notes.py
index ab1030c8..3b6322de 100644
--- a/tests/api_resources/test_credit_notes.py
+++ b/tests/api_resources/test_credit_notes.py
@@ -8,10 +8,10 @@
import pytest
from orb import Orb, AsyncOrb
-from orb.types import CreditNote
from orb._utils import parse_datetime
from tests.utils import assert_matches_type
from orb.pagination import SyncPage, AsyncPage
+from orb.types.shared import CreditNote
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
diff --git a/tests/api_resources/test_invoices.py b/tests/api_resources/test_invoices.py
index a45a38cd..d1082981 100644
--- a/tests/api_resources/test_invoices.py
+++ b/tests/api_resources/test_invoices.py
@@ -9,12 +9,12 @@
from orb import Orb, AsyncOrb
from orb.types import (
- Invoice,
InvoiceFetchUpcomingResponse,
)
from orb._utils import parse_date, parse_datetime
from tests.utils import assert_matches_type
from orb.pagination import SyncPage, AsyncPage
+from orb.types.shared import Invoice
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py
index f012b029..abecb8a2 100644
--- a/tests/api_resources/test_plans.py
+++ b/tests/api_resources/test_plans.py
@@ -55,6 +55,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -286,6 +290,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
diff --git a/tests/api_resources/test_prices.py b/tests/api_resources/test_prices.py
index 4b33780c..4cc40d19 100644
--- a/tests/api_resources/test_prices.py
+++ b/tests/api_resources/test_prices.py
@@ -9,13 +9,14 @@
from orb import Orb, AsyncOrb
from orb.types import (
- Price,
PriceEvaluateResponse,
PriceEvaluateMultipleResponse,
+ PriceEvaluatePreviewEventsResponse,
)
from orb._utils import parse_datetime
from tests.utils import assert_matches_type
from orb.pagination import SyncPage, AsyncPage
+from orb.types.shared import Price
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -51,6 +52,10 @@ def test_method_create_with_all_params_overload_1(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -135,6 +140,10 @@ def test_method_create_with_all_params_overload_2(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -237,6 +246,10 @@ def test_method_create_with_all_params_overload_3(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -353,6 +366,10 @@ def test_method_create_with_all_params_overload_4(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -466,6 +483,10 @@ def test_method_create_with_all_params_overload_5(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -574,6 +595,10 @@ def test_method_create_with_all_params_overload_6(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -669,6 +694,10 @@ def test_method_create_with_all_params_overload_7(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -755,6 +784,10 @@ def test_method_create_with_all_params_overload_8(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -840,6 +873,10 @@ def test_method_create_with_all_params_overload_9(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -918,6 +955,10 @@ def test_method_create_with_all_params_overload_10(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -996,6 +1037,10 @@ def test_method_create_with_all_params_overload_11(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1074,6 +1119,10 @@ def test_method_create_with_all_params_overload_12(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1152,6 +1201,10 @@ def test_method_create_with_all_params_overload_13(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1230,6 +1283,10 @@ def test_method_create_with_all_params_overload_14(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1308,6 +1365,10 @@ def test_method_create_with_all_params_overload_15(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1386,6 +1447,10 @@ def test_method_create_with_all_params_overload_16(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1464,6 +1529,10 @@ def test_method_create_with_all_params_overload_17(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1542,6 +1611,10 @@ def test_method_create_with_all_params_overload_18(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1620,6 +1693,10 @@ def test_method_create_with_all_params_overload_19(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1698,6 +1775,10 @@ def test_method_create_with_all_params_overload_20(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1776,6 +1857,10 @@ def test_method_create_with_all_params_overload_21(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1854,6 +1939,10 @@ def test_method_create_with_all_params_overload_22(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -1932,6 +2021,10 @@ def test_method_create_with_all_params_overload_23(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2010,6 +2103,10 @@ def test_method_create_with_all_params_overload_24(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2088,6 +2185,10 @@ def test_method_create_with_all_params_overload_25(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2166,6 +2267,10 @@ def test_method_create_with_all_params_overload_26(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2244,6 +2349,10 @@ def test_method_create_with_all_params_overload_27(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2322,6 +2431,10 @@ def test_method_create_with_all_params_overload_28(self, client: Orb) -> None:
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2521,6 +2634,89 @@ def test_method_evaluate_multiple(self, client: Orb) -> None:
@parametrize
def test_method_evaluate_multiple_with_all_params(self, client: Orb) -> None:
price = client.prices.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ customer_id="customer_id",
+ external_customer_id="external_customer_id",
+ price_evaluations=[
+ {
+ "filter": "my_numeric_property > 100 AND my_other_property = 'bar'",
+ "grouping_keys": ["case when my_event_type = 'foo' then true else false end"],
+ "price": {
+ "cadence": "annual",
+ "currency": "currency",
+ "item_id": "item_id",
+ "model_type": "unit",
+ "name": "Annual fee",
+ "unit_config": {"unit_amount": "unit_amount"},
+ "billable_metric_id": "billable_metric_id",
+ "billed_in_advance": True,
+ "billing_cycle_configuration": {
+ "duration": 0,
+ "duration_unit": "day",
+ },
+ "conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
+ "dimensional_price_configuration": {
+ "dimension_values": ["string"],
+ "dimensional_price_group_id": "dimensional_price_group_id",
+ "external_dimensional_price_group_id": "external_dimensional_price_group_id",
+ },
+ "external_price_id": "external_price_id",
+ "fixed_price_quantity": 0,
+ "invoice_grouping_key": "x",
+ "invoicing_cycle_configuration": {
+ "duration": 0,
+ "duration_unit": "day",
+ },
+ "metadata": {"foo": "string"},
+ },
+ "price_id": "price_id",
+ }
+ ],
+ )
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ @parametrize
+ def test_raw_response_evaluate_multiple(self, client: Orb) -> None:
+ response = client.prices.with_raw_response.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ price = response.parse()
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ @parametrize
+ def test_streaming_response_evaluate_multiple(self, client: Orb) -> None:
+ with client.prices.with_streaming_response.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ price = response.parse()
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_evaluate_preview_events(self, client: Orb) -> None:
+ price = client.prices.evaluate_preview_events(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
+
+ @parametrize
+ def test_method_evaluate_preview_events_with_all_params(self, client: Orb) -> None:
+ price = client.prices.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
customer_id="customer_id",
@@ -2552,6 +2748,10 @@ def test_method_evaluate_multiple_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"dimensional_price_configuration": {
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2570,11 +2770,11 @@ def test_method_evaluate_multiple_with_all_params(self, client: Orb) -> None:
}
],
)
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
@parametrize
- def test_raw_response_evaluate_multiple(self, client: Orb) -> None:
- response = client.prices.with_raw_response.evaluate_multiple(
+ def test_raw_response_evaluate_preview_events(self, client: Orb) -> None:
+ response = client.prices.with_raw_response.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
)
@@ -2582,11 +2782,11 @@ def test_raw_response_evaluate_multiple(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
price = response.parse()
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
@parametrize
- def test_streaming_response_evaluate_multiple(self, client: Orb) -> None:
- with client.prices.with_streaming_response.evaluate_multiple(
+ def test_streaming_response_evaluate_preview_events(self, client: Orb) -> None:
+ with client.prices.with_streaming_response.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
) as response:
@@ -2594,7 +2794,7 @@ def test_streaming_response_evaluate_multiple(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
price = response.parse()
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2668,6 +2868,10 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2752,6 +2956,10 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2854,6 +3062,10 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2970,6 +3182,10 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3083,6 +3299,10 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3191,6 +3411,10 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3286,6 +3510,10 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3372,6 +3600,10 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3457,6 +3689,10 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3535,6 +3771,10 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3613,6 +3853,10 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3691,6 +3935,10 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3769,6 +4017,10 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3847,6 +4099,10 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -3925,6 +4181,10 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4003,6 +4263,10 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4081,6 +4345,10 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4159,6 +4427,10 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4237,6 +4509,10 @@ async def test_method_create_with_all_params_overload_19(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4315,6 +4591,10 @@ async def test_method_create_with_all_params_overload_20(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4393,6 +4673,10 @@ async def test_method_create_with_all_params_overload_21(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4471,6 +4755,10 @@ async def test_method_create_with_all_params_overload_22(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4549,6 +4837,10 @@ async def test_method_create_with_all_params_overload_23(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4627,6 +4919,10 @@ async def test_method_create_with_all_params_overload_24(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4705,6 +5001,10 @@ async def test_method_create_with_all_params_overload_25(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4783,6 +5083,10 @@ async def test_method_create_with_all_params_overload_26(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4861,6 +5165,10 @@ async def test_method_create_with_all_params_overload_27(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -4939,6 +5247,10 @@ async def test_method_create_with_all_params_overload_28(self, async_client: Asy
"duration_unit": "day",
},
conversion_rate=0,
+ conversion_rate_config={
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
dimensional_price_configuration={
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -5138,6 +5450,89 @@ async def test_method_evaluate_multiple(self, async_client: AsyncOrb) -> None:
@parametrize
async def test_method_evaluate_multiple_with_all_params(self, async_client: AsyncOrb) -> None:
price = await async_client.prices.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ customer_id="customer_id",
+ external_customer_id="external_customer_id",
+ price_evaluations=[
+ {
+ "filter": "my_numeric_property > 100 AND my_other_property = 'bar'",
+ "grouping_keys": ["case when my_event_type = 'foo' then true else false end"],
+ "price": {
+ "cadence": "annual",
+ "currency": "currency",
+ "item_id": "item_id",
+ "model_type": "unit",
+ "name": "Annual fee",
+ "unit_config": {"unit_amount": "unit_amount"},
+ "billable_metric_id": "billable_metric_id",
+ "billed_in_advance": True,
+ "billing_cycle_configuration": {
+ "duration": 0,
+ "duration_unit": "day",
+ },
+ "conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
+ "dimensional_price_configuration": {
+ "dimension_values": ["string"],
+ "dimensional_price_group_id": "dimensional_price_group_id",
+ "external_dimensional_price_group_id": "external_dimensional_price_group_id",
+ },
+ "external_price_id": "external_price_id",
+ "fixed_price_quantity": 0,
+ "invoice_grouping_key": "x",
+ "invoicing_cycle_configuration": {
+ "duration": 0,
+ "duration_unit": "day",
+ },
+ "metadata": {"foo": "string"},
+ },
+ "price_id": "price_id",
+ }
+ ],
+ )
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ @parametrize
+ async def test_raw_response_evaluate_multiple(self, async_client: AsyncOrb) -> None:
+ response = await async_client.prices.with_raw_response.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ price = response.parse()
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_evaluate_multiple(self, async_client: AsyncOrb) -> None:
+ async with async_client.prices.with_streaming_response.evaluate_multiple(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ price = await response.parse()
+ assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_evaluate_preview_events(self, async_client: AsyncOrb) -> None:
+ price = await async_client.prices.evaluate_preview_events(
+ timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
+
+ @parametrize
+ async def test_method_evaluate_preview_events_with_all_params(self, async_client: AsyncOrb) -> None:
+ price = await async_client.prices.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
customer_id="customer_id",
@@ -5169,6 +5564,10 @@ async def test_method_evaluate_multiple_with_all_params(self, async_client: Asyn
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"dimensional_price_configuration": {
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -5187,11 +5586,11 @@ async def test_method_evaluate_multiple_with_all_params(self, async_client: Asyn
}
],
)
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
@parametrize
- async def test_raw_response_evaluate_multiple(self, async_client: AsyncOrb) -> None:
- response = await async_client.prices.with_raw_response.evaluate_multiple(
+ async def test_raw_response_evaluate_preview_events(self, async_client: AsyncOrb) -> None:
+ response = await async_client.prices.with_raw_response.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
)
@@ -5199,11 +5598,11 @@ async def test_raw_response_evaluate_multiple(self, async_client: AsyncOrb) -> N
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
price = response.parse()
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
@parametrize
- async def test_streaming_response_evaluate_multiple(self, async_client: AsyncOrb) -> None:
- async with async_client.prices.with_streaming_response.evaluate_multiple(
+ async def test_streaming_response_evaluate_preview_events(self, async_client: AsyncOrb) -> None:
+ async with async_client.prices.with_streaming_response.evaluate_preview_events(
timeframe_end=parse_datetime("2019-12-27T18:11:19.117Z"),
timeframe_start=parse_datetime("2019-12-27T18:11:19.117Z"),
) as response:
@@ -5211,7 +5610,7 @@ async def test_streaming_response_evaluate_multiple(self, async_client: AsyncOrb
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
price = await response.parse()
- assert_matches_type(PriceEvaluateMultipleResponse, price, path=["response"])
+ assert_matches_type(PriceEvaluatePreviewEventsResponse, price, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py
index faff8913..0d241eef 100644
--- a/tests/api_resources/test_subscriptions.py
+++ b/tests/api_resources/test_subscriptions.py
@@ -11,19 +11,9 @@
from orb.types import (
Subscription,
SubscriptionUsage,
- SubscriptionCancelResponse,
- SubscriptionCreateResponse,
+ MutatedSubscription,
SubscriptionFetchCostsResponse,
- SubscriptionUpdateTrialResponse,
- SubscriptionRedeemCouponResponse,
- SubscriptionTriggerPhaseResponse,
SubscriptionFetchScheduleResponse,
- SubscriptionPriceIntervalsResponse,
- SubscriptionSchedulePlanChangeResponse,
- SubscriptionUnscheduleCancellationResponse,
- SubscriptionUpdateFixedFeeQuantityResponse,
- SubscriptionUnschedulePendingPlanChangesResponse,
- SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
)
from orb._utils import parse_date, parse_datetime
from tests.utils import assert_matches_type
@@ -38,7 +28,7 @@ class TestSubscriptions:
@parametrize
def test_method_create(self, client: Orb) -> None:
subscription = client.subscriptions.create()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Orb) -> None:
@@ -105,6 +95,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -220,6 +214,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -243,7 +241,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
trial_duration_days=0,
usage_customer_ids=["string"],
)
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_create(self, client: Orb) -> None:
@@ -252,7 +250,7 @@ def test_raw_response_create(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Orb) -> None:
@@ -261,7 +259,7 @@ def test_streaming_response_create(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -361,7 +359,7 @@ def test_method_cancel(self, client: Orb) -> None:
subscription_id="subscription_id",
cancel_option="end_of_subscription_term",
)
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_cancel_with_all_params(self, client: Orb) -> None:
@@ -371,7 +369,7 @@ def test_method_cancel_with_all_params(self, client: Orb) -> None:
allow_invoice_credit_or_void=True,
cancellation_date=parse_datetime("2019-12-27T18:11:19.117Z"),
)
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_cancel(self, client: Orb) -> None:
@@ -383,7 +381,7 @@ def test_raw_response_cancel(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_cancel(self, client: Orb) -> None:
@@ -395,7 +393,7 @@ def test_streaming_response_cancel(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -611,7 +609,7 @@ def test_method_price_intervals(self, client: Orb) -> None:
subscription = client.subscriptions.price_intervals(
subscription_id="subscription_id",
)
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -662,6 +660,10 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"dimensional_price_configuration": {
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -728,7 +730,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
}
],
)
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -740,7 +742,7 @@ def test_raw_response_price_intervals(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -752,7 +754,7 @@ def test_streaming_response_price_intervals(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -770,7 +772,7 @@ def test_method_redeem_coupon(self, client: Orb) -> None:
subscription_id="subscription_id",
change_option="requested_date",
)
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_redeem_coupon_with_all_params(self, client: Orb) -> None:
@@ -782,7 +784,7 @@ def test_method_redeem_coupon_with_all_params(self, client: Orb) -> None:
coupon_id="coupon_id",
coupon_redemption_code="coupon_redemption_code",
)
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_redeem_coupon(self, client: Orb) -> None:
@@ -794,7 +796,7 @@ def test_raw_response_redeem_coupon(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_redeem_coupon(self, client: Orb) -> None:
@@ -806,7 +808,7 @@ def test_streaming_response_redeem_coupon(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -824,7 +826,7 @@ def test_method_schedule_plan_change(self, client: Orb) -> None:
subscription_id="subscription_id",
change_option="requested_date",
)
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
@@ -893,6 +895,10 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -1001,6 +1007,10 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -1023,7 +1033,7 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
trial_duration_days=0,
usage_customer_ids=["string"],
)
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_schedule_plan_change(self, client: Orb) -> None:
@@ -1035,7 +1045,7 @@ def test_raw_response_schedule_plan_change(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_schedule_plan_change(self, client: Orb) -> None:
@@ -1047,7 +1057,7 @@ def test_streaming_response_schedule_plan_change(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1064,7 +1074,7 @@ def test_method_trigger_phase(self, client: Orb) -> None:
subscription = client.subscriptions.trigger_phase(
subscription_id="subscription_id",
)
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_trigger_phase_with_all_params(self, client: Orb) -> None:
@@ -1073,7 +1083,7 @@ def test_method_trigger_phase_with_all_params(self, client: Orb) -> None:
allow_invoice_credit_or_void=True,
effective_date=parse_date("2019-12-27"),
)
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_trigger_phase(self, client: Orb) -> None:
@@ -1084,7 +1094,7 @@ def test_raw_response_trigger_phase(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_trigger_phase(self, client: Orb) -> None:
@@ -1095,7 +1105,7 @@ def test_streaming_response_trigger_phase(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1111,7 +1121,7 @@ def test_method_unschedule_cancellation(self, client: Orb) -> None:
subscription = client.subscriptions.unschedule_cancellation(
"subscription_id",
)
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_unschedule_cancellation(self, client: Orb) -> None:
@@ -1122,7 +1132,7 @@ def test_raw_response_unschedule_cancellation(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_unschedule_cancellation(self, client: Orb) -> None:
@@ -1133,7 +1143,7 @@ def test_streaming_response_unschedule_cancellation(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1150,7 +1160,7 @@ def test_method_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None
subscription_id="subscription_id",
price_id="price_id",
)
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None:
@@ -1162,7 +1172,7 @@ def test_raw_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) -
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, client: Orb) -> None:
@@ -1174,7 +1184,7 @@ def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, client:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1191,7 +1201,7 @@ def test_method_unschedule_pending_plan_changes(self, client: Orb) -> None:
subscription = client.subscriptions.unschedule_pending_plan_changes(
"subscription_id",
)
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_unschedule_pending_plan_changes(self, client: Orb) -> None:
@@ -1202,7 +1212,7 @@ def test_raw_response_unschedule_pending_plan_changes(self, client: Orb) -> None
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_unschedule_pending_plan_changes(self, client: Orb) -> None:
@@ -1213,7 +1223,7 @@ def test_streaming_response_unschedule_pending_plan_changes(self, client: Orb) -
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1231,7 +1241,7 @@ def test_method_update_fixed_fee_quantity(self, client: Orb) -> None:
price_id="price_id",
quantity=0,
)
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_update_fixed_fee_quantity_with_all_params(self, client: Orb) -> None:
@@ -1243,7 +1253,7 @@ def test_method_update_fixed_fee_quantity_with_all_params(self, client: Orb) ->
change_option="immediate",
effective_date=parse_date("2022-12-21"),
)
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_update_fixed_fee_quantity(self, client: Orb) -> None:
@@ -1256,7 +1266,7 @@ def test_raw_response_update_fixed_fee_quantity(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_update_fixed_fee_quantity(self, client: Orb) -> None:
@@ -1269,7 +1279,7 @@ def test_streaming_response_update_fixed_fee_quantity(self, client: Orb) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1288,7 +1298,7 @@ def test_method_update_trial(self, client: Orb) -> None:
subscription_id="subscription_id",
trial_end_date=parse_datetime("2017-07-21T17:32:28Z"),
)
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_method_update_trial_with_all_params(self, client: Orb) -> None:
@@ -1297,7 +1307,7 @@ def test_method_update_trial_with_all_params(self, client: Orb) -> None:
trial_end_date=parse_datetime("2017-07-21T17:32:28Z"),
shift=True,
)
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_raw_response_update_trial(self, client: Orb) -> None:
@@ -1309,7 +1319,7 @@ def test_raw_response_update_trial(self, client: Orb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
def test_streaming_response_update_trial(self, client: Orb) -> None:
@@ -1321,7 +1331,7 @@ def test_streaming_response_update_trial(self, client: Orb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1340,7 +1350,7 @@ class TestAsyncSubscriptions:
@parametrize
async def test_method_create(self, async_client: AsyncOrb) -> None:
subscription = await async_client.subscriptions.create()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -1407,6 +1417,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -1522,6 +1536,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -1545,7 +1563,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
trial_duration_days=0,
usage_customer_ids=["string"],
)
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
@@ -1554,7 +1572,7 @@ async def test_raw_response_create(self, async_client: AsyncOrb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncOrb) -> None:
@@ -1563,7 +1581,7 @@ async def test_streaming_response_create(self, async_client: AsyncOrb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1663,7 +1681,7 @@ async def test_method_cancel(self, async_client: AsyncOrb) -> None:
subscription_id="subscription_id",
cancel_option="end_of_subscription_term",
)
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_cancel_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -1673,7 +1691,7 @@ async def test_method_cancel_with_all_params(self, async_client: AsyncOrb) -> No
allow_invoice_credit_or_void=True,
cancellation_date=parse_datetime("2019-12-27T18:11:19.117Z"),
)
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_cancel(self, async_client: AsyncOrb) -> None:
@@ -1685,7 +1703,7 @@ async def test_raw_response_cancel(self, async_client: AsyncOrb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_cancel(self, async_client: AsyncOrb) -> None:
@@ -1697,7 +1715,7 @@ async def test_streaming_response_cancel(self, async_client: AsyncOrb) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionCancelResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1913,7 +1931,7 @@ async def test_method_price_intervals(self, async_client: AsyncOrb) -> None:
subscription = await async_client.subscriptions.price_intervals(
subscription_id="subscription_id",
)
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -1964,6 +1982,10 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"dimensional_price_configuration": {
"dimension_values": ["string"],
"dimensional_price_group_id": "dimensional_price_group_id",
@@ -2030,7 +2052,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
}
],
)
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -2042,7 +2064,7 @@ async def test_raw_response_price_intervals(self, async_client: AsyncOrb) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@pytest.mark.skip(reason="Incorrect example breaks Prism")
@parametrize
@@ -2054,7 +2076,7 @@ async def test_streaming_response_price_intervals(self, async_client: AsyncOrb)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionPriceIntervalsResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2072,7 +2094,7 @@ async def test_method_redeem_coupon(self, async_client: AsyncOrb) -> None:
subscription_id="subscription_id",
change_option="requested_date",
)
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_redeem_coupon_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -2084,7 +2106,7 @@ async def test_method_redeem_coupon_with_all_params(self, async_client: AsyncOrb
coupon_id="coupon_id",
coupon_redemption_code="coupon_redemption_code",
)
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_redeem_coupon(self, async_client: AsyncOrb) -> None:
@@ -2096,7 +2118,7 @@ async def test_raw_response_redeem_coupon(self, async_client: AsyncOrb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_redeem_coupon(self, async_client: AsyncOrb) -> None:
@@ -2108,7 +2130,7 @@ async def test_streaming_response_redeem_coupon(self, async_client: AsyncOrb) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionRedeemCouponResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2126,7 +2148,7 @@ async def test_method_schedule_plan_change(self, async_client: AsyncOrb) -> None
subscription_id="subscription_id",
change_option="requested_date",
)
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_schedule_plan_change_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -2195,6 +2217,10 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -2303,6 +2329,10 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A
"duration_unit": "day",
},
"conversion_rate": 0,
+ "conversion_rate_config": {
+ "conversion_rate_type": "unit",
+ "unit_config": {"unit_amount": "unit_amount"},
+ },
"currency": "currency",
"dimensional_price_configuration": {
"dimension_values": ["string"],
@@ -2325,7 +2355,7 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A
trial_duration_days=0,
usage_customer_ids=["string"],
)
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_schedule_plan_change(self, async_client: AsyncOrb) -> None:
@@ -2337,7 +2367,7 @@ async def test_raw_response_schedule_plan_change(self, async_client: AsyncOrb) -
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_schedule_plan_change(self, async_client: AsyncOrb) -> None:
@@ -2349,7 +2379,7 @@ async def test_streaming_response_schedule_plan_change(self, async_client: Async
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2366,7 +2396,7 @@ async def test_method_trigger_phase(self, async_client: AsyncOrb) -> None:
subscription = await async_client.subscriptions.trigger_phase(
subscription_id="subscription_id",
)
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_trigger_phase_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -2375,7 +2405,7 @@ async def test_method_trigger_phase_with_all_params(self, async_client: AsyncOrb
allow_invoice_credit_or_void=True,
effective_date=parse_date("2019-12-27"),
)
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_trigger_phase(self, async_client: AsyncOrb) -> None:
@@ -2386,7 +2416,7 @@ async def test_raw_response_trigger_phase(self, async_client: AsyncOrb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_trigger_phase(self, async_client: AsyncOrb) -> None:
@@ -2397,7 +2427,7 @@ async def test_streaming_response_trigger_phase(self, async_client: AsyncOrb) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionTriggerPhaseResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2413,7 +2443,7 @@ async def test_method_unschedule_cancellation(self, async_client: AsyncOrb) -> N
subscription = await async_client.subscriptions.unschedule_cancellation(
"subscription_id",
)
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_unschedule_cancellation(self, async_client: AsyncOrb) -> None:
@@ -2424,7 +2454,7 @@ async def test_raw_response_unschedule_cancellation(self, async_client: AsyncOrb
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_unschedule_cancellation(self, async_client: AsyncOrb) -> None:
@@ -2435,7 +2465,7 @@ async def test_streaming_response_unschedule_cancellation(self, async_client: As
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionUnscheduleCancellationResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2452,7 +2482,7 @@ async def test_method_unschedule_fixed_fee_quantity_updates(self, async_client:
subscription_id="subscription_id",
price_id="price_id",
)
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None:
@@ -2464,7 +2494,7 @@ async def test_raw_response_unschedule_fixed_fee_quantity_updates(self, async_cl
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, async_client: AsyncOrb) -> None:
@@ -2476,7 +2506,7 @@ async def test_streaming_response_unschedule_fixed_fee_quantity_updates(self, as
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2493,7 +2523,7 @@ async def test_method_unschedule_pending_plan_changes(self, async_client: AsyncO
subscription = await async_client.subscriptions.unschedule_pending_plan_changes(
"subscription_id",
)
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_unschedule_pending_plan_changes(self, async_client: AsyncOrb) -> None:
@@ -2504,7 +2534,7 @@ async def test_raw_response_unschedule_pending_plan_changes(self, async_client:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_unschedule_pending_plan_changes(self, async_client: AsyncOrb) -> None:
@@ -2515,7 +2545,7 @@ async def test_streaming_response_unschedule_pending_plan_changes(self, async_cl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionUnschedulePendingPlanChangesResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2533,7 +2563,7 @@ async def test_method_update_fixed_fee_quantity(self, async_client: AsyncOrb) ->
price_id="price_id",
quantity=0,
)
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_update_fixed_fee_quantity_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -2545,7 +2575,7 @@ async def test_method_update_fixed_fee_quantity_with_all_params(self, async_clie
change_option="immediate",
effective_date=parse_date("2022-12-21"),
)
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None:
@@ -2558,7 +2588,7 @@ async def test_raw_response_update_fixed_fee_quantity(self, async_client: AsyncO
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_update_fixed_fee_quantity(self, async_client: AsyncOrb) -> None:
@@ -2571,7 +2601,7 @@ async def test_streaming_response_update_fixed_fee_quantity(self, async_client:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionUpdateFixedFeeQuantityResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2590,7 +2620,7 @@ async def test_method_update_trial(self, async_client: AsyncOrb) -> None:
subscription_id="subscription_id",
trial_end_date=parse_datetime("2017-07-21T17:32:28Z"),
)
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_method_update_trial_with_all_params(self, async_client: AsyncOrb) -> None:
@@ -2599,7 +2629,7 @@ async def test_method_update_trial_with_all_params(self, async_client: AsyncOrb)
trial_end_date=parse_datetime("2017-07-21T17:32:28Z"),
shift=True,
)
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_raw_response_update_trial(self, async_client: AsyncOrb) -> None:
@@ -2611,7 +2641,7 @@ async def test_raw_response_update_trial(self, async_client: AsyncOrb) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = response.parse()
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
@parametrize
async def test_streaming_response_update_trial(self, async_client: AsyncOrb) -> None:
@@ -2623,7 +2653,7 @@ async def test_streaming_response_update_trial(self, async_client: AsyncOrb) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subscription = await response.parse()
- assert_matches_type(SubscriptionUpdateTrialResponse, subscription, path=["response"])
+ assert_matches_type(MutatedSubscription, subscription, path=["response"])
assert cast(Any, response.is_closed) is True