diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ac9a2e75..55d20255 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bbeb30b1..c17fdc16 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,6 +24,9 @@ } } } + }, + "features": { + "ghcr.io/devcontainers/features/node:1": {} } // Features to add to the dev container. More info: https://containers.dev/features. diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf0d0361..f391d416 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.5.0" + ".": "3.6.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a16642c4..fb35dc35 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4461a772..14640afb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 9caf9ee2..c449291a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/orb/_version.py b/src/orb/_version.py index 7591cf2d..21b275ed 100644 --- a/src/orb/_version.py +++ b/src/orb/_version.py @@ -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 diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index f131d20c..bd33194f 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -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, @@ -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`. @@ -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, @@ -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"]] @@ -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`. @@ -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, @@ -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"]] @@ -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`. @@ -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, @@ -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, @@ -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`. @@ -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, @@ -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"]] @@ -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`. @@ -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, @@ -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"]] @@ -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`. @@ -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, diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 0b5272bc..cdab5562 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -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, @@ -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 @@ -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, ), @@ -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, @@ -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 @@ -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, ), @@ -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, @@ -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 @@ -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, ), @@ -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, @@ -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 @@ -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, ), diff --git a/src/orb/types/customer.py b/src/orb/types/customer.py index 5b4bd50a..a47f3057 100644 --- a/src/orb/types/customer.py +++ b/src/orb/types/customer.py @@ -9,6 +9,9 @@ __all__ = [ "Customer", "BillingAddress", + "Hierarchy", + "HierarchyChild", + "HierarchyParent", "ShippingAddress", "TaxID", "AccountingSyncConfiguration", @@ -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 @@ -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. diff --git a/src/orb/types/customer_create_params.py b/src/orb/types/customer_create_params.py index 625a3534..7e1c1732 100644 --- a/src/orb/types/customer_create_params.py +++ b/src/orb/types/customer_create_params.py @@ -10,6 +10,7 @@ "AccountingSyncConfiguration", "AccountingSyncConfigurationAccountingProvider", "BillingAddress", + "Hierarchy", "ReportingConfiguration", "ShippingAddress", "TaxConfiguration", @@ -62,6 +63,9 @@ class CustomerCreateParams(TypedDict, total=False): an existing identifier in your system. """ + hierarchy: Optional[Hierarchy] + """The hierarchical relationships for this customer.""" + metadata: Optional[Dict[str, Optional[str]]] """User-specified key/value pairs for the resource. @@ -231,6 +235,20 @@ class BillingAddress(TypedDict, total=False): state: Optional[str] +class Hierarchy(TypedDict, total=False): + child_customer_ids: List[str] + """A list of child customer IDs to add to the hierarchy. + + The desired child customers must not already be part of another hierarchy. + """ + + parent_customer_id: Optional[str] + """The ID of the parent customer in the hierarchy. + + The desired parent customer must not be a child of another customer. + """ + + class ReportingConfiguration(TypedDict, total=False): exempt: Required[bool] diff --git a/src/orb/types/customer_update_by_external_id_params.py b/src/orb/types/customer_update_by_external_id_params.py index a4b86160..cb1dfd2d 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -10,6 +10,7 @@ "AccountingSyncConfiguration", "AccountingSyncConfigurationAccountingProvider", "BillingAddress", + "Hierarchy", "ReportingConfiguration", "ShippingAddress", "TaxConfiguration", @@ -55,6 +56,9 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False): subscriptions. """ + hierarchy: Optional[Hierarchy] + """The hierarchical relationships for this customer.""" + metadata: Optional[Dict[str, Optional[str]]] """User-specified key/value pairs for the resource. @@ -224,6 +228,20 @@ class BillingAddress(TypedDict, total=False): state: Optional[str] +class Hierarchy(TypedDict, total=False): + child_customer_ids: List[str] + """A list of child customer IDs to add to the hierarchy. + + The desired child customers must not already be part of another hierarchy. + """ + + parent_customer_id: Optional[str] + """The ID of the parent customer in the hierarchy. + + The desired parent customer must not be a child of another customer. + """ + + class ReportingConfiguration(TypedDict, total=False): exempt: Required[bool] diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index 93e9021e..886737d6 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -10,6 +10,7 @@ "AccountingSyncConfiguration", "AccountingSyncConfigurationAccountingProvider", "BillingAddress", + "Hierarchy", "ReportingConfiguration", "ShippingAddress", "TaxConfiguration", @@ -55,6 +56,9 @@ class CustomerUpdateParams(TypedDict, total=False): subscriptions. """ + hierarchy: Optional[Hierarchy] + """The hierarchical relationships for this customer.""" + metadata: Optional[Dict[str, Optional[str]]] """User-specified key/value pairs for the resource. @@ -224,6 +228,20 @@ class BillingAddress(TypedDict, total=False): state: Optional[str] +class Hierarchy(TypedDict, total=False): + child_customer_ids: List[str] + """A list of child customer IDs to add to the hierarchy. + + The desired child customers must not already be part of another hierarchy. + """ + + parent_customer_id: Optional[str] + """The ID of the parent customer in the hierarchy. + + The desired parent customer must not be a child of another customer. + """ + + class ReportingConfiguration(TypedDict, total=False): exempt: Required[bool] diff --git a/src/orb/types/subscription_create_params.py b/src/orb/types/subscription_create_params.py index f9df6679..ea4807cb 100644 --- a/src/orb/types/subscription_create_params.py +++ b/src/orb/types/subscription_create_params.py @@ -318,6 +318,16 @@ class SubscriptionCreateParams(TypedDict, total=False): provided, the trial on the plan will be skipped. """ + usage_customer_ids: Optional[List[str]] + """ + 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. + """ + class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["percentage_discount"]] diff --git a/src/orb/types/subscription_schedule_plan_change_params.py b/src/orb/types/subscription_schedule_plan_change_params.py index 8fd8776b..4410b50a 100644 --- a/src/orb/types/subscription_schedule_plan_change_params.py +++ b/src/orb/types/subscription_schedule_plan_change_params.py @@ -318,6 +318,16 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False): provided, the trial on the plan will be skipped. """ + usage_customer_ids: Optional[List[str]] + """ + 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. + """ + class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False): adjustment_type: Required[Literal["percentage_discount"]] diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index ff9b5b33..257fbd98 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -56,6 +56,10 @@ def test_method_create_with_all_params(self, client: Orb) -> None: currency="currency", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, payment_provider="quickbooks", payment_provider_id="payment_provider_id", @@ -142,6 +146,10 @@ def test_method_update_with_all_params(self, client: Orb) -> None: email="dev@stainlessapi.com", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, name="name", payment_provider="quickbooks", @@ -460,6 +468,10 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None email="dev@stainlessapi.com", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, name="name", payment_provider="quickbooks", @@ -557,6 +569,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No currency="currency", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, payment_provider="quickbooks", payment_provider_id="payment_provider_id", @@ -643,6 +659,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No email="dev@stainlessapi.com", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, name="name", payment_provider="quickbooks", @@ -973,6 +993,10 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: email="dev@stainlessapi.com", email_delivery=True, external_customer_id="external_customer_id", + hierarchy={ + "child_customer_ids": ["string"], + "parent_customer_id": "parent_customer_id", + }, metadata={"foo": "string"}, name="name", payment_provider="quickbooks", diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index d936b958..8ce86e5a 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -198,6 +198,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: ], start_date=parse_datetime("2019-12-27T18:11:19.117Z"), trial_duration_days=999999, + usage_customer_ids=["string"], ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @@ -859,6 +860,7 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: } ], trial_duration_days=999999, + usage_customer_ids=["string"], ) assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"]) @@ -1338,6 +1340,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No ], start_date=parse_datetime("2019-12-27T18:11:19.117Z"), trial_duration_days=999999, + usage_customer_ids=["string"], ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @@ -1999,6 +2002,7 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A } ], trial_duration_days=999999, + usage_customer_ids=["string"], ) assert_matches_type(SubscriptionSchedulePlanChangeResponse, subscription, path=["response"])