orb-billing 1.30.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +566 -6
- data/lib/orb/models/beta_create_plan_version_params.rb +566 -6
- data/lib/orb/models/changed_subscription_resources.rb +3 -2
- data/lib/orb/models/customers/balance_transaction_create_response.rb +1 -0
- data/lib/orb/models/customers/balance_transaction_list_response.rb +1 -0
- data/lib/orb/models/invoice.rb +3 -2
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +3 -2
- data/lib/orb/models/invoice_issue_summary_response.rb +1 -0
- data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
- data/lib/orb/models/invoice_list_summary_response.rb +1 -0
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +2 -2
- data/lib/orb/models/plan_create_params.rb +278 -3
- data/lib/orb/models/plan_version.rb +2 -2
- data/lib/orb/models/price.rb +450 -1
- data/lib/orb/models/price_create_params.rb +263 -3
- data/lib/orb/models/price_evaluate_multiple_params.rb +273 -3
- data/lib/orb/models/price_evaluate_preview_events_params.rb +273 -3
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription_create_params.rb +566 -6
- data/lib/orb/models/subscription_price_intervals_params.rb +273 -3
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +566 -6
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2737 -1811
- data/rbi/orb/models/beta_create_plan_version_params.rbi +2745 -1819
- data/rbi/orb/models/changed_subscription_resources.rbi +6 -0
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +5 -0
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +5 -0
- data/rbi/orb/models/invoice.rbi +6 -0
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +6 -0
- data/rbi/orb/models/invoice_issue_summary_response.rbi +5 -0
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +5 -0
- data/rbi/orb/models/per_price_cost.rbi +1 -0
- data/rbi/orb/models/plan.rbi +1 -0
- data/rbi/orb/models/plan_create_params.rbi +463 -0
- data/rbi/orb/models/plan_version.rbi +1 -0
- data/rbi/orb/models/price.rbi +805 -0
- data/rbi/orb/models/price_create_params.rbi +451 -0
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +451 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +451 -0
- data/rbi/orb/models/price_interval.rbi +1 -0
- data/rbi/orb/models/subscription_create_params.rbi +2660 -1734
- data/rbi/orb/models/subscription_price_intervals_params.rbi +451 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2660 -1734
- data/rbi/orb/resources/prices.rbi +1 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +376 -0
- data/sig/orb/models/beta_create_plan_version_params.rbs +376 -0
- data/sig/orb/models/changed_subscription_resources.rbs +2 -0
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +2 -0
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +2 -0
- data/sig/orb/models/invoice.rbs +2 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -0
- data/sig/orb/models/invoice_issue_summary_response.rbs +2 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +2 -0
- data/sig/orb/models/plan_create_params.rbs +188 -0
- data/sig/orb/models/price.rbs +332 -0
- data/sig/orb/models/price_create_params.rbs +178 -0
- data/sig/orb/models/price_evaluate_multiple_params.rbs +183 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +183 -0
- data/sig/orb/models/subscription_create_params.rbs +376 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +183 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +376 -0
- metadata +1 -1
|
@@ -239,6 +239,7 @@ module Orb
|
|
|
239
239
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
240
240
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
241
241
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
242
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
242
243
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
243
244
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
244
245
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -293,6 +294,7 @@ module Orb
|
|
|
293
294
|
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
294
295
|
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
295
296
|
Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
|
|
297
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::OrHash,
|
|
296
298
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
297
299
|
Orb::NewFloatingTieredWithProrationPrice::OrHash,
|
|
298
300
|
Orb::NewFloatingUnitWithProrationPrice::OrHash,
|
|
@@ -365,6 +367,7 @@ module Orb
|
|
|
365
367
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
366
368
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
367
369
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
370
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
368
371
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
369
372
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
370
373
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -416,6 +419,7 @@ module Orb
|
|
|
416
419
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
417
420
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
418
421
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
422
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
419
423
|
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
420
424
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
421
425
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -1342,6 +1346,453 @@ module Orb
|
|
|
1342
1346
|
end
|
|
1343
1347
|
end
|
|
1344
1348
|
|
|
1349
|
+
class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
|
|
1350
|
+
OrHash =
|
|
1351
|
+
T.type_alias do
|
|
1352
|
+
T.any(
|
|
1353
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
1354
|
+
Orb::Internal::AnyHash
|
|
1355
|
+
)
|
|
1356
|
+
end
|
|
1357
|
+
|
|
1358
|
+
# The cadence to bill for this price on.
|
|
1359
|
+
sig do
|
|
1360
|
+
returns(
|
|
1361
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol
|
|
1362
|
+
)
|
|
1363
|
+
end
|
|
1364
|
+
attr_accessor :cadence
|
|
1365
|
+
|
|
1366
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1367
|
+
sig { returns(String) }
|
|
1368
|
+
attr_accessor :currency
|
|
1369
|
+
|
|
1370
|
+
# The id of the item the price will be associated with.
|
|
1371
|
+
sig { returns(String) }
|
|
1372
|
+
attr_accessor :item_id
|
|
1373
|
+
|
|
1374
|
+
# The pricing model type
|
|
1375
|
+
sig { returns(Symbol) }
|
|
1376
|
+
attr_accessor :model_type
|
|
1377
|
+
|
|
1378
|
+
# The name of the price.
|
|
1379
|
+
sig { returns(String) }
|
|
1380
|
+
attr_accessor :name
|
|
1381
|
+
|
|
1382
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1383
|
+
sig do
|
|
1384
|
+
returns(
|
|
1385
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
|
|
1386
|
+
)
|
|
1387
|
+
end
|
|
1388
|
+
attr_reader :tiered_matrix_with_allocation_config
|
|
1389
|
+
|
|
1390
|
+
sig do
|
|
1391
|
+
params(
|
|
1392
|
+
tiered_matrix_with_allocation_config:
|
|
1393
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash
|
|
1394
|
+
).void
|
|
1395
|
+
end
|
|
1396
|
+
attr_writer :tiered_matrix_with_allocation_config
|
|
1397
|
+
|
|
1398
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1399
|
+
# usage-based.
|
|
1400
|
+
sig { returns(T.nilable(String)) }
|
|
1401
|
+
attr_accessor :billable_metric_id
|
|
1402
|
+
|
|
1403
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1404
|
+
# this is true, and in-arrears if this is false.
|
|
1405
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1406
|
+
attr_accessor :billed_in_advance
|
|
1407
|
+
|
|
1408
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1409
|
+
# months.
|
|
1410
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1411
|
+
attr_reader :billing_cycle_configuration
|
|
1412
|
+
|
|
1413
|
+
sig do
|
|
1414
|
+
params(
|
|
1415
|
+
billing_cycle_configuration:
|
|
1416
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1417
|
+
).void
|
|
1418
|
+
end
|
|
1419
|
+
attr_writer :billing_cycle_configuration
|
|
1420
|
+
|
|
1421
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1422
|
+
sig { returns(T.nilable(Float)) }
|
|
1423
|
+
attr_accessor :conversion_rate
|
|
1424
|
+
|
|
1425
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1426
|
+
sig do
|
|
1427
|
+
returns(
|
|
1428
|
+
T.nilable(
|
|
1429
|
+
T.any(
|
|
1430
|
+
Orb::UnitConversionRateConfig,
|
|
1431
|
+
Orb::TieredConversionRateConfig
|
|
1432
|
+
)
|
|
1433
|
+
)
|
|
1434
|
+
)
|
|
1435
|
+
end
|
|
1436
|
+
attr_accessor :conversion_rate_config
|
|
1437
|
+
|
|
1438
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1439
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1440
|
+
attr_reader :dimensional_price_configuration
|
|
1441
|
+
|
|
1442
|
+
sig do
|
|
1443
|
+
params(
|
|
1444
|
+
dimensional_price_configuration:
|
|
1445
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1446
|
+
).void
|
|
1447
|
+
end
|
|
1448
|
+
attr_writer :dimensional_price_configuration
|
|
1449
|
+
|
|
1450
|
+
# An alias for the price.
|
|
1451
|
+
sig { returns(T.nilable(String)) }
|
|
1452
|
+
attr_accessor :external_price_id
|
|
1453
|
+
|
|
1454
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1455
|
+
# applied.
|
|
1456
|
+
sig { returns(T.nilable(Float)) }
|
|
1457
|
+
attr_accessor :fixed_price_quantity
|
|
1458
|
+
|
|
1459
|
+
# The property used to group this price on an invoice
|
|
1460
|
+
sig { returns(T.nilable(String)) }
|
|
1461
|
+
attr_accessor :invoice_grouping_key
|
|
1462
|
+
|
|
1463
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1464
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1465
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1466
|
+
attr_reader :invoicing_cycle_configuration
|
|
1467
|
+
|
|
1468
|
+
sig do
|
|
1469
|
+
params(
|
|
1470
|
+
invoicing_cycle_configuration:
|
|
1471
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1472
|
+
).void
|
|
1473
|
+
end
|
|
1474
|
+
attr_writer :invoicing_cycle_configuration
|
|
1475
|
+
|
|
1476
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
1477
|
+
# also marks the price as eligible to draw down from that license type's
|
|
1478
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
1479
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
1480
|
+
# currency matches the allocation's.
|
|
1481
|
+
sig { returns(T.nilable(String)) }
|
|
1482
|
+
attr_accessor :license_type_id
|
|
1483
|
+
|
|
1484
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1485
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1486
|
+
# by setting `metadata` to `null`.
|
|
1487
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1488
|
+
attr_accessor :metadata
|
|
1489
|
+
|
|
1490
|
+
sig do
|
|
1491
|
+
params(
|
|
1492
|
+
cadence:
|
|
1493
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
|
|
1494
|
+
currency: String,
|
|
1495
|
+
item_id: String,
|
|
1496
|
+
name: String,
|
|
1497
|
+
tiered_matrix_with_allocation_config:
|
|
1498
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash,
|
|
1499
|
+
billable_metric_id: T.nilable(String),
|
|
1500
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1501
|
+
billing_cycle_configuration:
|
|
1502
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1503
|
+
conversion_rate: T.nilable(Float),
|
|
1504
|
+
conversion_rate_config:
|
|
1505
|
+
T.nilable(
|
|
1506
|
+
T.any(
|
|
1507
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1508
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1509
|
+
)
|
|
1510
|
+
),
|
|
1511
|
+
dimensional_price_configuration:
|
|
1512
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1513
|
+
external_price_id: T.nilable(String),
|
|
1514
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1515
|
+
invoice_grouping_key: T.nilable(String),
|
|
1516
|
+
invoicing_cycle_configuration:
|
|
1517
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1518
|
+
license_type_id: T.nilable(String),
|
|
1519
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1520
|
+
model_type: Symbol
|
|
1521
|
+
).returns(T.attached_class)
|
|
1522
|
+
end
|
|
1523
|
+
def self.new(
|
|
1524
|
+
# The cadence to bill for this price on.
|
|
1525
|
+
cadence:,
|
|
1526
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1527
|
+
currency:,
|
|
1528
|
+
# The id of the item the price will be associated with.
|
|
1529
|
+
item_id:,
|
|
1530
|
+
# The name of the price.
|
|
1531
|
+
name:,
|
|
1532
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1533
|
+
tiered_matrix_with_allocation_config:,
|
|
1534
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1535
|
+
# usage-based.
|
|
1536
|
+
billable_metric_id: nil,
|
|
1537
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1538
|
+
# this is true, and in-arrears if this is false.
|
|
1539
|
+
billed_in_advance: nil,
|
|
1540
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1541
|
+
# months.
|
|
1542
|
+
billing_cycle_configuration: nil,
|
|
1543
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1544
|
+
conversion_rate: nil,
|
|
1545
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1546
|
+
conversion_rate_config: nil,
|
|
1547
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1548
|
+
dimensional_price_configuration: nil,
|
|
1549
|
+
# An alias for the price.
|
|
1550
|
+
external_price_id: nil,
|
|
1551
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1552
|
+
# applied.
|
|
1553
|
+
fixed_price_quantity: nil,
|
|
1554
|
+
# The property used to group this price on an invoice
|
|
1555
|
+
invoice_grouping_key: nil,
|
|
1556
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1557
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1558
|
+
invoicing_cycle_configuration: nil,
|
|
1559
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
1560
|
+
# also marks the price as eligible to draw down from that license type's
|
|
1561
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
1562
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
1563
|
+
# currency matches the allocation's.
|
|
1564
|
+
license_type_id: nil,
|
|
1565
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1566
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1567
|
+
# by setting `metadata` to `null`.
|
|
1568
|
+
metadata: nil,
|
|
1569
|
+
# The pricing model type
|
|
1570
|
+
model_type: :tiered_matrix_with_allocation
|
|
1571
|
+
)
|
|
1572
|
+
end
|
|
1573
|
+
|
|
1574
|
+
sig do
|
|
1575
|
+
override.returns(
|
|
1576
|
+
{
|
|
1577
|
+
cadence:
|
|
1578
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
|
|
1579
|
+
currency: String,
|
|
1580
|
+
item_id: String,
|
|
1581
|
+
model_type: Symbol,
|
|
1582
|
+
name: String,
|
|
1583
|
+
tiered_matrix_with_allocation_config:
|
|
1584
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
1585
|
+
billable_metric_id: T.nilable(String),
|
|
1586
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1587
|
+
billing_cycle_configuration:
|
|
1588
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1589
|
+
conversion_rate: T.nilable(Float),
|
|
1590
|
+
conversion_rate_config:
|
|
1591
|
+
T.nilable(
|
|
1592
|
+
T.any(
|
|
1593
|
+
Orb::UnitConversionRateConfig,
|
|
1594
|
+
Orb::TieredConversionRateConfig
|
|
1595
|
+
)
|
|
1596
|
+
),
|
|
1597
|
+
dimensional_price_configuration:
|
|
1598
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1599
|
+
external_price_id: T.nilable(String),
|
|
1600
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1601
|
+
invoice_grouping_key: T.nilable(String),
|
|
1602
|
+
invoicing_cycle_configuration:
|
|
1603
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1604
|
+
license_type_id: T.nilable(String),
|
|
1605
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1606
|
+
}
|
|
1607
|
+
)
|
|
1608
|
+
end
|
|
1609
|
+
def to_hash
|
|
1610
|
+
end
|
|
1611
|
+
|
|
1612
|
+
# The cadence to bill for this price on.
|
|
1613
|
+
module Cadence
|
|
1614
|
+
extend Orb::Internal::Type::Enum
|
|
1615
|
+
|
|
1616
|
+
TaggedSymbol =
|
|
1617
|
+
T.type_alias do
|
|
1618
|
+
T.all(
|
|
1619
|
+
Symbol,
|
|
1620
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence
|
|
1621
|
+
)
|
|
1622
|
+
end
|
|
1623
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1624
|
+
|
|
1625
|
+
ANNUAL =
|
|
1626
|
+
T.let(
|
|
1627
|
+
:annual,
|
|
1628
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1629
|
+
)
|
|
1630
|
+
SEMI_ANNUAL =
|
|
1631
|
+
T.let(
|
|
1632
|
+
:semi_annual,
|
|
1633
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1634
|
+
)
|
|
1635
|
+
MONTHLY =
|
|
1636
|
+
T.let(
|
|
1637
|
+
:monthly,
|
|
1638
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1639
|
+
)
|
|
1640
|
+
QUARTERLY =
|
|
1641
|
+
T.let(
|
|
1642
|
+
:quarterly,
|
|
1643
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1644
|
+
)
|
|
1645
|
+
ONE_TIME =
|
|
1646
|
+
T.let(
|
|
1647
|
+
:one_time,
|
|
1648
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1649
|
+
)
|
|
1650
|
+
CUSTOM =
|
|
1651
|
+
T.let(
|
|
1652
|
+
:custom,
|
|
1653
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1654
|
+
)
|
|
1655
|
+
|
|
1656
|
+
sig do
|
|
1657
|
+
override.returns(
|
|
1658
|
+
T::Array[
|
|
1659
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1660
|
+
]
|
|
1661
|
+
)
|
|
1662
|
+
end
|
|
1663
|
+
def self.values
|
|
1664
|
+
end
|
|
1665
|
+
end
|
|
1666
|
+
|
|
1667
|
+
class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
|
|
1668
|
+
OrHash =
|
|
1669
|
+
T.type_alias do
|
|
1670
|
+
T.any(
|
|
1671
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
1672
|
+
Orb::Internal::AnyHash
|
|
1673
|
+
)
|
|
1674
|
+
end
|
|
1675
|
+
|
|
1676
|
+
# Usage allocation, pooled across all matrix cells
|
|
1677
|
+
sig { returns(String) }
|
|
1678
|
+
attr_accessor :allocation
|
|
1679
|
+
|
|
1680
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
1681
|
+
sig { returns(String) }
|
|
1682
|
+
attr_accessor :default_unit_amount
|
|
1683
|
+
|
|
1684
|
+
# One or two event property values to evaluate matrix cells by
|
|
1685
|
+
sig { returns(T::Array[String]) }
|
|
1686
|
+
attr_accessor :dimensions
|
|
1687
|
+
|
|
1688
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
1689
|
+
# own rows
|
|
1690
|
+
sig do
|
|
1691
|
+
returns(
|
|
1692
|
+
T::Array[
|
|
1693
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
1694
|
+
]
|
|
1695
|
+
)
|
|
1696
|
+
end
|
|
1697
|
+
attr_accessor :tiers
|
|
1698
|
+
|
|
1699
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1700
|
+
sig do
|
|
1701
|
+
params(
|
|
1702
|
+
allocation: String,
|
|
1703
|
+
default_unit_amount: String,
|
|
1704
|
+
dimensions: T::Array[String],
|
|
1705
|
+
tiers:
|
|
1706
|
+
T::Array[
|
|
1707
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier::OrHash
|
|
1708
|
+
]
|
|
1709
|
+
).returns(T.attached_class)
|
|
1710
|
+
end
|
|
1711
|
+
def self.new(
|
|
1712
|
+
# Usage allocation, pooled across all matrix cells
|
|
1713
|
+
allocation:,
|
|
1714
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
1715
|
+
default_unit_amount:,
|
|
1716
|
+
# One or two event property values to evaluate matrix cells by
|
|
1717
|
+
dimensions:,
|
|
1718
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
1719
|
+
# own rows
|
|
1720
|
+
tiers:
|
|
1721
|
+
)
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
sig do
|
|
1725
|
+
override.returns(
|
|
1726
|
+
{
|
|
1727
|
+
allocation: String,
|
|
1728
|
+
default_unit_amount: String,
|
|
1729
|
+
dimensions: T::Array[String],
|
|
1730
|
+
tiers:
|
|
1731
|
+
T::Array[
|
|
1732
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
1733
|
+
]
|
|
1734
|
+
}
|
|
1735
|
+
)
|
|
1736
|
+
end
|
|
1737
|
+
def to_hash
|
|
1738
|
+
end
|
|
1739
|
+
|
|
1740
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1741
|
+
OrHash =
|
|
1742
|
+
T.type_alias do
|
|
1743
|
+
T.any(
|
|
1744
|
+
Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier,
|
|
1745
|
+
Orb::Internal::AnyHash
|
|
1746
|
+
)
|
|
1747
|
+
end
|
|
1748
|
+
|
|
1749
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
1750
|
+
sig { returns(T::Array[String]) }
|
|
1751
|
+
attr_accessor :dimension_values
|
|
1752
|
+
|
|
1753
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1754
|
+
# configured for the same matrix cell.
|
|
1755
|
+
sig { returns(String) }
|
|
1756
|
+
attr_accessor :tier_lower_bound
|
|
1757
|
+
|
|
1758
|
+
# Per unit amount
|
|
1759
|
+
sig { returns(String) }
|
|
1760
|
+
attr_accessor :unit_amount
|
|
1761
|
+
|
|
1762
|
+
# Configuration for a single tier scoped to one matrix cell
|
|
1763
|
+
sig do
|
|
1764
|
+
params(
|
|
1765
|
+
dimension_values: T::Array[String],
|
|
1766
|
+
tier_lower_bound: String,
|
|
1767
|
+
unit_amount: String
|
|
1768
|
+
).returns(T.attached_class)
|
|
1769
|
+
end
|
|
1770
|
+
def self.new(
|
|
1771
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
1772
|
+
dimension_values:,
|
|
1773
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1774
|
+
# configured for the same matrix cell.
|
|
1775
|
+
tier_lower_bound:,
|
|
1776
|
+
# Per unit amount
|
|
1777
|
+
unit_amount:
|
|
1778
|
+
)
|
|
1779
|
+
end
|
|
1780
|
+
|
|
1781
|
+
sig do
|
|
1782
|
+
override.returns(
|
|
1783
|
+
{
|
|
1784
|
+
dimension_values: T::Array[String],
|
|
1785
|
+
tier_lower_bound: String,
|
|
1786
|
+
unit_amount: String
|
|
1787
|
+
}
|
|
1788
|
+
)
|
|
1789
|
+
end
|
|
1790
|
+
def to_hash
|
|
1791
|
+
end
|
|
1792
|
+
end
|
|
1793
|
+
end
|
|
1794
|
+
end
|
|
1795
|
+
|
|
1345
1796
|
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
1346
1797
|
OrHash =
|
|
1347
1798
|
T.type_alias do
|
|
@@ -104,6 +104,7 @@ module Orb
|
|
|
104
104
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
105
105
|
Orb::Price::UnitWithPercent::OrHash,
|
|
106
106
|
Orb::Price::MatrixWithAllocation::OrHash,
|
|
107
|
+
Orb::Price::TieredMatrixWithAllocation::OrHash,
|
|
107
108
|
Orb::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
108
109
|
Orb::Price::TieredWithProration::OrHash,
|
|
109
110
|
Orb::Price::UnitWithProration::OrHash,
|