Skip to content

release: 2.22.0 #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 16, 2025
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 @@
{
".": "2.21.0"
".": "2.22.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: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-1720084d65e39f50455fe3a8756afc68fedf57306a727f92e4d020c28878df87.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-11f40c15fa889d9752019e8a35b82d2e7a3d42f2b42c850b469f120a5b2c47ba.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 2.22.0 (2025-01-16)

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

### Features

* **api:** api update ([#491](https://github.com/orbcorp/orb-python/issues/491)) ([1f41a57](https://github.com/orbcorp/orb-python/commit/1f41a57f91218d275d85428d85458d6310aa15c4))
* **api:** api update ([#492](https://github.com/orbcorp/orb-python/issues/492)) ([8f48b6a](https://github.com/orbcorp/orb-python/commit/8f48b6aae6927aad5347f83fabf9c86059425dfe))


### Chores

* **internal:** version bump ([#469](https://github.com/orbcorp/orb-python/issues/469)) ([0c32ed8](https://github.com/orbcorp/orb-python/commit/0c32ed802f75842cd86bd2f631fc4cff5349e490))
* **internal:** version bump ([#489](https://github.com/orbcorp/orb-python/issues/489)) ([fe81c5e](https://github.com/orbcorp/orb-python/commit/fe81c5e9845f5848296e2b2d52fffe04b53040d7))

## 2.21.0 (2025-01-15)

Full Changelog: [v2.20.0...v2.21.0](https://github.com/orbcorp/orb-python/compare/v2.20.0...v2.21.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 = "2.21.0"
version = "2.22.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__ = "2.21.0" # x-release-please-version
__version__ = "2.22.0" # x-release-please-version
192 changes: 192 additions & 0 deletions src/orb/resources/prices/prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,98 @@ def create(
"""
...

@overload
def create(
self,
*,
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"],
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
]
| 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
]
| 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](../reference/price).

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](../reference/price) 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
"""
...

@overload
def create(
self,
Expand Down Expand Up @@ -2250,6 +2342,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", "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 @@ -2281,6 +2374,7 @@ def create(
| Literal["threshold_total_amount"]
| Literal["tiered_package"]
| Literal["grouped_tiered"]
| Literal["max_group_tiered"]
| Literal["tiered_with_minimum"]
| Literal["package_with_allocation"]
| Literal["tiered_package_with_minimum"]
Expand Down Expand Up @@ -2318,6 +2412,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,
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 @@ -2370,6 +2465,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,
"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 @@ -3725,6 +3821,98 @@ async def create(
"""
...

@overload
async def create(
self,
*,
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"],
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
]
| 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
]
| 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](../reference/price).

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](../reference/price) 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
"""
...

@overload
async def create(
self,
Expand Down Expand Up @@ -4842,6 +5030,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", "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 @@ -4873,6 +5062,7 @@ async def create(
| Literal["threshold_total_amount"]
| Literal["tiered_package"]
| Literal["grouped_tiered"]
| Literal["max_group_tiered"]
| Literal["tiered_with_minimum"]
| Literal["package_with_allocation"]
| Literal["tiered_package_with_minimum"]
Expand Down Expand Up @@ -4910,6 +5100,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,
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 @@ -4962,6 +5153,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,
"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
6 changes: 4 additions & 2 deletions src/orb/resources/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,8 @@ def schedule_plan_change(
billing cycle alignment.

change_date: The date that the plan change should take effect. This parameter can only be
passed if the `change_option` is `requested_date`.
passed if the `change_option` is `requested_date`. If a date with no time is
passed, the plan change will happen at midnight in the customer's timezone.

coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
by its redemption code, or cannot be redeemed, an error response will be
Expand Down Expand Up @@ -3541,7 +3542,8 @@ async def schedule_plan_change(
billing cycle alignment.

change_date: The date that the plan change should take effect. This parameter can only be
passed if the `change_option` is `requested_date`.
passed if the `change_option` is `requested_date`. If a date with no time is
passed, the plan change will happen at midnight in the customer's timezone.

coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
by its redemption code, or cannot be redeemed, an error response will be
Expand Down
Loading
Loading