Skip to content

Commit 4e8a240

Browse files
feat(api): api update
1 parent 46147bc commit 4e8a240

18 files changed

+1553
-14
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: 115
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-baf431485e9392b6fbff7c2f4d53d0dc3d1e49e2bec417501c924231c95dc09d.yml
3-
openapi_spec_hash: f80f4798ac7266ef21a9c069ccfef259
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-fee4c7438579fd72ae7c08ad11cc502da279ad3cccfe2235b18afcacc91ad0d9.yml
3+
openapi_spec_hash: dc9d553a388715ba22d873aee54a3ed1
44
config_hash: 1e2186b09e57d7d27b6ab5c8e6410b31

src/orb/types/beta/external_plan_id_create_plan_version_params.py

Lines changed: 270 additions & 0 deletions
Large diffs are not rendered by default.

src/orb/types/beta_create_plan_version_params.py

Lines changed: 270 additions & 0 deletions
Large diffs are not rendered by default.

src/orb/types/shared/amount_discount.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55

66
from ..._models import BaseModel
77

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

1021

1122
class AmountDiscount(BaseModel):
@@ -20,4 +31,7 @@ class AmountDiscount(BaseModel):
2031
For plan/plan phase discounts, this can be a subset of prices.
2132
"""
2233

34+
filters: Optional[List[Filter]] = None
35+
"""The filters that determine which prices to apply this discount to."""
36+
2337
reason: Optional[str] = None

src/orb/types/shared/percentage_discount.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55

66
from ..._models import BaseModel
77

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

1021

1122
class PercentageDiscount(BaseModel):
@@ -23,4 +34,7 @@ class PercentageDiscount(BaseModel):
2334
For plan/plan phase discounts, this can be a subset of prices.
2435
"""
2536

37+
filters: Optional[List[Filter]] = None
38+
"""The filters that determine which prices to apply this discount to."""
39+
2640
reason: Optional[str] = None

src/orb/types/shared/trial_discount.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55

66
from ..._models import BaseModel
77

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

1021

1122
class TrialDiscount(BaseModel):
@@ -17,6 +28,9 @@ class TrialDiscount(BaseModel):
1728
For plan/plan phase discounts, this can be a subset of prices.
1829
"""
1930

31+
filters: Optional[List[Filter]] = None
32+
"""The filters that determine which prices to apply this discount to."""
33+
2034
reason: Optional[str] = None
2135

2236
trial_amount_discount: Optional[str] = None

src/orb/types/shared/usage_discount.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,18 @@
55

66
from ..._models import BaseModel
77

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

1021

1122
class UsageDiscount(BaseModel):
@@ -23,4 +34,7 @@ class UsageDiscount(BaseModel):
2334
For plan/plan phase discounts, this can be a subset of prices.
2435
"""
2536

37+
filters: Optional[List[Filter]] = None
38+
"""The filters that determine which prices to apply this discount to."""
39+
2640
reason: Optional[str] = None

src/orb/types/shared_params/amount_discount.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import List, Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

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

1021

1122
class AmountDiscount(TypedDict, total=False):
@@ -20,4 +31,7 @@ class AmountDiscount(TypedDict, total=False):
2031
For plan/plan phase discounts, this can be a subset of prices.
2132
"""
2233

34+
filters: Optional[Iterable[Filter]]
35+
"""The filters that determine which prices to apply this discount to."""
36+
2337
reason: Optional[str]

src/orb/types/shared_params/percentage_discount.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import List, Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

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

1021

1122
class PercentageDiscount(TypedDict, total=False):
@@ -23,4 +34,7 @@ class PercentageDiscount(TypedDict, total=False):
2334
For plan/plan phase discounts, this can be a subset of prices.
2435
"""
2536

37+
filters: Optional[Iterable[Filter]]
38+
"""The filters that determine which prices to apply this discount to."""
39+
2640
reason: Optional[str]

src/orb/types/shared_params/trial_discount.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import List, Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

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

1021

1122
class TrialDiscount(TypedDict, total=False):
@@ -17,6 +28,9 @@ class TrialDiscount(TypedDict, total=False):
1728
For plan/plan phase discounts, this can be a subset of prices.
1829
"""
1930

31+
filters: Optional[Iterable[Filter]]
32+
"""The filters that determine which prices to apply this discount to."""
33+
2034
reason: Optional[str]
2135

2236
trial_amount_discount: Optional[str]

0 commit comments

Comments
 (0)