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.14.0"
".": "3.15.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-48084a007f009b4358484f09a3a7b74a990c402669f9d15adfbb60e4f835f951.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-04f02fa57c3ab8d15ecf0a16a41a83814c21cdc2a830fae4d65f1b7b2196d819.yml
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 3.15.0 (2025-03-11)

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

### Features

* **api:** api update ([#578](https://github.com/orbcorp/orb-python/issues/578)) ([04eaf67](https://github.com/orbcorp/orb-python/commit/04eaf6721083e11b758e90427f5b4337ba9b0d91))
* **api:** api update ([#580](https://github.com/orbcorp/orb-python/issues/580)) ([5d04ab2](https://github.com/orbcorp/orb-python/commit/5d04ab2dc9d6404f3092241470e379ef5c5693b3))
* **api:** api update ([#581](https://github.com/orbcorp/orb-python/issues/581)) ([dd09767](https://github.com/orbcorp/orb-python/commit/dd097673811c2082c8c95ee39dda5e613fd2c6a2))

## 3.14.0 (2025-03-05)

Full Changelog: [v3.13.0...v3.14.0](https://github.com/orbcorp/orb-python/compare/v3.13.0...v3.14.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.14.0"
version = "3.15.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 2 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ else
echo
fi

export DEFER_PYDANTIC_BUILD=false

echo "==> Running tests"
rye run pytest "$@"

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.14.0" # x-release-please-version
__version__ = "3.15.0" # x-release-please-version
48 changes: 6 additions & 42 deletions src/orb/resources/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,7 @@ def create_for_customer(
customer_id: str,
*,
currency: str,
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
thresholds: Optional[Iterable[alert_create_for_customer_params.Threshold]] | 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.
Expand Down Expand Up @@ -286,13 +280,7 @@ def create_for_external_customer(
external_customer_id: str,
*,
currency: str,
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
thresholds: Optional[Iterable[alert_create_for_external_customer_params.Threshold]] | 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.
Expand Down Expand Up @@ -359,13 +347,7 @@ def create_for_subscription(
subscription_id: str,
*,
thresholds: Iterable[alert_create_for_subscription_params.Threshold],
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["usage_exceeded", "cost_exceeded"],
metric_id: 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.
Expand Down Expand Up @@ -708,13 +690,7 @@ async def create_for_customer(
customer_id: str,
*,
currency: str,
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
thresholds: Optional[Iterable[alert_create_for_customer_params.Threshold]] | 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.
Expand Down Expand Up @@ -779,13 +755,7 @@ async def create_for_external_customer(
external_customer_id: str,
*,
currency: str,
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"],
thresholds: Optional[Iterable[alert_create_for_external_customer_params.Threshold]] | 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.
Expand Down Expand Up @@ -852,13 +822,7 @@ async def create_for_subscription(
subscription_id: str,
*,
thresholds: Iterable[alert_create_for_subscription_params.Threshold],
type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
],
type: Literal["usage_exceeded", "cost_exceeded"],
metric_id: 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.
Expand Down
4 changes: 2 additions & 2 deletions src/orb/types/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class Alert(BaseModel):
"""

type: Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
"usage_exceeded",
"cost_exceeded",
]
"""The type of alert. This must be a valid alert type."""
10 changes: 1 addition & 9 deletions src/orb/types/alert_create_for_customer_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ class AlertCreateForCustomerParams(TypedDict, total=False):
currency: Required[str]
"""The case sensitive currency or custom pricing unit to use for this alert."""

type: Required[
Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
]
]
type: Required[Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"]]
"""The type of alert to create. This must be a valid alert type."""

thresholds: Optional[Iterable[Threshold]]
Expand Down
10 changes: 1 addition & 9 deletions src/orb/types/alert_create_for_external_customer_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ class AlertCreateForExternalCustomerParams(TypedDict, total=False):
currency: Required[str]
"""The case sensitive currency or custom pricing unit to use for this alert."""

type: Required[
Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
]
]
type: Required[Literal["credit_balance_depleted", "credit_balance_dropped", "credit_balance_recovered"]]
"""The type of alert to create. This must be a valid alert type."""

thresholds: Optional[Iterable[Threshold]]
Expand Down
10 changes: 1 addition & 9 deletions src/orb/types/alert_create_for_subscription_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ class AlertCreateForSubscriptionParams(TypedDict, total=False):
thresholds: Required[Iterable[Threshold]]
"""The thresholds that define the values at which the alert will be triggered."""

type: Required[
Literal[
"usage_exceeded",
"cost_exceeded",
"credit_balance_depleted",
"credit_balance_dropped",
"credit_balance_recovered",
]
]
type: Required[Literal["usage_exceeded", "cost_exceeded"]]
"""The type of alert to create. This must be a valid alert type."""

metric_id: Optional[str]
Expand Down
6 changes: 5 additions & 1 deletion src/orb/types/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,11 @@ class LineItem(BaseModel):
"""

adjustments: List[LineItemAdjustment]
"""All adjustments (ie. maximums, minimums, discounts) applied to the line item."""
"""
All adjustments applied to the line item in the order they were applied based on
invoice calculations (ie. usage discounts -> amount discounts -> percentage
discounts -> minimums -> maximums).
"""

amount: str
"""
Expand Down
6 changes: 5 additions & 1 deletion src/orb/types/invoice_fetch_upcoming_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,11 @@ class LineItem(BaseModel):
"""

adjustments: List[LineItemAdjustment]
"""All adjustments (ie. maximums, minimums, discounts) applied to the line item."""
"""
All adjustments applied to the line item in the order they were applied based on
invoice calculations (ie. usage discounts -> amount discounts -> percentage
discounts -> minimums -> maximums).
"""

amount: str
"""
Expand Down
6 changes: 5 additions & 1 deletion src/orb/types/invoice_line_item_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ class InvoiceLineItemCreateResponse(BaseModel):
"""

adjustments: List[Adjustment]
"""All adjustments (ie. maximums, minimums, discounts) applied to the line item."""
"""
All adjustments applied to the line item in the order they were applied based on
invoice calculations (ie. usage discounts -> amount discounts -> percentage
discounts -> minimums -> maximums).
"""

amount: str
"""
Expand Down
11 changes: 7 additions & 4 deletions src/orb/types/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ class Subscription(BaseModel):
"""

adjustment_intervals: List[AdjustmentInterval]
"""The adjustment intervals for this subscription."""
"""
The adjustment intervals for this subscription sorted by the start_date of the
adjustment interval.
"""

auto_collection: Optional[bool] = None
"""
Expand Down Expand Up @@ -503,7 +506,7 @@ class Subscription(BaseModel):
"""

discount_intervals: List[DiscountInterval]
"""The discount intervals for this subscription."""
"""The discount intervals for this subscription sorted by the start_date."""

end_date: Optional[datetime] = None
"""The date Orb stops billing for this subscription."""
Expand All @@ -513,7 +516,7 @@ class Subscription(BaseModel):
invoicing_threshold: Optional[str] = None

maximum_intervals: List[MaximumInterval]
"""The maximum intervals for this subscription."""
"""The maximum intervals for this subscription sorted by the start_date."""

metadata: Dict[str, str]
"""User specified key-value pairs for the resource.
Expand All @@ -524,7 +527,7 @@ class Subscription(BaseModel):
"""

minimum_intervals: List[MinimumInterval]
"""The minimum intervals for this subscription."""
"""The minimum intervals for this subscription sorted by the start_date."""

net_terms: int
"""
Expand Down
11 changes: 7 additions & 4 deletions src/orb/types/subscription_cancel_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ class SubscriptionCancelResponse(BaseModel):
"""

adjustment_intervals: List[AdjustmentInterval]
"""The adjustment intervals for this subscription."""
"""
The adjustment intervals for this subscription sorted by the start_date of the
adjustment interval.
"""

auto_collection: Optional[bool] = None
"""
Expand Down Expand Up @@ -503,7 +506,7 @@ class SubscriptionCancelResponse(BaseModel):
"""

discount_intervals: List[DiscountInterval]
"""The discount intervals for this subscription."""
"""The discount intervals for this subscription sorted by the start_date."""

end_date: Optional[datetime] = None
"""The date Orb stops billing for this subscription."""
Expand All @@ -513,7 +516,7 @@ class SubscriptionCancelResponse(BaseModel):
invoicing_threshold: Optional[str] = None

maximum_intervals: List[MaximumInterval]
"""The maximum intervals for this subscription."""
"""The maximum intervals for this subscription sorted by the start_date."""

metadata: Dict[str, str]
"""User specified key-value pairs for the resource.
Expand All @@ -524,7 +527,7 @@ class SubscriptionCancelResponse(BaseModel):
"""

minimum_intervals: List[MinimumInterval]
"""The minimum intervals for this subscription."""
"""The minimum intervals for this subscription sorted by the start_date."""

net_terms: int
"""
Expand Down
11 changes: 7 additions & 4 deletions src/orb/types/subscription_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ class SubscriptionCreateResponse(BaseModel):
"""

adjustment_intervals: List[AdjustmentInterval]
"""The adjustment intervals for this subscription."""
"""
The adjustment intervals for this subscription sorted by the start_date of the
adjustment interval.
"""

auto_collection: Optional[bool] = None
"""
Expand Down Expand Up @@ -503,7 +506,7 @@ class SubscriptionCreateResponse(BaseModel):
"""

discount_intervals: List[DiscountInterval]
"""The discount intervals for this subscription."""
"""The discount intervals for this subscription sorted by the start_date."""

end_date: Optional[datetime] = None
"""The date Orb stops billing for this subscription."""
Expand All @@ -513,7 +516,7 @@ class SubscriptionCreateResponse(BaseModel):
invoicing_threshold: Optional[str] = None

maximum_intervals: List[MaximumInterval]
"""The maximum intervals for this subscription."""
"""The maximum intervals for this subscription sorted by the start_date."""

metadata: Dict[str, str]
"""User specified key-value pairs for the resource.
Expand All @@ -524,7 +527,7 @@ class SubscriptionCreateResponse(BaseModel):
"""

minimum_intervals: List[MinimumInterval]
"""The minimum intervals for this subscription."""
"""The minimum intervals for this subscription sorted by the start_date."""

net_terms: int
"""
Expand Down
8 changes: 6 additions & 2 deletions src/orb/types/subscription_price_intervals_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2803,14 +2803,18 @@ class AddAdjustment(TypedDict, total=False):
"""The start date of the adjustment interval.

This is the date that the adjustment will start affecting prices on the
subscription.
subscription. The adjustment will apply to invoice dates that overlap with this
`start_date`. This `start_date` is treated as inclusive for in-advance prices,
and exclusive for in-arrears prices.
"""

end_date: Annotated[Union[Union[str, datetime], BillingCycleRelativeDate, None], PropertyInfo(format="iso8601")]
"""The end date of the adjustment interval.

This is the date that the adjustment will stop affecting prices on the
subscription.
subscription. The adjustment will apply to invoice dates that overlap with this
`end_date`.This `end_date` is treated as exclusive for in-advance prices, and
inclusive for in-arrears prices.
"""


Expand Down
Loading