Skip to content

release: 3.6.0 #548

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 3 commits into from
Feb 21, 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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ USER vscode
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash
ENV PATH=/home/vscode/.rye/shims:$PATH

RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
Expand Down
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.5.0"
".": "3.6.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-99ab2def905df4700d0555a61c3e6f3e378664df85756fc0ff604aed8f8c5f8b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-097aa5c0e1408d7bd31c15caded400b84f45c0296aebdf67a1dc1a4013f371dd.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.6.0 (2025-02-21)

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

### Features

* **api:** api update ([#549](https://github.com/orbcorp/orb-python/issues/549)) ([e3c12c7](https://github.com/orbcorp/orb-python/commit/e3c12c77930b84c59c81e155d2cba86ee88b8301))


### Chores

* **internal:** fix devcontainers setup ([#547](https://github.com/orbcorp/orb-python/issues/547)) ([8a41ae9](https://github.com/orbcorp/orb-python/commit/8a41ae94bb215e52c4a523ad592c3fb62155ad3d))

## 3.5.0 (2025-02-20)

Full Changelog: [v3.4.1...v3.5.0](https://github.com/orbcorp/orb-python/compare/v3.4.1...v3.5.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.5.0"
version = "3.6.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.5.0" # x-release-please-version
__version__ = "3.6.0" # x-release-please-version
24 changes: 24 additions & 0 deletions src/orb/resources/customers/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def create(
currency: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_create_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -151,6 +152,8 @@ def create(
system as an alias for this Customer. Use this field to identify a customer by
an existing identifier in your system.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -295,6 +298,7 @@ def create(
"currency": currency,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"payment_provider": payment_provider,
"payment_provider_id": payment_provider_id,
Expand Down Expand Up @@ -329,6 +333,7 @@ def update(
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_update_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
Expand Down Expand Up @@ -369,6 +374,8 @@ def update(
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
past or current subscriptions.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -516,6 +523,7 @@ def update(
"email": email,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"name": name,
"payment_provider": payment_provider,
Expand Down Expand Up @@ -839,6 +847,7 @@ def update_by_external_id(
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_update_by_external_id_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
Expand Down Expand Up @@ -879,6 +888,8 @@ def update_by_external_id(
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
past or current subscriptions.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -1026,6 +1037,7 @@ def update_by_external_id(
"email": email,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"name": name,
"payment_provider": payment_provider,
Expand Down Expand Up @@ -1093,6 +1105,7 @@ async def create(
currency: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_create_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1145,6 +1158,8 @@ async def create(
system as an alias for this Customer. Use this field to identify a customer by
an existing identifier in your system.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -1289,6 +1304,7 @@ async def create(
"currency": currency,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"payment_provider": payment_provider,
"payment_provider_id": payment_provider_id,
Expand Down Expand Up @@ -1323,6 +1339,7 @@ async def update(
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_update_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
Expand Down Expand Up @@ -1363,6 +1380,8 @@ async def update(
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
past or current subscriptions.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -1510,6 +1529,7 @@ async def update(
"email": email,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"name": name,
"payment_provider": payment_provider,
Expand Down Expand Up @@ -1833,6 +1853,7 @@ async def update_by_external_id(
email: Optional[str] | NotGiven = NOT_GIVEN,
email_delivery: Optional[bool] | NotGiven = NOT_GIVEN,
external_customer_id: Optional[str] | NotGiven = NOT_GIVEN,
hierarchy: Optional[customer_update_by_external_id_params.Hierarchy] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
Expand Down Expand Up @@ -1873,6 +1894,8 @@ async def update_by_external_id(
external_customer_id: The external customer ID. This can only be set if empty and the customer has no
past or current subscriptions.

hierarchy: The hierarchical relationships for this customer.

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`.
Expand Down Expand Up @@ -2020,6 +2043,7 @@ async def update_by_external_id(
"email": email,
"email_delivery": email_delivery,
"external_customer_id": external_customer_id,
"hierarchy": hierarchy,
"metadata": metadata,
"name": name,
"payment_provider": payment_provider,
Expand Down
36 changes: 36 additions & 0 deletions src/orb/resources/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def create(
replace_prices: Optional[Iterable[subscription_create_params.ReplacePrice]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[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,
Expand Down Expand Up @@ -442,6 +443,13 @@ def create(
value specified in the plan. If `0` is provided, the trial on the plan will be
skipped.

usage_customer_ids: A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -486,6 +494,7 @@ def create(
"replace_prices": replace_prices,
"start_date": start_date,
"trial_duration_days": trial_duration_days,
"usage_customer_ids": usage_customer_ids,
},
subscription_create_params.SubscriptionCreateParams,
),
Expand Down Expand Up @@ -1382,6 +1391,7 @@ def schedule_plan_change(
replace_prices: Optional[Iterable[subscription_schedule_plan_change_params.ReplacePrice]]
| NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[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,
Expand Down Expand Up @@ -1648,6 +1658,13 @@ def schedule_plan_change(
value specified in the plan. If `0` is provided, the trial on the plan will be
skipped.

usage_customer_ids: A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -1689,6 +1706,7 @@ def schedule_plan_change(
"replace_adjustments": replace_adjustments,
"replace_prices": replace_prices,
"trial_duration_days": trial_duration_days,
"usage_customer_ids": usage_customer_ids,
},
subscription_schedule_plan_change_params.SubscriptionSchedulePlanChangeParams,
),
Expand Down Expand Up @@ -2106,6 +2124,7 @@ async def create(
replace_prices: Optional[Iterable[subscription_create_params.ReplacePrice]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[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,
Expand Down Expand Up @@ -2438,6 +2457,13 @@ async def create(
value specified in the plan. If `0` is provided, the trial on the plan will be
skipped.

usage_customer_ids: A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -2482,6 +2508,7 @@ async def create(
"replace_prices": replace_prices,
"start_date": start_date,
"trial_duration_days": trial_duration_days,
"usage_customer_ids": usage_customer_ids,
},
subscription_create_params.SubscriptionCreateParams,
),
Expand Down Expand Up @@ -3378,6 +3405,7 @@ async def schedule_plan_change(
replace_prices: Optional[Iterable[subscription_schedule_plan_change_params.ReplacePrice]]
| NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[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,
Expand Down Expand Up @@ -3644,6 +3672,13 @@ async def schedule_plan_change(
value specified in the plan. If `0` is provided, the trial on the plan will be
skipped.

usage_customer_ids: A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -3685,6 +3720,7 @@ async def schedule_plan_change(
"replace_adjustments": replace_adjustments,
"replace_prices": replace_prices,
"trial_duration_days": trial_duration_days,
"usage_customer_ids": usage_customer_ids,
},
subscription_schedule_plan_change_params.SubscriptionSchedulePlanChangeParams,
),
Expand Down
24 changes: 24 additions & 0 deletions src/orb/types/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
__all__ = [
"Customer",
"BillingAddress",
"Hierarchy",
"HierarchyChild",
"HierarchyParent",
"ShippingAddress",
"TaxID",
"AccountingSyncConfiguration",
Expand All @@ -31,6 +34,24 @@ class BillingAddress(BaseModel):
state: Optional[str] = None


class HierarchyChild(BaseModel):
id: str

external_customer_id: Optional[str] = None


class HierarchyParent(BaseModel):
id: str

external_customer_id: Optional[str] = None


class Hierarchy(BaseModel):
children: List[HierarchyChild]

parent: Optional[HierarchyParent] = None


class ShippingAddress(BaseModel):
city: Optional[str] = None

Expand Down Expand Up @@ -254,6 +275,9 @@ class Customer(BaseModel):
an existing identifier in your system.
"""

hierarchy: Hierarchy
"""The hierarchical relationships for this customer."""

metadata: Dict[str, str]
"""User specified key-value pairs for the resource.

Expand Down
Loading