Skip to content

Commit

Permalink
feat(api): api update (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 17, 2025
1 parent 0ad8741 commit 3a868c4
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 2 deletions.
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-5c7eb8f47c24e6522b060438a97933610aa731304d6aa26566f9fcbafe238db6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-276d7a875fe62eee63161903d2073612870df766a4701f800a5360e3b95087b4.yml
10 changes: 10 additions & 0 deletions src/metronome/resources/custom_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def add_key(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -128,6 +129,7 @@ def delete_values(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -189,6 +191,7 @@ def list_keys(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -250,6 +253,7 @@ def remove_key(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -308,6 +312,7 @@ def set_values(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -395,6 +400,7 @@ async def add_key(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -455,6 +461,7 @@ async def delete_values(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -516,6 +523,7 @@ async def list_keys(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -579,6 +587,7 @@ async def remove_key(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down Expand Up @@ -637,6 +646,7 @@ async def set_values(
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
2 changes: 2 additions & 0 deletions src/metronome/types/contract_amend_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ class Discount(TypedDict, total=False):
schedule: Required[DiscountSchedule]
"""Must provide either schedule_items or recurring_schedule."""

custom_fields: Dict[str, str]

name: str
"""displayed on invoices"""

Expand Down
2 changes: 2 additions & 0 deletions src/metronome/types/contract_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ class Discount(TypedDict, total=False):
schedule: Required[DiscountSchedule]
"""Must provide either schedule_items or recurring_schedule."""

custom_fields: Dict[str, str]

name: str
"""displayed on invoices"""

Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_add_key_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CustomFieldAddKeyParams(TypedDict, total=False):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_delete_values_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CustomFieldDeleteValuesParams(TypedDict, total=False):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_list_keys_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CustomFieldListKeysParams(TypedDict, total=False):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_list_keys_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Data(BaseModel):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_remove_key_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class CustomFieldRemoveKeyParams(TypedDict, total=False):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
1 change: 1 addition & 0 deletions src/metronome/types/custom_field_set_values_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CustomFieldSetValuesParams(TypedDict, total=False):
"credit_grant",
"customer_plan",
"customer",
"discount",
"invoice",
"plan",
"professional_service",
Expand Down
4 changes: 3 additions & 1 deletion src/metronome/types/shared/discount.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing import Dict, Optional

from ..._models import BaseModel
from .schedule_point_in_time import SchedulePointInTime
Expand All @@ -21,6 +21,8 @@ class Discount(BaseModel):

schedule: SchedulePointInTime

custom_fields: Optional[Dict[str, str]] = None

name: Optional[str] = None

netsuite_sales_order_id: Optional[str] = None
Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def test_method_create_with_all_params(self, client: Metronome) -> None:
}
],
},
"custom_fields": {"foo": "string"},
"name": "x",
"netsuite_sales_order_id": "netsuite_sales_order_id",
}
Expand Down Expand Up @@ -555,6 +556,7 @@ def test_method_amend_with_all_params(self, client: Metronome) -> None:
}
],
},
"custom_fields": {"foo": "string"},
"name": "x",
"netsuite_sales_order_id": "netsuite_sales_order_id",
}
Expand Down Expand Up @@ -1183,6 +1185,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMetronome)
}
],
},
"custom_fields": {"foo": "string"},
"name": "x",
"netsuite_sales_order_id": "netsuite_sales_order_id",
}
Expand Down Expand Up @@ -1597,6 +1600,7 @@ async def test_method_amend_with_all_params(self, async_client: AsyncMetronome)
}
],
},
"custom_fields": {"foo": "string"},
"name": "x",
"netsuite_sales_order_id": "netsuite_sales_order_id",
}
Expand Down

0 comments on commit 3a868c4

Please sign in to comment.