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
data/rbi/orb/models/price.rbi
CHANGED
|
@@ -33,6 +33,7 @@ module Orb
|
|
|
33
33
|
Orb::Price::PackageWithAllocation,
|
|
34
34
|
Orb::Price::UnitWithPercent,
|
|
35
35
|
Orb::Price::MatrixWithAllocation,
|
|
36
|
+
Orb::Price::TieredMatrixWithAllocation,
|
|
36
37
|
Orb::Price::MatrixWithThresholdDiscounts,
|
|
37
38
|
Orb::Price::TieredWithProration,
|
|
38
39
|
Orb::Price::UnitWithProration,
|
|
@@ -10097,6 +10098,810 @@ module Orb
|
|
|
10097
10098
|
end
|
|
10098
10099
|
end
|
|
10099
10100
|
|
|
10101
|
+
class TieredMatrixWithAllocation < Orb::Internal::Type::BaseModel
|
|
10102
|
+
OrHash =
|
|
10103
|
+
T.type_alias do
|
|
10104
|
+
T.any(
|
|
10105
|
+
Orb::Price::TieredMatrixWithAllocation,
|
|
10106
|
+
Orb::Internal::AnyHash
|
|
10107
|
+
)
|
|
10108
|
+
end
|
|
10109
|
+
|
|
10110
|
+
sig { returns(String) }
|
|
10111
|
+
attr_accessor :id
|
|
10112
|
+
|
|
10113
|
+
sig { returns(T.nilable(Orb::BillableMetricTiny)) }
|
|
10114
|
+
attr_reader :billable_metric
|
|
10115
|
+
|
|
10116
|
+
sig do
|
|
10117
|
+
params(
|
|
10118
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash)
|
|
10119
|
+
).void
|
|
10120
|
+
end
|
|
10121
|
+
attr_writer :billable_metric
|
|
10122
|
+
|
|
10123
|
+
sig { returns(Orb::BillingCycleConfiguration) }
|
|
10124
|
+
attr_reader :billing_cycle_configuration
|
|
10125
|
+
|
|
10126
|
+
sig do
|
|
10127
|
+
params(
|
|
10128
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash
|
|
10129
|
+
).void
|
|
10130
|
+
end
|
|
10131
|
+
attr_writer :billing_cycle_configuration
|
|
10132
|
+
|
|
10133
|
+
sig do
|
|
10134
|
+
returns(
|
|
10135
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::TaggedSymbol
|
|
10136
|
+
)
|
|
10137
|
+
end
|
|
10138
|
+
attr_accessor :billing_mode
|
|
10139
|
+
|
|
10140
|
+
sig do
|
|
10141
|
+
returns(Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol)
|
|
10142
|
+
end
|
|
10143
|
+
attr_accessor :cadence
|
|
10144
|
+
|
|
10145
|
+
sig do
|
|
10146
|
+
returns(
|
|
10147
|
+
T.nilable(
|
|
10148
|
+
T::Array[
|
|
10149
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter
|
|
10150
|
+
]
|
|
10151
|
+
)
|
|
10152
|
+
)
|
|
10153
|
+
end
|
|
10154
|
+
attr_accessor :composite_price_filters
|
|
10155
|
+
|
|
10156
|
+
sig { returns(T.nilable(Float)) }
|
|
10157
|
+
attr_accessor :conversion_rate
|
|
10158
|
+
|
|
10159
|
+
sig { returns(T.nilable(Orb::ConversionRateConfig::Variants)) }
|
|
10160
|
+
attr_accessor :conversion_rate_config
|
|
10161
|
+
|
|
10162
|
+
sig { returns(Time) }
|
|
10163
|
+
attr_accessor :created_at
|
|
10164
|
+
|
|
10165
|
+
sig { returns(T.nilable(Orb::Allocation)) }
|
|
10166
|
+
attr_reader :credit_allocation
|
|
10167
|
+
|
|
10168
|
+
sig do
|
|
10169
|
+
params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void
|
|
10170
|
+
end
|
|
10171
|
+
attr_writer :credit_allocation
|
|
10172
|
+
|
|
10173
|
+
sig { returns(String) }
|
|
10174
|
+
attr_accessor :currency
|
|
10175
|
+
|
|
10176
|
+
sig { returns(T.nilable(Orb::Discount::Variants)) }
|
|
10177
|
+
attr_accessor :discount
|
|
10178
|
+
|
|
10179
|
+
sig { returns(T.nilable(String)) }
|
|
10180
|
+
attr_accessor :external_price_id
|
|
10181
|
+
|
|
10182
|
+
sig { returns(T.nilable(Float)) }
|
|
10183
|
+
attr_accessor :fixed_price_quantity
|
|
10184
|
+
|
|
10185
|
+
sig { returns(T.nilable(String)) }
|
|
10186
|
+
attr_accessor :invoice_grouping_key
|
|
10187
|
+
|
|
10188
|
+
sig { returns(T.nilable(Orb::BillingCycleConfiguration)) }
|
|
10189
|
+
attr_reader :invoicing_cycle_configuration
|
|
10190
|
+
|
|
10191
|
+
sig do
|
|
10192
|
+
params(
|
|
10193
|
+
invoicing_cycle_configuration:
|
|
10194
|
+
T.nilable(Orb::BillingCycleConfiguration::OrHash)
|
|
10195
|
+
).void
|
|
10196
|
+
end
|
|
10197
|
+
attr_writer :invoicing_cycle_configuration
|
|
10198
|
+
|
|
10199
|
+
# A minimal representation of an Item containing only the essential identifying
|
|
10200
|
+
# information.
|
|
10201
|
+
sig { returns(Orb::ItemSlim) }
|
|
10202
|
+
attr_reader :item
|
|
10203
|
+
|
|
10204
|
+
sig { params(item: Orb::ItemSlim::OrHash).void }
|
|
10205
|
+
attr_writer :item
|
|
10206
|
+
|
|
10207
|
+
sig { returns(T.nilable(Orb::Maximum)) }
|
|
10208
|
+
attr_reader :maximum
|
|
10209
|
+
|
|
10210
|
+
sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void }
|
|
10211
|
+
attr_writer :maximum
|
|
10212
|
+
|
|
10213
|
+
sig { returns(T.nilable(String)) }
|
|
10214
|
+
attr_accessor :maximum_amount
|
|
10215
|
+
|
|
10216
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
|
10217
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
|
10218
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
10219
|
+
# `null`.
|
|
10220
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
10221
|
+
attr_accessor :metadata
|
|
10222
|
+
|
|
10223
|
+
sig { returns(T.nilable(Orb::Minimum)) }
|
|
10224
|
+
attr_reader :minimum
|
|
10225
|
+
|
|
10226
|
+
sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void }
|
|
10227
|
+
attr_writer :minimum
|
|
10228
|
+
|
|
10229
|
+
sig { returns(T.nilable(String)) }
|
|
10230
|
+
attr_accessor :minimum_amount
|
|
10231
|
+
|
|
10232
|
+
# The pricing model type
|
|
10233
|
+
sig { returns(Symbol) }
|
|
10234
|
+
attr_accessor :model_type
|
|
10235
|
+
|
|
10236
|
+
sig { returns(String) }
|
|
10237
|
+
attr_accessor :name
|
|
10238
|
+
|
|
10239
|
+
sig { returns(T.nilable(Integer)) }
|
|
10240
|
+
attr_accessor :plan_phase_order
|
|
10241
|
+
|
|
10242
|
+
sig do
|
|
10243
|
+
returns(
|
|
10244
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol
|
|
10245
|
+
)
|
|
10246
|
+
end
|
|
10247
|
+
attr_accessor :price_type
|
|
10248
|
+
|
|
10249
|
+
# The price id this price replaces. This price will take the place of the replaced
|
|
10250
|
+
# price in plan version migrations.
|
|
10251
|
+
sig { returns(T.nilable(String)) }
|
|
10252
|
+
attr_accessor :replaces_price_id
|
|
10253
|
+
|
|
10254
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
10255
|
+
sig do
|
|
10256
|
+
returns(
|
|
10257
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig
|
|
10258
|
+
)
|
|
10259
|
+
end
|
|
10260
|
+
attr_reader :tiered_matrix_with_allocation_config
|
|
10261
|
+
|
|
10262
|
+
sig do
|
|
10263
|
+
params(
|
|
10264
|
+
tiered_matrix_with_allocation_config:
|
|
10265
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash
|
|
10266
|
+
).void
|
|
10267
|
+
end
|
|
10268
|
+
attr_writer :tiered_matrix_with_allocation_config
|
|
10269
|
+
|
|
10270
|
+
sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) }
|
|
10271
|
+
attr_reader :dimensional_price_configuration
|
|
10272
|
+
|
|
10273
|
+
sig do
|
|
10274
|
+
params(
|
|
10275
|
+
dimensional_price_configuration:
|
|
10276
|
+
T.nilable(Orb::DimensionalPriceConfiguration::OrHash)
|
|
10277
|
+
).void
|
|
10278
|
+
end
|
|
10279
|
+
attr_writer :dimensional_price_configuration
|
|
10280
|
+
|
|
10281
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
10282
|
+
# users. License types are used during billing by grouping metrics on the
|
|
10283
|
+
# configured grouping key.
|
|
10284
|
+
sig do
|
|
10285
|
+
returns(
|
|
10286
|
+
T.nilable(Orb::Price::TieredMatrixWithAllocation::LicenseType)
|
|
10287
|
+
)
|
|
10288
|
+
end
|
|
10289
|
+
attr_reader :license_type
|
|
10290
|
+
|
|
10291
|
+
sig do
|
|
10292
|
+
params(
|
|
10293
|
+
license_type:
|
|
10294
|
+
T.nilable(
|
|
10295
|
+
Orb::Price::TieredMatrixWithAllocation::LicenseType::OrHash
|
|
10296
|
+
)
|
|
10297
|
+
).void
|
|
10298
|
+
end
|
|
10299
|
+
attr_writer :license_type
|
|
10300
|
+
|
|
10301
|
+
sig do
|
|
10302
|
+
params(
|
|
10303
|
+
id: String,
|
|
10304
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash),
|
|
10305
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash,
|
|
10306
|
+
billing_mode:
|
|
10307
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::OrSymbol,
|
|
10308
|
+
cadence: Orb::Price::TieredMatrixWithAllocation::Cadence::OrSymbol,
|
|
10309
|
+
composite_price_filters:
|
|
10310
|
+
T.nilable(
|
|
10311
|
+
T::Array[
|
|
10312
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::OrHash
|
|
10313
|
+
]
|
|
10314
|
+
),
|
|
10315
|
+
conversion_rate: T.nilable(Float),
|
|
10316
|
+
conversion_rate_config:
|
|
10317
|
+
T.nilable(
|
|
10318
|
+
T.any(
|
|
10319
|
+
Orb::UnitConversionRateConfig::OrHash,
|
|
10320
|
+
Orb::TieredConversionRateConfig::OrHash
|
|
10321
|
+
)
|
|
10322
|
+
),
|
|
10323
|
+
created_at: Time,
|
|
10324
|
+
credit_allocation: T.nilable(Orb::Allocation::OrHash),
|
|
10325
|
+
currency: String,
|
|
10326
|
+
discount:
|
|
10327
|
+
T.nilable(
|
|
10328
|
+
T.any(
|
|
10329
|
+
Orb::PercentageDiscount::OrHash,
|
|
10330
|
+
Orb::TrialDiscount::OrHash,
|
|
10331
|
+
Orb::UsageDiscount::OrHash,
|
|
10332
|
+
Orb::AmountDiscount::OrHash,
|
|
10333
|
+
Orb::Discount::TieredPercentage::OrHash
|
|
10334
|
+
)
|
|
10335
|
+
),
|
|
10336
|
+
external_price_id: T.nilable(String),
|
|
10337
|
+
fixed_price_quantity: T.nilable(Float),
|
|
10338
|
+
invoice_grouping_key: T.nilable(String),
|
|
10339
|
+
invoicing_cycle_configuration:
|
|
10340
|
+
T.nilable(Orb::BillingCycleConfiguration::OrHash),
|
|
10341
|
+
item: Orb::ItemSlim::OrHash,
|
|
10342
|
+
maximum: T.nilable(Orb::Maximum::OrHash),
|
|
10343
|
+
maximum_amount: T.nilable(String),
|
|
10344
|
+
metadata: T::Hash[Symbol, String],
|
|
10345
|
+
minimum: T.nilable(Orb::Minimum::OrHash),
|
|
10346
|
+
minimum_amount: T.nilable(String),
|
|
10347
|
+
name: String,
|
|
10348
|
+
plan_phase_order: T.nilable(Integer),
|
|
10349
|
+
price_type:
|
|
10350
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::OrSymbol,
|
|
10351
|
+
replaces_price_id: T.nilable(String),
|
|
10352
|
+
tiered_matrix_with_allocation_config:
|
|
10353
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::OrHash,
|
|
10354
|
+
dimensional_price_configuration:
|
|
10355
|
+
T.nilable(Orb::DimensionalPriceConfiguration::OrHash),
|
|
10356
|
+
license_type:
|
|
10357
|
+
T.nilable(
|
|
10358
|
+
Orb::Price::TieredMatrixWithAllocation::LicenseType::OrHash
|
|
10359
|
+
),
|
|
10360
|
+
model_type: Symbol
|
|
10361
|
+
).returns(T.attached_class)
|
|
10362
|
+
end
|
|
10363
|
+
def self.new(
|
|
10364
|
+
id:,
|
|
10365
|
+
billable_metric:,
|
|
10366
|
+
billing_cycle_configuration:,
|
|
10367
|
+
billing_mode:,
|
|
10368
|
+
cadence:,
|
|
10369
|
+
composite_price_filters:,
|
|
10370
|
+
conversion_rate:,
|
|
10371
|
+
conversion_rate_config:,
|
|
10372
|
+
created_at:,
|
|
10373
|
+
credit_allocation:,
|
|
10374
|
+
currency:,
|
|
10375
|
+
discount:,
|
|
10376
|
+
external_price_id:,
|
|
10377
|
+
fixed_price_quantity:,
|
|
10378
|
+
invoice_grouping_key:,
|
|
10379
|
+
invoicing_cycle_configuration:,
|
|
10380
|
+
# A minimal representation of an Item containing only the essential identifying
|
|
10381
|
+
# information.
|
|
10382
|
+
item:,
|
|
10383
|
+
maximum:,
|
|
10384
|
+
maximum_amount:,
|
|
10385
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
|
10386
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
|
10387
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
10388
|
+
# `null`.
|
|
10389
|
+
metadata:,
|
|
10390
|
+
minimum:,
|
|
10391
|
+
minimum_amount:,
|
|
10392
|
+
name:,
|
|
10393
|
+
plan_phase_order:,
|
|
10394
|
+
price_type:,
|
|
10395
|
+
# The price id this price replaces. This price will take the place of the replaced
|
|
10396
|
+
# price in plan version migrations.
|
|
10397
|
+
replaces_price_id:,
|
|
10398
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
10399
|
+
tiered_matrix_with_allocation_config:,
|
|
10400
|
+
dimensional_price_configuration: nil,
|
|
10401
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
10402
|
+
# users. License types are used during billing by grouping metrics on the
|
|
10403
|
+
# configured grouping key.
|
|
10404
|
+
license_type: nil,
|
|
10405
|
+
# The pricing model type
|
|
10406
|
+
model_type: :tiered_matrix_with_allocation
|
|
10407
|
+
)
|
|
10408
|
+
end
|
|
10409
|
+
|
|
10410
|
+
sig do
|
|
10411
|
+
override.returns(
|
|
10412
|
+
{
|
|
10413
|
+
id: String,
|
|
10414
|
+
billable_metric: T.nilable(Orb::BillableMetricTiny),
|
|
10415
|
+
billing_cycle_configuration: Orb::BillingCycleConfiguration,
|
|
10416
|
+
billing_mode:
|
|
10417
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::TaggedSymbol,
|
|
10418
|
+
cadence:
|
|
10419
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol,
|
|
10420
|
+
composite_price_filters:
|
|
10421
|
+
T.nilable(
|
|
10422
|
+
T::Array[
|
|
10423
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter
|
|
10424
|
+
]
|
|
10425
|
+
),
|
|
10426
|
+
conversion_rate: T.nilable(Float),
|
|
10427
|
+
conversion_rate_config:
|
|
10428
|
+
T.nilable(Orb::ConversionRateConfig::Variants),
|
|
10429
|
+
created_at: Time,
|
|
10430
|
+
credit_allocation: T.nilable(Orb::Allocation),
|
|
10431
|
+
currency: String,
|
|
10432
|
+
discount: T.nilable(Orb::Discount::Variants),
|
|
10433
|
+
external_price_id: T.nilable(String),
|
|
10434
|
+
fixed_price_quantity: T.nilable(Float),
|
|
10435
|
+
invoice_grouping_key: T.nilable(String),
|
|
10436
|
+
invoicing_cycle_configuration:
|
|
10437
|
+
T.nilable(Orb::BillingCycleConfiguration),
|
|
10438
|
+
item: Orb::ItemSlim,
|
|
10439
|
+
maximum: T.nilable(Orb::Maximum),
|
|
10440
|
+
maximum_amount: T.nilable(String),
|
|
10441
|
+
metadata: T::Hash[Symbol, String],
|
|
10442
|
+
minimum: T.nilable(Orb::Minimum),
|
|
10443
|
+
minimum_amount: T.nilable(String),
|
|
10444
|
+
model_type: Symbol,
|
|
10445
|
+
name: String,
|
|
10446
|
+
plan_phase_order: T.nilable(Integer),
|
|
10447
|
+
price_type:
|
|
10448
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol,
|
|
10449
|
+
replaces_price_id: T.nilable(String),
|
|
10450
|
+
tiered_matrix_with_allocation_config:
|
|
10451
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
10452
|
+
dimensional_price_configuration:
|
|
10453
|
+
T.nilable(Orb::DimensionalPriceConfiguration),
|
|
10454
|
+
license_type:
|
|
10455
|
+
T.nilable(Orb::Price::TieredMatrixWithAllocation::LicenseType)
|
|
10456
|
+
}
|
|
10457
|
+
)
|
|
10458
|
+
end
|
|
10459
|
+
def to_hash
|
|
10460
|
+
end
|
|
10461
|
+
|
|
10462
|
+
module BillingMode
|
|
10463
|
+
extend Orb::Internal::Type::Enum
|
|
10464
|
+
|
|
10465
|
+
TaggedSymbol =
|
|
10466
|
+
T.type_alias do
|
|
10467
|
+
T.all(Symbol, Orb::Price::TieredMatrixWithAllocation::BillingMode)
|
|
10468
|
+
end
|
|
10469
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10470
|
+
|
|
10471
|
+
IN_ADVANCE =
|
|
10472
|
+
T.let(
|
|
10473
|
+
:in_advance,
|
|
10474
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::TaggedSymbol
|
|
10475
|
+
)
|
|
10476
|
+
IN_ARREAR =
|
|
10477
|
+
T.let(
|
|
10478
|
+
:in_arrear,
|
|
10479
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::TaggedSymbol
|
|
10480
|
+
)
|
|
10481
|
+
|
|
10482
|
+
sig do
|
|
10483
|
+
override.returns(
|
|
10484
|
+
T::Array[
|
|
10485
|
+
Orb::Price::TieredMatrixWithAllocation::BillingMode::TaggedSymbol
|
|
10486
|
+
]
|
|
10487
|
+
)
|
|
10488
|
+
end
|
|
10489
|
+
def self.values
|
|
10490
|
+
end
|
|
10491
|
+
end
|
|
10492
|
+
|
|
10493
|
+
module Cadence
|
|
10494
|
+
extend Orb::Internal::Type::Enum
|
|
10495
|
+
|
|
10496
|
+
TaggedSymbol =
|
|
10497
|
+
T.type_alias do
|
|
10498
|
+
T.all(Symbol, Orb::Price::TieredMatrixWithAllocation::Cadence)
|
|
10499
|
+
end
|
|
10500
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10501
|
+
|
|
10502
|
+
ONE_TIME =
|
|
10503
|
+
T.let(
|
|
10504
|
+
:one_time,
|
|
10505
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10506
|
+
)
|
|
10507
|
+
MONTHLY =
|
|
10508
|
+
T.let(
|
|
10509
|
+
:monthly,
|
|
10510
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10511
|
+
)
|
|
10512
|
+
QUARTERLY =
|
|
10513
|
+
T.let(
|
|
10514
|
+
:quarterly,
|
|
10515
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10516
|
+
)
|
|
10517
|
+
SEMI_ANNUAL =
|
|
10518
|
+
T.let(
|
|
10519
|
+
:semi_annual,
|
|
10520
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10521
|
+
)
|
|
10522
|
+
ANNUAL =
|
|
10523
|
+
T.let(
|
|
10524
|
+
:annual,
|
|
10525
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10526
|
+
)
|
|
10527
|
+
CUSTOM =
|
|
10528
|
+
T.let(
|
|
10529
|
+
:custom,
|
|
10530
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10531
|
+
)
|
|
10532
|
+
|
|
10533
|
+
sig do
|
|
10534
|
+
override.returns(
|
|
10535
|
+
T::Array[
|
|
10536
|
+
Orb::Price::TieredMatrixWithAllocation::Cadence::TaggedSymbol
|
|
10537
|
+
]
|
|
10538
|
+
)
|
|
10539
|
+
end
|
|
10540
|
+
def self.values
|
|
10541
|
+
end
|
|
10542
|
+
end
|
|
10543
|
+
|
|
10544
|
+
class CompositePriceFilter < Orb::Internal::Type::BaseModel
|
|
10545
|
+
OrHash =
|
|
10546
|
+
T.type_alias do
|
|
10547
|
+
T.any(
|
|
10548
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter,
|
|
10549
|
+
Orb::Internal::AnyHash
|
|
10550
|
+
)
|
|
10551
|
+
end
|
|
10552
|
+
|
|
10553
|
+
# The property of the price to filter on.
|
|
10554
|
+
sig do
|
|
10555
|
+
returns(
|
|
10556
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10557
|
+
)
|
|
10558
|
+
end
|
|
10559
|
+
attr_accessor :field
|
|
10560
|
+
|
|
10561
|
+
# Should prices that match the filter be included or excluded.
|
|
10562
|
+
sig do
|
|
10563
|
+
returns(
|
|
10564
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::TaggedSymbol
|
|
10565
|
+
)
|
|
10566
|
+
end
|
|
10567
|
+
attr_accessor :operator
|
|
10568
|
+
|
|
10569
|
+
# The IDs or values that match this filter.
|
|
10570
|
+
sig { returns(T::Array[String]) }
|
|
10571
|
+
attr_accessor :values
|
|
10572
|
+
|
|
10573
|
+
sig do
|
|
10574
|
+
params(
|
|
10575
|
+
field:
|
|
10576
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::OrSymbol,
|
|
10577
|
+
operator:
|
|
10578
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::OrSymbol,
|
|
10579
|
+
values: T::Array[String]
|
|
10580
|
+
).returns(T.attached_class)
|
|
10581
|
+
end
|
|
10582
|
+
def self.new(
|
|
10583
|
+
# The property of the price to filter on.
|
|
10584
|
+
field:,
|
|
10585
|
+
# Should prices that match the filter be included or excluded.
|
|
10586
|
+
operator:,
|
|
10587
|
+
# The IDs or values that match this filter.
|
|
10588
|
+
values:
|
|
10589
|
+
)
|
|
10590
|
+
end
|
|
10591
|
+
|
|
10592
|
+
sig do
|
|
10593
|
+
override.returns(
|
|
10594
|
+
{
|
|
10595
|
+
field:
|
|
10596
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol,
|
|
10597
|
+
operator:
|
|
10598
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::TaggedSymbol,
|
|
10599
|
+
values: T::Array[String]
|
|
10600
|
+
}
|
|
10601
|
+
)
|
|
10602
|
+
end
|
|
10603
|
+
def to_hash
|
|
10604
|
+
end
|
|
10605
|
+
|
|
10606
|
+
# The property of the price to filter on.
|
|
10607
|
+
module Field
|
|
10608
|
+
extend Orb::Internal::Type::Enum
|
|
10609
|
+
|
|
10610
|
+
TaggedSymbol =
|
|
10611
|
+
T.type_alias do
|
|
10612
|
+
T.all(
|
|
10613
|
+
Symbol,
|
|
10614
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field
|
|
10615
|
+
)
|
|
10616
|
+
end
|
|
10617
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10618
|
+
|
|
10619
|
+
PRICE_ID =
|
|
10620
|
+
T.let(
|
|
10621
|
+
:price_id,
|
|
10622
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10623
|
+
)
|
|
10624
|
+
ITEM_ID =
|
|
10625
|
+
T.let(
|
|
10626
|
+
:item_id,
|
|
10627
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10628
|
+
)
|
|
10629
|
+
PRICE_TYPE =
|
|
10630
|
+
T.let(
|
|
10631
|
+
:price_type,
|
|
10632
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10633
|
+
)
|
|
10634
|
+
CURRENCY =
|
|
10635
|
+
T.let(
|
|
10636
|
+
:currency,
|
|
10637
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10638
|
+
)
|
|
10639
|
+
PRICING_UNIT_ID =
|
|
10640
|
+
T.let(
|
|
10641
|
+
:pricing_unit_id,
|
|
10642
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10643
|
+
)
|
|
10644
|
+
|
|
10645
|
+
sig do
|
|
10646
|
+
override.returns(
|
|
10647
|
+
T::Array[
|
|
10648
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Field::TaggedSymbol
|
|
10649
|
+
]
|
|
10650
|
+
)
|
|
10651
|
+
end
|
|
10652
|
+
def self.values
|
|
10653
|
+
end
|
|
10654
|
+
end
|
|
10655
|
+
|
|
10656
|
+
# Should prices that match the filter be included or excluded.
|
|
10657
|
+
module Operator
|
|
10658
|
+
extend Orb::Internal::Type::Enum
|
|
10659
|
+
|
|
10660
|
+
TaggedSymbol =
|
|
10661
|
+
T.type_alias do
|
|
10662
|
+
T.all(
|
|
10663
|
+
Symbol,
|
|
10664
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator
|
|
10665
|
+
)
|
|
10666
|
+
end
|
|
10667
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10668
|
+
|
|
10669
|
+
INCLUDES =
|
|
10670
|
+
T.let(
|
|
10671
|
+
:includes,
|
|
10672
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::TaggedSymbol
|
|
10673
|
+
)
|
|
10674
|
+
EXCLUDES =
|
|
10675
|
+
T.let(
|
|
10676
|
+
:excludes,
|
|
10677
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::TaggedSymbol
|
|
10678
|
+
)
|
|
10679
|
+
|
|
10680
|
+
sig do
|
|
10681
|
+
override.returns(
|
|
10682
|
+
T::Array[
|
|
10683
|
+
Orb::Price::TieredMatrixWithAllocation::CompositePriceFilter::Operator::TaggedSymbol
|
|
10684
|
+
]
|
|
10685
|
+
)
|
|
10686
|
+
end
|
|
10687
|
+
def self.values
|
|
10688
|
+
end
|
|
10689
|
+
end
|
|
10690
|
+
end
|
|
10691
|
+
|
|
10692
|
+
module PriceType
|
|
10693
|
+
extend Orb::Internal::Type::Enum
|
|
10694
|
+
|
|
10695
|
+
TaggedSymbol =
|
|
10696
|
+
T.type_alias do
|
|
10697
|
+
T.all(Symbol, Orb::Price::TieredMatrixWithAllocation::PriceType)
|
|
10698
|
+
end
|
|
10699
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10700
|
+
|
|
10701
|
+
USAGE_PRICE =
|
|
10702
|
+
T.let(
|
|
10703
|
+
:usage_price,
|
|
10704
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol
|
|
10705
|
+
)
|
|
10706
|
+
FIXED_PRICE =
|
|
10707
|
+
T.let(
|
|
10708
|
+
:fixed_price,
|
|
10709
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol
|
|
10710
|
+
)
|
|
10711
|
+
COMPOSITE_PRICE =
|
|
10712
|
+
T.let(
|
|
10713
|
+
:composite_price,
|
|
10714
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol
|
|
10715
|
+
)
|
|
10716
|
+
|
|
10717
|
+
sig do
|
|
10718
|
+
override.returns(
|
|
10719
|
+
T::Array[
|
|
10720
|
+
Orb::Price::TieredMatrixWithAllocation::PriceType::TaggedSymbol
|
|
10721
|
+
]
|
|
10722
|
+
)
|
|
10723
|
+
end
|
|
10724
|
+
def self.values
|
|
10725
|
+
end
|
|
10726
|
+
end
|
|
10727
|
+
|
|
10728
|
+
class TieredMatrixWithAllocationConfig < Orb::Internal::Type::BaseModel
|
|
10729
|
+
OrHash =
|
|
10730
|
+
T.type_alias do
|
|
10731
|
+
T.any(
|
|
10732
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig,
|
|
10733
|
+
Orb::Internal::AnyHash
|
|
10734
|
+
)
|
|
10735
|
+
end
|
|
10736
|
+
|
|
10737
|
+
# Usage allocation, pooled across all matrix cells
|
|
10738
|
+
sig { returns(String) }
|
|
10739
|
+
attr_accessor :allocation
|
|
10740
|
+
|
|
10741
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
10742
|
+
sig { returns(String) }
|
|
10743
|
+
attr_accessor :default_unit_amount
|
|
10744
|
+
|
|
10745
|
+
# One or two event property values to evaluate matrix cells by
|
|
10746
|
+
sig { returns(T::Array[String]) }
|
|
10747
|
+
attr_accessor :dimensions
|
|
10748
|
+
|
|
10749
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
10750
|
+
# own rows
|
|
10751
|
+
sig do
|
|
10752
|
+
returns(
|
|
10753
|
+
T::Array[
|
|
10754
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
10755
|
+
]
|
|
10756
|
+
)
|
|
10757
|
+
end
|
|
10758
|
+
attr_accessor :tiers
|
|
10759
|
+
|
|
10760
|
+
# Configuration for tiered_matrix_with_allocation pricing
|
|
10761
|
+
sig do
|
|
10762
|
+
params(
|
|
10763
|
+
allocation: String,
|
|
10764
|
+
default_unit_amount: String,
|
|
10765
|
+
dimensions: T::Array[String],
|
|
10766
|
+
tiers:
|
|
10767
|
+
T::Array[
|
|
10768
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier::OrHash
|
|
10769
|
+
]
|
|
10770
|
+
).returns(T.attached_class)
|
|
10771
|
+
end
|
|
10772
|
+
def self.new(
|
|
10773
|
+
# Usage allocation, pooled across all matrix cells
|
|
10774
|
+
allocation:,
|
|
10775
|
+
# Per unit rate for usage whose matrix cell has no configured tiers
|
|
10776
|
+
default_unit_amount:,
|
|
10777
|
+
# One or two event property values to evaluate matrix cells by
|
|
10778
|
+
dimensions:,
|
|
10779
|
+
# Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
10780
|
+
# own rows
|
|
10781
|
+
tiers:
|
|
10782
|
+
)
|
|
10783
|
+
end
|
|
10784
|
+
|
|
10785
|
+
sig do
|
|
10786
|
+
override.returns(
|
|
10787
|
+
{
|
|
10788
|
+
allocation: String,
|
|
10789
|
+
default_unit_amount: String,
|
|
10790
|
+
dimensions: T::Array[String],
|
|
10791
|
+
tiers:
|
|
10792
|
+
T::Array[
|
|
10793
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier
|
|
10794
|
+
]
|
|
10795
|
+
}
|
|
10796
|
+
)
|
|
10797
|
+
end
|
|
10798
|
+
def to_hash
|
|
10799
|
+
end
|
|
10800
|
+
|
|
10801
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
10802
|
+
OrHash =
|
|
10803
|
+
T.type_alias do
|
|
10804
|
+
T.any(
|
|
10805
|
+
Orb::Price::TieredMatrixWithAllocation::TieredMatrixWithAllocationConfig::Tier,
|
|
10806
|
+
Orb::Internal::AnyHash
|
|
10807
|
+
)
|
|
10808
|
+
end
|
|
10809
|
+
|
|
10810
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
10811
|
+
sig { returns(T::Array[String]) }
|
|
10812
|
+
attr_accessor :dimension_values
|
|
10813
|
+
|
|
10814
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
10815
|
+
# configured for the same matrix cell.
|
|
10816
|
+
sig { returns(String) }
|
|
10817
|
+
attr_accessor :tier_lower_bound
|
|
10818
|
+
|
|
10819
|
+
# Per unit amount
|
|
10820
|
+
sig { returns(String) }
|
|
10821
|
+
attr_accessor :unit_amount
|
|
10822
|
+
|
|
10823
|
+
# Configuration for a single tier scoped to one matrix cell
|
|
10824
|
+
sig do
|
|
10825
|
+
params(
|
|
10826
|
+
dimension_values: T::Array[String],
|
|
10827
|
+
tier_lower_bound: String,
|
|
10828
|
+
unit_amount: String
|
|
10829
|
+
).returns(T.attached_class)
|
|
10830
|
+
end
|
|
10831
|
+
def self.new(
|
|
10832
|
+
# The matrix cell this tier applies to, as one or two dimension values
|
|
10833
|
+
dimension_values:,
|
|
10834
|
+
# Exclusive tier starting value. The tier runs up to and including the next bound
|
|
10835
|
+
# configured for the same matrix cell.
|
|
10836
|
+
tier_lower_bound:,
|
|
10837
|
+
# Per unit amount
|
|
10838
|
+
unit_amount:
|
|
10839
|
+
)
|
|
10840
|
+
end
|
|
10841
|
+
|
|
10842
|
+
sig do
|
|
10843
|
+
override.returns(
|
|
10844
|
+
{
|
|
10845
|
+
dimension_values: T::Array[String],
|
|
10846
|
+
tier_lower_bound: String,
|
|
10847
|
+
unit_amount: String
|
|
10848
|
+
}
|
|
10849
|
+
)
|
|
10850
|
+
end
|
|
10851
|
+
def to_hash
|
|
10852
|
+
end
|
|
10853
|
+
end
|
|
10854
|
+
end
|
|
10855
|
+
|
|
10856
|
+
class LicenseType < Orb::Internal::Type::BaseModel
|
|
10857
|
+
OrHash =
|
|
10858
|
+
T.type_alias do
|
|
10859
|
+
T.any(
|
|
10860
|
+
Orb::Price::TieredMatrixWithAllocation::LicenseType,
|
|
10861
|
+
Orb::Internal::AnyHash
|
|
10862
|
+
)
|
|
10863
|
+
end
|
|
10864
|
+
|
|
10865
|
+
# The Orb-assigned unique identifier for the license type.
|
|
10866
|
+
sig { returns(String) }
|
|
10867
|
+
attr_accessor :id
|
|
10868
|
+
|
|
10869
|
+
# The key used for grouping licenses of this type. This is typically a user
|
|
10870
|
+
# identifier field.
|
|
10871
|
+
sig { returns(String) }
|
|
10872
|
+
attr_accessor :grouping_key
|
|
10873
|
+
|
|
10874
|
+
# The name of the license type.
|
|
10875
|
+
sig { returns(String) }
|
|
10876
|
+
attr_accessor :name
|
|
10877
|
+
|
|
10878
|
+
# The LicenseType resource represents a type of license that can be assigned to
|
|
10879
|
+
# users. License types are used during billing by grouping metrics on the
|
|
10880
|
+
# configured grouping key.
|
|
10881
|
+
sig do
|
|
10882
|
+
params(id: String, grouping_key: String, name: String).returns(
|
|
10883
|
+
T.attached_class
|
|
10884
|
+
)
|
|
10885
|
+
end
|
|
10886
|
+
def self.new(
|
|
10887
|
+
# The Orb-assigned unique identifier for the license type.
|
|
10888
|
+
id:,
|
|
10889
|
+
# The key used for grouping licenses of this type. This is typically a user
|
|
10890
|
+
# identifier field.
|
|
10891
|
+
grouping_key:,
|
|
10892
|
+
# The name of the license type.
|
|
10893
|
+
name:
|
|
10894
|
+
)
|
|
10895
|
+
end
|
|
10896
|
+
|
|
10897
|
+
sig do
|
|
10898
|
+
override.returns({ id: String, grouping_key: String, name: String })
|
|
10899
|
+
end
|
|
10900
|
+
def to_hash
|
|
10901
|
+
end
|
|
10902
|
+
end
|
|
10903
|
+
end
|
|
10904
|
+
|
|
10100
10905
|
class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
|
|
10101
10906
|
OrHash =
|
|
10102
10907
|
T.type_alias do
|