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.28.0"
".": "4.29.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-828c91953d2351040fdd4d90a3d9eafd09f9d240c4f6ce0441b7a10c06c1c722.yml
openapi_spec_hash: c82bc88563f80f600e59e22014d4cec4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml
openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0
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.29.0 (2025-10-23)

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

### Features

* **api:** api update ([9b86b32](https://github.com/orbcorp/orb-python/commit/9b86b32f9283071ad1a482e593563013a097a355))

## 4.28.0 (2025-10-17)

Full Changelog: [v4.27.0...v4.28.0](https://github.com/orbcorp/orb-python/compare/v4.27.0...v4.28.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.28.0"
version = "4.29.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.28.0" # x-release-please-version
__version__ = "4.29.0" # x-release-please-version
31 changes: 30 additions & 1 deletion src/orb/resources/subscription_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from __future__ import annotations

from typing import Optional
from typing import Union, Optional
from datetime import date

import httpx

Expand Down Expand Up @@ -90,6 +91,9 @@ def apply(
*,
description: Optional[str] | Omit = omit,
mark_as_paid: Optional[bool] | Omit = omit,
payment_external_id: Optional[str] | Omit = omit,
payment_notes: Optional[str] | Omit = omit,
payment_received_date: Union[str, date, None] | Omit = omit,
previously_collected_amount: 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.
Expand All @@ -111,6 +115,14 @@ def apply(
mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided,
mark as paid and credit the difference to the customer's balance.

payment_external_id: An optional external ID to associate with the payment. Only applicable when
mark_as_paid is true.

payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true.

payment_received_date: A date string to specify the date the payment was received. Only applicable when
mark_as_paid is true. If not provided, defaults to the current date.

previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is
also provided, credit the difference to the customer's balance.

Expand All @@ -134,6 +146,9 @@ def apply(
{
"description": description,
"mark_as_paid": mark_as_paid,
"payment_external_id": payment_external_id,
"payment_notes": payment_notes,
"payment_received_date": payment_received_date,
"previously_collected_amount": previously_collected_amount,
},
subscription_change_apply_params.SubscriptionChangeApplyParams,
Expand Down Expand Up @@ -263,6 +278,9 @@ async def apply(
*,
description: Optional[str] | Omit = omit,
mark_as_paid: Optional[bool] | Omit = omit,
payment_external_id: Optional[str] | Omit = omit,
payment_notes: Optional[str] | Omit = omit,
payment_received_date: Union[str, date, None] | Omit = omit,
previously_collected_amount: 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.
Expand All @@ -284,6 +302,14 @@ async def apply(
mark_as_paid: Mark all pending invoices that are payable as paid. If amount is also provided,
mark as paid and credit the difference to the customer's balance.

payment_external_id: An optional external ID to associate with the payment. Only applicable when
mark_as_paid is true.

payment_notes: Optional notes about the payment. Only applicable when mark_as_paid is true.

payment_received_date: A date string to specify the date the payment was received. Only applicable when
mark_as_paid is true. If not provided, defaults to the current date.

previously_collected_amount: Amount already collected to apply to the customer's balance. If mark_as_paid is
also provided, credit the difference to the customer's balance.

Expand All @@ -307,6 +333,9 @@ async def apply(
{
"description": description,
"mark_as_paid": mark_as_paid,
"payment_external_id": payment_external_id,
"payment_notes": payment_notes,
"payment_received_date": payment_received_date,
"previously_collected_amount": previously_collected_amount,
},
subscription_change_apply_params.SubscriptionChangeApplyParams,
Expand Down
23 changes: 21 additions & 2 deletions src/orb/types/subscription_change_apply_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict
from typing import Union, Optional
from datetime import date
from typing_extensions import Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["SubscriptionChangeApplyParams"]

Expand All @@ -19,6 +22,22 @@ class SubscriptionChangeApplyParams(TypedDict, total=False):
customer's balance.
"""

payment_external_id: Optional[str]
"""An optional external ID to associate with the payment.

Only applicable when mark_as_paid is true.
"""

payment_notes: Optional[str]
"""Optional notes about the payment. Only applicable when mark_as_paid is true."""

payment_received_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")]
"""A date string to specify the date the payment was received.

Only applicable when mark_as_paid is true. If not provided, defaults to the
current date.
"""

previously_collected_amount: Optional[str]
"""Amount already collected to apply to the customer's balance.

Expand Down
7 changes: 7 additions & 0 deletions tests/api_resources/test_subscription_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
SubscriptionChangeCancelResponse,
SubscriptionChangeRetrieveResponse,
)
from orb._utils import parse_date
from tests.utils import assert_matches_type

base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
Expand Down Expand Up @@ -74,6 +75,9 @@ def test_method_apply_with_all_params(self, client: Orb) -> None:
subscription_change_id="subscription_change_id",
description="description",
mark_as_paid=True,
payment_external_id="payment_external_id",
payment_notes="payment_notes",
payment_received_date=parse_date("2019-12-27"),
previously_collected_amount="previously_collected_amount",
)
assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"])
Expand Down Expand Up @@ -210,6 +214,9 @@ async def test_method_apply_with_all_params(self, async_client: AsyncOrb) -> Non
subscription_change_id="subscription_change_id",
description="description",
mark_as_paid=True,
payment_external_id="payment_external_id",
payment_notes="payment_notes",
payment_received_date=parse_date("2019-12-27"),
previously_collected_amount="previously_collected_amount",
)
assert_matches_type(SubscriptionChangeApplyResponse, subscription_change, path=["response"])
Expand Down