@@ -258,6 +258,76 @@ def create(
258
258
"""
259
259
...
260
260
261
+ @overload
262
+ def create (
263
+ self ,
264
+ * ,
265
+ cadence : Literal ["annual" , "monthly" , "quarterly" , "one_time" ],
266
+ currency : str ,
267
+ item_id : str ,
268
+ matrix_with_allocation_config : price_create_params .NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig ,
269
+ model_type : Literal ["matrix_with_allocation" ],
270
+ name : str ,
271
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
272
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
273
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
274
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
275
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
276
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
277
+ # The extra values given here take precedence over values defined on the client or passed to this method.
278
+ extra_headers : Headers | None = None ,
279
+ extra_query : Query | None = None ,
280
+ extra_body : Body | None = None ,
281
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
282
+ idempotency_key : str | None = None ,
283
+ ) -> Price :
284
+ """This endpoint is used to create a [price](../reference/price).
285
+
286
+ A price created
287
+ using this endpoint is always an add-on, meaning that it’s not associated with a
288
+ specific plan and can instead be individually added to subscriptions, including
289
+ subscriptions on different plans.
290
+
291
+ An `external_price_id` can be optionally specified as an alias to allow
292
+ ergonomic interaction with prices in the Orb API.
293
+
294
+ See the [Price resource](../reference/price) for the specification of different
295
+ price model configurations possible in this endpoint.
296
+
297
+ Args:
298
+ cadence: The cadence to bill for this price on.
299
+
300
+ currency: An ISO 4217 currency string for which this price is billed in.
301
+
302
+ item_id: The id of the item the plan will be associated with.
303
+
304
+ name: The name of the price.
305
+
306
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
307
+ usage-based.
308
+
309
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
310
+ this is true, and in-arrears if this is false.
311
+
312
+ external_price_id: An alias for the price.
313
+
314
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
315
+ applied.
316
+
317
+ invoice_grouping_key: The property used to group this price on an invoice
318
+
319
+ extra_headers: Send extra headers
320
+
321
+ extra_query: Add additional query parameters to the request
322
+
323
+ extra_body: Add additional JSON properties to the request
324
+
325
+ timeout: Override the client-level default timeout for this request, in seconds
326
+
327
+ idempotency_key: Specify a custom idempotency key for this request
328
+ """
329
+ ...
330
+
261
331
@overload
262
332
def create (
263
333
self ,
@@ -1032,6 +1102,7 @@ def create(
1032
1102
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
1033
1103
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
1034
1104
["cadence" , "currency" , "item_id" , "matrix_config" , "model_type" , "name" ],
1105
+ ["cadence" , "currency" , "item_id" , "matrix_with_allocation_config" , "model_type" , "name" ],
1035
1106
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_config" ],
1036
1107
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_bps_config" ],
1037
1108
["bps_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
@@ -1053,6 +1124,7 @@ def create(
1053
1124
model_type : Literal ["unit" ]
1054
1125
| Literal ["package" ]
1055
1126
| Literal ["matrix" ]
1127
+ | Literal ["matrix_with_allocation" ]
1056
1128
| Literal ["tiered" ]
1057
1129
| Literal ["tiered_bps" ]
1058
1130
| Literal ["bps" ]
@@ -1073,6 +1145,8 @@ def create(
1073
1145
invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
1074
1146
package_config : price_create_params .NewFloatingPackagePricePackageConfig | NotGiven = NOT_GIVEN ,
1075
1147
matrix_config : price_create_params .NewFloatingMatrixPriceMatrixConfig | NotGiven = NOT_GIVEN ,
1148
+ matrix_with_allocation_config : price_create_params .NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
1149
+ | NotGiven = NOT_GIVEN ,
1076
1150
tiered_config : price_create_params .NewFloatingTieredPriceTieredConfig | NotGiven = NOT_GIVEN ,
1077
1151
tiered_bps_config : price_create_params .NewFloatingTieredBpsPriceTieredBpsConfig | NotGiven = NOT_GIVEN ,
1078
1152
bps_config : price_create_params .NewFloatingBpsPriceBpsConfig | NotGiven = NOT_GIVEN ,
@@ -1111,6 +1185,7 @@ def create(
1111
1185
"invoice_grouping_key" : invoice_grouping_key ,
1112
1186
"package_config" : package_config ,
1113
1187
"matrix_config" : matrix_config ,
1188
+ "matrix_with_allocation_config" : matrix_with_allocation_config ,
1114
1189
"tiered_config" : tiered_config ,
1115
1190
"tiered_bps_config" : tiered_bps_config ,
1116
1191
"bps_config" : bps_config ,
@@ -1445,6 +1520,76 @@ async def create(
1445
1520
"""
1446
1521
...
1447
1522
1523
+ @overload
1524
+ async def create (
1525
+ self ,
1526
+ * ,
1527
+ cadence : Literal ["annual" , "monthly" , "quarterly" , "one_time" ],
1528
+ currency : str ,
1529
+ item_id : str ,
1530
+ matrix_with_allocation_config : price_create_params .NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig ,
1531
+ model_type : Literal ["matrix_with_allocation" ],
1532
+ name : str ,
1533
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1534
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
1535
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1536
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
1537
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
1538
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1539
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1540
+ extra_headers : Headers | None = None ,
1541
+ extra_query : Query | None = None ,
1542
+ extra_body : Body | None = None ,
1543
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1544
+ idempotency_key : str | None = None ,
1545
+ ) -> Price :
1546
+ """This endpoint is used to create a [price](../reference/price).
1547
+
1548
+ A price created
1549
+ using this endpoint is always an add-on, meaning that it’s not associated with a
1550
+ specific plan and can instead be individually added to subscriptions, including
1551
+ subscriptions on different plans.
1552
+
1553
+ An `external_price_id` can be optionally specified as an alias to allow
1554
+ ergonomic interaction with prices in the Orb API.
1555
+
1556
+ See the [Price resource](../reference/price) for the specification of different
1557
+ price model configurations possible in this endpoint.
1558
+
1559
+ Args:
1560
+ cadence: The cadence to bill for this price on.
1561
+
1562
+ currency: An ISO 4217 currency string for which this price is billed in.
1563
+
1564
+ item_id: The id of the item the plan will be associated with.
1565
+
1566
+ name: The name of the price.
1567
+
1568
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
1569
+ usage-based.
1570
+
1571
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
1572
+ this is true, and in-arrears if this is false.
1573
+
1574
+ external_price_id: An alias for the price.
1575
+
1576
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
1577
+ applied.
1578
+
1579
+ invoice_grouping_key: The property used to group this price on an invoice
1580
+
1581
+ extra_headers: Send extra headers
1582
+
1583
+ extra_query: Add additional query parameters to the request
1584
+
1585
+ extra_body: Add additional JSON properties to the request
1586
+
1587
+ timeout: Override the client-level default timeout for this request, in seconds
1588
+
1589
+ idempotency_key: Specify a custom idempotency key for this request
1590
+ """
1591
+ ...
1592
+
1448
1593
@overload
1449
1594
async def create (
1450
1595
self ,
@@ -2219,6 +2364,7 @@ async def create(
2219
2364
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
2220
2365
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
2221
2366
["cadence" , "currency" , "item_id" , "matrix_config" , "model_type" , "name" ],
2367
+ ["cadence" , "currency" , "item_id" , "matrix_with_allocation_config" , "model_type" , "name" ],
2222
2368
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_config" ],
2223
2369
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_bps_config" ],
2224
2370
["bps_config" , "cadence" , "currency" , "item_id" , "model_type" , "name" ],
@@ -2240,6 +2386,7 @@ async def create(
2240
2386
model_type : Literal ["unit" ]
2241
2387
| Literal ["package" ]
2242
2388
| Literal ["matrix" ]
2389
+ | Literal ["matrix_with_allocation" ]
2243
2390
| Literal ["tiered" ]
2244
2391
| Literal ["tiered_bps" ]
2245
2392
| Literal ["bps" ]
@@ -2260,6 +2407,8 @@ async def create(
2260
2407
invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
2261
2408
package_config : price_create_params .NewFloatingPackagePricePackageConfig | NotGiven = NOT_GIVEN ,
2262
2409
matrix_config : price_create_params .NewFloatingMatrixPriceMatrixConfig | NotGiven = NOT_GIVEN ,
2410
+ matrix_with_allocation_config : price_create_params .NewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
2411
+ | NotGiven = NOT_GIVEN ,
2263
2412
tiered_config : price_create_params .NewFloatingTieredPriceTieredConfig | NotGiven = NOT_GIVEN ,
2264
2413
tiered_bps_config : price_create_params .NewFloatingTieredBpsPriceTieredBpsConfig | NotGiven = NOT_GIVEN ,
2265
2414
bps_config : price_create_params .NewFloatingBpsPriceBpsConfig | NotGiven = NOT_GIVEN ,
@@ -2298,6 +2447,7 @@ async def create(
2298
2447
"invoice_grouping_key" : invoice_grouping_key ,
2299
2448
"package_config" : package_config ,
2300
2449
"matrix_config" : matrix_config ,
2450
+ "matrix_with_allocation_config" : matrix_with_allocation_config ,
2301
2451
"tiered_config" : tiered_config ,
2302
2452
"tiered_bps_config" : tiered_bps_config ,
2303
2453
"bps_config" : bps_config ,
0 commit comments