diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c76b581c..54d80883 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-beta.6" + ".": "0.1.0-beta.7" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f42f2bcd..4d0848d9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 91 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-b72a02c62483cb264bcf60bb973078212a6a74c8dd93d05ac622ab521528cc89.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-89372fda6ef2fb52d76ca32a7817e04902ef28a0c8dbc304f5a32c9eb8ddc8c4.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index febc332c..74beaaf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.1.0-beta.7 (2025-02-12) + +Full Changelog: [v0.1.0-beta.6...v0.1.0-beta.7](https://github.com/Metronome-Industries/metronome-python/compare/v0.1.0-beta.6...v0.1.0-beta.7) + +### Features + +* **api:** api update ([#188](https://github.com/Metronome-Industries/metronome-python/issues/188)) ([9bc534d](https://github.com/Metronome-Industries/metronome-python/commit/9bc534d337ac28774730efc42b2b2dc775c7d49c)) + + +### Chores + +* **internal:** update client tests ([#190](https://github.com/Metronome-Industries/metronome-python/issues/190)) ([8c5600a](https://github.com/Metronome-Industries/metronome-python/commit/8c5600a4d9847d19629aa02ec61ccddfc7ce6664)) + ## 0.1.0-beta.6 (2025-02-07) Full Changelog: [v0.1.0-beta.5...v0.1.0-beta.6](https://github.com/Metronome-Industries/metronome-python/compare/v0.1.0-beta.5...v0.1.0-beta.6) diff --git a/pyproject.toml b/pyproject.toml index 3dc7628c..e03a8123 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "metronome-sdk" -version = "0.1.0-beta.6" +version = "0.1.0-beta.7" description = "The official Python library for the metronome API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/metronome/_version.py b/src/metronome/_version.py index 028b1298..a7ed9ac4 100644 --- a/src/metronome/_version.py +++ b/src/metronome/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "metronome" -__version__ = "0.1.0-beta.6" # x-release-please-version +__version__ = "0.1.0-beta.7" # x-release-please-version diff --git a/src/metronome/resources/customers/customers.py b/src/metronome/resources/customers/customers.py index db43626a..563e034f 100644 --- a/src/metronome/resources/customers/customers.py +++ b/src/metronome/resources/customers/customers.py @@ -263,7 +263,8 @@ def list( next_page: Cursor that indicates where the next page of results should start. - only_archived: Filter the customer list by only archived customers. + only_archived: Filter the customer list to only return archived customers. By default, only + active customers are returned. salesforce_account_ids: Filter the customer list by salesforce_account_id. Up to 100 ids can be provided. @@ -742,7 +743,8 @@ def list( next_page: Cursor that indicates where the next page of results should start. - only_archived: Filter the customer list by only archived customers. + only_archived: Filter the customer list to only return archived customers. By default, only + active customers are returned. salesforce_account_ids: Filter the customer list by salesforce_account_id. Up to 100 ids can be provided. diff --git a/src/metronome/types/customer_detail.py b/src/metronome/types/customer_detail.py index 65ee33c9..877e0adc 100644 --- a/src/metronome/types/customer_detail.py +++ b/src/metronome/types/customer_detail.py @@ -42,5 +42,11 @@ class CustomerDetail(BaseModel): name: str + archived_at: Optional[datetime] = None + """RFC 3339 timestamp indicating when the customer was archived. + + Null if the customer is active. + """ + current_billable_status: Optional[CurrentBillableStatus] = None """This field's availability is dependent on your client's configuration.""" diff --git a/src/metronome/types/customer_list_params.py b/src/metronome/types/customer_list_params.py index 0dcc61e7..c055c2e7 100644 --- a/src/metronome/types/customer_list_params.py +++ b/src/metronome/types/customer_list_params.py @@ -22,7 +22,10 @@ class CustomerListParams(TypedDict, total=False): """Cursor that indicates where the next page of results should start.""" only_archived: bool - """Filter the customer list by only archived customers.""" + """Filter the customer list to only return archived customers. + + By default, only active customers are returned. + """ salesforce_account_ids: List[str] """Filter the customer list by salesforce_account_id. diff --git a/tests/test_client.py b/tests/test_client.py index 7db25630..2581c545 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,6 +23,7 @@ from metronome import Metronome, AsyncMetronome, APIResponseValidationError from metronome._types import Omit +from metronome._utils import parse_datetime, maybe_transform from metronome._models import BaseModel, FinalRequestOptions from metronome._constants import RAW_RESPONSE_HEADER from metronome._exceptions import APIStatusError, MetronomeError, APITimeoutError, APIResponseValidationError @@ -32,6 +33,7 @@ BaseClient, make_request_options, ) +from metronome.types.contract_create_params import ContractCreateParams from .utils import update_env @@ -747,9 +749,12 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No "/contracts/create", body=cast( object, - dict( - customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", - starting_at="2020-01-01T00:00:00.000Z", + maybe_transform( + dict( + customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", + starting_at=parse_datetime("2020-01-01T00:00:00.000Z"), + ), + ContractCreateParams, ), ), cast_to=httpx.Response, @@ -768,9 +773,12 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non "/contracts/create", body=cast( object, - dict( - customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", - starting_at="2020-01-01T00:00:00.000Z", + maybe_transform( + dict( + customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", + starting_at=parse_datetime("2020-01-01T00:00:00.000Z"), + ), + ContractCreateParams, ), ), cast_to=httpx.Response, @@ -1563,9 +1571,12 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) "/contracts/create", body=cast( object, - dict( - customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", - starting_at="2020-01-01T00:00:00.000Z", + maybe_transform( + dict( + customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", + starting_at=parse_datetime("2020-01-01T00:00:00.000Z"), + ), + ContractCreateParams, ), ), cast_to=httpx.Response, @@ -1584,9 +1595,12 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) "/contracts/create", body=cast( object, - dict( - customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", - starting_at="2020-01-01T00:00:00.000Z", + maybe_transform( + dict( + customer_id="13117714-3f05-48e5-a6e9-a66093f13b4d", + starting_at=parse_datetime("2020-01-01T00:00:00.000Z"), + ), + ContractCreateParams, ), ), cast_to=httpx.Response,