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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.22.0"
".": "4.23.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-26020bd285825dac04bf642a414ea07c786fc6e42ee6bbcf795e11f8db426519.yml
openapi_spec_hash: 897fedec83f0960539b3aa4ec0e3308d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-297c7ce95bc0aa1ac6f324a487515f49b8a30b74eb9d39ca9dcd2d9cf065f0ef.yml
openapi_spec_hash: 29e9af981bc78379336079bb4208c54d
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.23.0 (2025-10-06)

Full Changelog: [v4.22.0...v4.23.0](https://github.com/orbcorp/orb-python/compare/v4.22.0...v4.23.0)

### Features

* **api:** api update ([4d3c2f4](https://github.com/orbcorp/orb-python/commit/4d3c2f4646e6b64edde2d0bc7eb4701f1aa60a87))

## 4.22.0 (2025-10-03)

Full Changelog: [v4.21.0...v4.22.0](https://github.com/orbcorp/orb-python/compare/v4.21.0...v4.22.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "4.22.0"
version = "4.23.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/orb/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "orb"
__version__ = "4.22.0" # x-release-please-version
__version__ = "4.23.0" # x-release-please-version
206 changes: 204 additions & 2 deletions src/orb/resources/prices/prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,102 @@ def create(
"""
...

@overload
def create(
self,
*,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig,
item_id: str,
model_type: Literal["event_output"],
name: str,
billable_metric_id: Optional[str] | Omit = omit,
billed_in_advance: Optional[bool] | Omit = omit,
billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
conversion_rate: Optional[float] | Omit = omit,
conversion_rate_config: Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig]
| Omit = omit,
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
external_price_id: Optional[str] | Omit = omit,
fixed_price_quantity: Optional[float] | Omit = omit,
invoice_grouping_key: Optional[str] | Omit = omit,
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
# 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,
) -> Price:
"""
This endpoint is used to create a [price](/product-catalog/price-configuration).
A price created using this endpoint is always an add-on, meaning that it's not
associated with a specific plan and can instead be individually added to
subscriptions, including subscriptions on different plans.

An `external_price_id` can be optionally specified as an alias to allow
ergonomic interaction with prices in the Orb API.

See the [Price resource](/product-catalog/price-configuration) for the
specification of different price model configurations possible in this endpoint.

Args:
cadence: The cadence to bill for this price on.

currency: An ISO 4217 currency string for which this price is billed in.

event_output_config: Configuration for event_output pricing

item_id: The id of the item the price will be associated with.

model_type: The pricing model type

name: The name of the price.

billable_metric_id: The id of the billable metric for the price. Only needed if the price is
usage-based.

billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
this is true, and in-arrears if this is false.

billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
months.

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.

fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
applied.

invoice_grouping_key: The property used to group this price on an invoice

invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.

metadata: User-specified key/value pairs for the resource. Individual keys can be removed
by setting the value to `null`, and the entire metadata mapping can be cleared
by setting `metadata` to `null`.

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
"""
...

@required_args(
["cadence", "currency", "item_id", "model_type", "name", "unit_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_config"],
Expand Down Expand Up @@ -2699,6 +2795,7 @@ def create(
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"],
["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "minimum_config", "model_type", "name"],
["cadence", "currency", "event_output_config", "item_id", "model_type", "name"],
)
def create(
self,
Expand Down Expand Up @@ -2732,7 +2829,8 @@ def create(
| Literal["scalable_matrix_with_unit_pricing"]
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"]
| Literal["minimum"],
| Literal["minimum"]
| Literal["event_output"],
name: str,
unit_config: UnitConfig | Omit = omit,
billable_metric_id: Optional[str] | Omit = omit,
Expand Down Expand Up @@ -2766,6 +2864,7 @@ def create(
| Optional[price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig]
| Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig]
| Optional[price_create_params.NewFloatingMinimumCompositePriceConversionRateConfig]
| Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig]
| Omit = omit,
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
external_price_id: Optional[str] | Omit = omit,
Expand Down Expand Up @@ -2817,6 +2916,7 @@ def create(
cumulative_grouped_bulk_config: price_create_params.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig
| Omit = omit,
minimum_config: price_create_params.NewFloatingMinimumCompositePriceMinimumConfig | Omit = omit,
event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig | Omit = omit,
# 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,
Expand Down Expand Up @@ -2874,6 +2974,7 @@ def create(
"scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config,
"cumulative_grouped_bulk_config": cumulative_grouped_bulk_config,
"minimum_config": minimum_config,
"event_output_config": event_output_config,
},
price_create_params.PriceCreateParams,
),
Expand Down Expand Up @@ -5919,6 +6020,102 @@ async def create(
"""
...

@overload
async def create(
self,
*,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
currency: str,
event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig,
item_id: str,
model_type: Literal["event_output"],
name: str,
billable_metric_id: Optional[str] | Omit = omit,
billed_in_advance: Optional[bool] | Omit = omit,
billing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
conversion_rate: Optional[float] | Omit = omit,
conversion_rate_config: Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig]
| Omit = omit,
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
external_price_id: Optional[str] | Omit = omit,
fixed_price_quantity: Optional[float] | Omit = omit,
invoice_grouping_key: Optional[str] | Omit = omit,
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration] | Omit = omit,
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
# 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,
) -> Price:
"""
This endpoint is used to create a [price](/product-catalog/price-configuration).
A price created using this endpoint is always an add-on, meaning that it's not
associated with a specific plan and can instead be individually added to
subscriptions, including subscriptions on different plans.

An `external_price_id` can be optionally specified as an alias to allow
ergonomic interaction with prices in the Orb API.

See the [Price resource](/product-catalog/price-configuration) for the
specification of different price model configurations possible in this endpoint.

Args:
cadence: The cadence to bill for this price on.

currency: An ISO 4217 currency string for which this price is billed in.

event_output_config: Configuration for event_output pricing

item_id: The id of the item the price will be associated with.

model_type: The pricing model type

name: The name of the price.

billable_metric_id: The id of the billable metric for the price. Only needed if the price is
usage-based.

billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
this is true, and in-arrears if this is false.

billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
months.

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.

fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
applied.

invoice_grouping_key: The property used to group this price on an invoice

invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
If unspecified, a single invoice is produced per billing cycle.

metadata: User-specified key/value pairs for the resource. Individual keys can be removed
by setting the value to `null`, and the entire metadata mapping can be cleared
by setting `metadata` to `null`.

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
"""
...

@required_args(
["cadence", "currency", "item_id", "model_type", "name", "unit_config"],
["cadence", "currency", "item_id", "model_type", "name", "tiered_config"],
Expand Down Expand Up @@ -5947,6 +6144,7 @@ async def create(
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"],
["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "minimum_config", "model_type", "name"],
["cadence", "currency", "event_output_config", "item_id", "model_type", "name"],
)
async def create(
self,
Expand Down Expand Up @@ -5980,7 +6178,8 @@ async def create(
| Literal["scalable_matrix_with_unit_pricing"]
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"]
| Literal["minimum"],
| Literal["minimum"]
| Literal["event_output"],
name: str,
unit_config: UnitConfig | Omit = omit,
billable_metric_id: Optional[str] | Omit = omit,
Expand Down Expand Up @@ -6014,6 +6213,7 @@ async def create(
| Optional[price_create_params.NewFloatingScalableMatrixWithTieredPricingPriceConversionRateConfig]
| Optional[price_create_params.NewFloatingCumulativeGroupedBulkPriceConversionRateConfig]
| Optional[price_create_params.NewFloatingMinimumCompositePriceConversionRateConfig]
| Optional[price_create_params.NewFloatingEventOutputPriceConversionRateConfig]
| Omit = omit,
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration] | Omit = omit,
external_price_id: Optional[str] | Omit = omit,
Expand Down Expand Up @@ -6065,6 +6265,7 @@ async def create(
cumulative_grouped_bulk_config: price_create_params.NewFloatingCumulativeGroupedBulkPriceCumulativeGroupedBulkConfig
| Omit = omit,
minimum_config: price_create_params.NewFloatingMinimumCompositePriceMinimumConfig | Omit = omit,
event_output_config: price_create_params.NewFloatingEventOutputPriceEventOutputConfig | Omit = omit,
# 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,
Expand Down Expand Up @@ -6122,6 +6323,7 @@ async def create(
"scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config,
"cumulative_grouped_bulk_config": cumulative_grouped_bulk_config,
"minimum_config": minimum_config,
"event_output_config": event_output_config,
},
price_create_params.PriceCreateParams,
),
Expand Down
Loading