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 @@
{
".": "3.2.0"
".": "3.3.0"
}
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-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-25409f3b13e6d1d003e351fc18d248ecf3c5821cfde5f409a1d356e4fc917d8c.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 3.3.0 (2025-02-13)

Full Changelog: [v3.2.0...v3.3.0](https://github.com/orbcorp/orb-python/compare/v3.2.0...v3.3.0)

### Features

* **api:** api update ([#533](https://github.com/orbcorp/orb-python/issues/533)) ([579e4fc](https://github.com/orbcorp/orb-python/commit/579e4fcaba68a73f77fcb3a4e3be04ea904b26ee))


### Chores

* **internal:** update client tests ([#531](https://github.com/orbcorp/orb-python/issues/531)) ([e8c0abe](https://github.com/orbcorp/orb-python/commit/e8c0abe0dd656b03012cfaa2da786c03befd1f74))

## 3.2.0 (2025-02-11)

Full Changelog: [v3.1.0...v3.2.0](https://github.com/orbcorp/orb-python/compare/v3.1.0...v3.2.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 = "3.2.0"
version = "3.3.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__ = "3.2.0" # x-release-please-version
__version__ = "3.3.0" # x-release-please-version
194 changes: 192 additions & 2 deletions src/orb/resources/prices/prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,97 @@ def create(
"""
...

@overload
def create(
self,
*,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
cumulative_grouped_bulk_config: Dict[str, object],
currency: str,
item_id: str,
model_type: Literal["cumulative_grouped_bulk"],
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,
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.NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration
]
| 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.
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.

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

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.

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", "package_config"],
Expand Down Expand Up @@ -2514,6 +2605,7 @@ def create(
["cadence", "currency", "grouped_tiered_package_config", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_unit_pricing_config"],
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"],
["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"],
)
def create(
self,
Expand Down Expand Up @@ -2547,7 +2639,8 @@ def create(
| Literal["bulk_with_proration"]
| Literal["grouped_tiered_package"]
| Literal["scalable_matrix_with_unit_pricing"]
| Literal["scalable_matrix_with_tiered_pricing"],
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"],
name: str,
unit_config: price_create_params.NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -2588,6 +2681,7 @@ def create(
grouped_tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
scalable_matrix_with_unit_pricing_config: Dict[str, object] | NotGiven = NOT_GIVEN,
scalable_matrix_with_tiered_pricing_config: Dict[str, object] | NotGiven = NOT_GIVEN,
cumulative_grouped_bulk_config: Dict[str, object] | 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,
Expand Down Expand Up @@ -2643,6 +2737,7 @@ def create(
"grouped_tiered_package_config": grouped_tiered_package_config,
"scalable_matrix_with_unit_pricing_config": scalable_matrix_with_unit_pricing_config,
"scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config,
"cumulative_grouped_bulk_config": cumulative_grouped_bulk_config,
},
price_create_params.PriceCreateParams,
),
Expand Down Expand Up @@ -5339,6 +5434,97 @@ async def create(
"""
...

@overload
async def create(
self,
*,
cadence: Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"],
cumulative_grouped_bulk_config: Dict[str, object],
currency: str,
item_id: str,
model_type: Literal["cumulative_grouped_bulk"],
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,
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.NewFloatingCumulativeGroupedBulkPriceInvoicingCycleConfiguration
]
| 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.
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.

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

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.

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", "package_config"],
Expand Down Expand Up @@ -5367,6 +5553,7 @@ async def create(
["cadence", "currency", "grouped_tiered_package_config", "item_id", "model_type", "name"],
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_unit_pricing_config"],
["cadence", "currency", "item_id", "model_type", "name", "scalable_matrix_with_tiered_pricing_config"],
["cadence", "cumulative_grouped_bulk_config", "currency", "item_id", "model_type", "name"],
)
async def create(
self,
Expand Down Expand Up @@ -5400,7 +5587,8 @@ async def create(
| Literal["bulk_with_proration"]
| Literal["grouped_tiered_package"]
| Literal["scalable_matrix_with_unit_pricing"]
| Literal["scalable_matrix_with_tiered_pricing"],
| Literal["scalable_matrix_with_tiered_pricing"]
| Literal["cumulative_grouped_bulk"],
name: str,
unit_config: price_create_params.NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN,
billable_metric_id: Optional[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -5441,6 +5629,7 @@ async def create(
grouped_tiered_package_config: Dict[str, object] | NotGiven = NOT_GIVEN,
scalable_matrix_with_unit_pricing_config: Dict[str, object] | NotGiven = NOT_GIVEN,
scalable_matrix_with_tiered_pricing_config: Dict[str, object] | NotGiven = NOT_GIVEN,
cumulative_grouped_bulk_config: Dict[str, object] | 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,
Expand Down Expand Up @@ -5496,6 +5685,7 @@ async def create(
"grouped_tiered_package_config": grouped_tiered_package_config,
"scalable_matrix_with_unit_pricing_config": scalable_matrix_with_unit_pricing_config,
"scalable_matrix_with_tiered_pricing_config": scalable_matrix_with_tiered_pricing_config,
"cumulative_grouped_bulk_config": cumulative_grouped_bulk_config,
},
price_create_params.PriceCreateParams,
),
Expand Down
16 changes: 4 additions & 12 deletions src/orb/types/customers/cost_list_by_external_id_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@

class DataPerPriceCost(BaseModel):
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)
"""
"""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."""
Expand Down
16 changes: 4 additions & 12 deletions src/orb/types/customers/cost_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@

class DataPerPriceCost(BaseModel):
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)
"""
"""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."""
Expand Down
Loading