Skip to content

Commit 0ea58b5

Browse files
feat(api): api update (#559)
1 parent 5df04a9 commit 0ea58b5

15 files changed

+152
-5
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7b65f996788617c2d2f2e8e941d366edd1a2844f15eefec555e220b03bbc6d4c.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4f03b16daf0bae33be634c959dafb0e21b0bcb156beb162f8235394dca88e7c.yml

src/orb/resources/customers/credits/top_ups.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def delete(
206206
idempotency_key: str | None = None,
207207
) -> None:
208208
"""
209-
Delete top-up
209+
This deactivates the top-up and voids any invoices associated with pending
210+
credit blocks purchased through the top-up.
210211
211212
Args:
212213
extra_headers: Send extra headers
@@ -339,7 +340,8 @@ def delete_by_external_id(
339340
idempotency_key: str | None = None,
340341
) -> None:
341342
"""
342-
Delete top-up by external ID
343+
This deactivates the top-up and voids any invoices associated with pending
344+
credit blocks purchased through the top-up.
343345
344346
Args:
345347
extra_headers: Send extra headers
@@ -599,7 +601,8 @@ async def delete(
599601
idempotency_key: str | None = None,
600602
) -> None:
601603
"""
602-
Delete top-up
604+
This deactivates the top-up and voids any invoices associated with pending
605+
credit blocks purchased through the top-up.
603606
604607
Args:
605608
extra_headers: Send extra headers
@@ -732,7 +735,8 @@ async def delete_by_external_id(
732735
idempotency_key: str | None = None,
733736
) -> None:
734737
"""
735-
Delete top-up by external ID
738+
This deactivates the top-up and voids any invoices associated with pending
739+
credit blocks purchased through the top-up.
736740
737741
Args:
738742
extra_headers: Send extra headers

src/orb/types/subscription.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_cancel_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_create_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_price_intervals_params.py

+36
Original file line numberDiff line numberDiff line change
@@ -2666,6 +2666,14 @@ class Add(TypedDict, total=False):
26662666
external_price_id: Optional[str]
26672667
"""The external price id of the price to add to the subscription."""
26682668

2669+
filter: Optional[str]
2670+
"""An additional filter to apply to usage queries.
2671+
2672+
This filter must be expressed as a boolean
2673+
[computed property](/extensibility/advanced-metrics#computed-properties). If
2674+
null, usage queries will not include any additional filter.
2675+
"""
2676+
26692677
fixed_fee_quantity_transitions: Optional[Iterable[AddFixedFeeQuantityTransition]]
26702678
"""A list of fixed fee quantity transitions to initialize on the price interval."""
26712679

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

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

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

2842+
filter: Optional[str]
2843+
"""An additional filter to apply to usage queries.
2844+
2845+
This filter must be expressed as a boolean
2846+
[computed property](/extensibility/advanced-metrics#computed-properties). If
2847+
null, usage queries will not include any additional filter.
2848+
"""
2849+
28242850
fixed_fee_quantity_transitions: Optional[Iterable[EditFixedFeeQuantityTransition]]
28252851
"""A list of fixed fee quantity transitions to use for this price interval.
28262852
@@ -2834,6 +2860,16 @@ class Edit(TypedDict, total=False):
28342860
If not specified, the start date will not be updated.
28352861
"""
28362862

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

28382874
class EditAdjustment(TypedDict, total=False):
28392875
adjustment_interval_id: Required[str]

src/orb/types/subscription_price_intervals_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_schedule_plan_change_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_trigger_phase_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_unschedule_cancellation_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_unschedule_fixed_fee_quantity_updates_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_unschedule_pending_plan_changes_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_update_fixed_fee_quantity_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

src/orb/types/subscription_update_trial_response.py

+9
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ class PriceInterval(BaseModel):
381381
This is the date that Orb stops billing for this price.
382382
"""
383383

384+
filter: Optional[str] = None
385+
"""An additional filter to apply to usage queries."""
386+
384387
fixed_fee_quantity_transitions: Optional[List[PriceIntervalFixedFeeQuantityTransition]] = None
385388
"""The fixed fee quantity transitions for this price interval.
386389
@@ -407,6 +410,12 @@ class PriceInterval(BaseModel):
407410
This is the date that Orb starts billing for this price.
408411
"""
409412

413+
usage_customer_ids: Optional[List[str]] = None
414+
"""
415+
A list of customer IDs whose usage events will be aggregated and billed under
416+
this price interval.
417+
"""
418+
410419

411420
class RedeemedCoupon(BaseModel):
412421
coupon_id: str

0 commit comments

Comments
 (0)