metronome-sdk 3.6.0 → 3.8.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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
  5. data/lib/metronome_sdk/internal/type/enum.rb +0 -25
  6. data/lib/metronome_sdk/models/commit.rb +36 -1
  7. data/lib/metronome_sdk/models/contract.rb +140 -1
  8. data/lib/metronome_sdk/models/contract_v2.rb +457 -8
  9. data/lib/metronome_sdk/models/contract_without_amendments.rb +320 -5
  10. data/lib/metronome_sdk/models/credit.rb +10 -1
  11. data/lib/metronome_sdk/models/override.rb +7 -1
  12. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +113 -2
  13. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +105 -2
  14. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
  15. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
  16. data/lib/metronome_sdk/models/subscription.rb +90 -2
  17. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  18. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +46 -5
  19. data/lib/metronome_sdk/models/v1/contract_create_params.rb +436 -12
  20. data/lib/metronome_sdk/models/v1/contract_create_response.rb +1308 -3
  21. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  22. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  23. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  24. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  25. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  26. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  27. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  28. data/lib/metronome_sdk/models/v1/package_create_params.rb +394 -11
  29. data/lib/metronome_sdk/models/v1/package_list_response.rb +374 -8
  30. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +378 -8
  31. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +817 -13
  32. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +4310 -3
  33. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +600 -10
  34. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  35. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  36. data/lib/metronome_sdk/resources/v1/contracts.rb +71 -2
  37. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  38. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  39. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  40. data/lib/metronome_sdk/resources/v1/packages.rb +6 -5
  41. data/lib/metronome_sdk/resources/v1.rb +0 -4
  42. data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
  43. data/lib/metronome_sdk/version.rb +1 -1
  44. data/lib/metronome_sdk.rb +2 -8
  45. data/rbi/metronome_sdk/models/commit.rbi +61 -0
  46. data/rbi/metronome_sdk/models/contract.rbi +354 -0
  47. data/rbi/metronome_sdk/models/contract_v2.rbi +1132 -11
  48. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +831 -0
  49. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  50. data/rbi/metronome_sdk/models/override.rbi +9 -0
  51. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +299 -6
  52. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +287 -6
  53. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
  54. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
  55. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  56. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  57. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +81 -6
  58. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1095 -17
  59. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2911 -4
  60. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  61. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  62. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  63. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  64. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  65. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  66. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  67. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +1049 -42
  68. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +1051 -54
  69. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +1051 -54
  70. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +2130 -114
  71. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +9749 -4
  72. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1567 -82
  73. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  74. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  75. data/rbi/metronome_sdk/resources/v1/contracts.rbi +77 -0
  76. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  77. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  78. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  79. data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
  80. data/rbi/metronome_sdk/resources/v1.rbi +0 -3
  81. data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
  82. data/sig/metronome_sdk/models/commit.rbs +26 -0
  83. data/sig/metronome_sdk/models/contract.rbs +151 -0
  84. data/sig/metronome_sdk/models/contract_v2.rbs +448 -5
  85. data/sig/metronome_sdk/models/contract_without_amendments.rbs +320 -2
  86. data/sig/metronome_sdk/models/credit.rbs +7 -0
  87. data/sig/metronome_sdk/models/override.rbs +7 -0
  88. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
  89. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
  90. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
  91. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
  92. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  93. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  94. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +26 -0
  95. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +412 -5
  96. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1210 -4
  97. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  98. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  99. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  100. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  101. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  102. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  103. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  104. data/sig/metronome_sdk/models/v1/package_create_params.rbs +386 -5
  105. data/sig/metronome_sdk/models/v1/package_list_response.rbs +380 -5
  106. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +378 -5
  107. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +751 -14
  108. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4215 -4
  109. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +569 -14
  110. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  111. data/sig/metronome_sdk/resources/v1/contracts.rbs +14 -0
  112. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  113. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  114. data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
  115. data/sig/metronome_sdk/resources/v1.rbs +0 -2
  116. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  117. metadata +8 -26
  118. data/lib/metronome_sdk/models/v1/payment.rb +0 -196
  119. data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
  120. data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
  121. data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
  122. data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
  123. data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
  124. data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
  125. data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
  126. data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
  127. data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
  128. data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
  129. data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
  130. data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
  131. data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
  132. data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
  133. data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
  134. data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
  135. data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
  136. data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
  137. data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
  138. data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
  139. data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
  140. data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
  141. data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
@@ -12,19 +12,2926 @@ module MetronomeSDK
12
12
  )
13
13
  end
14
14
 
15
- sig { returns(MetronomeSDK::ID) }
15
+ sig { returns(MetronomeSDK::Models::V1::ContractCreateResponse::Data) }
16
16
  attr_reader :data
17
17
 
18
- sig { params(data: MetronomeSDK::ID::OrHash).void }
18
+ sig do
19
+ params(
20
+ data: MetronomeSDK::Models::V1::ContractCreateResponse::Data::OrHash
21
+ ).void
22
+ end
19
23
  attr_writer :data
20
24
 
21
- sig { params(data: MetronomeSDK::ID::OrHash).returns(T.attached_class) }
25
+ sig do
26
+ params(
27
+ data: MetronomeSDK::Models::V1::ContractCreateResponse::Data::OrHash
28
+ ).returns(T.attached_class)
29
+ end
22
30
  def self.new(data:)
23
31
  end
24
32
 
25
- sig { override.returns({ data: MetronomeSDK::ID }) }
33
+ sig do
34
+ override.returns(
35
+ { data: MetronomeSDK::Models::V1::ContractCreateResponse::Data }
36
+ )
37
+ end
26
38
  def to_hash
27
39
  end
40
+
41
+ class Data < MetronomeSDK::Internal::Type::BaseModel
42
+ OrHash =
43
+ T.type_alias do
44
+ T.any(
45
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data,
46
+ MetronomeSDK::Internal::AnyHash
47
+ )
48
+ end
49
+
50
+ sig { returns(String) }
51
+ attr_accessor :id
52
+
53
+ # The created contract.
54
+ sig do
55
+ returns(
56
+ T.nilable(
57
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract
58
+ )
59
+ )
60
+ end
61
+ attr_reader :contract
62
+
63
+ sig do
64
+ params(
65
+ contract:
66
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::OrHash
67
+ ).void
68
+ end
69
+ attr_writer :contract
70
+
71
+ sig do
72
+ params(
73
+ id: String,
74
+ contract:
75
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::OrHash
76
+ ).returns(T.attached_class)
77
+ end
78
+ def self.new(
79
+ id:,
80
+ # The created contract.
81
+ contract: nil
82
+ )
83
+ end
84
+
85
+ sig do
86
+ override.returns(
87
+ {
88
+ id: String,
89
+ contract:
90
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract
91
+ }
92
+ )
93
+ end
94
+ def to_hash
95
+ end
96
+
97
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
98
+ OrHash =
99
+ T.type_alias do
100
+ T.any(
101
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract,
102
+ MetronomeSDK::Internal::AnyHash
103
+ )
104
+ end
105
+
106
+ sig { returns(String) }
107
+ attr_accessor :id
108
+
109
+ sig { returns(T::Array[MetronomeSDK::Commit]) }
110
+ attr_accessor :commits
111
+
112
+ sig { returns(Time) }
113
+ attr_accessor :created_at
114
+
115
+ sig { returns(String) }
116
+ attr_accessor :created_by
117
+
118
+ sig { returns(String) }
119
+ attr_accessor :customer_id
120
+
121
+ sig { returns(T::Array[MetronomeSDK::Override]) }
122
+ attr_accessor :overrides
123
+
124
+ sig { returns(T::Array[MetronomeSDK::ScheduledCharge]) }
125
+ attr_accessor :scheduled_charges
126
+
127
+ sig { returns(Time) }
128
+ attr_accessor :starting_at
129
+
130
+ sig do
131
+ returns(
132
+ T::Array[
133
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition
134
+ ]
135
+ )
136
+ end
137
+ attr_accessor :transitions
138
+
139
+ sig do
140
+ returns(
141
+ T::Array[
142
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter
143
+ ]
144
+ )
145
+ end
146
+ attr_accessor :usage_filter
147
+
148
+ sig do
149
+ returns(
150
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule
151
+ )
152
+ end
153
+ attr_reader :usage_statement_schedule
154
+
155
+ sig do
156
+ params(
157
+ usage_statement_schedule:
158
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::OrHash
159
+ ).void
160
+ end
161
+ attr_writer :usage_statement_schedule
162
+
163
+ sig { returns(T.nilable(T::Array[MetronomeSDK::Credit])) }
164
+ attr_reader :credits
165
+
166
+ sig { params(credits: T::Array[MetronomeSDK::Credit::OrHash]).void }
167
+ attr_writer :credits
168
+
169
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
170
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
171
+ attr_reader :custom_fields
172
+
173
+ sig { params(custom_fields: T::Hash[Symbol, String]).void }
174
+ attr_writer :custom_fields
175
+
176
+ # The billing provider configuration associated with the contract.
177
+ sig do
178
+ returns(
179
+ T.nilable(
180
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration
181
+ )
182
+ )
183
+ end
184
+ attr_reader :customer_billing_provider_configuration
185
+
186
+ sig do
187
+ params(
188
+ customer_billing_provider_configuration:
189
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::OrHash
190
+ ).void
191
+ end
192
+ attr_writer :customer_billing_provider_configuration
193
+
194
+ sig { returns(T.nilable(Time)) }
195
+ attr_reader :ending_before
196
+
197
+ sig { params(ending_before: Time).void }
198
+ attr_writer :ending_before
199
+
200
+ # Indicates whether there are more items than the limit for this endpoint. Use the
201
+ # respective list endpoints to get the full lists.
202
+ sig do
203
+ returns(
204
+ T.nilable(
205
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore
206
+ )
207
+ )
208
+ end
209
+ attr_reader :has_more
210
+
211
+ sig do
212
+ params(
213
+ has_more:
214
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore::OrHash
215
+ ).void
216
+ end
217
+ attr_writer :has_more
218
+
219
+ # Either a **parent** configuration with a list of children or a **child**
220
+ # configuration with a single parent.
221
+ sig do
222
+ returns(T.nilable(MetronomeSDK::HierarchyConfiguration::Variants))
223
+ end
224
+ attr_reader :hierarchy_configuration
225
+
226
+ sig do
227
+ params(
228
+ hierarchy_configuration:
229
+ T.any(
230
+ MetronomeSDK::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
231
+ MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
232
+ )
233
+ ).void
234
+ end
235
+ attr_writer :hierarchy_configuration
236
+
237
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
238
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
239
+ # each multiplier; the one with the lowest priority value will be prioritized
240
+ # first.
241
+ sig do
242
+ returns(
243
+ T.nilable(
244
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
245
+ )
246
+ )
247
+ end
248
+ attr_reader :multiplier_override_prioritization
249
+
250
+ sig do
251
+ params(
252
+ multiplier_override_prioritization:
253
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::OrSymbol
254
+ ).void
255
+ end
256
+ attr_writer :multiplier_override_prioritization
257
+
258
+ sig { returns(T.nilable(String)) }
259
+ attr_reader :name
260
+
261
+ sig { params(name: String).void }
262
+ attr_writer :name
263
+
264
+ sig { returns(T.nilable(Float)) }
265
+ attr_reader :net_payment_terms_days
266
+
267
+ sig { params(net_payment_terms_days: Float).void }
268
+ attr_writer :net_payment_terms_days
269
+
270
+ # ID of the package this contract was created from, if applicable.
271
+ sig { returns(T.nilable(String)) }
272
+ attr_reader :package_id
273
+
274
+ sig { params(package_id: String).void }
275
+ attr_writer :package_id
276
+
277
+ sig do
278
+ returns(
279
+ T.nilable(MetronomeSDK::PrepaidBalanceThresholdConfiguration)
280
+ )
281
+ end
282
+ attr_reader :prepaid_balance_threshold_configuration
283
+
284
+ sig do
285
+ params(
286
+ prepaid_balance_threshold_configuration:
287
+ MetronomeSDK::PrepaidBalanceThresholdConfiguration::OrHash
288
+ ).void
289
+ end
290
+ attr_writer :prepaid_balance_threshold_configuration
291
+
292
+ sig { returns(T.nilable(String)) }
293
+ attr_reader :rate_card_id
294
+
295
+ sig { params(rate_card_id: String).void }
296
+ attr_writer :rate_card_id
297
+
298
+ sig do
299
+ returns(
300
+ T.nilable(
301
+ T::Array[
302
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit
303
+ ]
304
+ )
305
+ )
306
+ end
307
+ attr_reader :recurring_commits
308
+
309
+ sig do
310
+ params(
311
+ recurring_commits:
312
+ T::Array[
313
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::OrHash
314
+ ]
315
+ ).void
316
+ end
317
+ attr_writer :recurring_commits
318
+
319
+ sig do
320
+ returns(
321
+ T.nilable(
322
+ T::Array[
323
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit
324
+ ]
325
+ )
326
+ )
327
+ end
328
+ attr_reader :recurring_credits
329
+
330
+ sig do
331
+ params(
332
+ recurring_credits:
333
+ T::Array[
334
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::OrHash
335
+ ]
336
+ ).void
337
+ end
338
+ attr_writer :recurring_credits
339
+
340
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
341
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
342
+ # `ending_before` date for consolidation to occur. This field cannot be modified
343
+ # after a Contract has been created. If this field is omitted, charges will appear
344
+ # on a separate invoice from usage charges.
345
+ sig do
346
+ returns(
347
+ T.nilable(
348
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
349
+ )
350
+ )
351
+ end
352
+ attr_reader :scheduled_charges_on_usage_invoices
353
+
354
+ sig do
355
+ params(
356
+ scheduled_charges_on_usage_invoices:
357
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::OrSymbol
358
+ ).void
359
+ end
360
+ attr_writer :scheduled_charges_on_usage_invoices
361
+
362
+ sig do
363
+ returns(T.nilable(MetronomeSDK::SpendThresholdConfiguration))
364
+ end
365
+ attr_reader :spend_threshold_configuration
366
+
367
+ sig do
368
+ params(
369
+ spend_threshold_configuration:
370
+ MetronomeSDK::SpendThresholdConfiguration::OrHash
371
+ ).void
372
+ end
373
+ attr_writer :spend_threshold_configuration
374
+
375
+ # List of subscriptions on the contract.
376
+ sig { returns(T.nilable(T::Array[MetronomeSDK::Subscription])) }
377
+ attr_reader :subscriptions
378
+
379
+ sig do
380
+ params(
381
+ subscriptions: T::Array[MetronomeSDK::Subscription::OrHash]
382
+ ).void
383
+ end
384
+ attr_writer :subscriptions
385
+
386
+ # Optional uniqueness key to prevent duplicate contract creations.
387
+ sig { returns(T.nilable(String)) }
388
+ attr_reader :uniqueness_key
389
+
390
+ sig { params(uniqueness_key: String).void }
391
+ attr_writer :uniqueness_key
392
+
393
+ # The created contract.
394
+ sig do
395
+ params(
396
+ id: String,
397
+ commits: T::Array[MetronomeSDK::Commit::OrHash],
398
+ created_at: Time,
399
+ created_by: String,
400
+ customer_id: String,
401
+ overrides: T::Array[MetronomeSDK::Override::OrHash],
402
+ scheduled_charges:
403
+ T::Array[MetronomeSDK::ScheduledCharge::OrHash],
404
+ starting_at: Time,
405
+ transitions:
406
+ T::Array[
407
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::OrHash
408
+ ],
409
+ usage_filter:
410
+ T::Array[
411
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter::OrHash
412
+ ],
413
+ usage_statement_schedule:
414
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::OrHash,
415
+ credits: T::Array[MetronomeSDK::Credit::OrHash],
416
+ custom_fields: T::Hash[Symbol, String],
417
+ customer_billing_provider_configuration:
418
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::OrHash,
419
+ ending_before: Time,
420
+ has_more:
421
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore::OrHash,
422
+ hierarchy_configuration:
423
+ T.any(
424
+ MetronomeSDK::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
425
+ MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
426
+ ),
427
+ multiplier_override_prioritization:
428
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::OrSymbol,
429
+ name: String,
430
+ net_payment_terms_days: Float,
431
+ package_id: String,
432
+ prepaid_balance_threshold_configuration:
433
+ MetronomeSDK::PrepaidBalanceThresholdConfiguration::OrHash,
434
+ rate_card_id: String,
435
+ recurring_commits:
436
+ T::Array[
437
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::OrHash
438
+ ],
439
+ recurring_credits:
440
+ T::Array[
441
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::OrHash
442
+ ],
443
+ scheduled_charges_on_usage_invoices:
444
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::OrSymbol,
445
+ spend_threshold_configuration:
446
+ MetronomeSDK::SpendThresholdConfiguration::OrHash,
447
+ subscriptions: T::Array[MetronomeSDK::Subscription::OrHash],
448
+ uniqueness_key: String
449
+ ).returns(T.attached_class)
450
+ end
451
+ def self.new(
452
+ id:,
453
+ commits:,
454
+ created_at:,
455
+ created_by:,
456
+ customer_id:,
457
+ overrides:,
458
+ scheduled_charges:,
459
+ starting_at:,
460
+ transitions:,
461
+ usage_filter:,
462
+ usage_statement_schedule:,
463
+ credits: nil,
464
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
465
+ custom_fields: nil,
466
+ # The billing provider configuration associated with the contract.
467
+ customer_billing_provider_configuration: nil,
468
+ ending_before: nil,
469
+ # Indicates whether there are more items than the limit for this endpoint. Use the
470
+ # respective list endpoints to get the full lists.
471
+ has_more: nil,
472
+ # Either a **parent** configuration with a list of children or a **child**
473
+ # configuration with a single parent.
474
+ hierarchy_configuration: nil,
475
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
476
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
477
+ # each multiplier; the one with the lowest priority value will be prioritized
478
+ # first.
479
+ multiplier_override_prioritization: nil,
480
+ name: nil,
481
+ net_payment_terms_days: nil,
482
+ # ID of the package this contract was created from, if applicable.
483
+ package_id: nil,
484
+ prepaid_balance_threshold_configuration: nil,
485
+ rate_card_id: nil,
486
+ recurring_commits: nil,
487
+ recurring_credits: nil,
488
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
489
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
490
+ # `ending_before` date for consolidation to occur. This field cannot be modified
491
+ # after a Contract has been created. If this field is omitted, charges will appear
492
+ # on a separate invoice from usage charges.
493
+ scheduled_charges_on_usage_invoices: nil,
494
+ spend_threshold_configuration: nil,
495
+ # List of subscriptions on the contract.
496
+ subscriptions: nil,
497
+ # Optional uniqueness key to prevent duplicate contract creations.
498
+ uniqueness_key: nil
499
+ )
500
+ end
501
+
502
+ sig do
503
+ override.returns(
504
+ {
505
+ id: String,
506
+ commits: T::Array[MetronomeSDK::Commit],
507
+ created_at: Time,
508
+ created_by: String,
509
+ customer_id: String,
510
+ overrides: T::Array[MetronomeSDK::Override],
511
+ scheduled_charges: T::Array[MetronomeSDK::ScheduledCharge],
512
+ starting_at: Time,
513
+ transitions:
514
+ T::Array[
515
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition
516
+ ],
517
+ usage_filter:
518
+ T::Array[
519
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter
520
+ ],
521
+ usage_statement_schedule:
522
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule,
523
+ credits: T::Array[MetronomeSDK::Credit],
524
+ custom_fields: T::Hash[Symbol, String],
525
+ customer_billing_provider_configuration:
526
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration,
527
+ ending_before: Time,
528
+ has_more:
529
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore,
530
+ hierarchy_configuration:
531
+ MetronomeSDK::HierarchyConfiguration::Variants,
532
+ multiplier_override_prioritization:
533
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol,
534
+ name: String,
535
+ net_payment_terms_days: Float,
536
+ package_id: String,
537
+ prepaid_balance_threshold_configuration:
538
+ MetronomeSDK::PrepaidBalanceThresholdConfiguration,
539
+ rate_card_id: String,
540
+ recurring_commits:
541
+ T::Array[
542
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit
543
+ ],
544
+ recurring_credits:
545
+ T::Array[
546
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit
547
+ ],
548
+ scheduled_charges_on_usage_invoices:
549
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol,
550
+ spend_threshold_configuration:
551
+ MetronomeSDK::SpendThresholdConfiguration,
552
+ subscriptions: T::Array[MetronomeSDK::Subscription],
553
+ uniqueness_key: String
554
+ }
555
+ )
556
+ end
557
+ def to_hash
558
+ end
559
+
560
+ class Transition < MetronomeSDK::Internal::Type::BaseModel
561
+ OrHash =
562
+ T.type_alias do
563
+ T.any(
564
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition,
565
+ MetronomeSDK::Internal::AnyHash
566
+ )
567
+ end
568
+
569
+ sig { returns(String) }
570
+ attr_accessor :from_contract_id
571
+
572
+ sig { returns(String) }
573
+ attr_accessor :to_contract_id
574
+
575
+ sig do
576
+ returns(
577
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
578
+ )
579
+ end
580
+ attr_accessor :type
581
+
582
+ sig do
583
+ params(
584
+ from_contract_id: String,
585
+ to_contract_id: String,
586
+ type:
587
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::OrSymbol
588
+ ).returns(T.attached_class)
589
+ end
590
+ def self.new(from_contract_id:, to_contract_id:, type:)
591
+ end
592
+
593
+ sig do
594
+ override.returns(
595
+ {
596
+ from_contract_id: String,
597
+ to_contract_id: String,
598
+ type:
599
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
600
+ }
601
+ )
602
+ end
603
+ def to_hash
604
+ end
605
+
606
+ module Type
607
+ extend MetronomeSDK::Internal::Type::Enum
608
+
609
+ TaggedSymbol =
610
+ T.type_alias do
611
+ T.all(
612
+ Symbol,
613
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type
614
+ )
615
+ end
616
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
617
+
618
+ SUPERSEDE =
619
+ T.let(
620
+ :SUPERSEDE,
621
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
622
+ )
623
+ RENEWAL =
624
+ T.let(
625
+ :RENEWAL,
626
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
627
+ )
628
+
629
+ sig do
630
+ override.returns(
631
+ T::Array[
632
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
633
+ ]
634
+ )
635
+ end
636
+ def self.values
637
+ end
638
+ end
639
+ end
640
+
641
+ class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
642
+ OrHash =
643
+ T.type_alias do
644
+ T.any(
645
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter,
646
+ MetronomeSDK::Internal::AnyHash
647
+ )
648
+ end
649
+
650
+ sig { returns(String) }
651
+ attr_accessor :group_key
652
+
653
+ sig { returns(T::Array[String]) }
654
+ attr_accessor :group_values
655
+
656
+ sig { returns(Time) }
657
+ attr_accessor :starting_at
658
+
659
+ sig { returns(T.nilable(Time)) }
660
+ attr_reader :ending_before
661
+
662
+ sig { params(ending_before: Time).void }
663
+ attr_writer :ending_before
664
+
665
+ sig do
666
+ params(
667
+ group_key: String,
668
+ group_values: T::Array[String],
669
+ starting_at: Time,
670
+ ending_before: Time
671
+ ).returns(T.attached_class)
672
+ end
673
+ def self.new(
674
+ group_key:,
675
+ group_values:,
676
+ starting_at:,
677
+ ending_before: nil
678
+ )
679
+ end
680
+
681
+ sig do
682
+ override.returns(
683
+ {
684
+ group_key: String,
685
+ group_values: T::Array[String],
686
+ starting_at: Time,
687
+ ending_before: Time
688
+ }
689
+ )
690
+ end
691
+ def to_hash
692
+ end
693
+ end
694
+
695
+ class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
696
+ OrHash =
697
+ T.type_alias do
698
+ T.any(
699
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule,
700
+ MetronomeSDK::Internal::AnyHash
701
+ )
702
+ end
703
+
704
+ # Contract usage statements follow a selected cadence based on this date.
705
+ sig { returns(Time) }
706
+ attr_accessor :billing_anchor_date
707
+
708
+ sig do
709
+ returns(
710
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
711
+ )
712
+ end
713
+ attr_accessor :frequency
714
+
715
+ sig do
716
+ params(
717
+ billing_anchor_date: Time,
718
+ frequency:
719
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::OrSymbol
720
+ ).returns(T.attached_class)
721
+ end
722
+ def self.new(
723
+ # Contract usage statements follow a selected cadence based on this date.
724
+ billing_anchor_date:,
725
+ frequency:
726
+ )
727
+ end
728
+
729
+ sig do
730
+ override.returns(
731
+ {
732
+ billing_anchor_date: Time,
733
+ frequency:
734
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
735
+ }
736
+ )
737
+ end
738
+ def to_hash
739
+ end
740
+
741
+ module Frequency
742
+ extend MetronomeSDK::Internal::Type::Enum
743
+
744
+ TaggedSymbol =
745
+ T.type_alias do
746
+ T.all(
747
+ Symbol,
748
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency
749
+ )
750
+ end
751
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
752
+
753
+ MONTHLY =
754
+ T.let(
755
+ :MONTHLY,
756
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
757
+ )
758
+ QUARTERLY =
759
+ T.let(
760
+ :QUARTERLY,
761
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
762
+ )
763
+ ANNUAL =
764
+ T.let(
765
+ :ANNUAL,
766
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
767
+ )
768
+ WEEKLY =
769
+ T.let(
770
+ :WEEKLY,
771
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
772
+ )
773
+
774
+ sig do
775
+ override.returns(
776
+ T::Array[
777
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
778
+ ]
779
+ )
780
+ end
781
+ def self.values
782
+ end
783
+ end
784
+ end
785
+
786
+ class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
787
+ OrHash =
788
+ T.type_alias do
789
+ T.any(
790
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration,
791
+ MetronomeSDK::Internal::AnyHash
792
+ )
793
+ end
794
+
795
+ sig { returns(T.nilable(String)) }
796
+ attr_reader :id
797
+
798
+ sig { params(id: String).void }
799
+ attr_writer :id
800
+
801
+ sig do
802
+ returns(
803
+ T.nilable(
804
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
805
+ )
806
+ )
807
+ end
808
+ attr_reader :billing_provider
809
+
810
+ sig do
811
+ params(
812
+ billing_provider:
813
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol
814
+ ).void
815
+ end
816
+ attr_writer :billing_provider
817
+
818
+ sig do
819
+ returns(
820
+ T.nilable(
821
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
822
+ )
823
+ )
824
+ end
825
+ attr_reader :delivery_method
826
+
827
+ sig do
828
+ params(
829
+ delivery_method:
830
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
831
+ ).void
832
+ end
833
+ attr_writer :delivery_method
834
+
835
+ # The billing provider configuration associated with the contract.
836
+ sig do
837
+ params(
838
+ id: String,
839
+ billing_provider:
840
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol,
841
+ delivery_method:
842
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
843
+ ).returns(T.attached_class)
844
+ end
845
+ def self.new(id: nil, billing_provider: nil, delivery_method: nil)
846
+ end
847
+
848
+ sig do
849
+ override.returns(
850
+ {
851
+ id: String,
852
+ billing_provider:
853
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol,
854
+ delivery_method:
855
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
856
+ }
857
+ )
858
+ end
859
+ def to_hash
860
+ end
861
+
862
+ module BillingProvider
863
+ extend MetronomeSDK::Internal::Type::Enum
864
+
865
+ TaggedSymbol =
866
+ T.type_alias do
867
+ T.all(
868
+ Symbol,
869
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider
870
+ )
871
+ end
872
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
873
+
874
+ AWS_MARKETPLACE =
875
+ T.let(
876
+ :aws_marketplace,
877
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
878
+ )
879
+ STRIPE =
880
+ T.let(
881
+ :stripe,
882
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
883
+ )
884
+ NETSUITE =
885
+ T.let(
886
+ :netsuite,
887
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
888
+ )
889
+ CUSTOM =
890
+ T.let(
891
+ :custom,
892
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
893
+ )
894
+ AZURE_MARKETPLACE =
895
+ T.let(
896
+ :azure_marketplace,
897
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
898
+ )
899
+ QUICKBOOKS_ONLINE =
900
+ T.let(
901
+ :quickbooks_online,
902
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
903
+ )
904
+ WORKDAY =
905
+ T.let(
906
+ :workday,
907
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
908
+ )
909
+ GCP_MARKETPLACE =
910
+ T.let(
911
+ :gcp_marketplace,
912
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
913
+ )
914
+ METRONOME =
915
+ T.let(
916
+ :metronome,
917
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
918
+ )
919
+
920
+ sig do
921
+ override.returns(
922
+ T::Array[
923
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
924
+ ]
925
+ )
926
+ end
927
+ def self.values
928
+ end
929
+ end
930
+
931
+ module DeliveryMethod
932
+ extend MetronomeSDK::Internal::Type::Enum
933
+
934
+ TaggedSymbol =
935
+ T.type_alias do
936
+ T.all(
937
+ Symbol,
938
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod
939
+ )
940
+ end
941
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
942
+
943
+ DIRECT_TO_BILLING_PROVIDER =
944
+ T.let(
945
+ :direct_to_billing_provider,
946
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
947
+ )
948
+ AWS_SQS =
949
+ T.let(
950
+ :aws_sqs,
951
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
952
+ )
953
+ TACKLE =
954
+ T.let(
955
+ :tackle,
956
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
957
+ )
958
+ AWS_SNS =
959
+ T.let(
960
+ :aws_sns,
961
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
962
+ )
963
+
964
+ sig do
965
+ override.returns(
966
+ T::Array[
967
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
968
+ ]
969
+ )
970
+ end
971
+ def self.values
972
+ end
973
+ end
974
+ end
975
+
976
+ class HasMore < MetronomeSDK::Internal::Type::BaseModel
977
+ OrHash =
978
+ T.type_alias do
979
+ T.any(
980
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore,
981
+ MetronomeSDK::Internal::AnyHash
982
+ )
983
+ end
984
+
985
+ # Whether there are more commits on this contract than the limit for this
986
+ # endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
987
+ # of commits.
988
+ sig { returns(T::Boolean) }
989
+ attr_accessor :commits
990
+
991
+ # Whether there are more credits on this contract than the limit for this
992
+ # endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
993
+ # of credits.
994
+ sig { returns(T::Boolean) }
995
+ attr_accessor :credits
996
+
997
+ # Indicates whether there are more items than the limit for this endpoint. Use the
998
+ # respective list endpoints to get the full lists.
999
+ sig do
1000
+ params(commits: T::Boolean, credits: T::Boolean).returns(
1001
+ T.attached_class
1002
+ )
1003
+ end
1004
+ def self.new(
1005
+ # Whether there are more commits on this contract than the limit for this
1006
+ # endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
1007
+ # of commits.
1008
+ commits:,
1009
+ # Whether there are more credits on this contract than the limit for this
1010
+ # endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
1011
+ # of credits.
1012
+ credits:
1013
+ )
1014
+ end
1015
+
1016
+ sig do
1017
+ override.returns({ commits: T::Boolean, credits: T::Boolean })
1018
+ end
1019
+ def to_hash
1020
+ end
1021
+ end
1022
+
1023
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
1024
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
1025
+ # each multiplier; the one with the lowest priority value will be prioritized
1026
+ # first.
1027
+ module MultiplierOverridePrioritization
1028
+ extend MetronomeSDK::Internal::Type::Enum
1029
+
1030
+ TaggedSymbol =
1031
+ T.type_alias do
1032
+ T.all(
1033
+ Symbol,
1034
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization
1035
+ )
1036
+ end
1037
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1038
+
1039
+ LOWEST_MULTIPLIER =
1040
+ T.let(
1041
+ :LOWEST_MULTIPLIER,
1042
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
1043
+ )
1044
+ EXPLICIT =
1045
+ T.let(
1046
+ :EXPLICIT,
1047
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
1048
+ )
1049
+
1050
+ sig do
1051
+ override.returns(
1052
+ T::Array[
1053
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
1054
+ ]
1055
+ )
1056
+ end
1057
+ def self.values
1058
+ end
1059
+ end
1060
+
1061
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1062
+ OrHash =
1063
+ T.type_alias do
1064
+ T.any(
1065
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit,
1066
+ MetronomeSDK::Internal::AnyHash
1067
+ )
1068
+ end
1069
+
1070
+ sig { returns(String) }
1071
+ attr_accessor :id
1072
+
1073
+ # The amount of commit to grant.
1074
+ sig do
1075
+ returns(
1076
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount
1077
+ )
1078
+ end
1079
+ attr_reader :access_amount
1080
+
1081
+ sig do
1082
+ params(
1083
+ access_amount:
1084
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount::OrHash
1085
+ ).void
1086
+ end
1087
+ attr_writer :access_amount
1088
+
1089
+ # The amount of time the created commits will be valid for
1090
+ sig do
1091
+ returns(
1092
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration
1093
+ )
1094
+ end
1095
+ attr_reader :commit_duration
1096
+
1097
+ sig do
1098
+ params(
1099
+ commit_duration:
1100
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::OrHash
1101
+ ).void
1102
+ end
1103
+ attr_writer :commit_duration
1104
+
1105
+ # Will be passed down to the individual commits
1106
+ sig { returns(Float) }
1107
+ attr_accessor :priority
1108
+
1109
+ sig do
1110
+ returns(
1111
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product
1112
+ )
1113
+ end
1114
+ attr_reader :product
1115
+
1116
+ sig do
1117
+ params(
1118
+ product:
1119
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product::OrHash
1120
+ ).void
1121
+ end
1122
+ attr_writer :product
1123
+
1124
+ # Whether the created commits will use the commit rate or list rate
1125
+ sig do
1126
+ returns(
1127
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
1128
+ )
1129
+ end
1130
+ attr_accessor :rate_type
1131
+
1132
+ # Determines the start time for the first commit
1133
+ sig { returns(Time) }
1134
+ attr_accessor :starting_at
1135
+
1136
+ # Will be passed down to the individual commits
1137
+ sig { returns(T.nilable(T::Array[String])) }
1138
+ attr_reader :applicable_product_ids
1139
+
1140
+ sig { params(applicable_product_ids: T::Array[String]).void }
1141
+ attr_writer :applicable_product_ids
1142
+
1143
+ # Will be passed down to the individual commits
1144
+ sig { returns(T.nilable(T::Array[String])) }
1145
+ attr_reader :applicable_product_tags
1146
+
1147
+ sig { params(applicable_product_tags: T::Array[String]).void }
1148
+ attr_writer :applicable_product_tags
1149
+
1150
+ sig do
1151
+ returns(
1152
+ T.nilable(
1153
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract
1154
+ )
1155
+ )
1156
+ end
1157
+ attr_reader :contract
1158
+
1159
+ sig do
1160
+ params(
1161
+ contract:
1162
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract::OrHash
1163
+ ).void
1164
+ end
1165
+ attr_writer :contract
1166
+
1167
+ # Will be passed down to the individual commits
1168
+ sig { returns(T.nilable(String)) }
1169
+ attr_reader :description
1170
+
1171
+ sig { params(description: String).void }
1172
+ attr_writer :description
1173
+
1174
+ # Determines when the contract will stop creating recurring commits. Optional
1175
+ sig { returns(T.nilable(Time)) }
1176
+ attr_reader :ending_before
1177
+
1178
+ sig { params(ending_before: Time).void }
1179
+ attr_writer :ending_before
1180
+
1181
+ # Optional configuration for recurring commit/credit hierarchy access control
1182
+ sig do
1183
+ returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration))
1184
+ end
1185
+ attr_reader :hierarchy_configuration
1186
+
1187
+ sig do
1188
+ params(
1189
+ hierarchy_configuration:
1190
+ MetronomeSDK::CommitHierarchyConfiguration::OrHash
1191
+ ).void
1192
+ end
1193
+ attr_writer :hierarchy_configuration
1194
+
1195
+ # The amount the customer should be billed for the commit. Not required.
1196
+ sig do
1197
+ returns(
1198
+ T.nilable(
1199
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount
1200
+ )
1201
+ )
1202
+ end
1203
+ attr_reader :invoice_amount
1204
+
1205
+ sig do
1206
+ params(
1207
+ invoice_amount:
1208
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount::OrHash
1209
+ ).void
1210
+ end
1211
+ attr_writer :invoice_amount
1212
+
1213
+ # Displayed on invoices. Will be passed through to the individual commits
1214
+ sig { returns(T.nilable(String)) }
1215
+ attr_reader :name
1216
+
1217
+ sig { params(name: String).void }
1218
+ attr_writer :name
1219
+
1220
+ # Will be passed down to the individual commits
1221
+ sig { returns(T.nilable(String)) }
1222
+ attr_reader :netsuite_sales_order_id
1223
+
1224
+ sig { params(netsuite_sales_order_id: String).void }
1225
+ attr_writer :netsuite_sales_order_id
1226
+
1227
+ # Determines whether the first and last commit will be prorated. If not provided,
1228
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1229
+ sig do
1230
+ returns(
1231
+ T.nilable(
1232
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1233
+ )
1234
+ )
1235
+ end
1236
+ attr_reader :proration
1237
+
1238
+ sig do
1239
+ params(
1240
+ proration:
1241
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::OrSymbol
1242
+ ).void
1243
+ end
1244
+ attr_writer :proration
1245
+
1246
+ # Rounding configuration for prorated recurring commit amounts.
1247
+ sig do
1248
+ returns(
1249
+ T.nilable(
1250
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding
1251
+ )
1252
+ )
1253
+ end
1254
+ attr_reader :proration_rounding
1255
+
1256
+ sig do
1257
+ params(
1258
+ proration_rounding:
1259
+ T.nilable(
1260
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::OrHash
1261
+ )
1262
+ ).void
1263
+ end
1264
+ attr_writer :proration_rounding
1265
+
1266
+ # The frequency at which the recurring commits will be created. If not provided: -
1267
+ # The commits will be created on the usage invoice frequency. If provided: - The
1268
+ # period defined in the duration will correspond to this frequency. - Commits will
1269
+ # be created aligned with the recurring commit's starting_at rather than the usage
1270
+ # invoice dates.
1271
+ sig do
1272
+ returns(
1273
+ T.nilable(
1274
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
1275
+ )
1276
+ )
1277
+ end
1278
+ attr_reader :recurrence_frequency
1279
+
1280
+ sig do
1281
+ params(
1282
+ recurrence_frequency:
1283
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::OrSymbol
1284
+ ).void
1285
+ end
1286
+ attr_writer :recurrence_frequency
1287
+
1288
+ # Will be passed down to the individual commits. This controls how much of an
1289
+ # individual unexpired commit will roll over upon contract transition. Must be
1290
+ # between 0 and 1.
1291
+ sig { returns(T.nilable(Float)) }
1292
+ attr_reader :rollover_fraction
1293
+
1294
+ sig { params(rollover_fraction: Float).void }
1295
+ attr_writer :rollover_fraction
1296
+
1297
+ # List of filters that determine what kind of customer usage draws down a commit
1298
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1299
+ # specifiers to contribute to a commit's or credit's drawdown.
1300
+ sig do
1301
+ returns(T.nilable(T::Array[MetronomeSDK::CommitSpecifier]))
1302
+ end
1303
+ attr_reader :specifiers
1304
+
1305
+ sig do
1306
+ params(
1307
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash]
1308
+ ).void
1309
+ end
1310
+ attr_writer :specifiers
1311
+
1312
+ # Attach a subscription to the recurring commit/credit.
1313
+ sig do
1314
+ returns(
1315
+ T.nilable(MetronomeSDK::RecurringCommitSubscriptionConfig)
1316
+ )
1317
+ end
1318
+ attr_reader :subscription_config
1319
+
1320
+ sig do
1321
+ params(
1322
+ subscription_config:
1323
+ MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
1324
+ ).void
1325
+ end
1326
+ attr_writer :subscription_config
1327
+
1328
+ sig do
1329
+ params(
1330
+ id: String,
1331
+ access_amount:
1332
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount::OrHash,
1333
+ commit_duration:
1334
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::OrHash,
1335
+ priority: Float,
1336
+ product:
1337
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product::OrHash,
1338
+ rate_type:
1339
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::OrSymbol,
1340
+ starting_at: Time,
1341
+ applicable_product_ids: T::Array[String],
1342
+ applicable_product_tags: T::Array[String],
1343
+ contract:
1344
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract::OrHash,
1345
+ description: String,
1346
+ ending_before: Time,
1347
+ hierarchy_configuration:
1348
+ MetronomeSDK::CommitHierarchyConfiguration::OrHash,
1349
+ invoice_amount:
1350
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount::OrHash,
1351
+ name: String,
1352
+ netsuite_sales_order_id: String,
1353
+ proration:
1354
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::OrSymbol,
1355
+ proration_rounding:
1356
+ T.nilable(
1357
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::OrHash
1358
+ ),
1359
+ recurrence_frequency:
1360
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::OrSymbol,
1361
+ rollover_fraction: Float,
1362
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
1363
+ subscription_config:
1364
+ MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
1365
+ ).returns(T.attached_class)
1366
+ end
1367
+ def self.new(
1368
+ id:,
1369
+ # The amount of commit to grant.
1370
+ access_amount:,
1371
+ # The amount of time the created commits will be valid for
1372
+ commit_duration:,
1373
+ # Will be passed down to the individual commits
1374
+ priority:,
1375
+ product:,
1376
+ # Whether the created commits will use the commit rate or list rate
1377
+ rate_type:,
1378
+ # Determines the start time for the first commit
1379
+ starting_at:,
1380
+ # Will be passed down to the individual commits
1381
+ applicable_product_ids: nil,
1382
+ # Will be passed down to the individual commits
1383
+ applicable_product_tags: nil,
1384
+ contract: nil,
1385
+ # Will be passed down to the individual commits
1386
+ description: nil,
1387
+ # Determines when the contract will stop creating recurring commits. Optional
1388
+ ending_before: nil,
1389
+ # Optional configuration for recurring commit/credit hierarchy access control
1390
+ hierarchy_configuration: nil,
1391
+ # The amount the customer should be billed for the commit. Not required.
1392
+ invoice_amount: nil,
1393
+ # Displayed on invoices. Will be passed through to the individual commits
1394
+ name: nil,
1395
+ # Will be passed down to the individual commits
1396
+ netsuite_sales_order_id: nil,
1397
+ # Determines whether the first and last commit will be prorated. If not provided,
1398
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1399
+ proration: nil,
1400
+ # Rounding configuration for prorated recurring commit amounts.
1401
+ proration_rounding: nil,
1402
+ # The frequency at which the recurring commits will be created. If not provided: -
1403
+ # The commits will be created on the usage invoice frequency. If provided: - The
1404
+ # period defined in the duration will correspond to this frequency. - Commits will
1405
+ # be created aligned with the recurring commit's starting_at rather than the usage
1406
+ # invoice dates.
1407
+ recurrence_frequency: nil,
1408
+ # Will be passed down to the individual commits. This controls how much of an
1409
+ # individual unexpired commit will roll over upon contract transition. Must be
1410
+ # between 0 and 1.
1411
+ rollover_fraction: nil,
1412
+ # List of filters that determine what kind of customer usage draws down a commit
1413
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1414
+ # specifiers to contribute to a commit's or credit's drawdown.
1415
+ specifiers: nil,
1416
+ # Attach a subscription to the recurring commit/credit.
1417
+ subscription_config: nil
1418
+ )
1419
+ end
1420
+
1421
+ sig do
1422
+ override.returns(
1423
+ {
1424
+ id: String,
1425
+ access_amount:
1426
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount,
1427
+ commit_duration:
1428
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration,
1429
+ priority: Float,
1430
+ product:
1431
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product,
1432
+ rate_type:
1433
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol,
1434
+ starting_at: Time,
1435
+ applicable_product_ids: T::Array[String],
1436
+ applicable_product_tags: T::Array[String],
1437
+ contract:
1438
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract,
1439
+ description: String,
1440
+ ending_before: Time,
1441
+ hierarchy_configuration:
1442
+ MetronomeSDK::CommitHierarchyConfiguration,
1443
+ invoice_amount:
1444
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount,
1445
+ name: String,
1446
+ netsuite_sales_order_id: String,
1447
+ proration:
1448
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol,
1449
+ proration_rounding:
1450
+ T.nilable(
1451
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding
1452
+ ),
1453
+ recurrence_frequency:
1454
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
1455
+ rollover_fraction: Float,
1456
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier],
1457
+ subscription_config:
1458
+ MetronomeSDK::RecurringCommitSubscriptionConfig
1459
+ }
1460
+ )
1461
+ end
1462
+ def to_hash
1463
+ end
1464
+
1465
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1466
+ OrHash =
1467
+ T.type_alias do
1468
+ T.any(
1469
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount,
1470
+ MetronomeSDK::Internal::AnyHash
1471
+ )
1472
+ end
1473
+
1474
+ sig { returns(String) }
1475
+ attr_accessor :credit_type_id
1476
+
1477
+ sig { returns(Float) }
1478
+ attr_accessor :unit_price
1479
+
1480
+ sig { returns(T.nilable(Float)) }
1481
+ attr_reader :quantity
1482
+
1483
+ sig { params(quantity: Float).void }
1484
+ attr_writer :quantity
1485
+
1486
+ # The amount of commit to grant.
1487
+ sig do
1488
+ params(
1489
+ credit_type_id: String,
1490
+ unit_price: Float,
1491
+ quantity: Float
1492
+ ).returns(T.attached_class)
1493
+ end
1494
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
1495
+ end
1496
+
1497
+ sig do
1498
+ override.returns(
1499
+ {
1500
+ credit_type_id: String,
1501
+ unit_price: Float,
1502
+ quantity: Float
1503
+ }
1504
+ )
1505
+ end
1506
+ def to_hash
1507
+ end
1508
+ end
1509
+
1510
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1511
+ OrHash =
1512
+ T.type_alias do
1513
+ T.any(
1514
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration,
1515
+ MetronomeSDK::Internal::AnyHash
1516
+ )
1517
+ end
1518
+
1519
+ sig { returns(Float) }
1520
+ attr_accessor :value
1521
+
1522
+ sig do
1523
+ returns(
1524
+ T.nilable(
1525
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1526
+ )
1527
+ )
1528
+ end
1529
+ attr_reader :unit
1530
+
1531
+ sig do
1532
+ params(
1533
+ unit:
1534
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::OrSymbol
1535
+ ).void
1536
+ end
1537
+ attr_writer :unit
1538
+
1539
+ # The amount of time the created commits will be valid for
1540
+ sig do
1541
+ params(
1542
+ value: Float,
1543
+ unit:
1544
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::OrSymbol
1545
+ ).returns(T.attached_class)
1546
+ end
1547
+ def self.new(value:, unit: nil)
1548
+ end
1549
+
1550
+ sig do
1551
+ override.returns(
1552
+ {
1553
+ value: Float,
1554
+ unit:
1555
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1556
+ }
1557
+ )
1558
+ end
1559
+ def to_hash
1560
+ end
1561
+
1562
+ module Unit
1563
+ extend MetronomeSDK::Internal::Type::Enum
1564
+
1565
+ TaggedSymbol =
1566
+ T.type_alias do
1567
+ T.all(
1568
+ Symbol,
1569
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit
1570
+ )
1571
+ end
1572
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1573
+
1574
+ PERIODS =
1575
+ T.let(
1576
+ :PERIODS,
1577
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1578
+ )
1579
+
1580
+ sig do
1581
+ override.returns(
1582
+ T::Array[
1583
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
1584
+ ]
1585
+ )
1586
+ end
1587
+ def self.values
1588
+ end
1589
+ end
1590
+ end
1591
+
1592
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1593
+ OrHash =
1594
+ T.type_alias do
1595
+ T.any(
1596
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product,
1597
+ MetronomeSDK::Internal::AnyHash
1598
+ )
1599
+ end
1600
+
1601
+ sig { returns(String) }
1602
+ attr_accessor :id
1603
+
1604
+ sig { returns(String) }
1605
+ attr_accessor :name
1606
+
1607
+ sig do
1608
+ params(id: String, name: String).returns(T.attached_class)
1609
+ end
1610
+ def self.new(id:, name:)
1611
+ end
1612
+
1613
+ sig { override.returns({ id: String, name: String }) }
1614
+ def to_hash
1615
+ end
1616
+ end
1617
+
1618
+ # Whether the created commits will use the commit rate or list rate
1619
+ module RateType
1620
+ extend MetronomeSDK::Internal::Type::Enum
1621
+
1622
+ TaggedSymbol =
1623
+ T.type_alias do
1624
+ T.all(
1625
+ Symbol,
1626
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType
1627
+ )
1628
+ end
1629
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1630
+
1631
+ COMMIT_RATE =
1632
+ T.let(
1633
+ :COMMIT_RATE,
1634
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
1635
+ )
1636
+ LIST_RATE =
1637
+ T.let(
1638
+ :LIST_RATE,
1639
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
1640
+ )
1641
+
1642
+ sig do
1643
+ override.returns(
1644
+ T::Array[
1645
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
1646
+ ]
1647
+ )
1648
+ end
1649
+ def self.values
1650
+ end
1651
+ end
1652
+
1653
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1654
+ OrHash =
1655
+ T.type_alias do
1656
+ T.any(
1657
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract,
1658
+ MetronomeSDK::Internal::AnyHash
1659
+ )
1660
+ end
1661
+
1662
+ sig { returns(String) }
1663
+ attr_accessor :id
1664
+
1665
+ sig { params(id: String).returns(T.attached_class) }
1666
+ def self.new(id:)
1667
+ end
1668
+
1669
+ sig { override.returns({ id: String }) }
1670
+ def to_hash
1671
+ end
1672
+ end
1673
+
1674
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1675
+ OrHash =
1676
+ T.type_alias do
1677
+ T.any(
1678
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount,
1679
+ MetronomeSDK::Internal::AnyHash
1680
+ )
1681
+ end
1682
+
1683
+ sig { returns(String) }
1684
+ attr_accessor :credit_type_id
1685
+
1686
+ sig { returns(Float) }
1687
+ attr_accessor :quantity
1688
+
1689
+ sig { returns(Float) }
1690
+ attr_accessor :unit_price
1691
+
1692
+ # The amount the customer should be billed for the commit. Not required.
1693
+ sig do
1694
+ params(
1695
+ credit_type_id: String,
1696
+ quantity: Float,
1697
+ unit_price: Float
1698
+ ).returns(T.attached_class)
1699
+ end
1700
+ def self.new(credit_type_id:, quantity:, unit_price:)
1701
+ end
1702
+
1703
+ sig do
1704
+ override.returns(
1705
+ {
1706
+ credit_type_id: String,
1707
+ quantity: Float,
1708
+ unit_price: Float
1709
+ }
1710
+ )
1711
+ end
1712
+ def to_hash
1713
+ end
1714
+ end
1715
+
1716
+ # Determines whether the first and last commit will be prorated. If not provided,
1717
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1718
+ module Proration
1719
+ extend MetronomeSDK::Internal::Type::Enum
1720
+
1721
+ TaggedSymbol =
1722
+ T.type_alias do
1723
+ T.all(
1724
+ Symbol,
1725
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration
1726
+ )
1727
+ end
1728
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1729
+
1730
+ NONE =
1731
+ T.let(
1732
+ :NONE,
1733
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1734
+ )
1735
+ FIRST =
1736
+ T.let(
1737
+ :FIRST,
1738
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1739
+ )
1740
+ LAST =
1741
+ T.let(
1742
+ :LAST,
1743
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1744
+ )
1745
+ FIRST_AND_LAST =
1746
+ T.let(
1747
+ :FIRST_AND_LAST,
1748
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1749
+ )
1750
+
1751
+ sig do
1752
+ override.returns(
1753
+ T::Array[
1754
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
1755
+ ]
1756
+ )
1757
+ end
1758
+ def self.values
1759
+ end
1760
+ end
1761
+
1762
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
1763
+ OrHash =
1764
+ T.type_alias do
1765
+ T.any(
1766
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding,
1767
+ MetronomeSDK::Internal::AnyHash
1768
+ )
1769
+ end
1770
+
1771
+ sig do
1772
+ returns(
1773
+ T.nilable(
1774
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access
1775
+ )
1776
+ )
1777
+ end
1778
+ attr_reader :access
1779
+
1780
+ sig do
1781
+ params(
1782
+ access:
1783
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::OrHash
1784
+ ).void
1785
+ end
1786
+ attr_writer :access
1787
+
1788
+ sig do
1789
+ returns(
1790
+ T.nilable(
1791
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice
1792
+ )
1793
+ )
1794
+ end
1795
+ attr_reader :invoice
1796
+
1797
+ sig do
1798
+ params(
1799
+ invoice:
1800
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::OrHash
1801
+ ).void
1802
+ end
1803
+ attr_writer :invoice
1804
+
1805
+ # Rounding configuration for prorated recurring commit amounts.
1806
+ sig do
1807
+ params(
1808
+ access:
1809
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::OrHash,
1810
+ invoice:
1811
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::OrHash
1812
+ ).returns(T.attached_class)
1813
+ end
1814
+ def self.new(access: nil, invoice: nil)
1815
+ end
1816
+
1817
+ sig do
1818
+ override.returns(
1819
+ {
1820
+ access:
1821
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access,
1822
+ invoice:
1823
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice
1824
+ }
1825
+ )
1826
+ end
1827
+ def to_hash
1828
+ end
1829
+
1830
+ class Access < MetronomeSDK::Internal::Type::BaseModel
1831
+ OrHash =
1832
+ T.type_alias do
1833
+ T.any(
1834
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access,
1835
+ MetronomeSDK::Internal::AnyHash
1836
+ )
1837
+ end
1838
+
1839
+ # Number of decimal places to round to. Applied directly to the stored monetary
1840
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1841
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1842
+ # dollar).
1843
+ sig { returns(Float) }
1844
+ attr_accessor :decimal_places
1845
+
1846
+ sig do
1847
+ returns(
1848
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1849
+ )
1850
+ end
1851
+ attr_accessor :rounding_method
1852
+
1853
+ sig do
1854
+ params(
1855
+ decimal_places: Float,
1856
+ rounding_method:
1857
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
1858
+ ).returns(T.attached_class)
1859
+ end
1860
+ def self.new(
1861
+ # Number of decimal places to round to. Applied directly to the stored monetary
1862
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1863
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1864
+ # dollar).
1865
+ decimal_places:,
1866
+ rounding_method:
1867
+ )
1868
+ end
1869
+
1870
+ sig do
1871
+ override.returns(
1872
+ {
1873
+ decimal_places: Float,
1874
+ rounding_method:
1875
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1876
+ }
1877
+ )
1878
+ end
1879
+ def to_hash
1880
+ end
1881
+
1882
+ module RoundingMethod
1883
+ extend MetronomeSDK::Internal::Type::Enum
1884
+
1885
+ TaggedSymbol =
1886
+ T.type_alias do
1887
+ T.all(
1888
+ Symbol,
1889
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod
1890
+ )
1891
+ end
1892
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1893
+
1894
+ HALF_UP =
1895
+ T.let(
1896
+ :HALF_UP,
1897
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1898
+ )
1899
+ FLOOR =
1900
+ T.let(
1901
+ :FLOOR,
1902
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1903
+ )
1904
+ CEILING =
1905
+ T.let(
1906
+ :CEILING,
1907
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1908
+ )
1909
+
1910
+ sig do
1911
+ override.returns(
1912
+ T::Array[
1913
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
1914
+ ]
1915
+ )
1916
+ end
1917
+ def self.values
1918
+ end
1919
+ end
1920
+ end
1921
+
1922
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
1923
+ OrHash =
1924
+ T.type_alias do
1925
+ T.any(
1926
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice,
1927
+ MetronomeSDK::Internal::AnyHash
1928
+ )
1929
+ end
1930
+
1931
+ # Number of decimal places to round to. Applied directly to the stored monetary
1932
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1933
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1934
+ # dollar).
1935
+ sig { returns(Float) }
1936
+ attr_accessor :decimal_places
1937
+
1938
+ sig do
1939
+ returns(
1940
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
1941
+ )
1942
+ end
1943
+ attr_accessor :rounding_method
1944
+
1945
+ sig do
1946
+ params(
1947
+ decimal_places: Float,
1948
+ rounding_method:
1949
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
1950
+ ).returns(T.attached_class)
1951
+ end
1952
+ def self.new(
1953
+ # Number of decimal places to round to. Applied directly to the stored monetary
1954
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1955
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1956
+ # dollar).
1957
+ decimal_places:,
1958
+ rounding_method:
1959
+ )
1960
+ end
1961
+
1962
+ sig do
1963
+ override.returns(
1964
+ {
1965
+ decimal_places: Float,
1966
+ rounding_method:
1967
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
1968
+ }
1969
+ )
1970
+ end
1971
+ def to_hash
1972
+ end
1973
+
1974
+ module RoundingMethod
1975
+ extend MetronomeSDK::Internal::Type::Enum
1976
+
1977
+ TaggedSymbol =
1978
+ T.type_alias do
1979
+ T.all(
1980
+ Symbol,
1981
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
1982
+ )
1983
+ end
1984
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1985
+
1986
+ HALF_UP =
1987
+ T.let(
1988
+ :HALF_UP,
1989
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
1990
+ )
1991
+ FLOOR =
1992
+ T.let(
1993
+ :FLOOR,
1994
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
1995
+ )
1996
+ CEILING =
1997
+ T.let(
1998
+ :CEILING,
1999
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
2000
+ )
2001
+
2002
+ sig do
2003
+ override.returns(
2004
+ T::Array[
2005
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
2006
+ ]
2007
+ )
2008
+ end
2009
+ def self.values
2010
+ end
2011
+ end
2012
+ end
2013
+ end
2014
+
2015
+ # The frequency at which the recurring commits will be created. If not provided: -
2016
+ # The commits will be created on the usage invoice frequency. If provided: - The
2017
+ # period defined in the duration will correspond to this frequency. - Commits will
2018
+ # be created aligned with the recurring commit's starting_at rather than the usage
2019
+ # invoice dates.
2020
+ module RecurrenceFrequency
2021
+ extend MetronomeSDK::Internal::Type::Enum
2022
+
2023
+ TaggedSymbol =
2024
+ T.type_alias do
2025
+ T.all(
2026
+ Symbol,
2027
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency
2028
+ )
2029
+ end
2030
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2031
+
2032
+ MONTHLY =
2033
+ T.let(
2034
+ :MONTHLY,
2035
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2036
+ )
2037
+ QUARTERLY =
2038
+ T.let(
2039
+ :QUARTERLY,
2040
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2041
+ )
2042
+ ANNUAL =
2043
+ T.let(
2044
+ :ANNUAL,
2045
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2046
+ )
2047
+ WEEKLY =
2048
+ T.let(
2049
+ :WEEKLY,
2050
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2051
+ )
2052
+ DAILY =
2053
+ T.let(
2054
+ :DAILY,
2055
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2056
+ )
2057
+
2058
+ sig do
2059
+ override.returns(
2060
+ T::Array[
2061
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
2062
+ ]
2063
+ )
2064
+ end
2065
+ def self.values
2066
+ end
2067
+ end
2068
+ end
2069
+
2070
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
2071
+ OrHash =
2072
+ T.type_alias do
2073
+ T.any(
2074
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit,
2075
+ MetronomeSDK::Internal::AnyHash
2076
+ )
2077
+ end
2078
+
2079
+ sig { returns(String) }
2080
+ attr_accessor :id
2081
+
2082
+ # The amount of commit to grant.
2083
+ sig do
2084
+ returns(
2085
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount
2086
+ )
2087
+ end
2088
+ attr_reader :access_amount
2089
+
2090
+ sig do
2091
+ params(
2092
+ access_amount:
2093
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount::OrHash
2094
+ ).void
2095
+ end
2096
+ attr_writer :access_amount
2097
+
2098
+ # The amount of time the created commits will be valid for
2099
+ sig do
2100
+ returns(
2101
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration
2102
+ )
2103
+ end
2104
+ attr_reader :commit_duration
2105
+
2106
+ sig do
2107
+ params(
2108
+ commit_duration:
2109
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::OrHash
2110
+ ).void
2111
+ end
2112
+ attr_writer :commit_duration
2113
+
2114
+ # Will be passed down to the individual commits
2115
+ sig { returns(Float) }
2116
+ attr_accessor :priority
2117
+
2118
+ sig do
2119
+ returns(
2120
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product
2121
+ )
2122
+ end
2123
+ attr_reader :product
2124
+
2125
+ sig do
2126
+ params(
2127
+ product:
2128
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product::OrHash
2129
+ ).void
2130
+ end
2131
+ attr_writer :product
2132
+
2133
+ # Whether the created commits will use the commit rate or list rate
2134
+ sig do
2135
+ returns(
2136
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
2137
+ )
2138
+ end
2139
+ attr_accessor :rate_type
2140
+
2141
+ # Determines the start time for the first commit
2142
+ sig { returns(Time) }
2143
+ attr_accessor :starting_at
2144
+
2145
+ # Will be passed down to the individual commits
2146
+ sig { returns(T.nilable(T::Array[String])) }
2147
+ attr_reader :applicable_product_ids
2148
+
2149
+ sig { params(applicable_product_ids: T::Array[String]).void }
2150
+ attr_writer :applicable_product_ids
2151
+
2152
+ # Will be passed down to the individual commits
2153
+ sig { returns(T.nilable(T::Array[String])) }
2154
+ attr_reader :applicable_product_tags
2155
+
2156
+ sig { params(applicable_product_tags: T::Array[String]).void }
2157
+ attr_writer :applicable_product_tags
2158
+
2159
+ sig do
2160
+ returns(
2161
+ T.nilable(
2162
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract
2163
+ )
2164
+ )
2165
+ end
2166
+ attr_reader :contract
2167
+
2168
+ sig do
2169
+ params(
2170
+ contract:
2171
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract::OrHash
2172
+ ).void
2173
+ end
2174
+ attr_writer :contract
2175
+
2176
+ # Will be passed down to the individual commits
2177
+ sig { returns(T.nilable(String)) }
2178
+ attr_reader :description
2179
+
2180
+ sig { params(description: String).void }
2181
+ attr_writer :description
2182
+
2183
+ # Determines when the contract will stop creating recurring commits. Optional
2184
+ sig { returns(T.nilable(Time)) }
2185
+ attr_reader :ending_before
2186
+
2187
+ sig { params(ending_before: Time).void }
2188
+ attr_writer :ending_before
2189
+
2190
+ # Optional configuration for recurring commit/credit hierarchy access control
2191
+ sig do
2192
+ returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration))
2193
+ end
2194
+ attr_reader :hierarchy_configuration
2195
+
2196
+ sig do
2197
+ params(
2198
+ hierarchy_configuration:
2199
+ MetronomeSDK::CommitHierarchyConfiguration::OrHash
2200
+ ).void
2201
+ end
2202
+ attr_writer :hierarchy_configuration
2203
+
2204
+ # Displayed on invoices. Will be passed through to the individual commits
2205
+ sig { returns(T.nilable(String)) }
2206
+ attr_reader :name
2207
+
2208
+ sig { params(name: String).void }
2209
+ attr_writer :name
2210
+
2211
+ # Will be passed down to the individual commits
2212
+ sig { returns(T.nilable(String)) }
2213
+ attr_reader :netsuite_sales_order_id
2214
+
2215
+ sig { params(netsuite_sales_order_id: String).void }
2216
+ attr_writer :netsuite_sales_order_id
2217
+
2218
+ # Determines whether the first and last commit will be prorated. If not provided,
2219
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2220
+ sig do
2221
+ returns(
2222
+ T.nilable(
2223
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2224
+ )
2225
+ )
2226
+ end
2227
+ attr_reader :proration
2228
+
2229
+ sig do
2230
+ params(
2231
+ proration:
2232
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::OrSymbol
2233
+ ).void
2234
+ end
2235
+ attr_writer :proration
2236
+
2237
+ # Rounding configuration for prorated recurring credit amounts.
2238
+ sig do
2239
+ returns(
2240
+ T.nilable(
2241
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding
2242
+ )
2243
+ )
2244
+ end
2245
+ attr_reader :proration_rounding
2246
+
2247
+ sig do
2248
+ params(
2249
+ proration_rounding:
2250
+ T.nilable(
2251
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::OrHash
2252
+ )
2253
+ ).void
2254
+ end
2255
+ attr_writer :proration_rounding
2256
+
2257
+ # The frequency at which the recurring commits will be created. If not provided: -
2258
+ # The commits will be created on the usage invoice frequency. If provided: - The
2259
+ # period defined in the duration will correspond to this frequency. - Commits will
2260
+ # be created aligned with the recurring commit's starting_at rather than the usage
2261
+ # invoice dates.
2262
+ sig do
2263
+ returns(
2264
+ T.nilable(
2265
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2266
+ )
2267
+ )
2268
+ end
2269
+ attr_reader :recurrence_frequency
2270
+
2271
+ sig do
2272
+ params(
2273
+ recurrence_frequency:
2274
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::OrSymbol
2275
+ ).void
2276
+ end
2277
+ attr_writer :recurrence_frequency
2278
+
2279
+ # Will be passed down to the individual commits. This controls how much of an
2280
+ # individual unexpired commit will roll over upon contract transition. Must be
2281
+ # between 0 and 1.
2282
+ sig { returns(T.nilable(Float)) }
2283
+ attr_reader :rollover_fraction
2284
+
2285
+ sig { params(rollover_fraction: Float).void }
2286
+ attr_writer :rollover_fraction
2287
+
2288
+ # List of filters that determine what kind of customer usage draws down a commit
2289
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2290
+ # specifiers to contribute to a commit's or credit's drawdown.
2291
+ sig do
2292
+ returns(T.nilable(T::Array[MetronomeSDK::CommitSpecifier]))
2293
+ end
2294
+ attr_reader :specifiers
2295
+
2296
+ sig do
2297
+ params(
2298
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash]
2299
+ ).void
2300
+ end
2301
+ attr_writer :specifiers
2302
+
2303
+ # Attach a subscription to the recurring commit/credit.
2304
+ sig do
2305
+ returns(
2306
+ T.nilable(MetronomeSDK::RecurringCommitSubscriptionConfig)
2307
+ )
2308
+ end
2309
+ attr_reader :subscription_config
2310
+
2311
+ sig do
2312
+ params(
2313
+ subscription_config:
2314
+ MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
2315
+ ).void
2316
+ end
2317
+ attr_writer :subscription_config
2318
+
2319
+ sig do
2320
+ params(
2321
+ id: String,
2322
+ access_amount:
2323
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount::OrHash,
2324
+ commit_duration:
2325
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::OrHash,
2326
+ priority: Float,
2327
+ product:
2328
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product::OrHash,
2329
+ rate_type:
2330
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::OrSymbol,
2331
+ starting_at: Time,
2332
+ applicable_product_ids: T::Array[String],
2333
+ applicable_product_tags: T::Array[String],
2334
+ contract:
2335
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract::OrHash,
2336
+ description: String,
2337
+ ending_before: Time,
2338
+ hierarchy_configuration:
2339
+ MetronomeSDK::CommitHierarchyConfiguration::OrHash,
2340
+ name: String,
2341
+ netsuite_sales_order_id: String,
2342
+ proration:
2343
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::OrSymbol,
2344
+ proration_rounding:
2345
+ T.nilable(
2346
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::OrHash
2347
+ ),
2348
+ recurrence_frequency:
2349
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::OrSymbol,
2350
+ rollover_fraction: Float,
2351
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
2352
+ subscription_config:
2353
+ MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
2354
+ ).returns(T.attached_class)
2355
+ end
2356
+ def self.new(
2357
+ id:,
2358
+ # The amount of commit to grant.
2359
+ access_amount:,
2360
+ # The amount of time the created commits will be valid for
2361
+ commit_duration:,
2362
+ # Will be passed down to the individual commits
2363
+ priority:,
2364
+ product:,
2365
+ # Whether the created commits will use the commit rate or list rate
2366
+ rate_type:,
2367
+ # Determines the start time for the first commit
2368
+ starting_at:,
2369
+ # Will be passed down to the individual commits
2370
+ applicable_product_ids: nil,
2371
+ # Will be passed down to the individual commits
2372
+ applicable_product_tags: nil,
2373
+ contract: nil,
2374
+ # Will be passed down to the individual commits
2375
+ description: nil,
2376
+ # Determines when the contract will stop creating recurring commits. Optional
2377
+ ending_before: nil,
2378
+ # Optional configuration for recurring commit/credit hierarchy access control
2379
+ hierarchy_configuration: nil,
2380
+ # Displayed on invoices. Will be passed through to the individual commits
2381
+ name: nil,
2382
+ # Will be passed down to the individual commits
2383
+ netsuite_sales_order_id: nil,
2384
+ # Determines whether the first and last commit will be prorated. If not provided,
2385
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2386
+ proration: nil,
2387
+ # Rounding configuration for prorated recurring credit amounts.
2388
+ proration_rounding: nil,
2389
+ # The frequency at which the recurring commits will be created. If not provided: -
2390
+ # The commits will be created on the usage invoice frequency. If provided: - The
2391
+ # period defined in the duration will correspond to this frequency. - Commits will
2392
+ # be created aligned with the recurring commit's starting_at rather than the usage
2393
+ # invoice dates.
2394
+ recurrence_frequency: nil,
2395
+ # Will be passed down to the individual commits. This controls how much of an
2396
+ # individual unexpired commit will roll over upon contract transition. Must be
2397
+ # between 0 and 1.
2398
+ rollover_fraction: nil,
2399
+ # List of filters that determine what kind of customer usage draws down a commit
2400
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2401
+ # specifiers to contribute to a commit's or credit's drawdown.
2402
+ specifiers: nil,
2403
+ # Attach a subscription to the recurring commit/credit.
2404
+ subscription_config: nil
2405
+ )
2406
+ end
2407
+
2408
+ sig do
2409
+ override.returns(
2410
+ {
2411
+ id: String,
2412
+ access_amount:
2413
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount,
2414
+ commit_duration:
2415
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration,
2416
+ priority: Float,
2417
+ product:
2418
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product,
2419
+ rate_type:
2420
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol,
2421
+ starting_at: Time,
2422
+ applicable_product_ids: T::Array[String],
2423
+ applicable_product_tags: T::Array[String],
2424
+ contract:
2425
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract,
2426
+ description: String,
2427
+ ending_before: Time,
2428
+ hierarchy_configuration:
2429
+ MetronomeSDK::CommitHierarchyConfiguration,
2430
+ name: String,
2431
+ netsuite_sales_order_id: String,
2432
+ proration:
2433
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol,
2434
+ proration_rounding:
2435
+ T.nilable(
2436
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding
2437
+ ),
2438
+ recurrence_frequency:
2439
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
2440
+ rollover_fraction: Float,
2441
+ specifiers: T::Array[MetronomeSDK::CommitSpecifier],
2442
+ subscription_config:
2443
+ MetronomeSDK::RecurringCommitSubscriptionConfig
2444
+ }
2445
+ )
2446
+ end
2447
+ def to_hash
2448
+ end
2449
+
2450
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
2451
+ OrHash =
2452
+ T.type_alias do
2453
+ T.any(
2454
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount,
2455
+ MetronomeSDK::Internal::AnyHash
2456
+ )
2457
+ end
2458
+
2459
+ sig { returns(String) }
2460
+ attr_accessor :credit_type_id
2461
+
2462
+ sig { returns(Float) }
2463
+ attr_accessor :unit_price
2464
+
2465
+ sig { returns(T.nilable(Float)) }
2466
+ attr_reader :quantity
2467
+
2468
+ sig { params(quantity: Float).void }
2469
+ attr_writer :quantity
2470
+
2471
+ # The amount of commit to grant.
2472
+ sig do
2473
+ params(
2474
+ credit_type_id: String,
2475
+ unit_price: Float,
2476
+ quantity: Float
2477
+ ).returns(T.attached_class)
2478
+ end
2479
+ def self.new(credit_type_id:, unit_price:, quantity: nil)
2480
+ end
2481
+
2482
+ sig do
2483
+ override.returns(
2484
+ {
2485
+ credit_type_id: String,
2486
+ unit_price: Float,
2487
+ quantity: Float
2488
+ }
2489
+ )
2490
+ end
2491
+ def to_hash
2492
+ end
2493
+ end
2494
+
2495
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
2496
+ OrHash =
2497
+ T.type_alias do
2498
+ T.any(
2499
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration,
2500
+ MetronomeSDK::Internal::AnyHash
2501
+ )
2502
+ end
2503
+
2504
+ sig { returns(Float) }
2505
+ attr_accessor :value
2506
+
2507
+ sig do
2508
+ returns(
2509
+ T.nilable(
2510
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2511
+ )
2512
+ )
2513
+ end
2514
+ attr_reader :unit
2515
+
2516
+ sig do
2517
+ params(
2518
+ unit:
2519
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::OrSymbol
2520
+ ).void
2521
+ end
2522
+ attr_writer :unit
2523
+
2524
+ # The amount of time the created commits will be valid for
2525
+ sig do
2526
+ params(
2527
+ value: Float,
2528
+ unit:
2529
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::OrSymbol
2530
+ ).returns(T.attached_class)
2531
+ end
2532
+ def self.new(value:, unit: nil)
2533
+ end
2534
+
2535
+ sig do
2536
+ override.returns(
2537
+ {
2538
+ value: Float,
2539
+ unit:
2540
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2541
+ }
2542
+ )
2543
+ end
2544
+ def to_hash
2545
+ end
2546
+
2547
+ module Unit
2548
+ extend MetronomeSDK::Internal::Type::Enum
2549
+
2550
+ TaggedSymbol =
2551
+ T.type_alias do
2552
+ T.all(
2553
+ Symbol,
2554
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit
2555
+ )
2556
+ end
2557
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2558
+
2559
+ PERIODS =
2560
+ T.let(
2561
+ :PERIODS,
2562
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2563
+ )
2564
+
2565
+ sig do
2566
+ override.returns(
2567
+ T::Array[
2568
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
2569
+ ]
2570
+ )
2571
+ end
2572
+ def self.values
2573
+ end
2574
+ end
2575
+ end
2576
+
2577
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2578
+ OrHash =
2579
+ T.type_alias do
2580
+ T.any(
2581
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product,
2582
+ MetronomeSDK::Internal::AnyHash
2583
+ )
2584
+ end
2585
+
2586
+ sig { returns(String) }
2587
+ attr_accessor :id
2588
+
2589
+ sig { returns(String) }
2590
+ attr_accessor :name
2591
+
2592
+ sig do
2593
+ params(id: String, name: String).returns(T.attached_class)
2594
+ end
2595
+ def self.new(id:, name:)
2596
+ end
2597
+
2598
+ sig { override.returns({ id: String, name: String }) }
2599
+ def to_hash
2600
+ end
2601
+ end
2602
+
2603
+ # Whether the created commits will use the commit rate or list rate
2604
+ module RateType
2605
+ extend MetronomeSDK::Internal::Type::Enum
2606
+
2607
+ TaggedSymbol =
2608
+ T.type_alias do
2609
+ T.all(
2610
+ Symbol,
2611
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType
2612
+ )
2613
+ end
2614
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2615
+
2616
+ COMMIT_RATE =
2617
+ T.let(
2618
+ :COMMIT_RATE,
2619
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
2620
+ )
2621
+ LIST_RATE =
2622
+ T.let(
2623
+ :LIST_RATE,
2624
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
2625
+ )
2626
+
2627
+ sig do
2628
+ override.returns(
2629
+ T::Array[
2630
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
2631
+ ]
2632
+ )
2633
+ end
2634
+ def self.values
2635
+ end
2636
+ end
2637
+
2638
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
2639
+ OrHash =
2640
+ T.type_alias do
2641
+ T.any(
2642
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract,
2643
+ MetronomeSDK::Internal::AnyHash
2644
+ )
2645
+ end
2646
+
2647
+ sig { returns(String) }
2648
+ attr_accessor :id
2649
+
2650
+ sig { params(id: String).returns(T.attached_class) }
2651
+ def self.new(id:)
2652
+ end
2653
+
2654
+ sig { override.returns({ id: String }) }
2655
+ def to_hash
2656
+ end
2657
+ end
2658
+
2659
+ # Determines whether the first and last commit will be prorated. If not provided,
2660
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2661
+ module Proration
2662
+ extend MetronomeSDK::Internal::Type::Enum
2663
+
2664
+ TaggedSymbol =
2665
+ T.type_alias do
2666
+ T.all(
2667
+ Symbol,
2668
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration
2669
+ )
2670
+ end
2671
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2672
+
2673
+ NONE =
2674
+ T.let(
2675
+ :NONE,
2676
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2677
+ )
2678
+ FIRST =
2679
+ T.let(
2680
+ :FIRST,
2681
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2682
+ )
2683
+ LAST =
2684
+ T.let(
2685
+ :LAST,
2686
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2687
+ )
2688
+ FIRST_AND_LAST =
2689
+ T.let(
2690
+ :FIRST_AND_LAST,
2691
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2692
+ )
2693
+
2694
+ sig do
2695
+ override.returns(
2696
+ T::Array[
2697
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
2698
+ ]
2699
+ )
2700
+ end
2701
+ def self.values
2702
+ end
2703
+ end
2704
+
2705
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
2706
+ OrHash =
2707
+ T.type_alias do
2708
+ T.any(
2709
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding,
2710
+ MetronomeSDK::Internal::AnyHash
2711
+ )
2712
+ end
2713
+
2714
+ sig do
2715
+ returns(
2716
+ T.nilable(
2717
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access
2718
+ )
2719
+ )
2720
+ end
2721
+ attr_reader :access
2722
+
2723
+ sig do
2724
+ params(
2725
+ access:
2726
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::OrHash
2727
+ ).void
2728
+ end
2729
+ attr_writer :access
2730
+
2731
+ # Rounding configuration for prorated recurring credit amounts.
2732
+ sig do
2733
+ params(
2734
+ access:
2735
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::OrHash
2736
+ ).returns(T.attached_class)
2737
+ end
2738
+ def self.new(access: nil)
2739
+ end
2740
+
2741
+ sig do
2742
+ override.returns(
2743
+ {
2744
+ access:
2745
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access
2746
+ }
2747
+ )
2748
+ end
2749
+ def to_hash
2750
+ end
2751
+
2752
+ class Access < MetronomeSDK::Internal::Type::BaseModel
2753
+ OrHash =
2754
+ T.type_alias do
2755
+ T.any(
2756
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access,
2757
+ MetronomeSDK::Internal::AnyHash
2758
+ )
2759
+ end
2760
+
2761
+ # Number of decimal places to round to. Applied directly to the stored monetary
2762
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
2763
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
2764
+ # dollar).
2765
+ sig { returns(Float) }
2766
+ attr_accessor :decimal_places
2767
+
2768
+ sig do
2769
+ returns(
2770
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2771
+ )
2772
+ end
2773
+ attr_accessor :rounding_method
2774
+
2775
+ sig do
2776
+ params(
2777
+ decimal_places: Float,
2778
+ rounding_method:
2779
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
2780
+ ).returns(T.attached_class)
2781
+ end
2782
+ def self.new(
2783
+ # Number of decimal places to round to. Applied directly to the stored monetary
2784
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
2785
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
2786
+ # dollar).
2787
+ decimal_places:,
2788
+ rounding_method:
2789
+ )
2790
+ end
2791
+
2792
+ sig do
2793
+ override.returns(
2794
+ {
2795
+ decimal_places: Float,
2796
+ rounding_method:
2797
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2798
+ }
2799
+ )
2800
+ end
2801
+ def to_hash
2802
+ end
2803
+
2804
+ module RoundingMethod
2805
+ extend MetronomeSDK::Internal::Type::Enum
2806
+
2807
+ TaggedSymbol =
2808
+ T.type_alias do
2809
+ T.all(
2810
+ Symbol,
2811
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod
2812
+ )
2813
+ end
2814
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2815
+
2816
+ HALF_UP =
2817
+ T.let(
2818
+ :HALF_UP,
2819
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2820
+ )
2821
+ FLOOR =
2822
+ T.let(
2823
+ :FLOOR,
2824
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2825
+ )
2826
+ CEILING =
2827
+ T.let(
2828
+ :CEILING,
2829
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2830
+ )
2831
+
2832
+ sig do
2833
+ override.returns(
2834
+ T::Array[
2835
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
2836
+ ]
2837
+ )
2838
+ end
2839
+ def self.values
2840
+ end
2841
+ end
2842
+ end
2843
+ end
2844
+
2845
+ # The frequency at which the recurring commits will be created. If not provided: -
2846
+ # The commits will be created on the usage invoice frequency. If provided: - The
2847
+ # period defined in the duration will correspond to this frequency. - Commits will
2848
+ # be created aligned with the recurring commit's starting_at rather than the usage
2849
+ # invoice dates.
2850
+ module RecurrenceFrequency
2851
+ extend MetronomeSDK::Internal::Type::Enum
2852
+
2853
+ TaggedSymbol =
2854
+ T.type_alias do
2855
+ T.all(
2856
+ Symbol,
2857
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency
2858
+ )
2859
+ end
2860
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2861
+
2862
+ MONTHLY =
2863
+ T.let(
2864
+ :MONTHLY,
2865
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2866
+ )
2867
+ QUARTERLY =
2868
+ T.let(
2869
+ :QUARTERLY,
2870
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2871
+ )
2872
+ ANNUAL =
2873
+ T.let(
2874
+ :ANNUAL,
2875
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2876
+ )
2877
+ WEEKLY =
2878
+ T.let(
2879
+ :WEEKLY,
2880
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2881
+ )
2882
+ DAILY =
2883
+ T.let(
2884
+ :DAILY,
2885
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2886
+ )
2887
+
2888
+ sig do
2889
+ override.returns(
2890
+ T::Array[
2891
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
2892
+ ]
2893
+ )
2894
+ end
2895
+ def self.values
2896
+ end
2897
+ end
2898
+ end
2899
+
2900
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
2901
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
2902
+ # `ending_before` date for consolidation to occur. This field cannot be modified
2903
+ # after a Contract has been created. If this field is omitted, charges will appear
2904
+ # on a separate invoice from usage charges.
2905
+ module ScheduledChargesOnUsageInvoices
2906
+ extend MetronomeSDK::Internal::Type::Enum
2907
+
2908
+ TaggedSymbol =
2909
+ T.type_alias do
2910
+ T.all(
2911
+ Symbol,
2912
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices
2913
+ )
2914
+ end
2915
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2916
+
2917
+ ALL =
2918
+ T.let(
2919
+ :ALL,
2920
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
2921
+ )
2922
+
2923
+ sig do
2924
+ override.returns(
2925
+ T::Array[
2926
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
2927
+ ]
2928
+ )
2929
+ end
2930
+ def self.values
2931
+ end
2932
+ end
2933
+ end
2934
+ end
28
2935
  end
29
2936
  end
30
2937
  end