@@ -1452,6 +1452,84 @@ def create(
1452
1452
"""
1453
1453
...
1454
1454
1455
+ @overload
1456
+ def create (
1457
+ self ,
1458
+ * ,
1459
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
1460
+ currency : str ,
1461
+ grouped_allocation_config : Dict [str , object ],
1462
+ item_id : str ,
1463
+ model_type : Literal ["grouped_allocation" ],
1464
+ name : str ,
1465
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1466
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
1467
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
1468
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
1469
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
1470
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
1471
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
1472
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1473
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1474
+ extra_headers : Headers | None = None ,
1475
+ extra_query : Query | None = None ,
1476
+ extra_body : Body | None = None ,
1477
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1478
+ idempotency_key : str | None = None ,
1479
+ ) -> Price :
1480
+ """This endpoint is used to create a [price](../reference/price).
1481
+
1482
+ A price created
1483
+ using this endpoint is always an add-on, meaning that it’s not associated with a
1484
+ specific plan and can instead be individually added to subscriptions, including
1485
+ subscriptions on different plans.
1486
+
1487
+ An `external_price_id` can be optionally specified as an alias to allow
1488
+ ergonomic interaction with prices in the Orb API.
1489
+
1490
+ See the [Price resource](../reference/price) for the specification of different
1491
+ price model configurations possible in this endpoint.
1492
+
1493
+ Args:
1494
+ cadence: The cadence to bill for this price on.
1495
+
1496
+ currency: An ISO 4217 currency string for which this price is billed in.
1497
+
1498
+ item_id: The id of the item the plan will be associated with.
1499
+
1500
+ name: The name of the price.
1501
+
1502
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
1503
+ usage-based.
1504
+
1505
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
1506
+ this is true, and in-arrears if this is false.
1507
+
1508
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
1509
+
1510
+ external_price_id: An alias for the price.
1511
+
1512
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
1513
+ applied.
1514
+
1515
+ invoice_grouping_key: The property used to group this price on an invoice
1516
+
1517
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
1518
+ by setting the value to `null`, and the entire metadata mapping can be cleared
1519
+ by setting `metadata` to `null`.
1520
+
1521
+ extra_headers: Send extra headers
1522
+
1523
+ extra_query: Add additional query parameters to the request
1524
+
1525
+ extra_body: Add additional JSON properties to the request
1526
+
1527
+ timeout: Override the client-level default timeout for this request, in seconds
1528
+
1529
+ idempotency_key: Specify a custom idempotency key for this request
1530
+ """
1531
+ ...
1532
+
1455
1533
@required_args (
1456
1534
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
1457
1535
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
@@ -1471,6 +1549,7 @@ def create(
1471
1549
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_percent_config" ],
1472
1550
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_with_proration_config" ],
1473
1551
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_proration_config" ],
1552
+ ["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
1474
1553
)
1475
1554
def create (
1476
1555
self ,
@@ -1495,7 +1574,8 @@ def create(
1495
1574
| Literal ["tiered_package_with_minimum" ]
1496
1575
| Literal ["unit_with_percent" ]
1497
1576
| Literal ["tiered_with_proration" ]
1498
- | Literal ["unit_with_proration" ],
1577
+ | Literal ["unit_with_proration" ]
1578
+ | Literal ["grouped_allocation" ],
1499
1579
name : str ,
1500
1580
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
1501
1581
billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -1523,6 +1603,7 @@ def create(
1523
1603
unit_with_percent_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1524
1604
tiered_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1525
1605
unit_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1606
+ grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
1526
1607
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1527
1608
# The extra values given here take precedence over values defined on the client or passed to this method.
1528
1609
extra_headers : Headers | None = None ,
@@ -1567,6 +1648,7 @@ def create(
1567
1648
"unit_with_percent_config" : unit_with_percent_config ,
1568
1649
"tiered_with_proration_config" : tiered_with_proration_config ,
1569
1650
"unit_with_proration_config" : unit_with_proration_config ,
1651
+ "grouped_allocation_config" : grouped_allocation_config ,
1570
1652
},
1571
1653
price_create_params .PriceCreateParams ,
1572
1654
),
@@ -3229,6 +3311,84 @@ async def create(
3229
3311
"""
3230
3312
...
3231
3313
3314
+ @overload
3315
+ async def create (
3316
+ self ,
3317
+ * ,
3318
+ cadence : Literal ["annual" , "semi_annual" , "monthly" , "quarterly" , "one_time" , "custom" ],
3319
+ currency : str ,
3320
+ grouped_allocation_config : Dict [str , object ],
3321
+ item_id : str ,
3322
+ model_type : Literal ["grouped_allocation" ],
3323
+ name : str ,
3324
+ billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
3325
+ billed_in_advance : Optional [bool ] | NotGiven = NOT_GIVEN ,
3326
+ conversion_rate : Optional [float ] | NotGiven = NOT_GIVEN ,
3327
+ external_price_id : Optional [str ] | NotGiven = NOT_GIVEN ,
3328
+ fixed_price_quantity : Optional [float ] | NotGiven = NOT_GIVEN ,
3329
+ invoice_grouping_key : Optional [str ] | NotGiven = NOT_GIVEN ,
3330
+ metadata : Optional [Dict [str , Optional [str ]]] | NotGiven = NOT_GIVEN ,
3331
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3332
+ # The extra values given here take precedence over values defined on the client or passed to this method.
3333
+ extra_headers : Headers | None = None ,
3334
+ extra_query : Query | None = None ,
3335
+ extra_body : Body | None = None ,
3336
+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
3337
+ idempotency_key : str | None = None ,
3338
+ ) -> Price :
3339
+ """This endpoint is used to create a [price](../reference/price).
3340
+
3341
+ A price created
3342
+ using this endpoint is always an add-on, meaning that it’s not associated with a
3343
+ specific plan and can instead be individually added to subscriptions, including
3344
+ subscriptions on different plans.
3345
+
3346
+ An `external_price_id` can be optionally specified as an alias to allow
3347
+ ergonomic interaction with prices in the Orb API.
3348
+
3349
+ See the [Price resource](../reference/price) for the specification of different
3350
+ price model configurations possible in this endpoint.
3351
+
3352
+ Args:
3353
+ cadence: The cadence to bill for this price on.
3354
+
3355
+ currency: An ISO 4217 currency string for which this price is billed in.
3356
+
3357
+ item_id: The id of the item the plan will be associated with.
3358
+
3359
+ name: The name of the price.
3360
+
3361
+ billable_metric_id: The id of the billable metric for the price. Only needed if the price is
3362
+ usage-based.
3363
+
3364
+ billed_in_advance: If the Price represents a fixed cost, the price will be billed in-advance if
3365
+ this is true, and in-arrears if this is false.
3366
+
3367
+ conversion_rate: The per unit conversion rate of the price currency to the invoicing currency.
3368
+
3369
+ external_price_id: An alias for the price.
3370
+
3371
+ fixed_price_quantity: If the Price represents a fixed cost, this represents the quantity of units
3372
+ applied.
3373
+
3374
+ invoice_grouping_key: The property used to group this price on an invoice
3375
+
3376
+ metadata: User-specified key/value pairs for the resource. Individual keys can be removed
3377
+ by setting the value to `null`, and the entire metadata mapping can be cleared
3378
+ by setting `metadata` to `null`.
3379
+
3380
+ extra_headers: Send extra headers
3381
+
3382
+ extra_query: Add additional query parameters to the request
3383
+
3384
+ extra_body: Add additional JSON properties to the request
3385
+
3386
+ timeout: Override the client-level default timeout for this request, in seconds
3387
+
3388
+ idempotency_key: Specify a custom idempotency key for this request
3389
+ """
3390
+ ...
3391
+
3232
3392
@required_args (
3233
3393
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_config" ],
3234
3394
["cadence" , "currency" , "item_id" , "model_type" , "name" , "package_config" ],
@@ -3248,6 +3408,7 @@ async def create(
3248
3408
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_percent_config" ],
3249
3409
["cadence" , "currency" , "item_id" , "model_type" , "name" , "tiered_with_proration_config" ],
3250
3410
["cadence" , "currency" , "item_id" , "model_type" , "name" , "unit_with_proration_config" ],
3411
+ ["cadence" , "currency" , "grouped_allocation_config" , "item_id" , "model_type" , "name" ],
3251
3412
)
3252
3413
async def create (
3253
3414
self ,
@@ -3272,7 +3433,8 @@ async def create(
3272
3433
| Literal ["tiered_package_with_minimum" ]
3273
3434
| Literal ["unit_with_percent" ]
3274
3435
| Literal ["tiered_with_proration" ]
3275
- | Literal ["unit_with_proration" ],
3436
+ | Literal ["unit_with_proration" ]
3437
+ | Literal ["grouped_allocation" ],
3276
3438
name : str ,
3277
3439
unit_config : price_create_params .NewFloatingUnitPriceUnitConfig | NotGiven = NOT_GIVEN ,
3278
3440
billable_metric_id : Optional [str ] | NotGiven = NOT_GIVEN ,
@@ -3300,6 +3462,7 @@ async def create(
3300
3462
unit_with_percent_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
3301
3463
tiered_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
3302
3464
unit_with_proration_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
3465
+ grouped_allocation_config : Dict [str , object ] | NotGiven = NOT_GIVEN ,
3303
3466
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3304
3467
# The extra values given here take precedence over values defined on the client or passed to this method.
3305
3468
extra_headers : Headers | None = None ,
@@ -3344,6 +3507,7 @@ async def create(
3344
3507
"unit_with_percent_config" : unit_with_percent_config ,
3345
3508
"tiered_with_proration_config" : tiered_with_proration_config ,
3346
3509
"unit_with_proration_config" : unit_with_proration_config ,
3510
+ "grouped_allocation_config" : grouped_allocation_config ,
3347
3511
},
3348
3512
price_create_params .PriceCreateParams ,
3349
3513
),
0 commit comments