@@ -1950,6 +1950,98 @@ def create(
1950
1950
"""
1951
1951
...
1952
1952
1953
+ @overload
1954
+ def create (
1955
+ self ,
1956
+ * ,
1957
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
1958
+ currency : str ,
1959
+ grouped_tiered_package_config : Dict [str , object ],
1960
+ item_id : str ,
1961
+ model_type : Literal ["grouped_tiered_package" ],
1962
+ name : str ,
1963
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1964
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
1965
+ billing_cycle_configuration : Optional [
1966
+ price_create_params .NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration
1967
+ ]
1968
+ | NotGiven = NOT_GIVEN ,
1969
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
1970
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1971
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
1972
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
1973
+ invoicing_cycle_configuration : Optional [
1974
+ price_create_params .NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration
1975
+ ]
1976
+ | NotGiven = NOT_GIVEN ,
1977
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
1978
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1979
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1980
+ extra_headers : Headers | None = None ,
1981
+ extra_query : Query | None = None ,
1982
+ extra_body : Body | None = None ,
1983
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1984
+ idempotency_key : str | None = None ,
1985
+ ) -> Price :
1986
+ """This endpoint is used to create a [price](../reference/price).
1987
+
1988
+ A price created
1989
+ using this endpoint is always an add-on, meaning that it’s not associated with a
1990
+ specific plan and can instead be individually added to subscriptions, including
1991
+ subscriptions on different plans.
1992
+
1993
+ An `external_price_id` can be optionally specified as an alias to allow
1994
+ ergonomic interaction with prices in the Orb API.
1995
+
1996
+ See the [Price resource](../reference/price) for the specification of different
1997
+ price model configurations possible in this endpoint.
1998
+
1999
+ Args:
2000
+ cadence: The cadence to bill for this price on.
2001
+
2002
+ currency: An ISO 4217 currency string for which this price is billed in.
2003
+
2004
+ item_id: The id of the item the plan will be associated with.
2005
+
2006
+ name: The name of the price.
2007
+
2008
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
2009
+ usage-based.
2010
+
2011
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
2012
+ this is true, and in-arrears if this is false.
2013
+
2014
+ billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
2015
+ months.
2016
+
2017
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
2018
+
2019
+ external_price_id: An alias for the price.
2020
+
2021
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
2022
+ applied.
2023
+
2024
+ invoice_grouping_key: The property used to group this price on an invoice
2025
+
2026
+ invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
2027
+ If unspecified, a single invoice is produced per billing cycle.
2028
+
2029
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
2030
+ by setting the value to `null`, and the entire metadata mapping can be cleared
2031
+ by setting `metadata` to `null`.
2032
+
2033
+ extra_headers: Send extra headers
2034
+
2035
+ extra_query: Add additional query parameters to the request
2036
+
2037
+ extra_body: Add additional JSON properties to the request
2038
+
2039
+ timeout: Override the client-level default timeout for this request, in seconds
2040
+
2041
+ idempotency_key: Specify a custom idempotency key for this request
2042
+ """
2043
+ ...
2044
+
1953
2045
@required_args (
1954
2046
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
1955
2047
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
@@ -1972,6 +2064,7 @@ def create(
1972
2064
["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
1973
2065
["cadence" , "currency" , "grouped_with_prorated_minimum_config" , "item_id" , "model_type" , "name" ],
1974
2066
["bulk_with_proration_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
2067
+ ["cadence" , "currency" , "grouped_tiered_package_config" , "item_id" , "model_type" , "name" ],
1975
2068
)
1976
2069
def create (
1977
2070
self ,
@@ -1999,7 +2092,10 @@ def create(
1999
2092
| Literal ["unit_with_proration" ]
2000
2093
| Literal ["grouped_allocation" ]
2001
2094
| Literal ["grouped_with_prorated_minimum" ]
2002
- | Literal ["bulk_with_proration" ],
2095
+ | Literal ["grouped_with_metered_minimum" ]
2096
+ | Literal ["matrix_with_display_name" ]
2097
+ | Literal ["bulk_with_proration" ]
2098
+ | Literal ["grouped_tiered_package" ],
2003
2099
name : str ,
2004
2100
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
2005
2101
billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -2034,6 +2130,7 @@ def create(
2034
2130
grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
2035
2131
grouped_with_prorated_minimum_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
2036
2132
bulk_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
2133
+ grouped_tiered_package_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
2037
2134
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2038
2135
# The extra values given here take precedence over values defined on the client or passed to this method.
2039
2136
extra_headers : Headers | None = None ,
@@ -2083,6 +2180,7 @@ def create(
2083
2180
"grouped_allocation_config" : grouped_allocation_config ,
2084
2181
"grouped_with_prorated_minimum_config" : grouped_with_prorated_minimum_config ,
2085
2182
"bulk_with_proration_config" : bulk_with_proration_config ,
2183
+ "grouped_tiered_package_config" : grouped_tiered_package_config ,
2086
2184
},
2087
2185
price_create_params .PriceCreateParams ,
2088
2186
),
@@ -4243,6 +4341,98 @@ async def create(
4243
4341
"""
4244
4342
...
4245
4343
4344
+ @overload
4345
+ async def create (
4346
+ self ,
4347
+ * ,
4348
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
4349
+ currency : str ,
4350
+ grouped_tiered_package_config : Dict [str , object ],
4351
+ item_id : str ,
4352
+ model_type : Literal ["grouped_tiered_package" ],
4353
+ name : str ,
4354
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
4355
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
4356
+ billing_cycle_configuration : Optional [
4357
+ price_create_params .NewFloatingGroupedTieredPackagePriceBillingCycleConfiguration
4358
+ ]
4359
+ | NotGiven = NOT_GIVEN ,
4360
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
4361
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
4362
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
4363
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
4364
+ invoicing_cycle_configuration : Optional [
4365
+ price_create_params .NewFloatingGroupedTieredPackagePriceInvoicingCycleConfiguration
4366
+ ]
4367
+ | NotGiven = NOT_GIVEN ,
4368
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
4369
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4370
+ # The extra values given here take precedence over values defined on the client or passed to this method.
4371
+ extra_headers : Headers | None = None ,
4372
+ extra_query : Query | None = None ,
4373
+ extra_body : Body | None = None ,
4374
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
4375
+ idempotency_key : str | None = None ,
4376
+ ) -> Price :
4377
+ """This endpoint is used to create a [price](../reference/price).
4378
+
4379
+ A price created
4380
+ using this endpoint is always an add-on, meaning that it’s not associated with a
4381
+ specific plan and can instead be individually added to subscriptions, including
4382
+ subscriptions on different plans.
4383
+
4384
+ An `external_price_id` can be optionally specified as an alias to allow
4385
+ ergonomic interaction with prices in the Orb API.
4386
+
4387
+ See the [Price resource](../reference/price) for the specification of different
4388
+ price model configurations possible in this endpoint.
4389
+
4390
+ Args:
4391
+ cadence: The cadence to bill for this price on.
4392
+
4393
+ currency: An ISO 4217 currency string for which this price is billed in.
4394
+
4395
+ item_id: The id of the item the plan will be associated with.
4396
+
4397
+ name: The name of the price.
4398
+
4399
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
4400
+ usage-based.
4401
+
4402
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
4403
+ this is true, and in-arrears if this is false.
4404
+
4405
+ billing_cycle_configuration: For custom cadence: specifies the duration of the billing period in days or
4406
+ months.
4407
+
4408
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
4409
+
4410
+ external_price_id: An alias for the price.
4411
+
4412
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
4413
+ applied.
4414
+
4415
+ invoice_grouping_key: The property used to group this price on an invoice
4416
+
4417
+ invoicing_cycle_configuration: Within each billing cycle, specifies the cadence at which invoices are produced.
4418
+ If unspecified, a single invoice is produced per billing cycle.
4419
+
4420
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
4421
+ by setting the value to `null`, and the entire metadata mapping can be cleared
4422
+ by setting `metadata` to `null`.
4423
+
4424
+ extra_headers: Send extra headers
4425
+
4426
+ extra_query: Add additional query parameters to the request
4427
+
4428
+ extra_body: Add additional JSON properties to the request
4429
+
4430
+ timeout: Override the client-level default timeout for this request, in seconds
4431
+
4432
+ idempotency_key: Specify a custom idempotency key for this request
4433
+ """
4434
+ ...
4435
+
4246
4436
@required_args (
4247
4437
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
4248
4438
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
@@ -4265,6 +4455,7 @@ async def create(
4265
4455
["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
4266
4456
["cadence" , "currency" , "grouped_with_prorated_minimum_config" , "item_id" , "model_type" , "name" ],
4267
4457
["bulk_with_proration_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
4458
+ ["cadence" , "currency" , "grouped_tiered_package_config" , "item_id" , "model_type" , "name" ],
4268
4459
)
4269
4460
async def create (
4270
4461
self ,
@@ -4292,7 +4483,10 @@ async def create(
4292
4483
| Literal ["unit_with_proration" ]
4293
4484
| Literal ["grouped_allocation" ]
4294
4485
| Literal ["grouped_with_prorated_minimum" ]
4295
- | Literal ["bulk_with_proration" ],
4486
+ | Literal ["grouped_with_metered_minimum" ]
4487
+ | Literal ["matrix_with_display_name" ]
4488
+ | Literal ["bulk_with_proration" ]
4489
+ | Literal ["grouped_tiered_package" ],
4296
4490
name : str ,
4297
4491
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
4298
4492
billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -4327,6 +4521,7 @@ async def create(
4327
4521
grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4328
4522
grouped_with_prorated_minimum_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4329
4523
bulk_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4524
+ grouped_tiered_package_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
4330
4525
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4331
4526
# The extra values given here take precedence over values defined on the client or passed to this method.
4332
4527
extra_headers : Headers | None = None ,
@@ -4376,6 +4571,7 @@ async def create(
4376
4571
"grouped_allocation_config" : grouped_allocation_config ,
4377
4572
"grouped_with_prorated_minimum_config" : grouped_with_prorated_minimum_config ,
4378
4573
"bulk_with_proration_config" : bulk_with_proration_config ,
4574
+ "grouped_tiered_package_config" : grouped_tiered_package_config ,
4379
4575
},
4380
4576
price_create_params .PriceCreateParams ,
4381
4577
),
0 commit comments