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

## 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)

### Features

* **api:** api update ([#528](https://github.com/orbcorp/orb-python/issues/528)) ([091fd4c](https://github.com/orbcorp/orb-python/commit/091fd4cb9df5721bd0e80ecae6f145d6395cedce))

## 3.1.0 (2025-02-07)

Full Changelog: [v3.0.0...v3.1.0](https://github.com/orbcorp/orb-python/compare/v3.0.0...v3.1.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.1.0"
version = "3.2.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.1.0" # x-release-please-version
__version__ = "3.2.0" # x-release-please-version
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class BalanceTransactionCreateResponse(BaseModel):
"credit_note_applied",
"credit_note_voided",
"overpayment_refund",
"external_payment",
]

amount: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class BalanceTransactionListResponse(BaseModel):
"credit_note_applied",
"credit_note_voided",
"overpayment_refund",
"external_payment",
]

amount: str
Expand Down
1 change: 1 addition & 0 deletions src/orb/types/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class CustomerBalanceTransaction(BaseModel):
"credit_note_applied",
"credit_note_voided",
"overpayment_refund",
"external_payment",
]

amount: str
Expand Down
1 change: 1 addition & 0 deletions src/orb/types/invoice_fetch_upcoming_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class CustomerBalanceTransaction(BaseModel):
"credit_note_applied",
"credit_note_voided",
"overpayment_refund",
"external_payment",
]

amount: str
Expand Down
48 changes: 48 additions & 0 deletions src/orb/types/subscription_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"AddAdjustmentAdjustmentNewMinimum",
"AddAdjustmentAdjustmentNewMaximum",
"AddPrice",
"AddPriceAllocationPrice",
"AddPriceDiscount",
"AddPricePrice",
"AddPricePriceNewSubscriptionUnitPrice",
Expand Down Expand Up @@ -98,6 +99,7 @@
"ReplaceAdjustmentAdjustmentNewMinimum",
"ReplaceAdjustmentAdjustmentNewMaximum",
"ReplacePrice",
"ReplacePriceAllocationPrice",
"ReplacePriceDiscount",
"ReplacePricePrice",
"ReplacePricePriceNewSubscriptionUnitPrice",
Expand Down Expand Up @@ -427,6 +429,26 @@ class AddAdjustment(TypedDict, total=False):
"""


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

expires_at_end_of_cadence: Required[bool]
"""
Whether the allocated amount should expire at the end of the cadence or roll
over to the next period.
"""


class AddPriceDiscount(TypedDict, total=False):
discount_type: Required[Literal["percentage", "usage", "amount"]]

Expand Down Expand Up @@ -2211,6 +2233,9 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False)


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.

Expand Down Expand Up @@ -2388,6 +2413,26 @@ class ReplaceAdjustment(TypedDict, total=False):
"""The id of the adjustment on the plan to replace in the subscription."""


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

expires_at_end_of_cadence: Required[bool]
"""
Whether the allocated amount should expire at the end of the cadence or roll
over to the next period.
"""


class ReplacePriceDiscount(TypedDict, total=False):
discount_type: Required[Literal["percentage", "usage", "amount"]]

Expand Down Expand Up @@ -4191,6 +4236,9 @@ 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]
"""The definition of a new allocation price to create and add to the subscription."""

discounts: Optional[Iterable[ReplacePriceDiscount]]
"""[DEPRECATED] Use add_adjustments instead.

Expand Down
48 changes: 48 additions & 0 deletions src/orb/types/subscription_schedule_plan_change_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"AddAdjustmentAdjustmentNewMinimum",
"AddAdjustmentAdjustmentNewMaximum",
"AddPrice",
"AddPriceAllocationPrice",
"AddPriceDiscount",
"AddPricePrice",
"AddPricePriceNewSubscriptionUnitPrice",
Expand Down Expand Up @@ -98,6 +99,7 @@
"ReplaceAdjustmentAdjustmentNewMinimum",
"ReplaceAdjustmentAdjustmentNewMaximum",
"ReplacePrice",
"ReplacePriceAllocationPrice",
"ReplacePriceDiscount",
"ReplacePricePrice",
"ReplacePricePriceNewSubscriptionUnitPrice",
Expand Down Expand Up @@ -427,6 +429,26 @@ class AddAdjustment(TypedDict, total=False):
"""


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

expires_at_end_of_cadence: Required[bool]
"""
Whether the allocated amount should expire at the end of the cadence or roll
over to the next period.
"""


class AddPriceDiscount(TypedDict, total=False):
discount_type: Required[Literal["percentage", "usage", "amount"]]

Expand Down Expand Up @@ -2211,6 +2233,9 @@ class AddPricePriceNewSubscriptionBulkWithProrationPrice(TypedDict, total=False)


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.

Expand Down Expand Up @@ -2388,6 +2413,26 @@ class ReplaceAdjustment(TypedDict, total=False):
"""The id of the adjustment on the plan to replace in the subscription."""


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

expires_at_end_of_cadence: Required[bool]
"""
Whether the allocated amount should expire at the end of the cadence or roll
over to the next period.
"""


class ReplacePriceDiscount(TypedDict, total=False):
discount_type: Required[Literal["percentage", "usage", "amount"]]

Expand Down Expand Up @@ -4191,6 +4236,9 @@ 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]
"""The definition of a new allocation price to create and add to the subscription."""

discounts: Optional[Iterable[ReplacePriceDiscount]]
"""[DEPRECATED] Use add_adjustments instead.

Expand Down
48 changes: 48 additions & 0 deletions tests/api_resources/test_subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
],
add_prices=[
{
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -145,6 +151,12 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
replace_prices=[
{
"replaces_price_id": "replaces_price_id",
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -710,6 +722,12 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
],
add_prices=[
{
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -793,6 +811,12 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None:
replace_prices=[
{
"replaces_price_id": "replaces_price_id",
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -1169,6 +1193,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
],
add_prices=[
{
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -1257,6 +1287,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
replace_prices=[
{
"replaces_price_id": "replaces_price_id",
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -1822,6 +1858,12 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A
],
add_prices=[
{
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down Expand Up @@ -1905,6 +1947,12 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A
replace_prices=[
{
"replaces_price_id": "replaces_price_id",
"allocation_price": {
"amount": "10.00",
"cadence": "one_time",
"currency": "USD",
"expires_at_end_of_cadence": True,
},
"discounts": [
{
"discount_type": "percentage",
Expand Down