Skip to content

feat(api): api update #559

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

Merged
merged 1 commit into from
Feb 27, 2025
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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7b65f996788617c2d2f2e8e941d366edd1a2844f15eefec555e220b03bbc6d4c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4f03b16daf0bae33be634c959dafb0e21b0bcb156beb162f8235394dca88e7c.yml
12 changes: 8 additions & 4 deletions src/orb/resources/customers/credits/top_ups.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ def delete(
idempotency_key: str | None = None,
) -> None:
"""
Delete top-up
This deactivates the top-up and voids any invoices associated with pending
credit blocks purchased through the top-up.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -339,7 +340,8 @@ def delete_by_external_id(
idempotency_key: str | None = None,
) -> None:
"""
Delete top-up by external ID
This deactivates the top-up and voids any invoices associated with pending
credit blocks purchased through the top-up.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -599,7 +601,8 @@ async def delete(
idempotency_key: str | None = None,
) -> None:
"""
Delete top-up
This deactivates the top-up and voids any invoices associated with pending
credit blocks purchased through the top-up.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -732,7 +735,8 @@ async def delete_by_external_id(
idempotency_key: str | None = None,
) -> None:
"""
Delete top-up by external ID
This deactivates the top-up and voids any invoices associated with pending
credit blocks purchased through the top-up.

Args:
extra_headers: Send extra headers
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_cancel_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
36 changes: 36 additions & 0 deletions src/orb/types/subscription_price_intervals_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2666,6 +2666,14 @@ class Add(TypedDict, total=False):
external_price_id: Optional[str]
"""The external price id of the price to add to the subscription."""

filter: Optional[str]
"""An additional filter to apply to usage queries.

This filter must be expressed as a boolean
[computed property](/extensibility/advanced-metrics#computed-properties). If
null, usage queries will not include any additional filter.
"""

fixed_fee_quantity_transitions: Optional[Iterable[AddFixedFeeQuantityTransition]]
"""A list of fixed fee quantity transitions to initialize on the price interval."""

Expand All @@ -2687,6 +2695,16 @@ class Add(TypedDict, total=False):
price_id: Optional[str]
"""The id of the price to add to the subscription."""

usage_customer_ids: Optional[List[str]]
"""
A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.
"""


class AddAdjustmentAdjustmentNewPercentageDiscount(TypedDict, total=False):
adjustment_type: Required[Literal["percentage_discount"]]
Expand Down Expand Up @@ -2821,6 +2839,14 @@ class Edit(TypedDict, total=False):
If not specified, the start date will not be updated.
"""

filter: Optional[str]
"""An additional filter to apply to usage queries.

This filter must be expressed as a boolean
[computed property](/extensibility/advanced-metrics#computed-properties). If
null, usage queries will not include any additional filter.
"""

fixed_fee_quantity_transitions: Optional[Iterable[EditFixedFeeQuantityTransition]]
"""A list of fixed fee quantity transitions to use for this price interval.

Expand All @@ -2834,6 +2860,16 @@ class Edit(TypedDict, total=False):
If not specified, the start date will not be updated.
"""

usage_customer_ids: Optional[List[str]]
"""
A list of customer IDs whose usage events will be aggregated and billed under
this subscription. By default, a subscription only considers usage events
associated with its attached customer's customer_id. When usage_customer_ids is
provided, the subscription includes usage events from the specified customers
only. Provided usage_customer_ids must be either the customer for this
subscription itself, or any of that customer's children.
"""


class EditAdjustment(TypedDict, total=False):
adjustment_interval_id: Required[str]
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_price_intervals_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_schedule_plan_change_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_trigger_phase_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
9 changes: 9 additions & 0 deletions src/orb/types/subscription_update_trial_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
This is the date that Orb stops billing for this price.
"""

filter: Optional[str] = None
"""An additional filter to apply to usage queries."""

fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
"""The fixed fee quantity transitions for this price interval.

Expand All @@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
This is the date that Orb starts billing for this price.
"""

usage_customer_ids: Optional[List[str]] = None
"""
A list of customer IDs whose usage events will be aggregated and billed under
this price interval.
"""


class RedeemedCoupon(BaseModel):
coupon_id: str
Expand Down
Loading