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
|
@@ -138,6 +138,7 @@ module Orb
|
|
|
138
138
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
139
139
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
140
140
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
141
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
141
142
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
142
143
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
143
144
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -192,6 +193,7 @@ module Orb
|
|
|
192
193
|
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
193
194
|
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
194
195
|
Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
|
|
196
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::OrHash,
|
|
195
197
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
196
198
|
Orb::NewFloatingTieredWithProrationPrice::OrHash,
|
|
197
199
|
Orb::NewFloatingUnitWithProrationPrice::OrHash,
|
|
@@ -264,6 +266,7 @@ module Orb
|
|
|
264
266
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
265
267
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
266
268
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
269
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
267
270
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
268
271
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
269
272
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -315,6 +318,7 @@ module Orb
|
|
|
315
318
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
316
319
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
317
320
|
Orb::NewFloatingMatrixWithAllocationPrice,
|
|
321
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
318
322
|
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts,
|
|
319
323
|
Orb::NewFloatingTieredWithProrationPrice,
|
|
320
324
|
Orb::NewFloatingUnitWithProrationPrice,
|
|
@@ -1241,6 +1245,453 @@ module Orb
|
|
|
1241
1245
|
end
|
|
1242
1246
|
end
|
|
1243
1247
|
|
|
1248
|
+
class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
|
|
1249
|
+
OrHash =
|
|
1250
|
+
T.type_alias do
|
|
1251
|
+
T.any(
|
|
1252
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation,
|
|
1253
|
+
Orb::Internal::AnyHash
|
|
1254
|
+
)
|
|
1255
|
+
end
|
|
1256
|
+
|
|
1257
|
+
# The cadence to bill for this price on.
|
|
1258
|
+
sig do
|
|
1259
|
+
returns(
|
|
1260
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol
|
|
1261
|
+
)
|
|
1262
|
+
end
|
|
1263
|
+
attr_accessor :cadence
|
|
1264
|
+
|
|
1265
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1266
|
+
sig { returns(String) }
|
|
1267
|
+
attr_accessor :currency
|
|
1268
|
+
|
|
1269
|
+
# The id of the item the price will be associated with.
|
|
1270
|
+
sig { returns(String) }
|
|
1271
|
+
attr_accessor :item_id
|
|
1272
|
+
|
|
1273
|
+
# The pricing model type
|
|
1274
|
+
sig { returns(Symbol) }
|
|
1275
|
+
attr_accessor :model_type
|
|
1276
|
+
|
|
1277
|
+
# The name of the price.
|
|
1278
|
+
sig { returns(String) }
|
|
1279
|
+
attr_accessor :name
|
|
1280
|
+
|
|
1281
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1282
|
+
sig do
|
|
1283
|
+
returns(
|
|
1284
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
|
|
1285
|
+
)
|
|
1286
|
+
end
|
|
1287
|
+
attr_reader :tiered_matrix_with_allocation_config
|
|
1288
|
+
|
|
1289
|
+
sig do
|
|
1290
|
+
params(
|
|
1291
|
+
tiered_matrix_with_allocation_config:
|
|
1292
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash
|
|
1293
|
+
).void
|
|
1294
|
+
end
|
|
1295
|
+
attr_writer :tiered_matrix_with_allocation_config
|
|
1296
|
+
|
|
1297
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1298
|
+
# usage-based.
|
|
1299
|
+
sig { returns(T.nilable(String)) }
|
|
1300
|
+
attr_accessor :billable_metric_id
|
|
1301
|
+
|
|
1302
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1303
|
+
# this is true, and in-arrears if this is false.
|
|
1304
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1305
|
+
attr_accessor :billed_in_advance
|
|
1306
|
+
|
|
1307
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1308
|
+
# months.
|
|
1309
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1310
|
+
attr_reader :billing_cycle_configuration
|
|
1311
|
+
|
|
1312
|
+
sig do
|
|
1313
|
+
params(
|
|
1314
|
+
billing_cycle_configuration:
|
|
1315
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1316
|
+
).void
|
|
1317
|
+
end
|
|
1318
|
+
attr_writer :billing_cycle_configuration
|
|
1319
|
+
|
|
1320
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1321
|
+
sig { returns(T.nilable(Float)) }
|
|
1322
|
+
attr_accessor :conversion_rate
|
|
1323
|
+
|
|
1324
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1325
|
+
sig do
|
|
1326
|
+
returns(
|
|
1327
|
+
T.nilable(
|
|
1328
|
+
T.any(
|
|
1329
|
+
Orb::UnitConversionRateConfig,
|
|
1330
|
+
Orb::TieredConversionRateConfig
|
|
1331
|
+
)
|
|
1332
|
+
)
|
|
1333
|
+
)
|
|
1334
|
+
end
|
|
1335
|
+
attr_accessor :conversion_rate_config
|
|
1336
|
+
|
|
1337
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1338
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1339
|
+
attr_reader :dimensional_price_configuration
|
|
1340
|
+
|
|
1341
|
+
sig do
|
|
1342
|
+
params(
|
|
1343
|
+
dimensional_price_configuration:
|
|
1344
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1345
|
+
).void
|
|
1346
|
+
end
|
|
1347
|
+
attr_writer :dimensional_price_configuration
|
|
1348
|
+
|
|
1349
|
+
# An alias for the price.
|
|
1350
|
+
sig { returns(T.nilable(String)) }
|
|
1351
|
+
attr_accessor :external_price_id
|
|
1352
|
+
|
|
1353
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1354
|
+
# applied.
|
|
1355
|
+
sig { returns(T.nilable(Float)) }
|
|
1356
|
+
attr_accessor :fixed_price_quantity
|
|
1357
|
+
|
|
1358
|
+
# The property used to group this price on an invoice
|
|
1359
|
+
sig { returns(T.nilable(String)) }
|
|
1360
|
+
attr_accessor :invoice_grouping_key
|
|
1361
|
+
|
|
1362
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1363
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1364
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1365
|
+
attr_reader :invoicing_cycle_configuration
|
|
1366
|
+
|
|
1367
|
+
sig do
|
|
1368
|
+
params(
|
|
1369
|
+
invoicing_cycle_configuration:
|
|
1370
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1371
|
+
).void
|
|
1372
|
+
end
|
|
1373
|
+
attr_writer :invoicing_cycle_configuration
|
|
1374
|
+
|
|
1375
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
1376
|
+
# also marks the price as eligible to draw down from that license type's
|
|
1377
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
1378
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
1379
|
+
# currency matches the allocation's.
|
|
1380
|
+
sig { returns(T.nilable(String)) }
|
|
1381
|
+
attr_accessor :license_type_id
|
|
1382
|
+
|
|
1383
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1384
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1385
|
+
# by setting `metadata` to `null`.
|
|
1386
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1387
|
+
attr_accessor :metadata
|
|
1388
|
+
|
|
1389
|
+
sig do
|
|
1390
|
+
params(
|
|
1391
|
+
cadence:
|
|
1392
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
|
|
1393
|
+
currency: String,
|
|
1394
|
+
item_id: String,
|
|
1395
|
+
name: String,
|
|
1396
|
+
tiered_matrix_with_allocation_config:
|
|
1397
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash,
|
|
1398
|
+
billable_metric_id: T.nilable(String),
|
|
1399
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1400
|
+
billing_cycle_configuration:
|
|
1401
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1402
|
+
conversion_rate: T.nilable(Float),
|
|
1403
|
+
conversion_rate_config:
|
|
1404
|
+
T.nilable(
|
|
1405
|
+
T.any(
|
|
1406
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1407
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1408
|
+
)
|
|
1409
|
+
),
|
|
1410
|
+
dimensional_price_configuration:
|
|
1411
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1412
|
+
external_price_id: T.nilable(String),
|
|
1413
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1414
|
+
invoice_grouping_key: T.nilable(String),
|
|
1415
|
+
invoicing_cycle_configuration:
|
|
1416
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1417
|
+
license_type_id: T.nilable(String),
|
|
1418
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1419
|
+
model_type: Symbol
|
|
1420
|
+
).returns(T.attached_class)
|
|
1421
|
+
end
|
|
1422
|
+
def self.new(
|
|
1423
|
+
# The cadence to bill for this price on.
|
|
1424
|
+
cadence:,
|
|
1425
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1426
|
+
currency:,
|
|
1427
|
+
# The id of the item the price will be associated with.
|
|
1428
|
+
item_id:,
|
|
1429
|
+
# The name of the price.
|
|
1430
|
+
name:,
|
|
1431
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1432
|
+
tiered_matrix_with_allocation_config:,
|
|
1433
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1434
|
+
# usage-based.
|
|
1435
|
+
billable_metric_id: nil,
|
|
1436
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1437
|
+
# this is true, and in-arrears if this is false.
|
|
1438
|
+
billed_in_advance: nil,
|
|
1439
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1440
|
+
# months.
|
|
1441
|
+
billing_cycle_configuration: nil,
|
|
1442
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1443
|
+
conversion_rate: nil,
|
|
1444
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1445
|
+
conversion_rate_config: nil,
|
|
1446
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1447
|
+
dimensional_price_configuration: nil,
|
|
1448
|
+
# An alias for the price.
|
|
1449
|
+
external_price_id: nil,
|
|
1450
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1451
|
+
# applied.
|
|
1452
|
+
fixed_price_quantity: nil,
|
|
1453
|
+
# The property used to group this price on an invoice
|
|
1454
|
+
invoice_grouping_key: nil,
|
|
1455
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1456
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1457
|
+
invoicing_cycle_configuration: nil,
|
|
1458
|
+
# The ID of the license type to associate with this price. On a usage price this
|
|
1459
|
+
# also marks the price as eligible to draw down from that license type's
|
|
1460
|
+
# allocation; a usage price created without it is billed normally. Usage prices
|
|
1461
|
+
# with a license type must use the `unit` model, and only draw down when their
|
|
1462
|
+
# currency matches the allocation's.
|
|
1463
|
+
license_type_id: nil,
|
|
1464
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1465
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1466
|
+
# by setting `metadata` to `null`.
|
|
1467
|
+
metadata: nil,
|
|
1468
|
+
# The pricing model type
|
|
1469
|
+
model_type: :tiered_matrix_with_allocation
|
|
1470
|
+
)
|
|
1471
|
+
end
|
|
1472
|
+
|
|
1473
|
+
sig do
|
|
1474
|
+
override.returns(
|
|
1475
|
+
{
|
|
1476
|
+
cadence:
|
|
1477
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
|
|
1478
|
+
currency: String,
|
|
1479
|
+
item_id: String,
|
|
1480
|
+
model_type: Symbol,
|
|
1481
|
+
name: String,
|
|
1482
|
+
tiered_matrix_with_allocation_config:
|
|
1483
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
1484
|
+
billable_metric_id: T.nilable(String),
|
|
1485
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1486
|
+
billing_cycle_configuration:
|
|
1487
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1488
|
+
conversion_rate: T.nilable(Float),
|
|
1489
|
+
conversion_rate_config:
|
|
1490
|
+
T.nilable(
|
|
1491
|
+
T.any(
|
|
1492
|
+
Orb::UnitConversionRateConfig,
|
|
1493
|
+
Orb::TieredConversionRateConfig
|
|
1494
|
+
)
|
|
1495
|
+
),
|
|
1496
|
+
dimensional_price_configuration:
|
|
1497
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1498
|
+
external_price_id: T.nilable(String),
|
|
1499
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1500
|
+
invoice_grouping_key: T.nilable(String),
|
|
1501
|
+
invoicing_cycle_configuration:
|
|
1502
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1503
|
+
license_type_id: T.nilable(String),
|
|
1504
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1505
|
+
}
|
|
1506
|
+
)
|
|
1507
|
+
end
|
|
1508
|
+
def to_hash
|
|
1509
|
+
end
|
|
1510
|
+
|
|
1511
|
+
# The cadence to bill for this price on.
|
|
1512
|
+
module Cadence
|
|
1513
|
+
extend Orb::Internal::Type::Enum
|
|
1514
|
+
|
|
1515
|
+
TaggedSymbol =
|
|
1516
|
+
T.type_alias do
|
|
1517
|
+
T.all(
|
|
1518
|
+
Symbol,
|
|
1519
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence
|
|
1520
|
+
)
|
|
1521
|
+
end
|
|
1522
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1523
|
+
|
|
1524
|
+
ANNUAL =
|
|
1525
|
+
T.let(
|
|
1526
|
+
:annual,
|
|
1527
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1528
|
+
)
|
|
1529
|
+
SEMI_ANNUAL =
|
|
1530
|
+
T.let(
|
|
1531
|
+
:semi_annual,
|
|
1532
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1533
|
+
)
|
|
1534
|
+
MONTHLY =
|
|
1535
|
+
T.let(
|
|
1536
|
+
:monthly,
|
|
1537
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1538
|
+
)
|
|
1539
|
+
QUARTERLY =
|
|
1540
|
+
T.let(
|
|
1541
|
+
:quarterly,
|
|
1542
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1543
|
+
)
|
|
1544
|
+
ONE_TIME =
|
|
1545
|
+
T.let(
|
|
1546
|
+
:one_time,
|
|
1547
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1548
|
+
)
|
|
1549
|
+
CUSTOM =
|
|
1550
|
+
T.let(
|
|
1551
|
+
:custom,
|
|
1552
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
sig do
|
|
1556
|
+
override.returns(
|
|
1557
|
+
T::Array[
|
|
1558
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
1559
|
+
]
|
|
1560
|
+
)
|
|
1561
|
+
end
|
|
1562
|
+
def self.values
|
|
1563
|
+
end
|
|
1564
|
+
end
|
|
1565
|
+
|
|
1566
|
+
class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
|
|
1567
|
+
OrHash =
|
|
1568
|
+
T.type_alias do
|
|
1569
|
+
T.any(
|
|
1570
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
1571
|
+
Orb::Internal::AnyHash
|
|
1572
|
+
)
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
# Usage allocation, pooled across all matrix cells
|
|
1576
|
+
sig { returns(String) }
|
|
1577
|
+
attr_accessor :allocation
|
|
1578
|
+
|
|
1579
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
1580
|
+
sig { returns(String) }
|
|
1581
|
+
attr_accessor :default_unit_amount
|
|
1582
|
+
|
|
1583
|
+
# One or two event property values to evaluate matrix cells by
|
|
1584
|
+
sig { returns(T::Array[String]) }
|
|
1585
|
+
attr_accessor :dimensions
|
|
1586
|
+
|
|
1587
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
1588
|
+
# own rows
|
|
1589
|
+
sig do
|
|
1590
|
+
returns(
|
|
1591
|
+
T::Array[
|
|
1592
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
1593
|
+
]
|
|
1594
|
+
)
|
|
1595
|
+
end
|
|
1596
|
+
attr_accessor :tiers
|
|
1597
|
+
|
|
1598
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
1599
|
+
sig do
|
|
1600
|
+
params(
|
|
1601
|
+
allocation: String,
|
|
1602
|
+
default_unit_amount: String,
|
|
1603
|
+
dimensions: T::Array[String],
|
|
1604
|
+
tiers:
|
|
1605
|
+
T::Array[
|
|
1606
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier::OrHash
|
|
1607
|
+
]
|
|
1608
|
+
).returns(T.attached_class)
|
|
1609
|
+
end
|
|
1610
|
+
def self.new(
|
|
1611
|
+
# Usage allocation, pooled across all matrix cells
|
|
1612
|
+
allocation:,
|
|
1613
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
1614
|
+
default_unit_amount:,
|
|
1615
|
+
# One or two event property values to evaluate matrix cells by
|
|
1616
|
+
dimensions:,
|
|
1617
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
1618
|
+
# own rows
|
|
1619
|
+
tiers:
|
|
1620
|
+
)
|
|
1621
|
+
end
|
|
1622
|
+
|
|
1623
|
+
sig do
|
|
1624
|
+
override.returns(
|
|
1625
|
+
{
|
|
1626
|
+
allocation: String,
|
|
1627
|
+
default_unit_amount: String,
|
|
1628
|
+
dimensions: T::Array[String],
|
|
1629
|
+
tiers:
|
|
1630
|
+
T::Array[
|
|
1631
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
1632
|
+
]
|
|
1633
|
+
}
|
|
1634
|
+
)
|
|
1635
|
+
end
|
|
1636
|
+
def to_hash
|
|
1637
|
+
end
|
|
1638
|
+
|
|
1639
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1640
|
+
OrHash =
|
|
1641
|
+
T.type_alias do
|
|
1642
|
+
T.any(
|
|
1643
|
+
Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier,
|
|
1644
|
+
Orb::Internal::AnyHash
|
|
1645
|
+
)
|
|
1646
|
+
end
|
|
1647
|
+
|
|
1648
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
1649
|
+
sig { returns(T::Array[String]) }
|
|
1650
|
+
attr_accessor :dimension_values
|
|
1651
|
+
|
|
1652
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1653
|
+
# configured for the same matrix cell.
|
|
1654
|
+
sig { returns(String) }
|
|
1655
|
+
attr_accessor :tier_lower_bound
|
|
1656
|
+
|
|
1657
|
+
# Per unit amount
|
|
1658
|
+
sig { returns(String) }
|
|
1659
|
+
attr_accessor :unit_amount
|
|
1660
|
+
|
|
1661
|
+
# Configuration for a single tier scoped to one matrix cell
|
|
1662
|
+
sig do
|
|
1663
|
+
params(
|
|
1664
|
+
dimension_values: T::Array[String],
|
|
1665
|
+
tier_lower_bound: String,
|
|
1666
|
+
unit_amount: String
|
|
1667
|
+
).returns(T.attached_class)
|
|
1668
|
+
end
|
|
1669
|
+
def self.new(
|
|
1670
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
1671
|
+
dimension_values:,
|
|
1672
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1673
|
+
# configured for the same matrix cell.
|
|
1674
|
+
tier_lower_bound:,
|
|
1675
|
+
# Per unit amount
|
|
1676
|
+
unit_amount:
|
|
1677
|
+
)
|
|
1678
|
+
end
|
|
1679
|
+
|
|
1680
|
+
sig do
|
|
1681
|
+
override.returns(
|
|
1682
|
+
{
|
|
1683
|
+
dimension_values: T::Array[String],
|
|
1684
|
+
tier_lower_bound: String,
|
|
1685
|
+
unit_amount: String
|
|
1686
|
+
}
|
|
1687
|
+
)
|
|
1688
|
+
end
|
|
1689
|
+
def to_hash
|
|
1690
|
+
end
|
|
1691
|
+
end
|
|
1692
|
+
end
|
|
1693
|
+
end
|
|
1694
|
+
|
|
1244
1695
|
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
1245
1696
|
OrHash =
|
|
1246
1697
|
T.type_alias do
|