metronome-sdk 0.1.0 → 0.2.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +1 -1
  5. data/lib/metronome_sdk/models/commit.rb +35 -5
  6. data/lib/metronome_sdk/models/contract_without_amendments.rb +128 -2
  7. data/lib/metronome_sdk/models/credit.rb +21 -3
  8. data/lib/metronome_sdk/models/v1/alert_create_params.rb +9 -11
  9. data/lib/metronome_sdk/models/v1/contract_create_params.rb +159 -12
  10. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +29 -1
  11. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  12. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +2 -0
  13. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +2 -0
  14. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +183 -24
  15. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +570 -14
  16. data/lib/metronome_sdk/models/v2/contract_list_response.rb +194 -17
  17. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +194 -17
  18. data/lib/metronome_sdk/resources/v1/alerts.rb +2 -2
  19. data/lib/metronome_sdk/version.rb +1 -1
  20. data/rbi/metronome_sdk/internal/transport/base_client.rbi +1 -1
  21. data/rbi/metronome_sdk/models/commit.rbi +89 -15
  22. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +304 -6
  23. data/rbi/metronome_sdk/models/credit.rbi +54 -9
  24. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +16 -18
  25. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +349 -15
  26. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +60 -0
  27. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  28. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +4 -0
  29. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +4 -0
  30. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +385 -27
  31. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1532 -42
  32. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +431 -37
  33. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +431 -37
  34. data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -5
  35. data/rbi/metronome_sdk/resources/v2/contracts.rbi +4 -0
  36. data/sig/metronome_sdk/internal/transport/base_client.rbs +1 -1
  37. data/sig/metronome_sdk/models/commit.rbs +50 -15
  38. data/sig/metronome_sdk/models/contract_without_amendments.rbs +120 -6
  39. data/sig/metronome_sdk/models/credit.rbs +30 -9
  40. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +9 -9
  41. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +130 -3
  42. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +21 -0
  43. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  44. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +130 -3
  45. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +612 -6
  46. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +205 -30
  47. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +205 -30
  48. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -1
  49. metadata +2 -2
@@ -5373,6 +5373,24 @@ module MetronomeSDK
5373
5373
  end
5374
5374
  attr_writer :specifiers
5375
5375
 
5376
+ # Attach a subscription to the recurring commit/credit.
5377
+ sig do
5378
+ returns(
5379
+ T.nilable(
5380
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig
5381
+ )
5382
+ )
5383
+ end
5384
+ attr_reader :subscription_config
5385
+
5386
+ sig do
5387
+ params(
5388
+ subscription_config:
5389
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::OrHash
5390
+ ).void
5391
+ end
5392
+ attr_writer :subscription_config
5393
+
5376
5394
  # A temporary ID that can be used to reference the recurring commit for commit
5377
5395
  # specific overrides.
5378
5396
  sig { returns(T.nilable(String)) }
@@ -5411,6 +5429,8 @@ module MetronomeSDK
5411
5429
  T::Array[
5412
5430
  MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier::OrHash
5413
5431
  ],
5432
+ subscription_config:
5433
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::OrHash,
5414
5434
  temporary_id: String
5415
5435
  ).returns(T.attached_class)
5416
5436
  end
@@ -5462,6 +5482,8 @@ module MetronomeSDK
5462
5482
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
5463
5483
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
5464
5484
  specifiers: nil,
5485
+ # Attach a subscription to the recurring commit/credit.
5486
+ subscription_config: nil,
5465
5487
  # A temporary ID that can be used to reference the recurring commit for commit
5466
5488
  # specific overrides.
5467
5489
  temporary_id: nil
@@ -5499,6 +5521,8 @@ module MetronomeSDK
5499
5521
  T::Array[
5500
5522
  MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier
5501
5523
  ],
5524
+ subscription_config:
5525
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig,
5502
5526
  temporary_id: String
5503
5527
  }
5504
5528
  )
@@ -6153,6 +6177,141 @@ module MetronomeSDK
6153
6177
  def to_hash
6154
6178
  end
6155
6179
  end
6180
+
6181
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
6182
+ OrHash =
6183
+ T.type_alias do
6184
+ T.any(
6185
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig,
6186
+ MetronomeSDK::Internal::AnyHash
6187
+ )
6188
+ end
6189
+
6190
+ sig do
6191
+ returns(
6192
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
6193
+ )
6194
+ end
6195
+ attr_reader :apply_seat_increase_config
6196
+
6197
+ sig do
6198
+ params(
6199
+ apply_seat_increase_config:
6200
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
6201
+ ).void
6202
+ end
6203
+ attr_writer :apply_seat_increase_config
6204
+
6205
+ # ID of the subscription to configure on the recurring commit/credit.
6206
+ sig { returns(String) }
6207
+ attr_accessor :subscription_id
6208
+
6209
+ # If set to POOLED, allocation added per seat is pooled across the account.
6210
+ sig do
6211
+ returns(
6212
+ T.nilable(
6213
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6214
+ )
6215
+ )
6216
+ end
6217
+ attr_reader :allocation
6218
+
6219
+ sig do
6220
+ params(
6221
+ allocation:
6222
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6223
+ ).void
6224
+ end
6225
+ attr_writer :allocation
6226
+
6227
+ # Attach a subscription to the recurring commit/credit.
6228
+ sig do
6229
+ params(
6230
+ apply_seat_increase_config:
6231
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
6232
+ subscription_id: String,
6233
+ allocation:
6234
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6235
+ ).returns(T.attached_class)
6236
+ end
6237
+ def self.new(
6238
+ apply_seat_increase_config:,
6239
+ # ID of the subscription to configure on the recurring commit/credit.
6240
+ subscription_id:,
6241
+ # If set to POOLED, allocation added per seat is pooled across the account.
6242
+ allocation: nil
6243
+ )
6244
+ end
6245
+
6246
+ sig do
6247
+ override.returns(
6248
+ {
6249
+ apply_seat_increase_config:
6250
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
6251
+ subscription_id: String,
6252
+ allocation:
6253
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6254
+ }
6255
+ )
6256
+ end
6257
+ def to_hash
6258
+ end
6259
+
6260
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
6261
+ OrHash =
6262
+ T.type_alias do
6263
+ T.any(
6264
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
6265
+ MetronomeSDK::Internal::AnyHash
6266
+ )
6267
+ end
6268
+
6269
+ # Indicates whether a mid-period seat increase should be prorated.
6270
+ sig { returns(T::Boolean) }
6271
+ attr_accessor :is_prorated
6272
+
6273
+ sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
6274
+ def self.new(
6275
+ # Indicates whether a mid-period seat increase should be prorated.
6276
+ is_prorated:
6277
+ )
6278
+ end
6279
+
6280
+ sig { override.returns({ is_prorated: T::Boolean }) }
6281
+ def to_hash
6282
+ end
6283
+ end
6284
+
6285
+ # If set to POOLED, allocation added per seat is pooled across the account.
6286
+ module Allocation
6287
+ extend MetronomeSDK::Internal::Type::Enum
6288
+
6289
+ TaggedSymbol =
6290
+ T.type_alias do
6291
+ T.all(
6292
+ Symbol,
6293
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation
6294
+ )
6295
+ end
6296
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
6297
+
6298
+ POOLED =
6299
+ T.let(
6300
+ :POOLED,
6301
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
6302
+ )
6303
+
6304
+ sig do
6305
+ override.returns(
6306
+ T::Array[
6307
+ MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
6308
+ ]
6309
+ )
6310
+ end
6311
+ def self.values
6312
+ end
6313
+ end
6314
+ end
6156
6315
  end
6157
6316
 
6158
6317
  class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -6362,6 +6521,24 @@ module MetronomeSDK
6362
6521
  end
6363
6522
  attr_writer :specifiers
6364
6523
 
6524
+ # Attach a subscription to the recurring commit/credit.
6525
+ sig do
6526
+ returns(
6527
+ T.nilable(
6528
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig
6529
+ )
6530
+ )
6531
+ end
6532
+ attr_reader :subscription_config
6533
+
6534
+ sig do
6535
+ params(
6536
+ subscription_config:
6537
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::OrHash
6538
+ ).void
6539
+ end
6540
+ attr_writer :subscription_config
6541
+
6365
6542
  # A temporary ID that can be used to reference the recurring commit for commit
6366
6543
  # specific overrides.
6367
6544
  sig { returns(T.nilable(String)) }
@@ -6398,6 +6575,8 @@ module MetronomeSDK
6398
6575
  T::Array[
6399
6576
  MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier::OrHash
6400
6577
  ],
6578
+ subscription_config:
6579
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::OrHash,
6401
6580
  temporary_id: String
6402
6581
  ).returns(T.attached_class)
6403
6582
  end
@@ -6447,6 +6626,8 @@ module MetronomeSDK
6447
6626
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
6448
6627
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
6449
6628
  specifiers: nil,
6629
+ # Attach a subscription to the recurring commit/credit.
6630
+ subscription_config: nil,
6450
6631
  # A temporary ID that can be used to reference the recurring commit for commit
6451
6632
  # specific overrides.
6452
6633
  temporary_id: nil
@@ -6482,6 +6663,8 @@ module MetronomeSDK
6482
6663
  T::Array[
6483
6664
  MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier
6484
6665
  ],
6666
+ subscription_config:
6667
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig,
6485
6668
  temporary_id: String
6486
6669
  }
6487
6670
  )
@@ -7098,6 +7281,141 @@ module MetronomeSDK
7098
7281
  def to_hash
7099
7282
  end
7100
7283
  end
7284
+
7285
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
7286
+ OrHash =
7287
+ T.type_alias do
7288
+ T.any(
7289
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig,
7290
+ MetronomeSDK::Internal::AnyHash
7291
+ )
7292
+ end
7293
+
7294
+ sig do
7295
+ returns(
7296
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
7297
+ )
7298
+ end
7299
+ attr_reader :apply_seat_increase_config
7300
+
7301
+ sig do
7302
+ params(
7303
+ apply_seat_increase_config:
7304
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
7305
+ ).void
7306
+ end
7307
+ attr_writer :apply_seat_increase_config
7308
+
7309
+ # ID of the subscription to configure on the recurring commit/credit.
7310
+ sig { returns(String) }
7311
+ attr_accessor :subscription_id
7312
+
7313
+ # If set to POOLED, allocation added per seat is pooled across the account.
7314
+ sig do
7315
+ returns(
7316
+ T.nilable(
7317
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7318
+ )
7319
+ )
7320
+ end
7321
+ attr_reader :allocation
7322
+
7323
+ sig do
7324
+ params(
7325
+ allocation:
7326
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7327
+ ).void
7328
+ end
7329
+ attr_writer :allocation
7330
+
7331
+ # Attach a subscription to the recurring commit/credit.
7332
+ sig do
7333
+ params(
7334
+ apply_seat_increase_config:
7335
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
7336
+ subscription_id: String,
7337
+ allocation:
7338
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7339
+ ).returns(T.attached_class)
7340
+ end
7341
+ def self.new(
7342
+ apply_seat_increase_config:,
7343
+ # ID of the subscription to configure on the recurring commit/credit.
7344
+ subscription_id:,
7345
+ # If set to POOLED, allocation added per seat is pooled across the account.
7346
+ allocation: nil
7347
+ )
7348
+ end
7349
+
7350
+ sig do
7351
+ override.returns(
7352
+ {
7353
+ apply_seat_increase_config:
7354
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
7355
+ subscription_id: String,
7356
+ allocation:
7357
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7358
+ }
7359
+ )
7360
+ end
7361
+ def to_hash
7362
+ end
7363
+
7364
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
7365
+ OrHash =
7366
+ T.type_alias do
7367
+ T.any(
7368
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
7369
+ MetronomeSDK::Internal::AnyHash
7370
+ )
7371
+ end
7372
+
7373
+ # Indicates whether a mid-period seat increase should be prorated.
7374
+ sig { returns(T::Boolean) }
7375
+ attr_accessor :is_prorated
7376
+
7377
+ sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
7378
+ def self.new(
7379
+ # Indicates whether a mid-period seat increase should be prorated.
7380
+ is_prorated:
7381
+ )
7382
+ end
7383
+
7384
+ sig { override.returns({ is_prorated: T::Boolean }) }
7385
+ def to_hash
7386
+ end
7387
+ end
7388
+
7389
+ # If set to POOLED, allocation added per seat is pooled across the account.
7390
+ module Allocation
7391
+ extend MetronomeSDK::Internal::Type::Enum
7392
+
7393
+ TaggedSymbol =
7394
+ T.type_alias do
7395
+ T.all(
7396
+ Symbol,
7397
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation
7398
+ )
7399
+ end
7400
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
7401
+
7402
+ POOLED =
7403
+ T.let(
7404
+ :POOLED,
7405
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
7406
+ )
7407
+
7408
+ sig do
7409
+ override.returns(
7410
+ T::Array[
7411
+ MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
7412
+ ]
7413
+ )
7414
+ end
7415
+ def self.values
7416
+ end
7417
+ end
7418
+ end
7101
7419
  end
7102
7420
 
7103
7421
  class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
@@ -8437,6 +8755,14 @@ module MetronomeSDK
8437
8755
  sig { params(starting_at: Time).void }
8438
8756
  attr_writer :starting_at
8439
8757
 
8758
+ # A temporary ID used to reference the subscription in recurring commit/credit
8759
+ # subscription configs created within the same payload.
8760
+ sig { returns(T.nilable(String)) }
8761
+ attr_reader :temporary_id
8762
+
8763
+ sig { params(temporary_id: String).void }
8764
+ attr_writer :temporary_id
8765
+
8440
8766
  sig do
8441
8767
  params(
8442
8768
  collection_schedule:
@@ -8450,7 +8776,8 @@ module MetronomeSDK
8450
8776
  description: String,
8451
8777
  ending_before: Time,
8452
8778
  name: String,
8453
- starting_at: Time
8779
+ starting_at: Time,
8780
+ temporary_id: String
8454
8781
  ).returns(T.attached_class)
8455
8782
  end
8456
8783
  def self.new(
@@ -8467,7 +8794,10 @@ module MetronomeSDK
8467
8794
  name: nil,
8468
8795
  # Inclusive start time for the subscription. If not provided, defaults to contract
8469
8796
  # start date
8470
- starting_at: nil
8797
+ starting_at: nil,
8798
+ # A temporary ID used to reference the subscription in recurring commit/credit
8799
+ # subscription configs created within the same payload.
8800
+ temporary_id: nil
8471
8801
  )
8472
8802
  end
8473
8803
 
@@ -8485,7 +8815,8 @@ module MetronomeSDK
8485
8815
  description: String,
8486
8816
  ending_before: Time,
8487
8817
  name: String,
8488
- starting_at: Time
8818
+ starting_at: Time,
8819
+ temporary_id: String
8489
8820
  }
8490
8821
  )
8491
8822
  end
@@ -8535,10 +8866,11 @@ module MetronomeSDK
8535
8866
  )
8536
8867
  end
8537
8868
 
8538
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8539
- # is selected, the quantity increase will be billed on the scheduled date. If
8540
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8541
- # for in-arrears at the end of the period.
8869
+ # Indicates how mid-period quantity adjustments are invoiced.
8870
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8871
+ # quantity increase will be billed immediately on the scheduled date.
8872
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8873
+ # in-arrears at the end of the period.
8542
8874
  sig do
8543
8875
  returns(
8544
8876
  T.nilable(
@@ -8571,10 +8903,11 @@ module MetronomeSDK
8571
8903
  ).returns(T.attached_class)
8572
8904
  end
8573
8905
  def self.new(
8574
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8575
- # is selected, the quantity increase will be billed on the scheduled date. If
8576
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8577
- # for in-arrears at the end of the period.
8906
+ # Indicates how mid-period quantity adjustments are invoiced.
8907
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8908
+ # quantity increase will be billed immediately on the scheduled date.
8909
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8910
+ # in-arrears at the end of the period.
8578
8911
  invoice_behavior: nil,
8579
8912
  # Indicates if the partial period will be prorated or charged a full amount.
8580
8913
  is_prorated: nil
@@ -8593,10 +8926,11 @@ module MetronomeSDK
8593
8926
  def to_hash
8594
8927
  end
8595
8928
 
8596
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8597
- # is selected, the quantity increase will be billed on the scheduled date. If
8598
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8599
- # for in-arrears at the end of the period.
8929
+ # Indicates how mid-period quantity adjustments are invoiced.
8930
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8931
+ # quantity increase will be billed immediately on the scheduled date.
8932
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8933
+ # in-arrears at the end of the period.
8600
8934
  module InvoiceBehavior
8601
8935
  extend MetronomeSDK::Internal::Type::Enum
8602
8936
 
@@ -176,6 +176,29 @@ module MetronomeSDK
176
176
  end
177
177
  attr_writer :group_key_filter
178
178
 
179
+ # Only present for `spend_threshold_reached` alerts. Scope alert to a specific
180
+ # group key on individual line items.
181
+ sig do
182
+ returns(
183
+ T.nilable(
184
+ T::Array[
185
+ MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue
186
+ ]
187
+ )
188
+ )
189
+ end
190
+ attr_reader :group_values
191
+
192
+ sig do
193
+ params(
194
+ group_values:
195
+ T::Array[
196
+ MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue::OrHash
197
+ ]
198
+ ).void
199
+ end
200
+ attr_writer :group_values
201
+
179
202
  # Only supported for invoice_total_reached alerts. A list of invoice types to
180
203
  # evaluate.
181
204
  sig { returns(T.nilable(T::Array[String])) }
@@ -211,6 +234,10 @@ module MetronomeSDK
211
234
  ],
212
235
  group_key_filter:
213
236
  MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupKeyFilter::OrHash,
237
+ group_values:
238
+ T::Array[
239
+ MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue::OrHash
240
+ ],
214
241
  invoice_types_filter: T::Array[String],
215
242
  uniqueness_key: String
216
243
  ).returns(T.attached_class)
@@ -238,6 +265,9 @@ module MetronomeSDK
238
265
  # Scopes alert evaluation to a specific presentation group key on individual line
239
266
  # items. Only present for spend alerts.
240
267
  group_key_filter: nil,
268
+ # Only present for `spend_threshold_reached` alerts. Scope alert to a specific
269
+ # group key on individual line items.
270
+ group_values: nil,
241
271
  # Only supported for invoice_total_reached alerts. A list of invoice types to
242
272
  # evaluate.
243
273
  invoice_types_filter: nil,
@@ -267,6 +297,10 @@ module MetronomeSDK
267
297
  ],
268
298
  group_key_filter:
269
299
  MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupKeyFilter,
300
+ group_values:
301
+ T::Array[
302
+ MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue
303
+ ],
270
304
  invoice_types_filter: T::Array[String],
271
305
  uniqueness_key: String
272
306
  }
@@ -523,6 +557,32 @@ module MetronomeSDK
523
557
  def to_hash
524
558
  end
525
559
  end
560
+
561
+ class GroupValue < MetronomeSDK::Internal::Type::BaseModel
562
+ OrHash =
563
+ T.type_alias do
564
+ T.any(
565
+ MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue,
566
+ MetronomeSDK::Internal::AnyHash
567
+ )
568
+ end
569
+
570
+ sig { returns(String) }
571
+ attr_accessor :key
572
+
573
+ sig { returns(String) }
574
+ attr_accessor :value
575
+
576
+ sig do
577
+ params(key: String, value: String).returns(T.attached_class)
578
+ end
579
+ def self.new(key:, value:)
580
+ end
581
+
582
+ sig { override.returns({ key: String, value: String }) }
583
+ def to_hash
584
+ end
585
+ end
526
586
  end
527
587
 
528
588
  # The status of the customer alert. If the alert is archived, null will be
@@ -424,6 +424,16 @@ module MetronomeSDK
424
424
  :Primary_red,
425
425
  MetronomeSDK::V1::DashboardGetEmbeddableURLParams::ColorOverride::Name::TaggedSymbol
426
426
  )
427
+ PROGRESS_BAR =
428
+ T.let(
429
+ :Progress_bar,
430
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::ColorOverride::Name::TaggedSymbol
431
+ )
432
+ PROGRESS_BAR_BACKGROUND =
433
+ T.let(
434
+ :Progress_bar_background,
435
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::ColorOverride::Name::TaggedSymbol
436
+ )
427
437
 
428
438
  sig do
429
439
  override.returns(
@@ -86,6 +86,8 @@ module MetronomeSDK
86
86
  # or credit. A customer's usage needs to meet the condition of at least one of the
87
87
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
88
88
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
89
+ # Instead, to target usage by product or product tag, pass those values in the
90
+ # body of `specifiers`.
89
91
  sig do
90
92
  returns(
91
93
  T.nilable(
@@ -138,6 +140,8 @@ module MetronomeSDK
138
140
  # or credit. A customer's usage needs to meet the condition of at least one of the
139
141
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
140
142
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
143
+ # Instead, to target usage by product or product tag, pass those values in the
144
+ # body of `specifiers`.
141
145
  specifiers: nil,
142
146
  request_options: {}
143
147
  )
@@ -60,6 +60,8 @@ module MetronomeSDK
60
60
  # or credit. A customer's usage needs to meet the condition of at least one of the
61
61
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
62
62
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
63
+ # Instead, to target usage by product or product tag, pass those values in the
64
+ # body of `specifiers`.
63
65
  sig do
64
66
  returns(
65
67
  T.nilable(
@@ -104,6 +106,8 @@ module MetronomeSDK
104
106
  # or credit. A customer's usage needs to meet the condition of at least one of the
105
107
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
106
108
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
109
+ # Instead, to target usage by product or product tag, pass those values in the
110
+ # body of `specifiers`.
107
111
  specifiers: nil,
108
112
  request_options: {}
109
113
  )