Skip to content
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

release: 0.1.0-beta.7 #189

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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 @@
{
".": "0.1.0-beta.6"
".": "0.1.0-beta.7"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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 = "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"
Expand Down
2 changes: 1 addition & 1 deletion src/metronome/_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__ = "metronome"
__version__ = "0.1.0-beta.6" # x-release-please-version
__version__ = "0.1.0-beta.7" # x-release-please-version
6 changes: 4 additions & 2 deletions src/metronome/resources/customers/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions src/metronome/types/customer_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
5 changes: 4 additions & 1 deletion src/metronome/types/customer_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
38 changes: 26 additions & 12 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,7 @@
BaseClient,
make_request_options,
)
from metronome.types.contract_create_params import ContractCreateParams

from .utils import update_env

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down