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
@@ -930,6 +930,8 @@ module MetronomeSDK
930
930
  # or credit. A customer's usage needs to meet the condition of at least one of the
931
931
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
932
932
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
933
+ # Instead, to target usage by product or product tag, pass those values in the
934
+ # body of `specifiers`.
933
935
  sig do
934
936
  returns(
935
937
  T.nilable(
@@ -1033,6 +1035,8 @@ module MetronomeSDK
1033
1035
  # or credit. A customer's usage needs to meet the condition of at least one of the
1034
1036
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
1035
1037
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
1038
+ # Instead, to target usage by product or product tag, pass those values in the
1039
+ # body of `specifiers`.
1036
1040
  specifiers: nil,
1037
1041
  # A temporary ID for the commit that can be used to reference the commit for
1038
1042
  # commit specific overrides.
@@ -1494,7 +1498,7 @@ module MetronomeSDK
1494
1498
  )
1495
1499
  end
1496
1500
 
1497
- # Defaults to USD if not passed. Only USD is supported at this time.
1501
+ # Defaults to USD (cents) if not passed.
1498
1502
  sig { returns(T.nilable(String)) }
1499
1503
  attr_reader :credit_type_id
1500
1504
 
@@ -1559,7 +1563,7 @@ module MetronomeSDK
1559
1563
  ).returns(T.attached_class)
1560
1564
  end
1561
1565
  def self.new(
1562
- # Defaults to USD if not passed. Only USD is supported at this time.
1566
+ # Defaults to USD (cents) if not passed.
1563
1567
  credit_type_id: nil,
1564
1568
  # Enter the unit price and quantity for the charge or instead only send the
1565
1569
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -2441,6 +2445,8 @@ module MetronomeSDK
2441
2445
  # or credit. A customer's usage needs to meet the condition of at least one of the
2442
2446
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2443
2447
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
2448
+ # Instead, to target usage by product or product tag, pass those values in the
2449
+ # body of `specifiers`.
2444
2450
  sig do
2445
2451
  returns(
2446
2452
  T.nilable(
@@ -2511,6 +2517,8 @@ module MetronomeSDK
2511
2517
  # or credit. A customer's usage needs to meet the condition of at least one of the
2512
2518
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2513
2519
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
2520
+ # Instead, to target usage by product or product tag, pass those values in the
2521
+ # body of `specifiers`.
2514
2522
  specifiers: nil
2515
2523
  )
2516
2524
  end
@@ -3113,7 +3121,7 @@ module MetronomeSDK
3113
3121
  )
3114
3122
  end
3115
3123
 
3116
- # Defaults to USD if not passed. Only USD is supported at this time.
3124
+ # Defaults to USD (cents) if not passed.
3117
3125
  sig { returns(T.nilable(String)) }
3118
3126
  attr_reader :credit_type_id
3119
3127
 
@@ -3175,7 +3183,7 @@ module MetronomeSDK
3175
3183
  ).returns(T.attached_class)
3176
3184
  end
3177
3185
  def self.new(
3178
- # Defaults to USD if not passed. Only USD is supported at this time.
3186
+ # Defaults to USD (cents) if not passed.
3179
3187
  credit_type_id: nil,
3180
3188
  # Enter the unit price and quantity for the charge or instead only send the
3181
3189
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -4369,6 +4377,8 @@ module MetronomeSDK
4369
4377
  # or credit. A customer's usage needs to meet the condition of at least one of the
4370
4378
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
4371
4379
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
4380
+ # Instead, to target usage by product or product tag, pass those values in the
4381
+ # body of `specifiers`.
4372
4382
  sig do
4373
4383
  returns(
4374
4384
  T.nilable(
@@ -4423,6 +4433,8 @@ module MetronomeSDK
4423
4433
  # or credit. A customer's usage needs to meet the condition of at least one of the
4424
4434
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
4425
4435
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
4436
+ # Instead, to target usage by product or product tag, pass those values in the
4437
+ # body of `specifiers`.
4426
4438
  specifiers: nil
4427
4439
  )
4428
4440
  end
@@ -5036,7 +5048,7 @@ module MetronomeSDK
5036
5048
  sig { params(ending_before: Time).void }
5037
5049
  attr_writer :ending_before
5038
5050
 
5039
- # Optional configuration for recurring commit/credit hierarchy access control
5051
+ # Optional configuration for recurring credit hierarchy access control
5040
5052
  sig do
5041
5053
  returns(
5042
5054
  T.nilable(
@@ -5158,6 +5170,8 @@ module MetronomeSDK
5158
5170
  # or credit. A customer's usage needs to meet the condition of at least one of the
5159
5171
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
5160
5172
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
5173
+ # Instead, to target usage by product or product tag, pass those values in the
5174
+ # body of `specifiers`.
5161
5175
  sig do
5162
5176
  returns(
5163
5177
  T.nilable(
@@ -5179,6 +5193,24 @@ module MetronomeSDK
5179
5193
  end
5180
5194
  attr_writer :specifiers
5181
5195
 
5196
+ # Attach a subscription to the recurring commit/credit.
5197
+ sig do
5198
+ returns(
5199
+ T.nilable(
5200
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig
5201
+ )
5202
+ )
5203
+ end
5204
+ attr_reader :subscription_config
5205
+
5206
+ sig do
5207
+ params(
5208
+ subscription_config:
5209
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::OrHash
5210
+ ).void
5211
+ end
5212
+ attr_writer :subscription_config
5213
+
5182
5214
  # A temporary ID that can be used to reference the recurring commit for commit
5183
5215
  # specific overrides.
5184
5216
  sig { returns(T.nilable(String)) }
@@ -5217,6 +5249,8 @@ module MetronomeSDK
5217
5249
  T::Array[
5218
5250
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Specifier::OrHash
5219
5251
  ],
5252
+ subscription_config:
5253
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::OrHash,
5220
5254
  temporary_id: String
5221
5255
  ).returns(T.attached_class)
5222
5256
  end
@@ -5240,7 +5274,7 @@ module MetronomeSDK
5240
5274
  description: nil,
5241
5275
  # Determines when the contract will stop creating recurring commits. optional
5242
5276
  ending_before: nil,
5243
- # Optional configuration for recurring commit/credit hierarchy access control
5277
+ # Optional configuration for recurring credit hierarchy access control
5244
5278
  hierarchy_configuration: nil,
5245
5279
  # The amount the customer should be billed for the commit. Not required.
5246
5280
  invoice_amount: nil,
@@ -5267,7 +5301,11 @@ module MetronomeSDK
5267
5301
  # or credit. A customer's usage needs to meet the condition of at least one of the
5268
5302
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
5269
5303
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
5304
+ # Instead, to target usage by product or product tag, pass those values in the
5305
+ # body of `specifiers`.
5270
5306
  specifiers: nil,
5307
+ # Attach a subscription to the recurring commit/credit.
5308
+ subscription_config: nil,
5271
5309
  # A temporary ID that can be used to reference the recurring commit for commit
5272
5310
  # specific overrides.
5273
5311
  temporary_id: nil
@@ -5305,6 +5343,8 @@ module MetronomeSDK
5305
5343
  T::Array[
5306
5344
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Specifier
5307
5345
  ],
5346
+ subscription_config:
5347
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig,
5308
5348
  temporary_id: String
5309
5349
  }
5310
5350
  )
@@ -5465,7 +5505,7 @@ module MetronomeSDK
5465
5505
  end
5466
5506
  attr_accessor :child_access
5467
5507
 
5468
- # Optional configuration for recurring commit/credit hierarchy access control
5508
+ # Optional configuration for recurring credit hierarchy access control
5469
5509
  sig do
5470
5510
  params(
5471
5511
  child_access:
@@ -5959,6 +5999,141 @@ module MetronomeSDK
5959
5999
  def to_hash
5960
6000
  end
5961
6001
  end
6002
+
6003
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
6004
+ OrHash =
6005
+ T.type_alias do
6006
+ T.any(
6007
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig,
6008
+ MetronomeSDK::Internal::AnyHash
6009
+ )
6010
+ end
6011
+
6012
+ sig do
6013
+ returns(
6014
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
6015
+ )
6016
+ end
6017
+ attr_reader :apply_seat_increase_config
6018
+
6019
+ sig do
6020
+ params(
6021
+ apply_seat_increase_config:
6022
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
6023
+ ).void
6024
+ end
6025
+ attr_writer :apply_seat_increase_config
6026
+
6027
+ # ID of the subscription to configure on the recurring commit/credit.
6028
+ sig { returns(String) }
6029
+ attr_accessor :subscription_id
6030
+
6031
+ # If set to POOLED, allocation added per seat is pooled across the account.
6032
+ sig do
6033
+ returns(
6034
+ T.nilable(
6035
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6036
+ )
6037
+ )
6038
+ end
6039
+ attr_reader :allocation
6040
+
6041
+ sig do
6042
+ params(
6043
+ allocation:
6044
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6045
+ ).void
6046
+ end
6047
+ attr_writer :allocation
6048
+
6049
+ # Attach a subscription to the recurring commit/credit.
6050
+ sig do
6051
+ params(
6052
+ apply_seat_increase_config:
6053
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
6054
+ subscription_id: String,
6055
+ allocation:
6056
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6057
+ ).returns(T.attached_class)
6058
+ end
6059
+ def self.new(
6060
+ apply_seat_increase_config:,
6061
+ # ID of the subscription to configure on the recurring commit/credit.
6062
+ subscription_id:,
6063
+ # If set to POOLED, allocation added per seat is pooled across the account.
6064
+ allocation: nil
6065
+ )
6066
+ end
6067
+
6068
+ sig do
6069
+ override.returns(
6070
+ {
6071
+ apply_seat_increase_config:
6072
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
6073
+ subscription_id: String,
6074
+ allocation:
6075
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
6076
+ }
6077
+ )
6078
+ end
6079
+ def to_hash
6080
+ end
6081
+
6082
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
6083
+ OrHash =
6084
+ T.type_alias do
6085
+ T.any(
6086
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
6087
+ MetronomeSDK::Internal::AnyHash
6088
+ )
6089
+ end
6090
+
6091
+ # Indicates whether a mid-period seat increase should be prorated.
6092
+ sig { returns(T::Boolean) }
6093
+ attr_accessor :is_prorated
6094
+
6095
+ sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
6096
+ def self.new(
6097
+ # Indicates whether a mid-period seat increase should be prorated.
6098
+ is_prorated:
6099
+ )
6100
+ end
6101
+
6102
+ sig { override.returns({ is_prorated: T::Boolean }) }
6103
+ def to_hash
6104
+ end
6105
+ end
6106
+
6107
+ # If set to POOLED, allocation added per seat is pooled across the account.
6108
+ module Allocation
6109
+ extend MetronomeSDK::Internal::Type::Enum
6110
+
6111
+ TaggedSymbol =
6112
+ T.type_alias do
6113
+ T.all(
6114
+ Symbol,
6115
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation
6116
+ )
6117
+ end
6118
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
6119
+
6120
+ POOLED =
6121
+ T.let(
6122
+ :POOLED,
6123
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
6124
+ )
6125
+
6126
+ sig do
6127
+ override.returns(
6128
+ T::Array[
6129
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
6130
+ ]
6131
+ )
6132
+ end
6133
+ def self.values
6134
+ end
6135
+ end
6136
+ end
5962
6137
  end
5963
6138
 
5964
6139
  class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -6043,7 +6218,7 @@ module MetronomeSDK
6043
6218
  sig { params(ending_before: Time).void }
6044
6219
  attr_writer :ending_before
6045
6220
 
6046
- # Optional configuration for recurring commit/credit hierarchy access control
6221
+ # Optional configuration for recurring credit hierarchy access control
6047
6222
  sig do
6048
6223
  returns(
6049
6224
  T.nilable(
@@ -6147,6 +6322,8 @@ module MetronomeSDK
6147
6322
  # or credit. A customer's usage needs to meet the condition of at least one of the
6148
6323
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
6149
6324
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
6325
+ # Instead, to target usage by product or product tag, pass those values in the
6326
+ # body of `specifiers`.
6150
6327
  sig do
6151
6328
  returns(
6152
6329
  T.nilable(
@@ -6168,6 +6345,24 @@ module MetronomeSDK
6168
6345
  end
6169
6346
  attr_writer :specifiers
6170
6347
 
6348
+ # Attach a subscription to the recurring commit/credit.
6349
+ sig do
6350
+ returns(
6351
+ T.nilable(
6352
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig
6353
+ )
6354
+ )
6355
+ end
6356
+ attr_reader :subscription_config
6357
+
6358
+ sig do
6359
+ params(
6360
+ subscription_config:
6361
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::OrHash
6362
+ ).void
6363
+ end
6364
+ attr_writer :subscription_config
6365
+
6171
6366
  # A temporary ID that can be used to reference the recurring commit for commit
6172
6367
  # specific overrides.
6173
6368
  sig { returns(T.nilable(String)) }
@@ -6204,6 +6399,8 @@ module MetronomeSDK
6204
6399
  T::Array[
6205
6400
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Specifier::OrHash
6206
6401
  ],
6402
+ subscription_config:
6403
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::OrHash,
6207
6404
  temporary_id: String
6208
6405
  ).returns(T.attached_class)
6209
6406
  end
@@ -6227,7 +6424,7 @@ module MetronomeSDK
6227
6424
  description: nil,
6228
6425
  # Determines when the contract will stop creating recurring commits. optional
6229
6426
  ending_before: nil,
6230
- # Optional configuration for recurring commit/credit hierarchy access control
6427
+ # Optional configuration for recurring credit hierarchy access control
6231
6428
  hierarchy_configuration: nil,
6232
6429
  # displayed on invoices. will be passed through to the individual commits
6233
6430
  name: nil,
@@ -6252,7 +6449,11 @@ module MetronomeSDK
6252
6449
  # or credit. A customer's usage needs to meet the condition of at least one of the
6253
6450
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
6254
6451
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
6452
+ # Instead, to target usage by product or product tag, pass those values in the
6453
+ # body of `specifiers`.
6255
6454
  specifiers: nil,
6455
+ # Attach a subscription to the recurring commit/credit.
6456
+ subscription_config: nil,
6256
6457
  # A temporary ID that can be used to reference the recurring commit for commit
6257
6458
  # specific overrides.
6258
6459
  temporary_id: nil
@@ -6288,6 +6489,8 @@ module MetronomeSDK
6288
6489
  T::Array[
6289
6490
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Specifier
6290
6491
  ],
6492
+ subscription_config:
6493
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig,
6291
6494
  temporary_id: String
6292
6495
  }
6293
6496
  )
@@ -6448,7 +6651,7 @@ module MetronomeSDK
6448
6651
  end
6449
6652
  attr_accessor :child_access
6450
6653
 
6451
- # Optional configuration for recurring commit/credit hierarchy access control
6654
+ # Optional configuration for recurring credit hierarchy access control
6452
6655
  sig do
6453
6656
  params(
6454
6657
  child_access:
@@ -6904,6 +7107,141 @@ module MetronomeSDK
6904
7107
  def to_hash
6905
7108
  end
6906
7109
  end
7110
+
7111
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
7112
+ OrHash =
7113
+ T.type_alias do
7114
+ T.any(
7115
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig,
7116
+ MetronomeSDK::Internal::AnyHash
7117
+ )
7118
+ end
7119
+
7120
+ sig do
7121
+ returns(
7122
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
7123
+ )
7124
+ end
7125
+ attr_reader :apply_seat_increase_config
7126
+
7127
+ sig do
7128
+ params(
7129
+ apply_seat_increase_config:
7130
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
7131
+ ).void
7132
+ end
7133
+ attr_writer :apply_seat_increase_config
7134
+
7135
+ # ID of the subscription to configure on the recurring commit/credit.
7136
+ sig { returns(String) }
7137
+ attr_accessor :subscription_id
7138
+
7139
+ # If set to POOLED, allocation added per seat is pooled across the account.
7140
+ sig do
7141
+ returns(
7142
+ T.nilable(
7143
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7144
+ )
7145
+ )
7146
+ end
7147
+ attr_reader :allocation
7148
+
7149
+ sig do
7150
+ params(
7151
+ allocation:
7152
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7153
+ ).void
7154
+ end
7155
+ attr_writer :allocation
7156
+
7157
+ # Attach a subscription to the recurring commit/credit.
7158
+ sig do
7159
+ params(
7160
+ apply_seat_increase_config:
7161
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
7162
+ subscription_id: String,
7163
+ allocation:
7164
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7165
+ ).returns(T.attached_class)
7166
+ end
7167
+ def self.new(
7168
+ apply_seat_increase_config:,
7169
+ # ID of the subscription to configure on the recurring commit/credit.
7170
+ subscription_id:,
7171
+ # If set to POOLED, allocation added per seat is pooled across the account.
7172
+ allocation: nil
7173
+ )
7174
+ end
7175
+
7176
+ sig do
7177
+ override.returns(
7178
+ {
7179
+ apply_seat_increase_config:
7180
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
7181
+ subscription_id: String,
7182
+ allocation:
7183
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
7184
+ }
7185
+ )
7186
+ end
7187
+ def to_hash
7188
+ end
7189
+
7190
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
7191
+ OrHash =
7192
+ T.type_alias do
7193
+ T.any(
7194
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
7195
+ MetronomeSDK::Internal::AnyHash
7196
+ )
7197
+ end
7198
+
7199
+ # Indicates whether a mid-period seat increase should be prorated.
7200
+ sig { returns(T::Boolean) }
7201
+ attr_accessor :is_prorated
7202
+
7203
+ sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
7204
+ def self.new(
7205
+ # Indicates whether a mid-period seat increase should be prorated.
7206
+ is_prorated:
7207
+ )
7208
+ end
7209
+
7210
+ sig { override.returns({ is_prorated: T::Boolean }) }
7211
+ def to_hash
7212
+ end
7213
+ end
7214
+
7215
+ # If set to POOLED, allocation added per seat is pooled across the account.
7216
+ module Allocation
7217
+ extend MetronomeSDK::Internal::Type::Enum
7218
+
7219
+ TaggedSymbol =
7220
+ T.type_alias do
7221
+ T.all(
7222
+ Symbol,
7223
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation
7224
+ )
7225
+ end
7226
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
7227
+
7228
+ POOLED =
7229
+ T.let(
7230
+ :POOLED,
7231
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
7232
+ )
7233
+
7234
+ sig do
7235
+ override.returns(
7236
+ T::Array[
7237
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
7238
+ ]
7239
+ )
7240
+ end
7241
+ def self.values
7242
+ end
7243
+ end
7244
+ end
6907
7245
  end
6908
7246
 
6909
7247
  class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
@@ -7274,7 +7612,7 @@ module MetronomeSDK
7274
7612
  )
7275
7613
  end
7276
7614
 
7277
- # Defaults to USD if not passed. Only USD is supported at this time.
7615
+ # Defaults to USD (cents) if not passed.
7278
7616
  sig { returns(T.nilable(String)) }
7279
7617
  attr_reader :credit_type_id
7280
7618
 
@@ -7336,7 +7674,7 @@ module MetronomeSDK
7336
7674
  ).returns(T.attached_class)
7337
7675
  end
7338
7676
  def self.new(
7339
- # Defaults to USD if not passed. Only USD is supported at this time.
7677
+ # Defaults to USD (cents) if not passed.
7340
7678
  credit_type_id: nil,
7341
7679
  # Enter the unit price and quantity for the charge or instead only send the
7342
7680
  # amount. If amount is sent, the unit price is assumed to be the amount and
@@ -8221,6 +8559,14 @@ module MetronomeSDK
8221
8559
  sig { params(starting_at: Time).void }
8222
8560
  attr_writer :starting_at
8223
8561
 
8562
+ # A temporary ID used to reference the subscription in recurring commit/credit
8563
+ # subscription configs created within the same payload.
8564
+ sig { returns(T.nilable(String)) }
8565
+ attr_reader :temporary_id
8566
+
8567
+ sig { params(temporary_id: String).void }
8568
+ attr_writer :temporary_id
8569
+
8224
8570
  sig do
8225
8571
  params(
8226
8572
  collection_schedule:
@@ -8234,7 +8580,8 @@ module MetronomeSDK
8234
8580
  description: String,
8235
8581
  ending_before: Time,
8236
8582
  name: String,
8237
- starting_at: Time
8583
+ starting_at: Time,
8584
+ temporary_id: String
8238
8585
  ).returns(T.attached_class)
8239
8586
  end
8240
8587
  def self.new(
@@ -8250,7 +8597,10 @@ module MetronomeSDK
8250
8597
  name: nil,
8251
8598
  # Inclusive start time for the subscription. If not provided, defaults to contract
8252
8599
  # start date
8253
- starting_at: nil
8600
+ starting_at: nil,
8601
+ # A temporary ID used to reference the subscription in recurring commit/credit
8602
+ # subscription configs created within the same payload.
8603
+ temporary_id: nil
8254
8604
  )
8255
8605
  end
8256
8606
 
@@ -8268,7 +8618,8 @@ module MetronomeSDK
8268
8618
  description: String,
8269
8619
  ending_before: Time,
8270
8620
  name: String,
8271
- starting_at: Time
8621
+ starting_at: Time,
8622
+ temporary_id: String
8272
8623
  }
8273
8624
  )
8274
8625
  end
@@ -8318,10 +8669,11 @@ module MetronomeSDK
8318
8669
  )
8319
8670
  end
8320
8671
 
8321
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8322
- # is selected, the quantity increase will be billed on the scheduled date. If
8323
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8324
- # for in-arrears at the end of the period.
8672
+ # Indicates how mid-period quantity adjustments are invoiced.
8673
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8674
+ # quantity increase will be billed immediately on the scheduled date.
8675
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8676
+ # in-arrears at the end of the period.
8325
8677
  sig do
8326
8678
  returns(
8327
8679
  T.nilable(
@@ -8354,10 +8706,11 @@ module MetronomeSDK
8354
8706
  ).returns(T.attached_class)
8355
8707
  end
8356
8708
  def self.new(
8357
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8358
- # is selected, the quantity increase will be billed on the scheduled date. If
8359
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8360
- # for in-arrears at the end of the period.
8709
+ # Indicates how mid-period quantity adjustments are invoiced.
8710
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8711
+ # quantity increase will be billed immediately on the scheduled date.
8712
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8713
+ # in-arrears at the end of the period.
8361
8714
  invoice_behavior: nil,
8362
8715
  # Indicates if the partial period will be prorated or charged a full amount.
8363
8716
  is_prorated: nil
@@ -8376,10 +8729,11 @@ module MetronomeSDK
8376
8729
  def to_hash
8377
8730
  end
8378
8731
 
8379
- # Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
8380
- # is selected, the quantity increase will be billed on the scheduled date. If
8381
- # BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
8382
- # for in-arrears at the end of the period.
8732
+ # Indicates how mid-period quantity adjustments are invoiced.
8733
+ # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
8734
+ # quantity increase will be billed immediately on the scheduled date.
8735
+ # **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
8736
+ # in-arrears at the end of the period.
8383
8737
  module InvoiceBehavior
8384
8738
  extend MetronomeSDK::Internal::Type::Enum
8385
8739
 
@@ -10315,6 +10669,8 @@ module MetronomeSDK
10315
10669
  # or credit. A customer's usage needs to meet the condition of at least one of the
10316
10670
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
10317
10671
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
10672
+ # Instead, to target usage by product or product tag, pass those values in the
10673
+ # body of `specifiers`.
10318
10674
  sig do
10319
10675
  returns(
10320
10676
  T.nilable(
@@ -10360,6 +10716,8 @@ module MetronomeSDK
10360
10716
  # or credit. A customer's usage needs to meet the condition of at least one of the
10361
10717
  # specifiers to contribute to a commit's or credit's drawdown. This field cannot
10362
10718
  # be used together with `applicable_product_ids` or `applicable_product_tags`.
10719
+ # Instead, to target usage by product or product tag, pass those values in the
10720
+ # body of `specifiers`.
10363
10721
  specifiers: nil
10364
10722
  )
10365
10723
  end