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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +566 -6
  5. data/lib/orb/models/beta_create_plan_version_params.rb +566 -6
  6. data/lib/orb/models/changed_subscription_resources.rb +3 -2
  7. data/lib/orb/models/customers/balance_transaction_create_response.rb +1 -0
  8. data/lib/orb/models/customers/balance_transaction_list_response.rb +1 -0
  9. data/lib/orb/models/invoice.rb +3 -2
  10. data/lib/orb/models/invoice_fetch_upcoming_response.rb +3 -2
  11. data/lib/orb/models/invoice_issue_summary_response.rb +1 -0
  12. data/lib/orb/models/invoice_line_item_create_response.rb +2 -2
  13. data/lib/orb/models/invoice_list_summary_response.rb +1 -0
  14. data/lib/orb/models/per_price_cost.rb +2 -2
  15. data/lib/orb/models/plan.rb +2 -2
  16. data/lib/orb/models/plan_create_params.rb +278 -3
  17. data/lib/orb/models/plan_version.rb +2 -2
  18. data/lib/orb/models/price.rb +450 -1
  19. data/lib/orb/models/price_create_params.rb +263 -3
  20. data/lib/orb/models/price_evaluate_multiple_params.rb +273 -3
  21. data/lib/orb/models/price_evaluate_preview_events_params.rb +273 -3
  22. data/lib/orb/models/price_interval.rb +2 -2
  23. data/lib/orb/models/subscription_create_params.rb +566 -6
  24. data/lib/orb/models/subscription_price_intervals_params.rb +273 -3
  25. data/lib/orb/models/subscription_schedule_plan_change_params.rb +566 -6
  26. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  27. data/lib/orb/resources/prices.rb +5 -5
  28. data/lib/orb/version.rb +1 -1
  29. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +2737 -1811
  30. data/rbi/orb/models/beta_create_plan_version_params.rbi +2745 -1819
  31. data/rbi/orb/models/changed_subscription_resources.rbi +6 -0
  32. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +5 -0
  33. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +5 -0
  34. data/rbi/orb/models/invoice.rbi +6 -0
  35. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +6 -0
  36. data/rbi/orb/models/invoice_issue_summary_response.rbi +5 -0
  37. data/rbi/orb/models/invoice_line_item_create_response.rbi +1 -0
  38. data/rbi/orb/models/invoice_list_summary_response.rbi +5 -0
  39. data/rbi/orb/models/per_price_cost.rbi +1 -0
  40. data/rbi/orb/models/plan.rbi +1 -0
  41. data/rbi/orb/models/plan_create_params.rbi +463 -0
  42. data/rbi/orb/models/plan_version.rbi +1 -0
  43. data/rbi/orb/models/price.rbi +805 -0
  44. data/rbi/orb/models/price_create_params.rbi +451 -0
  45. data/rbi/orb/models/price_evaluate_multiple_params.rbi +451 -0
  46. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +451 -0
  47. data/rbi/orb/models/price_interval.rbi +1 -0
  48. data/rbi/orb/models/subscription_create_params.rbi +2660 -1734
  49. data/rbi/orb/models/subscription_price_intervals_params.rbi +451 -0
  50. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +2660 -1734
  51. data/rbi/orb/resources/prices.rbi +1 -0
  52. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +376 -0
  53. data/sig/orb/models/beta_create_plan_version_params.rbs +376 -0
  54. data/sig/orb/models/changed_subscription_resources.rbs +2 -0
  55. data/sig/orb/models/customers/balance_transaction_create_response.rbs +2 -0
  56. data/sig/orb/models/customers/balance_transaction_list_response.rbs +2 -0
  57. data/sig/orb/models/invoice.rbs +2 -0
  58. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -0
  59. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -0
  60. data/sig/orb/models/invoice_list_summary_response.rbs +2 -0
  61. data/sig/orb/models/plan_create_params.rbs +188 -0
  62. data/sig/orb/models/price.rbs +332 -0
  63. data/sig/orb/models/price_create_params.rbs +178 -0
  64. data/sig/orb/models/price_evaluate_multiple_params.rbs +183 -0
  65. data/sig/orb/models/price_evaluate_preview_events_params.rbs +183 -0
  66. data/sig/orb/models/subscription_create_params.rbs +376 -0
  67. data/sig/orb/models/subscription_price_intervals_params.rbs +183 -0
  68. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +376 -0
  69. metadata +1 -1
@@ -28,6 +28,7 @@ module Orb
28
28
  Orb::NewFloatingPackageWithAllocationPrice,
29
29
  Orb::NewFloatingUnitWithPercentPrice,
30
30
  Orb::NewFloatingMatrixWithAllocationPrice,
31
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation,
31
32
  Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts,
32
33
  Orb::NewFloatingTieredWithProrationPrice,
33
34
  Orb::NewFloatingUnitWithProrationPrice,
@@ -72,6 +73,7 @@ module Orb
72
73
  Orb::NewFloatingPackageWithAllocationPrice::OrHash,
73
74
  Orb::NewFloatingUnitWithPercentPrice::OrHash,
74
75
  Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
76
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::OrHash,
75
77
  Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash,
76
78
  Orb::NewFloatingTieredWithProrationPrice::OrHash,
77
79
  Orb::NewFloatingUnitWithProrationPrice::OrHash,
@@ -123,6 +125,7 @@ module Orb
123
125
  Orb::NewFloatingPackageWithAllocationPrice,
124
126
  Orb::NewFloatingUnitWithPercentPrice,
125
127
  Orb::NewFloatingMatrixWithAllocationPrice,
128
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation,
126
129
  Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts,
127
130
  Orb::NewFloatingTieredWithProrationPrice,
128
131
  Orb::NewFloatingUnitWithProrationPrice,
@@ -173,6 +176,7 @@ module Orb
173
176
  Orb::NewFloatingPackageWithAllocationPrice,
174
177
  Orb::NewFloatingUnitWithPercentPrice,
175
178
  Orb::NewFloatingMatrixWithAllocationPrice,
179
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation,
176
180
  Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts,
177
181
  Orb::NewFloatingTieredWithProrationPrice,
178
182
  Orb::NewFloatingUnitWithProrationPrice,
@@ -1099,6 +1103,453 @@ module Orb
1099
1103
  end
1100
1104
  end
1101
1105
 
1106
+ class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
1107
+ OrHash =
1108
+ T.type_alias do
1109
+ T.any(
1110
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation,
1111
+ Orb::Internal::AnyHash
1112
+ )
1113
+ end
1114
+
1115
+ # The cadence to bill for this price on.
1116
+ sig do
1117
+ returns(
1118
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::OrSymbol
1119
+ )
1120
+ end
1121
+ attr_accessor :cadence
1122
+
1123
+ # An ISO 4217 currency string for which this price is billed in.
1124
+ sig { returns(String) }
1125
+ attr_accessor :currency
1126
+
1127
+ # The id of the item the price will be associated with.
1128
+ sig { returns(String) }
1129
+ attr_accessor :item_id
1130
+
1131
+ # The pricing model type
1132
+ sig { returns(Symbol) }
1133
+ attr_accessor :model_type
1134
+
1135
+ # The name of the price.
1136
+ sig { returns(String) }
1137
+ attr_accessor :name
1138
+
1139
+ # Configuration for tiered_matrix_with_allocation pricing
1140
+ sig do
1141
+ returns(
1142
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
1143
+ )
1144
+ end
1145
+ attr_reader :tiered_matrix_with_allocation_config
1146
+
1147
+ sig do
1148
+ params(
1149
+ tiered_matrix_with_allocation_config:
1150
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash
1151
+ ).void
1152
+ end
1153
+ attr_writer :tiered_matrix_with_allocation_config
1154
+
1155
+ # The id of the billable metric for the price. Only needed if the price is
1156
+ # usage-based.
1157
+ sig { returns(T.nilable(String)) }
1158
+ attr_accessor :billable_metric_id
1159
+
1160
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1161
+ # this is true, and in-arrears if this is false.
1162
+ sig { returns(T.nilable(T::Boolean)) }
1163
+ attr_accessor :billed_in_advance
1164
+
1165
+ # For custom cadence: specifies the duration of the billing period in days or
1166
+ # months.
1167
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1168
+ attr_reader :billing_cycle_configuration
1169
+
1170
+ sig do
1171
+ params(
1172
+ billing_cycle_configuration:
1173
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1174
+ ).void
1175
+ end
1176
+ attr_writer :billing_cycle_configuration
1177
+
1178
+ # The per unit conversion rate of the price currency to the invoicing currency.
1179
+ sig { returns(T.nilable(Float)) }
1180
+ attr_accessor :conversion_rate
1181
+
1182
+ # The configuration for the rate of the price currency to the invoicing currency.
1183
+ sig do
1184
+ returns(
1185
+ T.nilable(
1186
+ T.any(
1187
+ Orb::UnitConversionRateConfig,
1188
+ Orb::TieredConversionRateConfig
1189
+ )
1190
+ )
1191
+ )
1192
+ end
1193
+ attr_accessor :conversion_rate_config
1194
+
1195
+ # For dimensional price: specifies a price group and dimension values
1196
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
1197
+ attr_reader :dimensional_price_configuration
1198
+
1199
+ sig do
1200
+ params(
1201
+ dimensional_price_configuration:
1202
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
1203
+ ).void
1204
+ end
1205
+ attr_writer :dimensional_price_configuration
1206
+
1207
+ # An alias for the price.
1208
+ sig { returns(T.nilable(String)) }
1209
+ attr_accessor :external_price_id
1210
+
1211
+ # If the Price represents a fixed cost, this represents the quantity of units
1212
+ # applied.
1213
+ sig { returns(T.nilable(Float)) }
1214
+ attr_accessor :fixed_price_quantity
1215
+
1216
+ # The property used to group this price on an invoice
1217
+ sig { returns(T.nilable(String)) }
1218
+ attr_accessor :invoice_grouping_key
1219
+
1220
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1221
+ # If unspecified, a single invoice is produced per billing cycle.
1222
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1223
+ attr_reader :invoicing_cycle_configuration
1224
+
1225
+ sig do
1226
+ params(
1227
+ invoicing_cycle_configuration:
1228
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1229
+ ).void
1230
+ end
1231
+ attr_writer :invoicing_cycle_configuration
1232
+
1233
+ # The ID of the license type to associate with this price. On a usage price this
1234
+ # also marks the price as eligible to draw down from that license type's
1235
+ # allocation; a usage price created without it is billed normally. Usage prices
1236
+ # with a license type must use the `unit` model, and only draw down when their
1237
+ # currency matches the allocation's.
1238
+ sig { returns(T.nilable(String)) }
1239
+ attr_accessor :license_type_id
1240
+
1241
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1242
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1243
+ # by setting `metadata` to `null`.
1244
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
1245
+ attr_accessor :metadata
1246
+
1247
+ sig do
1248
+ params(
1249
+ cadence:
1250
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::OrSymbol,
1251
+ currency: String,
1252
+ item_id: String,
1253
+ name: String,
1254
+ tiered_matrix_with_allocation_config:
1255
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash,
1256
+ billable_metric_id: T.nilable(String),
1257
+ billed_in_advance: T.nilable(T::Boolean),
1258
+ billing_cycle_configuration:
1259
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1260
+ conversion_rate: T.nilable(Float),
1261
+ conversion_rate_config:
1262
+ T.nilable(
1263
+ T.any(
1264
+ Orb::UnitConversionRateConfig::OrHash,
1265
+ Orb::TieredConversionRateConfig::OrHash
1266
+ )
1267
+ ),
1268
+ dimensional_price_configuration:
1269
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
1270
+ external_price_id: T.nilable(String),
1271
+ fixed_price_quantity: T.nilable(Float),
1272
+ invoice_grouping_key: T.nilable(String),
1273
+ invoicing_cycle_configuration:
1274
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1275
+ license_type_id: T.nilable(String),
1276
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
1277
+ model_type: Symbol
1278
+ ).returns(T.attached_class)
1279
+ end
1280
+ def self.new(
1281
+ # The cadence to bill for this price on.
1282
+ cadence:,
1283
+ # An ISO 4217 currency string for which this price is billed in.
1284
+ currency:,
1285
+ # The id of the item the price will be associated with.
1286
+ item_id:,
1287
+ # The name of the price.
1288
+ name:,
1289
+ # Configuration for tiered_matrix_with_allocation pricing
1290
+ tiered_matrix_with_allocation_config:,
1291
+ # The id of the billable metric for the price. Only needed if the price is
1292
+ # usage-based.
1293
+ billable_metric_id: nil,
1294
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1295
+ # this is true, and in-arrears if this is false.
1296
+ billed_in_advance: nil,
1297
+ # For custom cadence: specifies the duration of the billing period in days or
1298
+ # months.
1299
+ billing_cycle_configuration: nil,
1300
+ # The per unit conversion rate of the price currency to the invoicing currency.
1301
+ conversion_rate: nil,
1302
+ # The configuration for the rate of the price currency to the invoicing currency.
1303
+ conversion_rate_config: nil,
1304
+ # For dimensional price: specifies a price group and dimension values
1305
+ dimensional_price_configuration: nil,
1306
+ # An alias for the price.
1307
+ external_price_id: nil,
1308
+ # If the Price represents a fixed cost, this represents the quantity of units
1309
+ # applied.
1310
+ fixed_price_quantity: nil,
1311
+ # The property used to group this price on an invoice
1312
+ invoice_grouping_key: nil,
1313
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1314
+ # If unspecified, a single invoice is produced per billing cycle.
1315
+ invoicing_cycle_configuration: nil,
1316
+ # The ID of the license type to associate with this price. On a usage price this
1317
+ # also marks the price as eligible to draw down from that license type's
1318
+ # allocation; a usage price created without it is billed normally. Usage prices
1319
+ # with a license type must use the `unit` model, and only draw down when their
1320
+ # currency matches the allocation's.
1321
+ license_type_id: nil,
1322
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1323
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1324
+ # by setting `metadata` to `null`.
1325
+ metadata: nil,
1326
+ # The pricing model type
1327
+ model_type: :tiered_matrix_with_allocation
1328
+ )
1329
+ end
1330
+
1331
+ sig do
1332
+ override.returns(
1333
+ {
1334
+ cadence:
1335
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::OrSymbol,
1336
+ currency: String,
1337
+ item_id: String,
1338
+ model_type: Symbol,
1339
+ name: String,
1340
+ tiered_matrix_with_allocation_config:
1341
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
1342
+ billable_metric_id: T.nilable(String),
1343
+ billed_in_advance: T.nilable(T::Boolean),
1344
+ billing_cycle_configuration:
1345
+ T.nilable(Orb::NewBillingCycleConfiguration),
1346
+ conversion_rate: T.nilable(Float),
1347
+ conversion_rate_config:
1348
+ T.nilable(
1349
+ T.any(
1350
+ Orb::UnitConversionRateConfig,
1351
+ Orb::TieredConversionRateConfig
1352
+ )
1353
+ ),
1354
+ dimensional_price_configuration:
1355
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
1356
+ external_price_id: T.nilable(String),
1357
+ fixed_price_quantity: T.nilable(Float),
1358
+ invoice_grouping_key: T.nilable(String),
1359
+ invoicing_cycle_configuration:
1360
+ T.nilable(Orb::NewBillingCycleConfiguration),
1361
+ license_type_id: T.nilable(String),
1362
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)])
1363
+ }
1364
+ )
1365
+ end
1366
+ def to_hash
1367
+ end
1368
+
1369
+ # The cadence to bill for this price on.
1370
+ module Cadence
1371
+ extend Orb::Internal::Type::Enum
1372
+
1373
+ TaggedSymbol =
1374
+ T.type_alias do
1375
+ T.all(
1376
+ Symbol,
1377
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence
1378
+ )
1379
+ end
1380
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1381
+
1382
+ ANNUAL =
1383
+ T.let(
1384
+ :annual,
1385
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1386
+ )
1387
+ SEMI_ANNUAL =
1388
+ T.let(
1389
+ :semi_annual,
1390
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1391
+ )
1392
+ MONTHLY =
1393
+ T.let(
1394
+ :monthly,
1395
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1396
+ )
1397
+ QUARTERLY =
1398
+ T.let(
1399
+ :quarterly,
1400
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1401
+ )
1402
+ ONE_TIME =
1403
+ T.let(
1404
+ :one_time,
1405
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1406
+ )
1407
+ CUSTOM =
1408
+ T.let(
1409
+ :custom,
1410
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1411
+ )
1412
+
1413
+ sig do
1414
+ override.returns(
1415
+ T::Array[
1416
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::Cadence::TaggedSymbol
1417
+ ]
1418
+ )
1419
+ end
1420
+ def self.values
1421
+ end
1422
+ end
1423
+
1424
+ class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
1425
+ OrHash =
1426
+ T.type_alias do
1427
+ T.any(
1428
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
1429
+ Orb::Internal::AnyHash
1430
+ )
1431
+ end
1432
+
1433
+ # Usage allocation, pooled across all matrix cells
1434
+ sig { returns(String) }
1435
+ attr_accessor :allocation
1436
+
1437
+ # Per unit rate for usage whose matrix cell has no configured tiers
1438
+ sig { returns(String) }
1439
+ attr_accessor :default_unit_amount
1440
+
1441
+ # One or two event property values to evaluate matrix cells by
1442
+ sig { returns(T::Array[String]) }
1443
+ attr_accessor :dimensions
1444
+
1445
+ # Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
1446
+ # own rows
1447
+ sig do
1448
+ returns(
1449
+ T::Array[
1450
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
1451
+ ]
1452
+ )
1453
+ end
1454
+ attr_accessor :tiers
1455
+
1456
+ # Configuration for tiered_matrix_with_allocation pricing
1457
+ sig do
1458
+ params(
1459
+ allocation: String,
1460
+ default_unit_amount: String,
1461
+ dimensions: T::Array[String],
1462
+ tiers:
1463
+ T::Array[
1464
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier::OrHash
1465
+ ]
1466
+ ).returns(T.attached_class)
1467
+ end
1468
+ def self.new(
1469
+ # Usage allocation, pooled across all matrix cells
1470
+ allocation:,
1471
+ # Per unit rate for usage whose matrix cell has no configured tiers
1472
+ default_unit_amount:,
1473
+ # One or two event property values to evaluate matrix cells by
1474
+ dimensions:,
1475
+ # Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
1476
+ # own rows
1477
+ tiers:
1478
+ )
1479
+ end
1480
+
1481
+ sig do
1482
+ override.returns(
1483
+ {
1484
+ allocation: String,
1485
+ default_unit_amount: String,
1486
+ dimensions: T::Array[String],
1487
+ tiers:
1488
+ T::Array[
1489
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
1490
+ ]
1491
+ }
1492
+ )
1493
+ end
1494
+ def to_hash
1495
+ end
1496
+
1497
+ class Tier < Orb::Internal::Type::BaseModel
1498
+ OrHash =
1499
+ T.type_alias do
1500
+ T.any(
1501
+ Orb::PriceCreateParams::Body::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier,
1502
+ Orb::Internal::AnyHash
1503
+ )
1504
+ end
1505
+
1506
+ # The matrix cell this tier applies to, as one or two dimension values
1507
+ sig { returns(T::Array[String]) }
1508
+ attr_accessor :dimension_values
1509
+
1510
+ # Exclusive tier starting value. The tier runs up to and including the next bound
1511
+ # configured for the same matrix cell.
1512
+ sig { returns(String) }
1513
+ attr_accessor :tier_lower_bound
1514
+
1515
+ # Per unit amount
1516
+ sig { returns(String) }
1517
+ attr_accessor :unit_amount
1518
+
1519
+ # Configuration for a single tier scoped to one matrix cell
1520
+ sig do
1521
+ params(
1522
+ dimension_values: T::Array[String],
1523
+ tier_lower_bound: String,
1524
+ unit_amount: String
1525
+ ).returns(T.attached_class)
1526
+ end
1527
+ def self.new(
1528
+ # The matrix cell this tier applies to, as one or two dimension values
1529
+ dimension_values:,
1530
+ # Exclusive tier starting value. The tier runs up to and including the next bound
1531
+ # configured for the same matrix cell.
1532
+ tier_lower_bound:,
1533
+ # Per unit amount
1534
+ unit_amount:
1535
+ )
1536
+ end
1537
+
1538
+ sig do
1539
+ override.returns(
1540
+ {
1541
+ dimension_values: T::Array[String],
1542
+ tier_lower_bound: String,
1543
+ unit_amount: String
1544
+ }
1545
+ )
1546
+ end
1547
+ def to_hash
1548
+ end
1549
+ end
1550
+ end
1551
+ end
1552
+
1102
1553
  class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
1103
1554
  OrHash =
1104
1555
  T.type_alias do