Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-326205df28a52e9ad57c34d7ed1ec85fadd67f9a041df2882ebaa65f6de09930.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-8663e8fc543041d9694eddcd2f7e9784611369606700f99340e6dc80607b2dfa.yml
4 changes: 2 additions & 2 deletions src/orb/resources/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def issue(
Args:
synchronous: If true, the invoice will be issued synchronously. If false, the invoice will be
issued asynchronously. The synchronous option is only available for invoices
containin no usage fees. If the invoice is configured to sync to an external
that have no usage fees. If the invoice is configured to sync to an external
provider, a successful response from this endpoint guarantees the invoice is
present in the provider.

Expand Down Expand Up @@ -927,7 +927,7 @@ async def issue(
Args:
synchronous: If true, the invoice will be issued synchronously. If false, the invoice will be
issued asynchronously. The synchronous option is only available for invoices
containin no usage fees. If the invoice is configured to sync to an external
that have no usage fees. If the invoice is configured to sync to an external
provider, a successful response from this endpoint guarantees the invoice is
present in the provider.

Expand Down
32 changes: 16 additions & 16 deletions src/orb/resources/prices/prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,21 +1128,21 @@ def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
max_group_tiered_config: Dict[str, object],
model_type: Literal["max_group_tiered"],
max_group_tiered_package_config: Dict[str, object],
model_type: Literal["max_group_tiered_package"],
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.NewFloatingMaxGroupTieredPriceBillingCycleConfiguration
price_create_params.NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration
]
| NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | 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.NewFloatingMaxGroupTieredPriceInvoicingCycleConfiguration
price_create_params.NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration
]
| NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -2317,7 +2317,7 @@ def create(
["cadence", "currency", "item_id", "model_type", "name", "threshold_total_amount_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_package_config"],
["cadence", "currency", "grouped_tiered_config", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "max_group_tiered_config", "model_type", "name"],
["cadence", "currency", "item_id", "max_group_tiered_package_config", "model_type", "name"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_with_minimum_config"],
["cadence", "currency", "item_id", "model_type", "name", "package_with_allocation_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_package_with_minimum_config"],
Expand Down Expand Up @@ -2349,7 +2349,7 @@ def create(
| Literal["threshold_total_amount"]
| Literal["tiered_package"]
| Literal["grouped_tiered"]
| Literal["max_group_tiered"]
| Literal["max_group_tiered_package"]
| Literal["tiered_with_minimum"]
| Literal["package_with_allocation"]
| Literal["tiered_package_with_minimum"]
Expand Down Expand Up @@ -2387,7 +2387,7 @@ def create(
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,
max_group_tiered_config: Dict[str, object] | NotGiven = NOT_GIVEN,
max_group_tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_with_minimum_config: Dict[str, object] | NotGiven = NOT_GIVEN,
package_with_allocation_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_package_with_minimum_config: Dict[str, object] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -2440,7 +2440,7 @@ def create(
"threshold_total_amount_config": threshold_total_amount_config,
"tiered_package_config": tiered_package_config,
"grouped_tiered_config": grouped_tiered_config,
"max_group_tiered_config": max_group_tiered_config,
"max_group_tiered_package_config": max_group_tiered_package_config,
"tiered_with_minimum_config": tiered_with_minimum_config,
"package_with_allocation_config": package_with_allocation_config,
"tiered_package_with_minimum_config": tiered_package_with_minimum_config,
Expand Down Expand Up @@ -3791,21 +3791,21 @@ async def create(
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
item_id: str,
max_group_tiered_config: Dict[str, object],
model_type: Literal["max_group_tiered"],
max_group_tiered_package_config: Dict[str, object],
model_type: Literal["max_group_tiered_package"],
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.NewFloatingMaxGroupTieredPriceBillingCycleConfiguration
price_create_params.NewFloatingMaxGroupTieredPackagePriceBillingCycleConfiguration
]
| NotGiven = NOT_GIVEN,
conversion_rate: Optional[float] | 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.NewFloatingMaxGroupTieredPriceInvoicingCycleConfiguration
price_create_params.NewFloatingMaxGroupTieredPackagePriceInvoicingCycleConfiguration
]
| NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -4980,7 +4980,7 @@ async def create(
["cadence", "currency", "item_id", "model_type", "name", "threshold_total_amount_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_package_config"],
["cadence", "currency", "grouped_tiered_config", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "max_group_tiered_config", "model_type", "name"],
["cadence", "currency", "item_id", "max_group_tiered_package_config", "model_type", "name"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_with_minimum_config"],
["cadence", "currency", "item_id", "model_type", "name", "package_with_allocation_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_package_with_minimum_config"],
Expand Down Expand Up @@ -5012,7 +5012,7 @@ async def create(
| Literal["threshold_total_amount"]
| Literal["tiered_package"]
| Literal["grouped_tiered"]
| Literal["max_group_tiered"]
| Literal["max_group_tiered_package"]
| Literal["tiered_with_minimum"]
| Literal["package_with_allocation"]
| Literal["tiered_package_with_minimum"]
Expand Down Expand Up @@ -5050,7 +5050,7 @@ async def create(
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,
max_group_tiered_config: Dict[str, object] | NotGiven = NOT_GIVEN,
max_group_tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_with_minimum_config: Dict[str, object] | NotGiven = NOT_GIVEN,
package_with_allocation_config: Dict[str, object] | NotGiven = NOT_GIVEN,
tiered_package_with_minimum_config: Dict[str, object] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -5103,7 +5103,7 @@ async def create(
"threshold_total_amount_config": threshold_total_amount_config,
"tiered_package_config": tiered_package_config,
"grouped_tiered_config": grouped_tiered_config,
"max_group_tiered_config": max_group_tiered_config,
"max_group_tiered_package_config": max_group_tiered_package_config,
"tiered_with_minimum_config": tiered_with_minimum_config,
"package_with_allocation_config": package_with_allocation_config,
"tiered_package_with_minimum_config": tiered_package_with_minimum_config,
Expand Down
2 changes: 1 addition & 1 deletion src/orb/types/invoice_issue_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InvoiceIssueParams(TypedDict, total=False):
"""If true, the invoice will be issued synchronously.

If false, the invoice will be issued asynchronously. The synchronous option is
only available for invoices containin no usage fees. If the invoice is
only available for invoices that have no usage fees. If the invoice is
configured to sync to an external provider, a successful response from this
endpoint guarantees the invoice is present in the provider.
"""
22 changes: 11 additions & 11 deletions src/orb/types/plan_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
"PriceNewPlanGroupedTieredPackagePrice",
"PriceNewPlanGroupedTieredPackagePriceBillingCycleConfiguration",
"PriceNewPlanGroupedTieredPackagePriceInvoicingCycleConfiguration",
"PriceNewPlanMaxGroupTieredPrice",
"PriceNewPlanMaxGroupTieredPriceBillingCycleConfiguration",
"PriceNewPlanMaxGroupTieredPriceInvoicingCycleConfiguration",
"PriceNewPlanMaxGroupTieredPackagePrice",
"PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration",
"PriceNewPlanMaxGroupTieredPackagePriceInvoicingCycleConfiguration",
]


Expand Down Expand Up @@ -1994,32 +1994,32 @@ class PriceNewPlanGroupedTieredPackagePrice(TypedDict, total=False):
"""


class PriceNewPlanMaxGroupTieredPriceBillingCycleConfiguration(TypedDict, total=False):
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 PriceNewPlanMaxGroupTieredPriceInvoicingCycleConfiguration(TypedDict, total=False):
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 PriceNewPlanMaxGroupTieredPrice(TypedDict, total=False):
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 plan will be associated with."""

max_group_tiered_config: Required[Dict[str, object]]
max_group_tiered_package_config: Required[Dict[str, object]]

model_type: Required[Literal["max_group_tiered"]]
model_type: Required[Literal["max_group_tiered_package"]]

name: Required[str]
"""The name of the price."""
Expand All @@ -2036,7 +2036,7 @@ class PriceNewPlanMaxGroupTieredPrice(TypedDict, total=False):
this is true, and in-arrears if this is false.
"""

billing_cycle_configuration: Optional[PriceNewPlanMaxGroupTieredPriceBillingCycleConfiguration]
billing_cycle_configuration: Optional[PriceNewPlanMaxGroupTieredPackagePriceBillingCycleConfiguration]
"""
For custom cadence: specifies the duration of the billing period in days or
months.
Expand All @@ -2063,7 +2063,7 @@ class PriceNewPlanMaxGroupTieredPrice(TypedDict, total=False):
invoice_grouping_key: Optional[str]
"""The property used to group this price on an invoice"""

invoicing_cycle_configuration: Optional[PriceNewPlanMaxGroupTieredPriceInvoicingCycleConfiguration]
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.
Expand Down Expand Up @@ -2099,5 +2099,5 @@ class PriceNewPlanMaxGroupTieredPrice(TypedDict, total=False):
PriceNewPlanMatrixWithDisplayNamePrice,
PriceNewPlanBulkWithProrationPrice,
PriceNewPlanGroupedTieredPackagePrice,
PriceNewPlanMaxGroupTieredPrice,
PriceNewPlanMaxGroupTieredPackagePrice,
]
52 changes: 26 additions & 26 deletions src/orb/types/price.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@
"GroupedTieredPackagePriceItem",
"GroupedTieredPackagePriceMaximum",
"GroupedTieredPackagePriceMinimum",
"MaxGroupTieredPrice",
"MaxGroupTieredPriceBillableMetric",
"MaxGroupTieredPriceBillingCycleConfiguration",
"MaxGroupTieredPriceCreditAllocation",
"MaxGroupTieredPriceInvoicingCycleConfiguration",
"MaxGroupTieredPriceItem",
"MaxGroupTieredPriceMaximum",
"MaxGroupTieredPriceMinimum",
"MaxGroupTieredPackagePrice",
"MaxGroupTieredPackagePriceBillableMetric",
"MaxGroupTieredPackagePriceBillingCycleConfiguration",
"MaxGroupTieredPackagePriceCreditAllocation",
"MaxGroupTieredPackagePriceInvoicingCycleConfiguration",
"MaxGroupTieredPackagePriceItem",
"MaxGroupTieredPackagePriceMaximum",
"MaxGroupTieredPackagePriceMinimum",
]


Expand Down Expand Up @@ -2870,35 +2870,35 @@ class GroupedTieredPackagePrice(BaseModel):
price_type: Literal["usage_price", "fixed_price"]


class MaxGroupTieredPriceBillableMetric(BaseModel):
class MaxGroupTieredPackagePriceBillableMetric(BaseModel):
id: str


class MaxGroupTieredPriceBillingCycleConfiguration(BaseModel):
class MaxGroupTieredPackagePriceBillingCycleConfiguration(BaseModel):
duration: int

duration_unit: Literal["day", "month"]


class MaxGroupTieredPriceCreditAllocation(BaseModel):
class MaxGroupTieredPackagePriceCreditAllocation(BaseModel):
allows_rollover: bool

currency: str


class MaxGroupTieredPriceInvoicingCycleConfiguration(BaseModel):
class MaxGroupTieredPackagePriceInvoicingCycleConfiguration(BaseModel):
duration: int

duration_unit: Literal["day", "month"]


class MaxGroupTieredPriceItem(BaseModel):
class MaxGroupTieredPackagePriceItem(BaseModel):
id: str

name: str


class MaxGroupTieredPriceMaximum(BaseModel):
class MaxGroupTieredPackagePriceMaximum(BaseModel):
applies_to_price_ids: List[str]
"""List of price_ids that this maximum amount applies to.

Expand All @@ -2909,7 +2909,7 @@ class MaxGroupTieredPriceMaximum(BaseModel):
"""Maximum amount applied"""


class MaxGroupTieredPriceMinimum(BaseModel):
class MaxGroupTieredPackagePriceMinimum(BaseModel):
applies_to_price_ids: List[str]
"""List of price_ids that this minimum amount applies to.

Expand All @@ -2920,20 +2920,20 @@ class MaxGroupTieredPriceMinimum(BaseModel):
"""Minimum amount applied"""


class MaxGroupTieredPrice(BaseModel):
class MaxGroupTieredPackagePrice(BaseModel):
id: str

billable_metric: Optional[MaxGroupTieredPriceBillableMetric] = None
billable_metric: Optional[MaxGroupTieredPackagePriceBillableMetric] = None

billing_cycle_configuration: MaxGroupTieredPriceBillingCycleConfiguration
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[MaxGroupTieredPriceCreditAllocation] = None
credit_allocation: Optional[MaxGroupTieredPackagePriceCreditAllocation] = None

currency: str

Expand All @@ -2943,13 +2943,13 @@ class MaxGroupTieredPrice(BaseModel):

fixed_price_quantity: Optional[float] = None

invoicing_cycle_configuration: Optional[MaxGroupTieredPriceInvoicingCycleConfiguration] = None
invoicing_cycle_configuration: Optional[MaxGroupTieredPackagePriceInvoicingCycleConfiguration] = None

item: MaxGroupTieredPriceItem
item: MaxGroupTieredPackagePriceItem

max_group_tiered_config: Dict[str, object]
max_group_tiered_package_config: Dict[str, object]

maximum: Optional[MaxGroupTieredPriceMaximum] = None
maximum: Optional[MaxGroupTieredPackagePriceMaximum] = None

maximum_amount: Optional[str] = None

Expand All @@ -2961,11 +2961,11 @@ class MaxGroupTieredPrice(BaseModel):
cleared by setting `metadata` to `null`.
"""

minimum: Optional[MaxGroupTieredPriceMinimum] = None
minimum: Optional[MaxGroupTieredPackagePriceMinimum] = None

minimum_amount: Optional[str] = None

price_model_type: Literal["max_group_tiered"] = FieldInfo(alias="model_type")
price_model_type: Literal["max_group_tiered_package"] = FieldInfo(alias="model_type")

name: str

Expand Down Expand Up @@ -3000,7 +3000,7 @@ class MaxGroupTieredPrice(BaseModel):
MatrixWithDisplayNamePrice,
BulkWithProrationPrice,
GroupedTieredPackagePrice,
MaxGroupTieredPrice,
MaxGroupTieredPackagePrice,
],
PropertyInfo(discriminator="price_model_type"),
]
Loading