Skip to content

Commit 33ae2c0

Browse files
feat(api): api update
1 parent b4bb163 commit 33ae2c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+968
-183
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cc3ad3383dd73a4bf35b91b19baf855439ec29635ee500163e0bd972faef7bea.yml
3-
openapi_spec_hash: 671698714962b7a17f2f1fc308ad9434
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-828c91953d2351040fdd4d90a3d9eafd09f9d240c4f6ce0441b7a10c06c1c722.yml
3+
openapi_spec_hash: c82bc88563f80f600e59e22014d4cec4
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ from orb.types import (
127127
TierSubLineItem,
128128
TieredConfig,
129129
TieredConversionRateConfig,
130-
TransformPriceFilter,
131130
TrialDiscount,
132131
UnitConfig,
133132
UnitConversionRateConfig,

src/orb/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
NewFloatingBulkPrice as NewFloatingBulkPrice,
6363
NewFloatingUnitPrice as NewFloatingUnitPrice,
6464
SubscriptionMinified as SubscriptionMinified,
65-
TransformPriceFilter as TransformPriceFilter,
6665
NewPercentageDiscount as NewPercentageDiscount,
6766
SubscriptionTrialInfo as SubscriptionTrialInfo,
6867
UsageDiscountInterval as UsageDiscountInterval,

src/orb/types/beta/external_plan_id_create_plan_version_params.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,13 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal
542542
unit_rating_key: Required[str]
543543
"""The key in the event data to extract the unit rate from."""
544544

545+
default_unit_rate: Optional[str]
546+
"""
547+
If provided, this amount will be used as the unit rate when an event does not
548+
have a value for the `unit_rating_key`. If not provided, events missing a unit
549+
rate will be ignored.
550+
"""
551+
545552
grouping_key: Optional[str]
546553
"""An optional key in the event data to group by (e.g., event ID).
547554
@@ -1121,6 +1128,13 @@ class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total
11211128
unit_rating_key: Required[str]
11221129
"""The key in the event data to extract the unit rate from."""
11231130

1131+
default_unit_rate: Optional[str]
1132+
"""
1133+
If provided, this amount will be used as the unit rate when an event does not
1134+
have a value for the `unit_rating_key`. If not provided, events missing a unit
1135+
rate will be ignored.
1136+
"""
1137+
11241138
grouping_key: Optional[str]
11251139
"""An optional key in the event data to group by (e.g., event ID).
11261140

src/orb/types/beta_create_plan_version_params.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,13 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal
542542
unit_rating_key: Required[str]
543543
"""The key in the event data to extract the unit rate from."""
544544

545+
default_unit_rate: Optional[str]
546+
"""
547+
If provided, this amount will be used as the unit rate when an event does not
548+
have a value for the `unit_rating_key`. If not provided, events missing a unit
549+
rate will be ignored.
550+
"""
551+
545552
grouping_key: Optional[str]
546553
"""An optional key in the event data to group by (e.g., event ID).
547554
@@ -1121,6 +1128,13 @@ class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total
11211128
unit_rating_key: Required[str]
11221129
"""The key in the event data to extract the unit rate from."""
11231130

1131+
default_unit_rate: Optional[str]
1132+
"""
1133+
If provided, this amount will be used as the unit rate when an event does not
1134+
have a value for the `unit_rating_key`. If not provided, events missing a unit
1135+
rate will be ignored.
1136+
"""
1137+
11241138
grouping_key: Optional[str]
11251139
"""An optional key in the event data to group by (e.g., event ID).
11261140
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from ...._models import BaseModel
78

8-
__all__ = ["AffectedBlock"]
9+
__all__ = ["AffectedBlock", "BlockFilter"]
10+
11+
12+
class BlockFilter(BaseModel):
13+
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
14+
"""The property of the price to filter on."""
15+
16+
operator: Literal["includes", "excludes"]
17+
"""Should prices that match the filter be included or excluded."""
18+
19+
values: List[str]
20+
"""The IDs or values that match this filter."""
921

1022

1123
class AffectedBlock(BaseModel):
1224
id: str
1325

26+
block_filters: Optional[List[BlockFilter]] = None
27+
1428
expiry_date: Optional[datetime] = None
1529

1630
per_unit_cost_basis: Optional[str] = None

src/orb/types/plan_create_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ class PricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False)
535535
unit_rating_key: Required[str]
536536
"""The key in the event data to extract the unit rate from."""
537537

538+
default_unit_rate: Optional[str]
539+
"""
540+
If provided, this amount will be used as the unit rate when an event does not
541+
have a value for the `unit_rating_key`. If not provided, events missing a unit
542+
rate will be ignored.
543+
"""
544+
538545
grouping_key: Optional[str]
539546
"""An optional key in the event data to group by (e.g., event ID).
540547

src/orb/types/price_create_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,6 +2862,13 @@ class NewFloatingEventOutputPriceEventOutputConfig(TypedDict, total=False):
28622862
unit_rating_key: Required[str]
28632863
"""The key in the event data to extract the unit rate from."""
28642864

2865+
default_unit_rate: Optional[str]
2866+
"""
2867+
If provided, this amount will be used as the unit rate when an event does not
2868+
have a value for the `unit_rating_key`. If not provided, events missing a unit
2869+
rate will be ignored.
2870+
"""
2871+
28652872
grouping_key: Optional[str]
28662873
"""An optional key in the event data to group by (e.g., event ID).
28672874

src/orb/types/price_evaluate_multiple_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ class PriceEvaluationPriceNewFloatingEventOutputPriceEventOutputConfig(TypedDict
365365
unit_rating_key: Required[str]
366366
"""The key in the event data to extract the unit rate from."""
367367

368+
default_unit_rate: Optional[str]
369+
"""
370+
If provided, this amount will be used as the unit rate when an event does not
371+
have a value for the `unit_rating_key`. If not provided, events missing a unit
372+
rate will be ignored.
373+
"""
374+
368375
grouping_key: Optional[str]
369376
"""An optional key in the event data to group by (e.g., event ID).
370377

src/orb/types/price_evaluate_preview_events_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ class PriceEvaluationPriceNewFloatingEventOutputPriceEventOutputConfig(TypedDict
397397
unit_rating_key: Required[str]
398398
"""The key in the event data to extract the unit rate from."""
399399

400+
default_unit_rate: Optional[str]
401+
"""
402+
If provided, this amount will be used as the unit rate when an event does not
403+
have a value for the `unit_rating_key`. If not provided, events missing a unit
404+
rate will be ignored.
405+
"""
406+
400407
grouping_key: Optional[str]
401408
"""An optional key in the event data to group by (e.g., event ID).
402409

0 commit comments

Comments
 (0)