orb-billing 1.24.0 → 1.26.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/alert.rb +4 -2
- data/lib/orb/models/alert_update_params.rb +5 -3
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +530 -6
- data/lib/orb/models/beta_create_plan_version_params.rb +526 -6
- data/lib/orb/models/changed_subscription_resources.rb +5 -5
- data/lib/orb/models/invoice.rb +5 -5
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +5 -5
- data/lib/orb/models/invoice_issue_summary_response.rb +3 -3
- data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
- data/lib/orb/models/invoice_list_summary_response.rb +3 -3
- 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 +259 -3
- data/lib/orb/models/plan_version.rb +2 -2
- data/lib/orb/models/price.rb +433 -1
- data/lib/orb/models/price_create_params.rb +244 -3
- data/lib/orb/models/price_evaluate_multiple_params.rb +255 -3
- data/lib/orb/models/price_evaluate_preview_events_params.rb +255 -3
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription_create_params.rb +521 -6
- data/lib/orb/models/subscription_price_intervals_params.rb +251 -3
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +530 -6
- data/lib/orb/resources/alerts.rb +5 -2
- data/lib/orb/resources/customers/costs.rb +20 -0
- data/lib/orb/resources/licenses/external_licenses.rb +7 -0
- data/lib/orb/resources/licenses/usage.rb +3 -0
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/resources/subscriptions.rb +39 -6
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/alert.rbi +6 -2
- data/rbi/orb/models/alert_update_params.rbi +8 -4
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2789 -1903
- data/rbi/orb/models/beta_create_plan_version_params.rbi +2788 -1902
- data/rbi/orb/models/changed_subscription_resources.rbi +7 -6
- data/rbi/orb/models/invoice.rbi +7 -6
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +7 -6
- data/rbi/orb/models/invoice_issue_summary_response.rbi +6 -6
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +6 -6
- 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 +443 -0
- data/rbi/orb/models/plan_version.rbi +1 -0
- data/rbi/orb/models/price.rbi +766 -0
- data/rbi/orb/models/price_create_params.rbi +431 -0
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +431 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +431 -0
- data/rbi/orb/models/price_interval.rbi +1 -0
- data/rbi/orb/models/subscription_create_params.rbi +2489 -1603
- data/rbi/orb/models/subscription_price_intervals_params.rbi +431 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2483 -1597
- data/rbi/orb/resources/alerts.rbi +8 -3
- data/rbi/orb/resources/customers/costs.rbi +20 -0
- data/rbi/orb/resources/licenses/external_licenses.rbi +7 -0
- data/rbi/orb/resources/licenses/usage.rbi +3 -0
- data/rbi/orb/resources/prices.rbi +1 -0
- data/rbi/orb/resources/subscriptions.rbi +39 -6
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +366 -0
- data/sig/orb/models/beta_create_plan_version_params.rbs +366 -0
- data/sig/orb/models/plan_create_params.rbs +183 -0
- data/sig/orb/models/price.rbs +327 -0
- data/sig/orb/models/price_create_params.rbs +173 -0
- data/sig/orb/models/price_evaluate_multiple_params.rbs +178 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +178 -0
- data/sig/orb/models/subscription_create_params.rbs +366 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +178 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +366 -0
- metadata +2 -2
|
@@ -260,6 +260,7 @@ module Orb
|
|
|
260
260
|
Orb::NewFloatingTieredPackagePrice,
|
|
261
261
|
Orb::NewFloatingTieredWithMinimumPrice,
|
|
262
262
|
Orb::NewFloatingGroupedTieredPrice,
|
|
263
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix,
|
|
263
264
|
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
264
265
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
265
266
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
@@ -344,6 +345,7 @@ module Orb
|
|
|
344
345
|
Orb::NewFloatingTieredPackagePrice::OrHash,
|
|
345
346
|
Orb::NewFloatingTieredWithMinimumPrice::OrHash,
|
|
346
347
|
Orb::NewFloatingGroupedTieredPrice::OrHash,
|
|
348
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::OrHash,
|
|
347
349
|
Orb::NewFloatingTieredPackageWithMinimumPrice::OrHash,
|
|
348
350
|
Orb::NewFloatingPackageWithAllocationPrice::OrHash,
|
|
349
351
|
Orb::NewFloatingUnitWithPercentPrice::OrHash,
|
|
@@ -464,6 +466,7 @@ module Orb
|
|
|
464
466
|
Orb::NewFloatingTieredPackagePrice,
|
|
465
467
|
Orb::NewFloatingTieredWithMinimumPrice,
|
|
466
468
|
Orb::NewFloatingGroupedTieredPrice,
|
|
469
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix,
|
|
467
470
|
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
468
471
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
469
472
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
@@ -728,6 +731,7 @@ module Orb
|
|
|
728
731
|
Orb::NewFloatingTieredPackagePrice,
|
|
729
732
|
Orb::NewFloatingTieredWithMinimumPrice,
|
|
730
733
|
Orb::NewFloatingGroupedTieredPrice,
|
|
734
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix,
|
|
731
735
|
Orb::NewFloatingTieredPackageWithMinimumPrice,
|
|
732
736
|
Orb::NewFloatingPackageWithAllocationPrice,
|
|
733
737
|
Orb::NewFloatingUnitWithPercentPrice,
|
|
@@ -1215,6 +1219,433 @@ module Orb
|
|
|
1215
1219
|
end
|
|
1216
1220
|
end
|
|
1217
1221
|
|
|
1222
|
+
class GroupedTieredMatrix < Orb::Internal::Type::BaseModel
|
|
1223
|
+
OrHash =
|
|
1224
|
+
T.type_alias do
|
|
1225
|
+
T.any(
|
|
1226
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix,
|
|
1227
|
+
Orb::Internal::AnyHash
|
|
1228
|
+
)
|
|
1229
|
+
end
|
|
1230
|
+
|
|
1231
|
+
# The cadence to bill for this price on.
|
|
1232
|
+
sig do
|
|
1233
|
+
returns(
|
|
1234
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::OrSymbol
|
|
1235
|
+
)
|
|
1236
|
+
end
|
|
1237
|
+
attr_accessor :cadence
|
|
1238
|
+
|
|
1239
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1240
|
+
sig { returns(String) }
|
|
1241
|
+
attr_accessor :currency
|
|
1242
|
+
|
|
1243
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1244
|
+
sig do
|
|
1245
|
+
returns(
|
|
1246
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig
|
|
1247
|
+
)
|
|
1248
|
+
end
|
|
1249
|
+
attr_reader :grouped_tiered_matrix_config
|
|
1250
|
+
|
|
1251
|
+
sig do
|
|
1252
|
+
params(
|
|
1253
|
+
grouped_tiered_matrix_config:
|
|
1254
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::OrHash
|
|
1255
|
+
).void
|
|
1256
|
+
end
|
|
1257
|
+
attr_writer :grouped_tiered_matrix_config
|
|
1258
|
+
|
|
1259
|
+
# The id of the item the price will be associated with.
|
|
1260
|
+
sig { returns(String) }
|
|
1261
|
+
attr_accessor :item_id
|
|
1262
|
+
|
|
1263
|
+
# The pricing model type
|
|
1264
|
+
sig { returns(Symbol) }
|
|
1265
|
+
attr_accessor :model_type
|
|
1266
|
+
|
|
1267
|
+
# The name of the price.
|
|
1268
|
+
sig { returns(String) }
|
|
1269
|
+
attr_accessor :name
|
|
1270
|
+
|
|
1271
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1272
|
+
# usage-based.
|
|
1273
|
+
sig { returns(T.nilable(String)) }
|
|
1274
|
+
attr_accessor :billable_metric_id
|
|
1275
|
+
|
|
1276
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1277
|
+
# this is true, and in-arrears if this is false.
|
|
1278
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1279
|
+
attr_accessor :billed_in_advance
|
|
1280
|
+
|
|
1281
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1282
|
+
# months.
|
|
1283
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1284
|
+
attr_reader :billing_cycle_configuration
|
|
1285
|
+
|
|
1286
|
+
sig do
|
|
1287
|
+
params(
|
|
1288
|
+
billing_cycle_configuration:
|
|
1289
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1290
|
+
).void
|
|
1291
|
+
end
|
|
1292
|
+
attr_writer :billing_cycle_configuration
|
|
1293
|
+
|
|
1294
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1295
|
+
sig { returns(T.nilable(Float)) }
|
|
1296
|
+
attr_accessor :conversion_rate
|
|
1297
|
+
|
|
1298
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1299
|
+
sig do
|
|
1300
|
+
returns(
|
|
1301
|
+
T.nilable(
|
|
1302
|
+
T.any(
|
|
1303
|
+
Orb::UnitConversionRateConfig,
|
|
1304
|
+
Orb::TieredConversionRateConfig
|
|
1305
|
+
)
|
|
1306
|
+
)
|
|
1307
|
+
)
|
|
1308
|
+
end
|
|
1309
|
+
attr_accessor :conversion_rate_config
|
|
1310
|
+
|
|
1311
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1312
|
+
sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
|
|
1313
|
+
attr_reader :dimensional_price_configuration
|
|
1314
|
+
|
|
1315
|
+
sig do
|
|
1316
|
+
params(
|
|
1317
|
+
dimensional_price_configuration:
|
|
1318
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
|
|
1319
|
+
).void
|
|
1320
|
+
end
|
|
1321
|
+
attr_writer :dimensional_price_configuration
|
|
1322
|
+
|
|
1323
|
+
# An alias for the price.
|
|
1324
|
+
sig { returns(T.nilable(String)) }
|
|
1325
|
+
attr_accessor :external_price_id
|
|
1326
|
+
|
|
1327
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1328
|
+
# applied.
|
|
1329
|
+
sig { returns(T.nilable(Float)) }
|
|
1330
|
+
attr_accessor :fixed_price_quantity
|
|
1331
|
+
|
|
1332
|
+
# The property used to group this price on an invoice
|
|
1333
|
+
sig { returns(T.nilable(String)) }
|
|
1334
|
+
attr_accessor :invoice_grouping_key
|
|
1335
|
+
|
|
1336
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1337
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1338
|
+
sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
|
|
1339
|
+
attr_reader :invoicing_cycle_configuration
|
|
1340
|
+
|
|
1341
|
+
sig do
|
|
1342
|
+
params(
|
|
1343
|
+
invoicing_cycle_configuration:
|
|
1344
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
|
|
1345
|
+
).void
|
|
1346
|
+
end
|
|
1347
|
+
attr_writer :invoicing_cycle_configuration
|
|
1348
|
+
|
|
1349
|
+
# The ID of the license type to associate with this price.
|
|
1350
|
+
sig { returns(T.nilable(String)) }
|
|
1351
|
+
attr_accessor :license_type_id
|
|
1352
|
+
|
|
1353
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1354
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1355
|
+
# by setting `metadata` to `null`.
|
|
1356
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
1357
|
+
attr_accessor :metadata
|
|
1358
|
+
|
|
1359
|
+
sig do
|
|
1360
|
+
params(
|
|
1361
|
+
cadence:
|
|
1362
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::OrSymbol,
|
|
1363
|
+
currency: String,
|
|
1364
|
+
grouped_tiered_matrix_config:
|
|
1365
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::OrHash,
|
|
1366
|
+
item_id: String,
|
|
1367
|
+
name: String,
|
|
1368
|
+
billable_metric_id: T.nilable(String),
|
|
1369
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1370
|
+
billing_cycle_configuration:
|
|
1371
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1372
|
+
conversion_rate: T.nilable(Float),
|
|
1373
|
+
conversion_rate_config:
|
|
1374
|
+
T.nilable(
|
|
1375
|
+
T.any(
|
|
1376
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
1377
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
1378
|
+
)
|
|
1379
|
+
),
|
|
1380
|
+
dimensional_price_configuration:
|
|
1381
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
|
|
1382
|
+
external_price_id: T.nilable(String),
|
|
1383
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1384
|
+
invoice_grouping_key: T.nilable(String),
|
|
1385
|
+
invoicing_cycle_configuration:
|
|
1386
|
+
T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
|
|
1387
|
+
license_type_id: T.nilable(String),
|
|
1388
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
1389
|
+
model_type: Symbol
|
|
1390
|
+
).returns(T.attached_class)
|
|
1391
|
+
end
|
|
1392
|
+
def self.new(
|
|
1393
|
+
# The cadence to bill for this price on.
|
|
1394
|
+
cadence:,
|
|
1395
|
+
# An ISO 4217 currency string for which this price is billed in.
|
|
1396
|
+
currency:,
|
|
1397
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1398
|
+
grouped_tiered_matrix_config:,
|
|
1399
|
+
# The id of the item the price will be associated with.
|
|
1400
|
+
item_id:,
|
|
1401
|
+
# The name of the price.
|
|
1402
|
+
name:,
|
|
1403
|
+
# The id of the billable metric for the price. Only needed if the price is
|
|
1404
|
+
# usage-based.
|
|
1405
|
+
billable_metric_id: nil,
|
|
1406
|
+
# If the Price represents a fixed cost, the price will be billed in-advance if
|
|
1407
|
+
# this is true, and in-arrears if this is false.
|
|
1408
|
+
billed_in_advance: nil,
|
|
1409
|
+
# For custom cadence: specifies the duration of the billing period in days or
|
|
1410
|
+
# months.
|
|
1411
|
+
billing_cycle_configuration: nil,
|
|
1412
|
+
# The per unit conversion rate of the price currency to the invoicing currency.
|
|
1413
|
+
conversion_rate: nil,
|
|
1414
|
+
# The configuration for the rate of the price currency to the invoicing currency.
|
|
1415
|
+
conversion_rate_config: nil,
|
|
1416
|
+
# For dimensional price: specifies a price group and dimension values
|
|
1417
|
+
dimensional_price_configuration: nil,
|
|
1418
|
+
# An alias for the price.
|
|
1419
|
+
external_price_id: nil,
|
|
1420
|
+
# If the Price represents a fixed cost, this represents the quantity of units
|
|
1421
|
+
# applied.
|
|
1422
|
+
fixed_price_quantity: nil,
|
|
1423
|
+
# The property used to group this price on an invoice
|
|
1424
|
+
invoice_grouping_key: nil,
|
|
1425
|
+
# Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
1426
|
+
# If unspecified, a single invoice is produced per billing cycle.
|
|
1427
|
+
invoicing_cycle_configuration: nil,
|
|
1428
|
+
# The ID of the license type to associate with this price.
|
|
1429
|
+
license_type_id: nil,
|
|
1430
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1431
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1432
|
+
# by setting `metadata` to `null`.
|
|
1433
|
+
metadata: nil,
|
|
1434
|
+
# The pricing model type
|
|
1435
|
+
model_type: :grouped_tiered_matrix
|
|
1436
|
+
)
|
|
1437
|
+
end
|
|
1438
|
+
|
|
1439
|
+
sig do
|
|
1440
|
+
override.returns(
|
|
1441
|
+
{
|
|
1442
|
+
cadence:
|
|
1443
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::OrSymbol,
|
|
1444
|
+
currency: String,
|
|
1445
|
+
grouped_tiered_matrix_config:
|
|
1446
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
|
|
1447
|
+
item_id: String,
|
|
1448
|
+
model_type: Symbol,
|
|
1449
|
+
name: String,
|
|
1450
|
+
billable_metric_id: T.nilable(String),
|
|
1451
|
+
billed_in_advance: T.nilable(T::Boolean),
|
|
1452
|
+
billing_cycle_configuration:
|
|
1453
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1454
|
+
conversion_rate: T.nilable(Float),
|
|
1455
|
+
conversion_rate_config:
|
|
1456
|
+
T.nilable(
|
|
1457
|
+
T.any(
|
|
1458
|
+
Orb::UnitConversionRateConfig,
|
|
1459
|
+
Orb::TieredConversionRateConfig
|
|
1460
|
+
)
|
|
1461
|
+
),
|
|
1462
|
+
dimensional_price_configuration:
|
|
1463
|
+
T.nilable(Orb::NewDimensionalPriceConfiguration),
|
|
1464
|
+
external_price_id: T.nilable(String),
|
|
1465
|
+
fixed_price_quantity: T.nilable(Float),
|
|
1466
|
+
invoice_grouping_key: T.nilable(String),
|
|
1467
|
+
invoicing_cycle_configuration:
|
|
1468
|
+
T.nilable(Orb::NewBillingCycleConfiguration),
|
|
1469
|
+
license_type_id: T.nilable(String),
|
|
1470
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
|
|
1471
|
+
}
|
|
1472
|
+
)
|
|
1473
|
+
end
|
|
1474
|
+
def to_hash
|
|
1475
|
+
end
|
|
1476
|
+
|
|
1477
|
+
# The cadence to bill for this price on.
|
|
1478
|
+
module Cadence
|
|
1479
|
+
extend Orb::Internal::Type::Enum
|
|
1480
|
+
|
|
1481
|
+
TaggedSymbol =
|
|
1482
|
+
T.type_alias do
|
|
1483
|
+
T.all(
|
|
1484
|
+
Symbol,
|
|
1485
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence
|
|
1486
|
+
)
|
|
1487
|
+
end
|
|
1488
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1489
|
+
|
|
1490
|
+
ANNUAL =
|
|
1491
|
+
T.let(
|
|
1492
|
+
:annual,
|
|
1493
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1494
|
+
)
|
|
1495
|
+
SEMI_ANNUAL =
|
|
1496
|
+
T.let(
|
|
1497
|
+
:semi_annual,
|
|
1498
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1499
|
+
)
|
|
1500
|
+
MONTHLY =
|
|
1501
|
+
T.let(
|
|
1502
|
+
:monthly,
|
|
1503
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1504
|
+
)
|
|
1505
|
+
QUARTERLY =
|
|
1506
|
+
T.let(
|
|
1507
|
+
:quarterly,
|
|
1508
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1509
|
+
)
|
|
1510
|
+
ONE_TIME =
|
|
1511
|
+
T.let(
|
|
1512
|
+
:one_time,
|
|
1513
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1514
|
+
)
|
|
1515
|
+
CUSTOM =
|
|
1516
|
+
T.let(
|
|
1517
|
+
:custom,
|
|
1518
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
sig do
|
|
1522
|
+
override.returns(
|
|
1523
|
+
T::Array[
|
|
1524
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::Cadence::TaggedSymbol
|
|
1525
|
+
]
|
|
1526
|
+
)
|
|
1527
|
+
end
|
|
1528
|
+
def self.values
|
|
1529
|
+
end
|
|
1530
|
+
end
|
|
1531
|
+
|
|
1532
|
+
class GroupedTieredMatrixConfig < Orb::Internal::Type::BaseModel
|
|
1533
|
+
OrHash =
|
|
1534
|
+
T.type_alias do
|
|
1535
|
+
T.any(
|
|
1536
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig,
|
|
1537
|
+
Orb::Internal::AnyHash
|
|
1538
|
+
)
|
|
1539
|
+
end
|
|
1540
|
+
|
|
1541
|
+
# Per unit rate for usage whose dimension value has no configured tiers
|
|
1542
|
+
sig { returns(String) }
|
|
1543
|
+
attr_accessor :default_unit_amount
|
|
1544
|
+
|
|
1545
|
+
# The billable metric property used to group usage before tiering
|
|
1546
|
+
sig { returns(String) }
|
|
1547
|
+
attr_accessor :dimension
|
|
1548
|
+
|
|
1549
|
+
# Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
1550
|
+
# against its own rows
|
|
1551
|
+
sig do
|
|
1552
|
+
returns(
|
|
1553
|
+
T::Array[
|
|
1554
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier
|
|
1555
|
+
]
|
|
1556
|
+
)
|
|
1557
|
+
end
|
|
1558
|
+
attr_accessor :tiers
|
|
1559
|
+
|
|
1560
|
+
# Configuration for grouped_tiered_matrix pricing
|
|
1561
|
+
sig do
|
|
1562
|
+
params(
|
|
1563
|
+
default_unit_amount: String,
|
|
1564
|
+
dimension: String,
|
|
1565
|
+
tiers:
|
|
1566
|
+
T::Array[
|
|
1567
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier::OrHash
|
|
1568
|
+
]
|
|
1569
|
+
).returns(T.attached_class)
|
|
1570
|
+
end
|
|
1571
|
+
def self.new(
|
|
1572
|
+
# Per unit rate for usage whose dimension value has no configured tiers
|
|
1573
|
+
default_unit_amount:,
|
|
1574
|
+
# The billable metric property used to group usage before tiering
|
|
1575
|
+
dimension:,
|
|
1576
|
+
# Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
1577
|
+
# against its own rows
|
|
1578
|
+
tiers:
|
|
1579
|
+
)
|
|
1580
|
+
end
|
|
1581
|
+
|
|
1582
|
+
sig do
|
|
1583
|
+
override.returns(
|
|
1584
|
+
{
|
|
1585
|
+
default_unit_amount: String,
|
|
1586
|
+
dimension: String,
|
|
1587
|
+
tiers:
|
|
1588
|
+
T::Array[
|
|
1589
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier
|
|
1590
|
+
]
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
end
|
|
1594
|
+
def to_hash
|
|
1595
|
+
end
|
|
1596
|
+
|
|
1597
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1598
|
+
OrHash =
|
|
1599
|
+
T.type_alias do
|
|
1600
|
+
T.any(
|
|
1601
|
+
Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedTieredMatrix::GroupedTieredMatrixConfig::Tier,
|
|
1602
|
+
Orb::Internal::AnyHash
|
|
1603
|
+
)
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
# The dimension value this tier applies to
|
|
1607
|
+
sig { returns(String) }
|
|
1608
|
+
attr_accessor :dimension_value
|
|
1609
|
+
|
|
1610
|
+
sig { returns(String) }
|
|
1611
|
+
attr_accessor :tier_lower_bound
|
|
1612
|
+
|
|
1613
|
+
# Per unit amount
|
|
1614
|
+
sig { returns(String) }
|
|
1615
|
+
attr_accessor :unit_amount
|
|
1616
|
+
|
|
1617
|
+
# Configuration for a single tier scoped to a dimension value
|
|
1618
|
+
sig do
|
|
1619
|
+
params(
|
|
1620
|
+
dimension_value: String,
|
|
1621
|
+
tier_lower_bound: String,
|
|
1622
|
+
unit_amount: String
|
|
1623
|
+
).returns(T.attached_class)
|
|
1624
|
+
end
|
|
1625
|
+
def self.new(
|
|
1626
|
+
# The dimension value this tier applies to
|
|
1627
|
+
dimension_value:,
|
|
1628
|
+
tier_lower_bound:,
|
|
1629
|
+
# Per unit amount
|
|
1630
|
+
unit_amount:
|
|
1631
|
+
)
|
|
1632
|
+
end
|
|
1633
|
+
|
|
1634
|
+
sig do
|
|
1635
|
+
override.returns(
|
|
1636
|
+
{
|
|
1637
|
+
dimension_value: String,
|
|
1638
|
+
tier_lower_bound: String,
|
|
1639
|
+
unit_amount: String
|
|
1640
|
+
}
|
|
1641
|
+
)
|
|
1642
|
+
end
|
|
1643
|
+
def to_hash
|
|
1644
|
+
end
|
|
1645
|
+
end
|
|
1646
|
+
end
|
|
1647
|
+
end
|
|
1648
|
+
|
|
1218
1649
|
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
1219
1650
|
OrHash =
|
|
1220
1651
|
T.type_alias do
|