diff --git a/.gitignore b/.gitignore index 87797408..95ceb189 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .prism.log -.vscode _dev __pycache__ diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7c37fb19..6b467676 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.8.1" + ".": "4.9.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 5a4c2212..82cec55f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-a44cccd16bb58080f7cc0669999403f6ed3f77287fad901caa6fd2523f2fbafd.yml -openapi_spec_hash: af6444648d0b2a70b7f7ad234bd37541 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-1aabbd8715a871e993abf67f0bf9c1d6793b4f197c4b2f11fc7a76453590cd6c.yml +openapi_spec_hash: 3e5878f87e74881d882a69e1ccdc25a3 config_hash: 1f535c1fa222aacf28b636eed21bec72 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..5b010307 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.analysis.importFormat": "relative", +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6643d58e..a006795c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.9.0 (2025-07-24) + +Full Changelog: [v4.8.1...v4.9.0](https://github.com/orbcorp/orb-python/compare/v4.8.1...v4.9.0) + +### Features + +* **api:** api update ([8eb1072](https://github.com/orbcorp/orb-python/commit/8eb107295f3e00437f5143d790884a35252639c0)) + + +### Chores + +* **project:** add settings file for vscode ([b95d016](https://github.com/orbcorp/orb-python/commit/b95d01634114df214eb92cdade208dcd3333b905)) + ## 4.8.1 (2025-07-22) Full Changelog: [v4.8.0...v4.8.1](https://github.com/orbcorp/orb-python/compare/v4.8.0...v4.8.1) diff --git a/pyproject.toml b/pyproject.toml index 5c32f4a2..fdddfb2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.8.1" +version = "4.9.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 a6ab00ac..f9296999 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__ = "4.8.1" # x-release-please-version +__version__ = "4.9.0" # x-release-please-version diff --git a/src/orb/resources/customers/costs.py b/src/orb/resources/customers/costs.py index d18f7991..6798a487 100644 --- a/src/orb/resources/customers/costs.py +++ b/src/orb/resources/customers/costs.py @@ -177,7 +177,7 @@ def list( `grouping_value` and `secondary_grouping_value` available. Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. @@ -353,7 +353,7 @@ def list_by_external_id( `grouping_value` and `secondary_grouping_value` available. Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. @@ -552,7 +552,7 @@ async def list( `grouping_value` and `secondary_grouping_value` available. Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. @@ -728,7 +728,7 @@ async def list_by_external_id( `grouping_value` and `secondary_grouping_value` available. Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index f51a8c03..9fe23085 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -371,8 +371,11 @@ def update( email: A valid customer email, to be used for invoicing and notifications. - external_customer_id: The external customer ID. This can only be set if empty and the customer has no - past or current subscriptions. + external_customer_id: The external customer ID. This can only be set if the customer has no existing + external customer ID. Since this action may change usage quantities for all + existing subscriptions, it is disallowed if the customer has issued invoices + with usage line items and subject to the same restrictions as backdated + subscription creation. hierarchy: The hierarchical relationships for this customer. @@ -880,8 +883,11 @@ def update_by_external_id( email: A valid customer email, to be used for invoicing and notifications. - external_customer_id: The external customer ID. This can only be set if empty and the customer has no - past or current subscriptions. + external_customer_id: The external customer ID. This can only be set if the customer has no existing + external customer ID. Since this action may change usage quantities for all + existing subscriptions, it is disallowed if the customer has issued invoices + with usage line items and subject to the same restrictions as backdated + subscription creation. hierarchy: The hierarchical relationships for this customer. @@ -1370,8 +1376,11 @@ async def update( email: A valid customer email, to be used for invoicing and notifications. - external_customer_id: The external customer ID. This can only be set if empty and the customer has no - past or current subscriptions. + external_customer_id: The external customer ID. This can only be set if the customer has no existing + external customer ID. Since this action may change usage quantities for all + existing subscriptions, it is disallowed if the customer has issued invoices + with usage line items and subject to the same restrictions as backdated + subscription creation. hierarchy: The hierarchical relationships for this customer. @@ -1879,8 +1888,11 @@ async def update_by_external_id( email: A valid customer email, to be used for invoicing and notifications. - external_customer_id: The external customer ID. This can only be set if empty and the customer has no - past or current subscriptions. + external_customer_id: The external customer ID. This can only be set if the customer has no existing + external customer ID. Since this action may change usage quantities for all + existing subscriptions, it is disallowed if the customer has issued invoices + with usage line items and subject to the same restrictions as backdated + subscription creation. hierarchy: The hierarchical relationships for this customer. diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py index 24d87c55..ed47e86d 100644 --- a/src/orb/resources/invoices.py +++ b/src/orb/resources/invoices.py @@ -155,13 +155,13 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Invoice: - """This endpoint allows you to update the `metadata` property on an invoice. - - If you - pass null for the metadata value, it will clear any existing metadata for that - invoice. + """ + This endpoint allows you to update the `metadata`, `net_terms`, and `due_date` + properties on an invoice. If you pass null for the metadata value, it will clear + any existing metadata for that invoice. - `metadata` can be modified regardless of invoice state. + `metadata` can be modified regardless of invoice state. `net_terms` and + `due_date` can only be modified if the invoice is in a `draft` state. Args: metadata: User-specified key/value pairs for the resource. Individual keys can be removed @@ -695,13 +695,13 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Invoice: - """This endpoint allows you to update the `metadata` property on an invoice. - - If you - pass null for the metadata value, it will clear any existing metadata for that - invoice. + """ + This endpoint allows you to update the `metadata`, `net_terms`, and `due_date` + properties on an invoice. If you pass null for the metadata value, it will clear + any existing metadata for that invoice. - `metadata` can be modified regardless of invoice state. + `metadata` can be modified regardless of invoice state. `net_terms` and + `due_date` can only be modified if the invoice is in a `draft` state. Args: metadata: User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 3e8788fc..64212514 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -833,7 +833,7 @@ def fetch_costs( same day). Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. @@ -2919,7 +2919,7 @@ async def fetch_costs( same day). Args: - currency: The currency to use. + currency: The currency or custom pricing unit to use. timeframe_end: Costs returned are exclusive of `timeframe_end`. 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 6a12edd0..07fdc36b 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -49,8 +49,10 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False): external_customer_id: Optional[str] """The external customer ID. - This can only be set if empty and the customer has no past or current - subscriptions. + This can only be set if the customer has no existing external customer ID. Since + this action may change usage quantities for all existing subscriptions, it is + disallowed if the customer has issued invoices with usage line items and subject + to the same restrictions as backdated subscription creation. """ hierarchy: Optional[CustomerHierarchyConfigParam] diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index 6d041950..fd8a7777 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -49,8 +49,10 @@ class CustomerUpdateParams(TypedDict, total=False): external_customer_id: Optional[str] """The external customer ID. - This can only be set if empty and the customer has no past or current - subscriptions. + This can only be set if the customer has no existing external customer ID. Since + this action may change usage quantities for all existing subscriptions, it is + disallowed if the customer has issued invoices with usage line items and subject + to the same restrictions as backdated subscription creation. """ hierarchy: Optional[CustomerHierarchyConfigParam] diff --git a/src/orb/types/customers/cost_list_by_external_id_params.py b/src/orb/types/customers/cost_list_by_external_id_params.py index 2cba8e61..dad37e47 100644 --- a/src/orb/types/customers/cost_list_by_external_id_params.py +++ b/src/orb/types/customers/cost_list_by_external_id_params.py @@ -13,7 +13,7 @@ class CostListByExternalIDParams(TypedDict, total=False): currency: Optional[str] - """The currency to use.""" + """The currency or custom pricing unit to use.""" timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`.""" diff --git a/src/orb/types/customers/cost_list_params.py b/src/orb/types/customers/cost_list_params.py index 3900ec20..741fd8d9 100644 --- a/src/orb/types/customers/cost_list_params.py +++ b/src/orb/types/customers/cost_list_params.py @@ -13,7 +13,7 @@ class CostListParams(TypedDict, total=False): currency: Optional[str] - """The currency to use.""" + """The currency or custom pricing unit to use.""" timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`.""" diff --git a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py index 16d77a78..84291198 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py +++ b/src/orb/types/customers/credits/ledger_create_entry_by_external_id_params.py @@ -81,7 +81,7 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total saved payment method. """ - net_terms: Required[int] + net_terms: Required[Optional[int]] """ The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this diff --git a/src/orb/types/customers/credits/ledger_create_entry_params.py b/src/orb/types/customers/credits/ledger_create_entry_params.py index a8c9ce9d..ac7a6a85 100644 --- a/src/orb/types/customers/credits/ledger_create_entry_params.py +++ b/src/orb/types/customers/credits/ledger_create_entry_params.py @@ -81,7 +81,7 @@ class AddIncrementCreditLedgerEntryRequestParamsInvoiceSettings(TypedDict, total saved payment method. """ - net_terms: Required[int] + net_terms: Required[Optional[int]] """ The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this diff --git a/src/orb/types/subscription_fetch_costs_params.py b/src/orb/types/subscription_fetch_costs_params.py index e5941c1a..38266115 100644 --- a/src/orb/types/subscription_fetch_costs_params.py +++ b/src/orb/types/subscription_fetch_costs_params.py @@ -13,7 +13,7 @@ class SubscriptionFetchCostsParams(TypedDict, total=False): currency: Optional[str] - """The currency to use.""" + """The currency or custom pricing unit to use.""" timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`."""