Skip to content

Commit 83d3429

Browse files
stainless-app[bot]Stainless Bot
authored and
Stainless Bot
committed
feat(api): OpenAPI spec update via Stainless API (#369)
1 parent 5899921 commit 83d3429

File tree

3 files changed

+241
-1
lines changed

3 files changed

+241
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 93
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-43ca3ef2601cc2b4dc4c5cfe217ed0b3e9a8fda04c3cd777ce8431427c5eb45a.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-15ce5857138c8d5d61dfcfca1b028427d9501531fa5fc8ac36a84b6fdb648783.yml

src/orb/types/subscription_create_params.py

+120
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
"PriceOverrideOverridePackageWithAllocationPriceDiscount",
5252
"PriceOverrideOverrideUnitWithPercentPrice",
5353
"PriceOverrideOverrideUnitWithPercentPriceDiscount",
54+
"PriceOverrideOverrideGroupedAllocationPrice",
55+
"PriceOverrideOverrideGroupedAllocationPriceDiscount",
56+
"PriceOverrideOverrideBulkWithProrationPrice",
57+
"PriceOverrideOverrideBulkWithProrationPriceDiscount",
5458
]
5559

5660

@@ -995,6 +999,120 @@ class PriceOverrideOverrideUnitWithPercentPrice(TypedDict, total=False):
995999
"""The subscription's override minimum amount for the plan."""
9961000

9971001

1002+
class PriceOverrideOverrideGroupedAllocationPriceDiscount(TypedDict, total=False):
1003+
discount_type: Required[Literal["percentage", "trial", "usage", "amount"]]
1004+
1005+
amount_discount: Optional[str]
1006+
"""Only available if discount_type is `amount`."""
1007+
1008+
applies_to_price_ids: Optional[List[str]]
1009+
"""List of price_ids that this discount applies to.
1010+
1011+
For plan/plan phase discounts, this can be a subset of prices.
1012+
"""
1013+
1014+
percentage_discount: Optional[float]
1015+
"""Only available if discount_type is `percentage`.
1016+
1017+
This is a number between 0 and 1.
1018+
"""
1019+
1020+
trial_amount_discount: Optional[str]
1021+
"""Only available if discount_type is `trial`"""
1022+
1023+
usage_discount: Optional[float]
1024+
"""Only available if discount_type is `usage`.
1025+
1026+
Number of usage units that this discount is for
1027+
"""
1028+
1029+
1030+
class PriceOverrideOverrideGroupedAllocationPrice(TypedDict, total=False):
1031+
id: Required[str]
1032+
1033+
grouped_allocation_config: Required[Dict[str, object]]
1034+
1035+
model_type: Required[Literal["grouped_allocation"]]
1036+
1037+
conversion_rate: Optional[float]
1038+
"""The per unit conversion rate of the price currency to the invoicing currency."""
1039+
1040+
currency: Optional[str]
1041+
"""The currency of the price.
1042+
1043+
If not provided, the currency of the plan will be used.
1044+
"""
1045+
1046+
discount: Optional[PriceOverrideOverrideGroupedAllocationPriceDiscount]
1047+
"""The subscription's override discount for the plan."""
1048+
1049+
fixed_price_quantity: Optional[float]
1050+
"""The starting quantity of the price, if the price is a fixed price."""
1051+
1052+
maximum_amount: Optional[str]
1053+
"""The subscription's override maximum amount for the plan."""
1054+
1055+
minimum_amount: Optional[str]
1056+
"""The subscription's override minimum amount for the plan."""
1057+
1058+
1059+
class PriceOverrideOverrideBulkWithProrationPriceDiscount(TypedDict, total=False):
1060+
discount_type: Required[Literal["percentage", "trial", "usage", "amount"]]
1061+
1062+
amount_discount: Optional[str]
1063+
"""Only available if discount_type is `amount`."""
1064+
1065+
applies_to_price_ids: Optional[List[str]]
1066+
"""List of price_ids that this discount applies to.
1067+
1068+
For plan/plan phase discounts, this can be a subset of prices.
1069+
"""
1070+
1071+
percentage_discount: Optional[float]
1072+
"""Only available if discount_type is `percentage`.
1073+
1074+
This is a number between 0 and 1.
1075+
"""
1076+
1077+
trial_amount_discount: Optional[str]
1078+
"""Only available if discount_type is `trial`"""
1079+
1080+
usage_discount: Optional[float]
1081+
"""Only available if discount_type is `usage`.
1082+
1083+
Number of usage units that this discount is for
1084+
"""
1085+
1086+
1087+
class PriceOverrideOverrideBulkWithProrationPrice(TypedDict, total=False):
1088+
id: Required[str]
1089+
1090+
bulk_with_proration_config: Required[Dict[str, object]]
1091+
1092+
model_type: Required[Literal["bulk_with_proration"]]
1093+
1094+
conversion_rate: Optional[float]
1095+
"""The per unit conversion rate of the price currency to the invoicing currency."""
1096+
1097+
currency: Optional[str]
1098+
"""The currency of the price.
1099+
1100+
If not provided, the currency of the plan will be used.
1101+
"""
1102+
1103+
discount: Optional[PriceOverrideOverrideBulkWithProrationPriceDiscount]
1104+
"""The subscription's override discount for the plan."""
1105+
1106+
fixed_price_quantity: Optional[float]
1107+
"""The starting quantity of the price, if the price is a fixed price."""
1108+
1109+
maximum_amount: Optional[str]
1110+
"""The subscription's override maximum amount for the plan."""
1111+
1112+
minimum_amount: Optional[str]
1113+
"""The subscription's override minimum amount for the plan."""
1114+
1115+
9981116
PriceOverride: TypeAlias = Union[
9991117
PriceOverrideOverrideUnitPrice,
10001118
PriceOverrideOverridePackagePrice,
@@ -1009,4 +1127,6 @@ class PriceOverrideOverrideUnitWithPercentPrice(TypedDict, total=False):
10091127
PriceOverrideOverrideTieredWithMinimumPrice,
10101128
PriceOverrideOverridePackageWithAllocationPrice,
10111129
PriceOverrideOverrideUnitWithPercentPrice,
1130+
PriceOverrideOverrideGroupedAllocationPrice,
1131+
PriceOverrideOverrideBulkWithProrationPrice,
10121132
]

src/orb/types/subscription_schedule_plan_change_params.py

+120
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
"PriceOverrideOverridePackageWithAllocationPriceDiscount",
5151
"PriceOverrideOverrideUnitWithPercentPrice",
5252
"PriceOverrideOverrideUnitWithPercentPriceDiscount",
53+
"PriceOverrideOverrideGroupedAllocationPrice",
54+
"PriceOverrideOverrideGroupedAllocationPriceDiscount",
55+
"PriceOverrideOverrideBulkWithProrationPrice",
56+
"PriceOverrideOverrideBulkWithProrationPriceDiscount",
5357
]
5458

5559

@@ -971,6 +975,120 @@ class PriceOverrideOverrideUnitWithPercentPrice(TypedDict, total=False):
971975
"""The subscription's override minimum amount for the plan."""
972976

973977

978+
class PriceOverrideOverrideGroupedAllocationPriceDiscount(TypedDict, total=False):
979+
discount_type: Required[Literal["percentage", "trial", "usage", "amount"]]
980+
981+
amount_discount: Optional[str]
982+
"""Only available if discount_type is `amount`."""
983+
984+
applies_to_price_ids: Optional[List[str]]
985+
"""List of price_ids that this discount applies to.
986+
987+
For plan/plan phase discounts, this can be a subset of prices.
988+
"""
989+
990+
percentage_discount: Optional[float]
991+
"""Only available if discount_type is `percentage`.
992+
993+
This is a number between 0 and 1.
994+
"""
995+
996+
trial_amount_discount: Optional[str]
997+
"""Only available if discount_type is `trial`"""
998+
999+
usage_discount: Optional[float]
1000+
"""Only available if discount_type is `usage`.
1001+
1002+
Number of usage units that this discount is for
1003+
"""
1004+
1005+
1006+
class PriceOverrideOverrideGroupedAllocationPrice(TypedDict, total=False):
1007+
id: Required[str]
1008+
1009+
grouped_allocation_config: Required[Dict[str, object]]
1010+
1011+
model_type: Required[Literal["grouped_allocation"]]
1012+
1013+
conversion_rate: Optional[float]
1014+
"""The per unit conversion rate of the price currency to the invoicing currency."""
1015+
1016+
currency: Optional[str]
1017+
"""The currency of the price.
1018+
1019+
If not provided, the currency of the plan will be used.
1020+
"""
1021+
1022+
discount: Optional[PriceOverrideOverrideGroupedAllocationPriceDiscount]
1023+
"""The subscription's override discount for the plan."""
1024+
1025+
fixed_price_quantity: Optional[float]
1026+
"""The starting quantity of the price, if the price is a fixed price."""
1027+
1028+
maximum_amount: Optional[str]
1029+
"""The subscription's override maximum amount for the plan."""
1030+
1031+
minimum_amount: Optional[str]
1032+
"""The subscription's override minimum amount for the plan."""
1033+
1034+
1035+
class PriceOverrideOverrideBulkWithProrationPriceDiscount(TypedDict, total=False):
1036+
discount_type: Required[Literal["percentage", "trial", "usage", "amount"]]
1037+
1038+
amount_discount: Optional[str]
1039+
"""Only available if discount_type is `amount`."""
1040+
1041+
applies_to_price_ids: Optional[List[str]]
1042+
"""List of price_ids that this discount applies to.
1043+
1044+
For plan/plan phase discounts, this can be a subset of prices.
1045+
"""
1046+
1047+
percentage_discount: Optional[float]
1048+
"""Only available if discount_type is `percentage`.
1049+
1050+
This is a number between 0 and 1.
1051+
"""
1052+
1053+
trial_amount_discount: Optional[str]
1054+
"""Only available if discount_type is `trial`"""
1055+
1056+
usage_discount: Optional[float]
1057+
"""Only available if discount_type is `usage`.
1058+
1059+
Number of usage units that this discount is for
1060+
"""
1061+
1062+
1063+
class PriceOverrideOverrideBulkWithProrationPrice(TypedDict, total=False):
1064+
id: Required[str]
1065+
1066+
bulk_with_proration_config: Required[Dict[str, object]]
1067+
1068+
model_type: Required[Literal["bulk_with_proration"]]
1069+
1070+
conversion_rate: Optional[float]
1071+
"""The per unit conversion rate of the price currency to the invoicing currency."""
1072+
1073+
currency: Optional[str]
1074+
"""The currency of the price.
1075+
1076+
If not provided, the currency of the plan will be used.
1077+
"""
1078+
1079+
discount: Optional[PriceOverrideOverrideBulkWithProrationPriceDiscount]
1080+
"""The subscription's override discount for the plan."""
1081+
1082+
fixed_price_quantity: Optional[float]
1083+
"""The starting quantity of the price, if the price is a fixed price."""
1084+
1085+
maximum_amount: Optional[str]
1086+
"""The subscription's override maximum amount for the plan."""
1087+
1088+
minimum_amount: Optional[str]
1089+
"""The subscription's override minimum amount for the plan."""
1090+
1091+
9741092
PriceOverride: TypeAlias = Union[
9751093
PriceOverrideOverrideUnitPrice,
9761094
PriceOverrideOverridePackagePrice,
@@ -985,4 +1103,6 @@ class PriceOverrideOverrideUnitWithPercentPrice(TypedDict, total=False):
9851103
PriceOverrideOverrideTieredWithMinimumPrice,
9861104
PriceOverrideOverridePackageWithAllocationPrice,
9871105
PriceOverrideOverrideUnitWithPercentPrice,
1106+
PriceOverrideOverrideGroupedAllocationPrice,
1107+
PriceOverrideOverrideBulkWithProrationPrice,
9881108
]

0 commit comments

Comments
 (0)