Skip to content

Commit 4dba245

Browse files
feat: extract minimum composite to type
1 parent 9f4c932 commit 4dba245

File tree

132 files changed

+1006
-1619
lines changed

Some content is hidden

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

132 files changed

+1006
-1619
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6b2550b95f82872b3825619c109352352b9c92281c8b2470fce158e971142881.yml
33
openapi_spec_hash: 379df18de1af6a9d0b50d3653aab4d44
4-
config_hash: be9350529b910ec14bff0a30cd74a185
4+
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ from orb.types import (
6161
NewFloatingMatrixWithAllocationPrice,
6262
NewFloatingMatrixWithDisplayNamePrice,
6363
NewFloatingMaxGroupTieredPackagePrice,
64+
NewFloatingMinimumCompositePrice,
6465
NewFloatingPackagePrice,
6566
NewFloatingPackageWithAllocationPrice,
6667
NewFloatingScalableMatrixWithTieredPricingPrice,
@@ -89,6 +90,7 @@ from orb.types import (
8990
NewPlanMatrixWithAllocationPrice,
9091
NewPlanMatrixWithDisplayNamePrice,
9192
NewPlanMaxGroupTieredPackagePrice,
93+
NewPlanMinimumCompositePrice,
9294
NewPlanPackagePrice,
9395
NewPlanPackageWithAllocationPrice,
9496
NewPlanScalableMatrixWithTieredPricingPrice,
@@ -507,6 +509,7 @@ from orb.types import (
507509
NewSubscriptionMatrixWithAllocationPrice,
508510
NewSubscriptionMatrixWithDisplayNamePrice,
509511
NewSubscriptionMaxGroupTieredPackagePrice,
512+
NewSubscriptionMinimumCompositePrice,
510513
NewSubscriptionPackagePrice,
511514
NewSubscriptionPackageWithAllocationPrice,
512515
NewSubscriptionScalableMatrixWithTieredPricingPrice,

src/orb/types/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
NewPlanUnitWithPercentPrice as NewPlanUnitWithPercentPrice,
9292
ChangedSubscriptionResources as ChangedSubscriptionResources,
9393
NewBillingCycleConfiguration as NewBillingCycleConfiguration,
94+
NewPlanMinimumCompositePrice as NewPlanMinimumCompositePrice,
9495
DimensionalPriceConfiguration as DimensionalPriceConfiguration,
9596
FixedFeeQuantityScheduleEntry as FixedFeeQuantityScheduleEntry,
9697
NewFloatingGroupedTieredPrice as NewFloatingGroupedTieredPrice,
@@ -105,6 +106,7 @@
105106
NewFloatingUnitWithPercentPrice as NewFloatingUnitWithPercentPrice,
106107
MonetaryAmountDiscountAdjustment as MonetaryAmountDiscountAdjustment,
107108
NewDimensionalPriceConfiguration as NewDimensionalPriceConfiguration,
109+
NewFloatingMinimumCompositePrice as NewFloatingMinimumCompositePrice,
108110
NewPlanGroupedTieredPackagePrice as NewPlanGroupedTieredPackagePrice,
109111
NewPlanMatrixWithAllocationPrice as NewPlanMatrixWithAllocationPrice,
110112
NewPlanThresholdTotalAmountPrice as NewPlanThresholdTotalAmountPrice,
@@ -262,6 +264,9 @@
262264
from .subscription_update_fixed_fee_quantity_params import (
263265
SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams,
264266
)
267+
from .new_subscription_minimum_composite_price_param import (
268+
NewSubscriptionMinimumCompositePriceParam as NewSubscriptionMinimumCompositePriceParam,
269+
)
265270
from .new_subscription_unit_with_percent_price_param import (
266271
NewSubscriptionUnitWithPercentPriceParam as NewSubscriptionUnitWithPercentPriceParam,
267272
)

src/orb/types/beta/external_plan_id_create_plan_version_params.py

Lines changed: 9 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ..shared_params.new_plan_tiered_package_price import NewPlanTieredPackagePrice
2222
from ..shared_params.tiered_conversion_rate_config import TieredConversionRateConfig
2323
from ..shared_params.new_billing_cycle_configuration import NewBillingCycleConfiguration
24+
from ..shared_params.new_plan_minimum_composite_price import NewPlanMinimumCompositePrice
2425
from ..shared_params.new_plan_unit_with_percent_price import NewPlanUnitWithPercentPrice
2526
from ..shared_params.new_plan_grouped_allocation_price import NewPlanGroupedAllocationPrice
2627
from ..shared_params.new_plan_bulk_with_proration_price import NewPlanBulkWithProrationPrice
@@ -50,21 +51,15 @@
5051
"AddPrice",
5152
"AddPricePrice",
5253
"AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice",
53-
"AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent158",
54-
"AddPricePriceNewPlanMinimumCompositePrice",
55-
"AddPricePriceNewPlanMinimumCompositePriceMinimumConfig",
56-
"AddPricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent159",
54+
"AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160",
5755
"RemoveAdjustment",
5856
"RemovePrice",
5957
"ReplaceAdjustment",
6058
"ReplaceAdjustmentAdjustment",
6159
"ReplacePrice",
6260
"ReplacePricePrice",
6361
"ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice",
64-
"ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160",
65-
"ReplacePricePriceNewPlanMinimumCompositePrice",
66-
"ReplacePricePriceNewPlanMinimumCompositePriceMinimumConfig",
67-
"ReplacePricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent161",
62+
"ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent161",
6863
]
6964

7065

@@ -107,7 +102,7 @@ class AddAdjustment(TypedDict, total=False):
107102
"""The phase to add this adjustment to."""
108103

109104

110-
AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent158: TypeAlias = Union[
105+
AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160: TypeAlias = Union[
111106
UnitConversionRateConfig, TieredConversionRateConfig
112107
]
113108

@@ -147,102 +142,7 @@ class AddPricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=Fals
147142
conversion_rate: Optional[float]
148143
"""The per unit conversion rate of the price currency to the invoicing currency."""
149144

150-
conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent158]
151-
"""The configuration for the rate of the price currency to the invoicing currency."""
152-
153-
currency: Optional[str]
154-
"""
155-
An ISO 4217 currency string, or custom pricing unit identifier, in which this
156-
price is billed.
157-
"""
158-
159-
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
160-
"""For dimensional price: specifies a price group and dimension values"""
161-
162-
external_price_id: Optional[str]
163-
"""An alias for the price."""
164-
165-
fixed_price_quantity: Optional[float]
166-
"""
167-
If the Price represents a fixed cost, this represents the quantity of units
168-
applied.
169-
"""
170-
171-
invoice_grouping_key: Optional[str]
172-
"""The property used to group this price on an invoice"""
173-
174-
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
175-
"""Within each billing cycle, specifies the cadence at which invoices are produced.
176-
177-
If unspecified, a single invoice is produced per billing cycle.
178-
"""
179-
180-
metadata: Optional[Dict[str, Optional[str]]]
181-
"""User-specified key/value pairs for the resource.
182-
183-
Individual keys can be removed by setting the value to `null`, and the entire
184-
metadata mapping can be cleared by setting `metadata` to `null`.
185-
"""
186-
187-
reference_id: Optional[str]
188-
"""
189-
A transient ID that can be used to reference this price when adding adjustments
190-
in the same API call.
191-
"""
192-
193-
194-
class AddPricePriceNewPlanMinimumCompositePriceMinimumConfig(TypedDict, total=False):
195-
minimum_amount: Required[str]
196-
"""The minimum amount to apply"""
197-
198-
prorated: Optional[bool]
199-
"""
200-
By default, subtotals from minimum composite prices are prorated based on the
201-
service period. Set to false to disable proration.
202-
"""
203-
204-
205-
AddPricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent159: TypeAlias = Union[
206-
UnitConversionRateConfig, TieredConversionRateConfig
207-
]
208-
209-
210-
class AddPricePriceNewPlanMinimumCompositePrice(TypedDict, total=False):
211-
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
212-
"""The cadence to bill for this price on."""
213-
214-
item_id: Required[str]
215-
"""The id of the item the price will be associated with."""
216-
217-
minimum_config: Required[AddPricePriceNewPlanMinimumCompositePriceMinimumConfig]
218-
219-
model_type: Required[Literal["minimum"]]
220-
221-
name: Required[str]
222-
"""The name of the price."""
223-
224-
billable_metric_id: Optional[str]
225-
"""The id of the billable metric for the price.
226-
227-
Only needed if the price is usage-based.
228-
"""
229-
230-
billed_in_advance: Optional[bool]
231-
"""
232-
If the Price represents a fixed cost, the price will be billed in-advance if
233-
this is true, and in-arrears if this is false.
234-
"""
235-
236-
billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
237-
"""
238-
For custom cadence: specifies the duration of the billing period in days or
239-
months.
240-
"""
241-
242-
conversion_rate: Optional[float]
243-
"""The per unit conversion rate of the price currency to the invoicing currency."""
244-
245-
conversion_rate_config: Optional[AddPricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent159]
145+
conversion_rate_config: Optional[AddPricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160]
246146
"""The configuration for the rate of the price currency to the invoicing currency."""
247147

248148
currency: Optional[str]
@@ -313,7 +213,7 @@ class AddPricePriceNewPlanMinimumCompositePrice(TypedDict, total=False):
313213
NewPlanTieredPackageWithMinimumPrice,
314214
NewPlanMatrixWithAllocationPrice,
315215
NewPlanGroupedTieredPrice,
316-
AddPricePriceNewPlanMinimumCompositePrice,
216+
NewPlanMinimumCompositePrice,
317217
]
318218

319219

@@ -360,7 +260,7 @@ class ReplaceAdjustment(TypedDict, total=False):
360260
"""The phase to replace this adjustment from."""
361261

362262

363-
ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160: TypeAlias = Union[
263+
ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent161: TypeAlias = Union[
364264
UnitConversionRateConfig, TieredConversionRateConfig
365265
]
366266

@@ -401,7 +301,7 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=
401301
"""The per unit conversion rate of the price currency to the invoicing currency."""
402302

403303
conversion_rate_config: Optional[
404-
ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent160
304+
ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPriceUnnamedTypeWithobjectParent161
405305
]
406306
"""The configuration for the rate of the price currency to the invoicing currency."""
407307

@@ -446,101 +346,6 @@ class ReplacePricePriceNewPlanGroupedWithMinMaxThresholdsPrice(TypedDict, total=
446346
"""
447347

448348

449-
class ReplacePricePriceNewPlanMinimumCompositePriceMinimumConfig(TypedDict, total=False):
450-
minimum_amount: Required[str]
451-
"""The minimum amount to apply"""
452-
453-
prorated: Optional[bool]
454-
"""
455-
By default, subtotals from minimum composite prices are prorated based on the
456-
service period. Set to false to disable proration.
457-
"""
458-
459-
460-
ReplacePricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent161: TypeAlias = Union[
461-
UnitConversionRateConfig, TieredConversionRateConfig
462-
]
463-
464-
465-
class ReplacePricePriceNewPlanMinimumCompositePrice(TypedDict, total=False):
466-
cadence: Required[Literal["annual", "semi_annual", "monthly", "quarterly", "one_time", "custom"]]
467-
"""The cadence to bill for this price on."""
468-
469-
item_id: Required[str]
470-
"""The id of the item the price will be associated with."""
471-
472-
minimum_config: Required[ReplacePricePriceNewPlanMinimumCompositePriceMinimumConfig]
473-
474-
model_type: Required[Literal["minimum"]]
475-
476-
name: Required[str]
477-
"""The name of the price."""
478-
479-
billable_metric_id: Optional[str]
480-
"""The id of the billable metric for the price.
481-
482-
Only needed if the price is usage-based.
483-
"""
484-
485-
billed_in_advance: Optional[bool]
486-
"""
487-
If the Price represents a fixed cost, the price will be billed in-advance if
488-
this is true, and in-arrears if this is false.
489-
"""
490-
491-
billing_cycle_configuration: Optional[NewBillingCycleConfiguration]
492-
"""
493-
For custom cadence: specifies the duration of the billing period in days or
494-
months.
495-
"""
496-
497-
conversion_rate: Optional[float]
498-
"""The per unit conversion rate of the price currency to the invoicing currency."""
499-
500-
conversion_rate_config: Optional[ReplacePricePriceNewPlanMinimumCompositePriceUnnamedTypeWithobjectParent161]
501-
"""The configuration for the rate of the price currency to the invoicing currency."""
502-
503-
currency: Optional[str]
504-
"""
505-
An ISO 4217 currency string, or custom pricing unit identifier, in which this
506-
price is billed.
507-
"""
508-
509-
dimensional_price_configuration: Optional[NewDimensionalPriceConfiguration]
510-
"""For dimensional price: specifies a price group and dimension values"""
511-
512-
external_price_id: Optional[str]
513-
"""An alias for the price."""
514-
515-
fixed_price_quantity: Optional[float]
516-
"""
517-
If the Price represents a fixed cost, this represents the quantity of units
518-
applied.
519-
"""
520-
521-
invoice_grouping_key: Optional[str]
522-
"""The property used to group this price on an invoice"""
523-
524-
invoicing_cycle_configuration: Optional[NewBillingCycleConfiguration]
525-
"""Within each billing cycle, specifies the cadence at which invoices are produced.
526-
527-
If unspecified, a single invoice is produced per billing cycle.
528-
"""
529-
530-
metadata: Optional[Dict[str, Optional[str]]]
531-
"""User-specified key/value pairs for the resource.
532-
533-
Individual keys can be removed by setting the value to `null`, and the entire
534-
metadata mapping can be cleared by setting `metadata` to `null`.
535-
"""
536-
537-
reference_id: Optional[str]
538-
"""
539-
A transient ID that can be used to reference this price when adding adjustments
540-
in the same API call.
541-
"""
542-
543-
544349
ReplacePricePrice: TypeAlias = Union[
545350
NewPlanUnitPrice,
546351
NewPlanPackagePrice,
@@ -568,7 +373,7 @@ class ReplacePricePriceNewPlanMinimumCompositePrice(TypedDict, total=False):
568373
NewPlanTieredPackageWithMinimumPrice,
569374
NewPlanMatrixWithAllocationPrice,
570375
NewPlanGroupedTieredPrice,
571-
ReplacePricePriceNewPlanMinimumCompositePrice,
376+
NewPlanMinimumCompositePrice,
572377
]
573378

574379

0 commit comments

Comments
 (0)