Skip to content
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.6.0"
".": "4.7.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome/metronome-f7e0e0ddfc48af411be9cceb4ff2f2902fd49e10a0e37375e291c2a06a6ddf6d.yml
openapi_spec_hash: 51a0820e0399b218d44af30e9e0cb2da
config_hash: e73a5fed3fb2fc458b2cd21b1e3e7b91
configured_endpoints: 115
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome/metronome-f12f505faf40d5f25d74c0b5a417e2b36c7f3f9621a0e23acd3d6ec4c615443e.yml
openapi_spec_hash: 5c1f13896608a69feebd8855703b76df
config_hash: 6bd82f310398d5d47bcfeb8d7ed150b3
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 4.7.0 (2026-05-29)

Full Changelog: [v4.6.0...v4.7.0](https://github.com/Metronome-Industries/metronome-python/compare/v4.6.0...v4.7.0)

### Features

* [LAUNCH-2814] editContract returns full edit in the response ([918e37c](https://github.com/Metronome-Industries/metronome-python/commit/918e37cf7c332247cbee157cfd027e9fe544b323))
* [orch-1860] remove all deprecated `/payments/*` endpoints from API ([18e35ff](https://github.com/Metronome-Industries/metronome-python/commit/18e35ffc40321d898069710cca6beccc8de0bd8d))
* create contract returns contract data ([d389dd3](https://github.com/Metronome-Industries/metronome-python/commit/d389dd34fb1fba3845e269efc7ba9e51c761840c))
* nikku-orch-1723-update-create-contract ([55828d8](https://github.com/Metronome-Industries/metronome-python/commit/55828d8566c304e7ca8a5333dc45b3611e3c9298))


### Chores

* (internal) Add threshold balance specifier to contract create & edit, package create and both contract and package retrievals ([69b5ffe](https://github.com/Metronome-Industries/metronome-python/commit/69b5ffeeefbfccad8d0ee40d5e0abe8fff254bfc))

## 4.6.0 (2026-05-18)

Full Changelog: [v4.5.0...v4.6.0](https://github.com/Metronome-Industries/metronome-python/compare/v4.5.0...v4.6.0)
Expand Down
14 changes: 0 additions & 14 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,20 +558,6 @@ Methods:
- <code title="post /v1/packages/archive">client.v1.packages.<a href="./src/metronome/resources/v1/packages.py">archive</a>(\*\*<a href="src/metronome/types/v1/package_archive_params.py">params</a>) -> <a href="./src/metronome/types/v1/package_archive_response.py">PackageArchiveResponse</a></code>
- <code title="post /v1/packages/listContractsOnPackage">client.v1.packages.<a href="./src/metronome/resources/v1/packages.py">list_contracts_on_package</a>(\*\*<a href="src/metronome/types/v1/package_list_contracts_on_package_params.py">params</a>) -> <a href="./src/metronome/types/v1/package_list_contracts_on_package_response.py">SyncCursorPage[PackageListContractsOnPackageResponse]</a></code>

## Payments

Types:

```python
from metronome.types.v1 import Payment, PaymentStatus, PaymentAttemptResponse, PaymentCancelResponse
```

Methods:

- <code title="post /v1/payments/list">client.v1.payments.<a href="./src/metronome/resources/v1/payments.py">list</a>(\*\*<a href="src/metronome/types/v1/payment_list_params.py">params</a>) -> <a href="./src/metronome/types/v1/payment.py">SyncBodyCursorPage[Payment]</a></code>
- <code title="post /v1/payments/attempt">client.v1.payments.<a href="./src/metronome/resources/v1/payments.py">attempt</a>(\*\*<a href="src/metronome/types/v1/payment_attempt_params.py">params</a>) -> <a href="./src/metronome/types/v1/payment_attempt_response.py">PaymentAttemptResponse</a></code>
- <code title="post /v1/payments/cancel">client.v1.payments.<a href="./src/metronome/resources/v1/payments.py">cancel</a>(\*\*<a href="src/metronome/types/v1/payment_cancel_params.py">params</a>) -> <a href="./src/metronome/types/v1/payment_cancel_response.py">PaymentCancelResponse</a></code>

## Settings

Types:
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 = "4.6.0"
version = "4.7.0"
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__ = "4.6.0" # x-release-please-version
__version__ = "4.7.0" # x-release-please-version
14 changes: 0 additions & 14 deletions src/metronome/resources/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@
PackagesResourceWithStreamingResponse,
AsyncPackagesResourceWithStreamingResponse,
)
from .payments import (
PaymentsResource,
AsyncPaymentsResource,
PaymentsResourceWithRawResponse,
AsyncPaymentsResourceWithRawResponse,
PaymentsResourceWithStreamingResponse,
AsyncPaymentsResourceWithStreamingResponse,
)
from .services import (
ServicesResource,
AsyncServicesResource,
Expand Down Expand Up @@ -222,12 +214,6 @@
"AsyncPackagesResourceWithRawResponse",
"PackagesResourceWithStreamingResponse",
"AsyncPackagesResourceWithStreamingResponse",
"PaymentsResource",
"AsyncPaymentsResource",
"PaymentsResourceWithRawResponse",
"AsyncPaymentsResourceWithRawResponse",
"PaymentsResourceWithStreamingResponse",
"AsyncPaymentsResourceWithStreamingResponse",
"SettingsResource",
"AsyncSettingsResource",
"SettingsResourceWithRawResponse",
Expand Down
10 changes: 10 additions & 0 deletions src/metronome/resources/v1/contracts/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def create(
scheduled_charges: Iterable[contract_create_params.ScheduledCharge] | Omit = omit,
scheduled_charges_on_usage_invoices: Literal["ALL"] | Omit = omit,
spend_threshold_configuration: SpendThresholdConfiguration | Omit = omit,
spend_trackers: Iterable[contract_create_params.SpendTracker] | Omit = omit,
subscriptions: Iterable[contract_create_params.Subscription] | Omit = omit,
total_contract_value: float | Omit = omit,
transition: contract_create_params.Transition | Omit = omit,
Expand Down Expand Up @@ -335,6 +336,9 @@ def create(
after a Contract has been created. If this field is omitted, charges will appear
on a separate invoice from usage charges.

spend_trackers: Spend trackers to attach to this contract. Aliases must be unique within a
contract.

subscriptions: Optional list of
[subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
to add to the contract.
Expand Down Expand Up @@ -385,6 +389,7 @@ def create(
"scheduled_charges": scheduled_charges,
"scheduled_charges_on_usage_invoices": scheduled_charges_on_usage_invoices,
"spend_threshold_configuration": spend_threshold_configuration,
"spend_trackers": spend_trackers,
"subscriptions": subscriptions,
"total_contract_value": total_contract_value,
"transition": transition,
Expand Down Expand Up @@ -1520,6 +1525,7 @@ async def create(
scheduled_charges: Iterable[contract_create_params.ScheduledCharge] | Omit = omit,
scheduled_charges_on_usage_invoices: Literal["ALL"] | Omit = omit,
spend_threshold_configuration: SpendThresholdConfiguration | Omit = omit,
spend_trackers: Iterable[contract_create_params.SpendTracker] | Omit = omit,
subscriptions: Iterable[contract_create_params.Subscription] | Omit = omit,
total_contract_value: float | Omit = omit,
transition: contract_create_params.Transition | Omit = omit,
Expand Down Expand Up @@ -1702,6 +1708,9 @@ async def create(
after a Contract has been created. If this field is omitted, charges will appear
on a separate invoice from usage charges.

spend_trackers: Spend trackers to attach to this contract. Aliases must be unique within a
contract.

subscriptions: Optional list of
[subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
to add to the contract.
Expand Down Expand Up @@ -1752,6 +1761,7 @@ async def create(
"scheduled_charges": scheduled_charges,
"scheduled_charges_on_usage_invoices": scheduled_charges_on_usage_invoices,
"spend_threshold_configuration": spend_threshold_configuration,
"spend_trackers": spend_trackers,
"subscriptions": subscriptions,
"total_contract_value": total_contract_value,
"transition": transition,
Expand Down
18 changes: 10 additions & 8 deletions src/metronome/resources/v1/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def create(
scheduled_charges: Iterable[package_create_params.ScheduledCharge] | Omit = omit,
scheduled_charges_on_usage_invoices: Literal["ALL"] | Omit = omit,
spend_threshold_configuration: SpendThresholdConfiguration | Omit = omit,
spend_trackers: Iterable[package_create_params.SpendTracker] | Omit = omit,
subscriptions: Iterable[package_create_params.Subscription] | Omit = omit,
uniqueness_key: str | Omit = omit,
usage_statement_schedule: package_create_params.UsageStatementSchedule | Omit = omit,
Expand Down Expand Up @@ -197,6 +198,7 @@ def create(
"scheduled_charges": scheduled_charges,
"scheduled_charges_on_usage_invoices": scheduled_charges_on_usage_invoices,
"spend_threshold_configuration": spend_threshold_configuration,
"spend_trackers": spend_trackers,
"subscriptions": subscriptions,
"uniqueness_key": uniqueness_key,
"usage_statement_schedule": usage_statement_schedule,
Expand Down Expand Up @@ -365,10 +367,9 @@ def list_contracts_on_package(

### **Usage guidelines:**

Use the **`starting_at`**, **`covering_date`**,
and **`include_archived`** parameters to filter the list of returned contracts.
For example, to list only currently active contracts,
pass **`covering_date`** equal to the current time.
Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
parameters to filter the list of returned contracts. For example, to list only
currently active contracts, pass **`covering_date`** equal to the current time.

Args:
limit: Max number of results that should be returned
Expand Down Expand Up @@ -464,6 +465,7 @@ async def create(
scheduled_charges: Iterable[package_create_params.ScheduledCharge] | Omit = omit,
scheduled_charges_on_usage_invoices: Literal["ALL"] | Omit = omit,
spend_threshold_configuration: SpendThresholdConfiguration | Omit = omit,
spend_trackers: Iterable[package_create_params.SpendTracker] | Omit = omit,
subscriptions: Iterable[package_create_params.Subscription] | Omit = omit,
uniqueness_key: str | Omit = omit,
usage_statement_schedule: package_create_params.UsageStatementSchedule | Omit = omit,
Expand Down Expand Up @@ -580,6 +582,7 @@ async def create(
"scheduled_charges": scheduled_charges,
"scheduled_charges_on_usage_invoices": scheduled_charges_on_usage_invoices,
"spend_threshold_configuration": spend_threshold_configuration,
"spend_trackers": spend_trackers,
"subscriptions": subscriptions,
"uniqueness_key": uniqueness_key,
"usage_statement_schedule": usage_statement_schedule,
Expand Down Expand Up @@ -748,10 +751,9 @@ def list_contracts_on_package(

### **Usage guidelines:**

Use the **`starting_at`**, **`covering_date`**,
and **`include_archived`** parameters to filter the list of returned contracts.
For example, to list only currently active contracts,
pass **`covering_date`** equal to the current time.
Use the **`starting_at`**, **`covering_date`**, and **`include_archived`**
parameters to filter the list of returned contracts. For example, to list only
currently active contracts, pass **`covering_date`** equal to the current time.

Args:
limit: Max number of results that should be returned
Expand Down
Loading