metronome-sdk 3.6.0 → 3.7.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/type/enum.rb +0 -25
  5. data/lib/metronome_sdk/models/commit.rb +27 -1
  6. data/lib/metronome_sdk/models/contract.rb +140 -1
  7. data/lib/metronome_sdk/models/contract_v2.rb +168 -2
  8. data/lib/metronome_sdk/models/contract_without_amendments.rb +142 -1
  9. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +105 -2
  10. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +103 -2
  11. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
  12. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
  13. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +29 -1
  14. data/lib/metronome_sdk/models/v1/contract_create_params.rb +146 -2
  15. data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
  16. data/lib/metronome_sdk/models/v1/package_create_params.rb +115 -1
  17. data/lib/metronome_sdk/models/v1/package_list_response.rb +110 -1
  18. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +114 -1
  19. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +303 -5
  20. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3862 -3
  21. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +145 -3
  22. data/lib/metronome_sdk/resources/v1/contracts.rb +3 -1
  23. data/lib/metronome_sdk/resources/v1/packages.rb +6 -5
  24. data/lib/metronome_sdk/resources/v1.rb +0 -4
  25. data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
  26. data/lib/metronome_sdk/version.rb +1 -1
  27. data/lib/metronome_sdk.rb +0 -8
  28. data/rbi/metronome_sdk/models/commit.rbi +48 -0
  29. data/rbi/metronome_sdk/models/contract.rbi +354 -0
  30. data/rbi/metronome_sdk/models/contract_v2.rbi +409 -0
  31. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +368 -0
  32. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +289 -6
  33. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +283 -6
  34. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
  35. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
  36. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +54 -0
  37. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +368 -0
  38. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
  39. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +310 -0
  40. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +307 -0
  41. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +307 -0
  42. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +734 -11
  43. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +8612 -4
  44. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +359 -11
  45. data/rbi/metronome_sdk/resources/v1/contracts.rbi +7 -0
  46. data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
  47. data/rbi/metronome_sdk/resources/v1.rbi +0 -3
  48. data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
  49. data/sig/metronome_sdk/models/commit.rbs +19 -0
  50. data/sig/metronome_sdk/models/contract.rbs +151 -0
  51. data/sig/metronome_sdk/models/contract_v2.rbs +170 -0
  52. data/sig/metronome_sdk/models/contract_without_amendments.rbs +151 -0
  53. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
  54. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
  55. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
  56. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
  57. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +19 -0
  58. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -0
  59. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
  60. data/sig/metronome_sdk/models/v1/package_create_params.rbs +115 -0
  61. data/sig/metronome_sdk/models/v1/package_list_response.rbs +115 -0
  62. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +115 -0
  63. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +283 -9
  64. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +3792 -4
  65. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +142 -9
  66. data/sig/metronome_sdk/resources/v1/contracts.rbs +1 -0
  67. data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
  68. data/sig/metronome_sdk/resources/v1.rbs +0 -2
  69. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  70. metadata +2 -26
  71. data/lib/metronome_sdk/models/v1/payment.rb +0 -196
  72. data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
  73. data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
  74. data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
  75. data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
  76. data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
  77. data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
  78. data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
  79. data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
  80. data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
  81. data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
  82. data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
  83. data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
  84. data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
  85. data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
  86. data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
  87. data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
  88. data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
  89. data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
  90. data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
  91. data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
  92. data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
  93. data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
  94. data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
@@ -7,11 +7,3870 @@ module MetronomeSDK
7
7
  class ContractEditResponse < MetronomeSDK::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  #
10
- # @return [MetronomeSDK::Models::ID]
11
- required :data, -> { MetronomeSDK::ID }
10
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data]
11
+ required :data, -> { MetronomeSDK::Models::V2::ContractEditResponse::Data }
12
12
 
13
13
  # @!method initialize(data:)
14
- # @param data [MetronomeSDK::Models::ID]
14
+ # @param data [MetronomeSDK::Models::V2::ContractEditResponse::Data]
15
+
16
+ # @see MetronomeSDK::Models::V2::ContractEditResponse#data
17
+ class Data < MetronomeSDK::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ #
20
+ # @return [String]
21
+ required :id, String
22
+
23
+ # @!attribute edit
24
+ #
25
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit, nil]
26
+ optional :edit, -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit }
27
+
28
+ # @!method initialize(id:, edit: nil)
29
+ # @param id [String]
30
+ # @param edit [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit]
31
+
32
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data#edit
33
+ class Edit < MetronomeSDK::Internal::Type::BaseModel
34
+ # @!attribute id
35
+ #
36
+ # @return [String]
37
+ required :id, String
38
+
39
+ # @!attribute add_commits
40
+ #
41
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit>, nil]
42
+ optional :add_commits,
43
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit] }
44
+
45
+ # @!attribute add_credits
46
+ #
47
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit>, nil]
48
+ optional :add_credits,
49
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit] }
50
+
51
+ # @!attribute add_discounts
52
+ #
53
+ # @return [Array<MetronomeSDK::Models::Discount>, nil]
54
+ optional :add_discounts, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Discount] }
55
+
56
+ # @!attribute add_overrides
57
+ #
58
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride>, nil]
59
+ optional :add_overrides,
60
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride] }
61
+
62
+ # @!attribute add_prepaid_balance_threshold_configuration
63
+ #
64
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2, nil]
65
+ optional :add_prepaid_balance_threshold_configuration,
66
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2 }
67
+
68
+ # @!attribute add_pro_services
69
+ #
70
+ # @return [Array<MetronomeSDK::Models::ProService>, nil]
71
+ optional :add_pro_services, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ProService] }
72
+
73
+ # @!attribute add_recurring_commits
74
+ #
75
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit>, nil]
76
+ optional :add_recurring_commits,
77
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit] }
78
+
79
+ # @!attribute add_recurring_credits
80
+ #
81
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit>, nil]
82
+ optional :add_recurring_credits,
83
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit] }
84
+
85
+ # @!attribute add_reseller_royalties
86
+ #
87
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty>, nil]
88
+ optional :add_reseller_royalties,
89
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty] }
90
+
91
+ # @!attribute add_scheduled_charges
92
+ #
93
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge>, nil]
94
+ optional :add_scheduled_charges,
95
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge] }
96
+
97
+ # @!attribute add_spend_threshold_configuration
98
+ #
99
+ # @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
100
+ optional :add_spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
101
+
102
+ # @!attribute add_subscriptions
103
+ # List of subscriptions on the contract.
104
+ #
105
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription>, nil]
106
+ optional :add_subscriptions,
107
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription] }
108
+
109
+ # @!attribute add_usage_filters
110
+ #
111
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddUsageFilter>, nil]
112
+ optional :add_usage_filters,
113
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddUsageFilter] }
114
+
115
+ # @!attribute archive_commits
116
+ #
117
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCommit>, nil]
118
+ optional :archive_commits,
119
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCommit] }
120
+
121
+ # @!attribute archive_credits
122
+ #
123
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCredit>, nil]
124
+ optional :archive_credits,
125
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCredit] }
126
+
127
+ # @!attribute archive_scheduled_charges
128
+ #
129
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveScheduledCharge>, nil]
130
+ optional :archive_scheduled_charges,
131
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveScheduledCharge] }
132
+
133
+ # @!attribute remove_overrides
134
+ #
135
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::RemoveOverride>, nil]
136
+ optional :remove_overrides,
137
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::RemoveOverride] }
138
+
139
+ # @!attribute timestamp
140
+ #
141
+ # @return [Time, nil]
142
+ optional :timestamp, Time
143
+
144
+ # @!attribute uniqueness_key
145
+ # Prevents the creation of duplicates. If a request to create a record is made
146
+ # with a previously used uniqueness key, a new record will not be created and the
147
+ # request will fail with a 409 error.
148
+ #
149
+ # @return [String, nil]
150
+ optional :uniqueness_key, String
151
+
152
+ # @!attribute update_commits
153
+ #
154
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit>, nil]
155
+ optional :update_commits,
156
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit] }
157
+
158
+ # @!attribute update_contract_end_date
159
+ #
160
+ # @return [Time, nil]
161
+ optional :update_contract_end_date, Time
162
+
163
+ # @!attribute update_contract_name
164
+ # Value to update the contract name to. If not provided, the contract name will
165
+ # remain unchanged.
166
+ #
167
+ # @return [String, nil]
168
+ optional :update_contract_name, String, nil?: true
169
+
170
+ # @!attribute update_credits
171
+ #
172
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit>, nil]
173
+ optional :update_credits,
174
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit] }
175
+
176
+ # @!attribute update_discounts
177
+ #
178
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount>, nil]
179
+ optional :update_discounts,
180
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount] }
181
+
182
+ # @!attribute update_prepaid_balance_threshold_configuration
183
+ #
184
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration, nil]
185
+ optional :update_prepaid_balance_threshold_configuration,
186
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration }
187
+
188
+ # @!attribute update_recurring_commits
189
+ #
190
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit>, nil]
191
+ optional :update_recurring_commits,
192
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit] }
193
+
194
+ # @!attribute update_recurring_credits
195
+ #
196
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit>, nil]
197
+ optional :update_recurring_credits,
198
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit] }
199
+
200
+ # @!attribute update_refund_invoices
201
+ #
202
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRefundInvoice>, nil]
203
+ optional :update_refund_invoices,
204
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRefundInvoice] }
205
+
206
+ # @!attribute update_scheduled_charges
207
+ #
208
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge>, nil]
209
+ optional :update_scheduled_charges,
210
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge] }
211
+
212
+ # @!attribute update_spend_threshold_configuration
213
+ #
214
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration, nil]
215
+ optional :update_spend_threshold_configuration,
216
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration }
217
+
218
+ # @!attribute update_subscriptions
219
+ # Optional list of subscriptions to update.
220
+ #
221
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription>, nil]
222
+ optional :update_subscriptions,
223
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription] }
224
+
225
+ # @!method initialize(id:, add_commits: nil, add_credits: nil, add_discounts: nil, add_overrides: nil, add_prepaid_balance_threshold_configuration: nil, add_pro_services: nil, add_recurring_commits: nil, add_recurring_credits: nil, add_reseller_royalties: nil, add_scheduled_charges: nil, add_spend_threshold_configuration: nil, add_subscriptions: nil, add_usage_filters: nil, archive_commits: nil, archive_credits: nil, archive_scheduled_charges: nil, remove_overrides: nil, timestamp: nil, uniqueness_key: nil, update_commits: nil, update_contract_end_date: nil, update_contract_name: nil, update_credits: nil, update_discounts: nil, update_prepaid_balance_threshold_configuration: nil, update_recurring_commits: nil, update_recurring_credits: nil, update_refund_invoices: nil, update_scheduled_charges: nil, update_spend_threshold_configuration: nil, update_subscriptions: nil)
226
+ # Some parameter documentations has been truncated, see
227
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit} for more details.
228
+ #
229
+ # @param id [String]
230
+ #
231
+ # @param add_commits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit>]
232
+ #
233
+ # @param add_credits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit>]
234
+ #
235
+ # @param add_discounts [Array<MetronomeSDK::Models::Discount>]
236
+ #
237
+ # @param add_overrides [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride>]
238
+ #
239
+ # @param add_prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2]
240
+ #
241
+ # @param add_pro_services [Array<MetronomeSDK::Models::ProService>]
242
+ #
243
+ # @param add_recurring_commits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit>]
244
+ #
245
+ # @param add_recurring_credits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit>]
246
+ #
247
+ # @param add_reseller_royalties [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty>]
248
+ #
249
+ # @param add_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge>]
250
+ #
251
+ # @param add_spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
252
+ #
253
+ # @param add_subscriptions [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription>] List of subscriptions on the contract.
254
+ #
255
+ # @param add_usage_filters [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddUsageFilter>]
256
+ #
257
+ # @param archive_commits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCommit>]
258
+ #
259
+ # @param archive_credits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveCredit>]
260
+ #
261
+ # @param archive_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::ArchiveScheduledCharge>]
262
+ #
263
+ # @param remove_overrides [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::RemoveOverride>]
264
+ #
265
+ # @param timestamp [Time]
266
+ #
267
+ # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
268
+ #
269
+ # @param update_commits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit>]
270
+ #
271
+ # @param update_contract_end_date [Time]
272
+ #
273
+ # @param update_contract_name [String, nil] Value to update the contract name to. If not provided, the contract name will re
274
+ #
275
+ # @param update_credits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit>]
276
+ #
277
+ # @param update_discounts [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount>]
278
+ #
279
+ # @param update_prepaid_balance_threshold_configuration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration]
280
+ #
281
+ # @param update_recurring_commits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit>]
282
+ #
283
+ # @param update_recurring_credits [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit>]
284
+ #
285
+ # @param update_refund_invoices [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRefundInvoice>]
286
+ #
287
+ # @param update_scheduled_charges [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge>]
288
+ #
289
+ # @param update_spend_threshold_configuration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration]
290
+ #
291
+ # @param update_subscriptions [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription>] Optional list of subscriptions to update.
292
+
293
+ class AddCommit < MetronomeSDK::Internal::Type::BaseModel
294
+ # @!attribute id
295
+ #
296
+ # @return [String]
297
+ required :id, String
298
+
299
+ # @!attribute product
300
+ #
301
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Product]
302
+ required :product, -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Product }
303
+
304
+ # @!attribute type
305
+ #
306
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Type]
307
+ required :type, enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Type }
308
+
309
+ # @!attribute access_schedule
310
+ # The schedule that the customer will gain access to the credits purposed with
311
+ # this commit.
312
+ #
313
+ # @return [MetronomeSDK::Models::ScheduleDuration, nil]
314
+ optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
315
+
316
+ # @!attribute applicable_product_ids
317
+ #
318
+ # @return [Array<String>, nil]
319
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
320
+
321
+ # @!attribute applicable_product_tags
322
+ #
323
+ # @return [Array<String>, nil]
324
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
325
+
326
+ # @!attribute description
327
+ #
328
+ # @return [String, nil]
329
+ optional :description, String
330
+
331
+ # @!attribute hierarchy_configuration
332
+ # Optional configuration for commit hierarchy access control
333
+ #
334
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
335
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
336
+
337
+ # @!attribute invoice_schedule
338
+ # The schedule that the customer will be invoiced for this commit.
339
+ #
340
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule, nil]
341
+ optional :invoice_schedule,
342
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule }
343
+
344
+ # @!attribute name
345
+ #
346
+ # @return [String, nil]
347
+ optional :name, String
348
+
349
+ # @!attribute netsuite_sales_order_id
350
+ # This field's availability is dependent on your client's configuration.
351
+ #
352
+ # @return [String, nil]
353
+ optional :netsuite_sales_order_id, String
354
+
355
+ # @!attribute priority
356
+ # If multiple credits or commits are applicable, the one with the lower priority
357
+ # will apply first.
358
+ #
359
+ # @return [Float, nil]
360
+ optional :priority, Float
361
+
362
+ # @!attribute rate_type
363
+ #
364
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::RateType, nil]
365
+ optional :rate_type,
366
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::RateType }
367
+
368
+ # @!attribute rollover_fraction
369
+ #
370
+ # @return [Float, nil]
371
+ optional :rollover_fraction, Float
372
+
373
+ # @!attribute salesforce_opportunity_id
374
+ # This field's availability is dependent on your client's configuration.
375
+ #
376
+ # @return [String, nil]
377
+ optional :salesforce_opportunity_id, String
378
+
379
+ # @!attribute specifiers
380
+ # List of filters that determine what kind of customer usage draws down a commit
381
+ # or credit. A customer's usage needs to meet the condition of at least one of the
382
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
383
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
384
+ # Instead, to target usage by product or product tag, pass those values in the
385
+ # body of `specifiers`.
386
+ #
387
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
388
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
389
+
390
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
391
+ # Some parameter documentations has been truncated, see
392
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit} for more
393
+ # details.
394
+ #
395
+ # @param id [String]
396
+ #
397
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Product]
398
+ #
399
+ # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::Type]
400
+ #
401
+ # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits purposed with thi
402
+ #
403
+ # @param applicable_product_ids [Array<String>]
404
+ #
405
+ # @param applicable_product_tags [Array<String>]
406
+ #
407
+ # @param description [String]
408
+ #
409
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
410
+ #
411
+ # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
412
+ #
413
+ # @param name [String]
414
+ #
415
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
416
+ #
417
+ # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
418
+ #
419
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::RateType]
420
+ #
421
+ # @param rollover_fraction [Float]
422
+ #
423
+ # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
424
+ #
425
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
426
+
427
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit#product
428
+ class Product < MetronomeSDK::Internal::Type::BaseModel
429
+ # @!attribute id
430
+ #
431
+ # @return [String]
432
+ required :id, String
433
+
434
+ # @!attribute name
435
+ #
436
+ # @return [String]
437
+ required :name, String
438
+
439
+ # @!method initialize(id:, name:)
440
+ # @param id [String]
441
+ # @param name [String]
442
+ end
443
+
444
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit#type
445
+ module Type
446
+ extend MetronomeSDK::Internal::Type::Enum
447
+
448
+ PREPAID = :PREPAID
449
+ POSTPAID = :POSTPAID
450
+
451
+ # @!method self.values
452
+ # @return [Array<Symbol>]
453
+ end
454
+
455
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit#invoice_schedule
456
+ class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
457
+ # @!attribute credit_type
458
+ #
459
+ # @return [MetronomeSDK::Models::CreditTypeData, nil]
460
+ optional :credit_type, -> { MetronomeSDK::CreditTypeData }
461
+
462
+ # @!attribute do_not_invoice
463
+ # If true, this schedule will not generate an invoice.
464
+ #
465
+ # @return [Boolean, nil]
466
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
467
+
468
+ # @!attribute schedule_items
469
+ #
470
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
471
+ optional :schedule_items,
472
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule::ScheduleItem] }
473
+
474
+ # @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
475
+ # The schedule that the customer will be invoiced for this commit.
476
+ #
477
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
478
+ #
479
+ # @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
480
+ #
481
+ # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit::InvoiceSchedule::ScheduleItem>]
482
+
483
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
484
+ # @!attribute id
485
+ #
486
+ # @return [String]
487
+ required :id, String
488
+
489
+ # @!attribute timestamp
490
+ #
491
+ # @return [Time]
492
+ required :timestamp, Time
493
+
494
+ # @!attribute amount
495
+ #
496
+ # @return [Float, nil]
497
+ optional :amount, Float
498
+
499
+ # @!attribute invoice_id
500
+ #
501
+ # @return [String, nil]
502
+ optional :invoice_id, String, nil?: true
503
+
504
+ # @!attribute quantity
505
+ #
506
+ # @return [Float, nil]
507
+ optional :quantity, Float
508
+
509
+ # @!attribute unit_price
510
+ #
511
+ # @return [Float, nil]
512
+ optional :unit_price, Float
513
+
514
+ # @!method initialize(id:, timestamp:, amount: nil, invoice_id: nil, quantity: nil, unit_price: nil)
515
+ # @param id [String]
516
+ # @param timestamp [Time]
517
+ # @param amount [Float]
518
+ # @param invoice_id [String, nil]
519
+ # @param quantity [Float]
520
+ # @param unit_price [Float]
521
+ end
522
+ end
523
+
524
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCommit#rate_type
525
+ module RateType
526
+ extend MetronomeSDK::Internal::Type::Enum
527
+
528
+ COMMIT_RATE = :COMMIT_RATE
529
+ LIST_RATE = :LIST_RATE
530
+
531
+ # @!method self.values
532
+ # @return [Array<Symbol>]
533
+ end
534
+ end
535
+
536
+ class AddCredit < MetronomeSDK::Internal::Type::BaseModel
537
+ # @!attribute id
538
+ #
539
+ # @return [String]
540
+ required :id, String
541
+
542
+ # @!attribute product
543
+ #
544
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Product]
545
+ required :product, -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Product }
546
+
547
+ # @!attribute type
548
+ #
549
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Type]
550
+ required :type, enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Type }
551
+
552
+ # @!attribute access_schedule
553
+ # The schedule that the customer will gain access to the credits.
554
+ #
555
+ # @return [MetronomeSDK::Models::ScheduleDuration, nil]
556
+ optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }
557
+
558
+ # @!attribute applicable_product_ids
559
+ #
560
+ # @return [Array<String>, nil]
561
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
562
+
563
+ # @!attribute applicable_product_tags
564
+ #
565
+ # @return [Array<String>, nil]
566
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
567
+
568
+ # @!attribute description
569
+ #
570
+ # @return [String, nil]
571
+ optional :description, String
572
+
573
+ # @!attribute hierarchy_configuration
574
+ # Optional configuration for recurring credit hierarchy access control
575
+ #
576
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
577
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
578
+
579
+ # @!attribute name
580
+ #
581
+ # @return [String, nil]
582
+ optional :name, String
583
+
584
+ # @!attribute netsuite_sales_order_id
585
+ # This field's availability is dependent on your client's configuration.
586
+ #
587
+ # @return [String, nil]
588
+ optional :netsuite_sales_order_id, String
589
+
590
+ # @!attribute priority
591
+ # If multiple credits or commits are applicable, the one with the lower priority
592
+ # will apply first.
593
+ #
594
+ # @return [Float, nil]
595
+ optional :priority, Float
596
+
597
+ # @!attribute rate_type
598
+ #
599
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::RateType, nil]
600
+ optional :rate_type,
601
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::RateType }
602
+
603
+ # @!attribute rollover_fraction
604
+ #
605
+ # @return [Float, nil]
606
+ optional :rollover_fraction, Float
607
+
608
+ # @!attribute salesforce_opportunity_id
609
+ # This field's availability is dependent on your client's configuration.
610
+ #
611
+ # @return [String, nil]
612
+ optional :salesforce_opportunity_id, String
613
+
614
+ # @!attribute specifiers
615
+ # List of filters that determine what kind of customer usage draws down a commit
616
+ # or credit. A customer's usage needs to meet the condition of at least one of the
617
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
618
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
619
+ # Instead, to target usage by product or product tag, pass those values in the
620
+ # body of `specifiers`.
621
+ #
622
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
623
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
624
+
625
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil)
626
+ # Some parameter documentations has been truncated, see
627
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit} for more
628
+ # details.
629
+ #
630
+ # @param id [String]
631
+ #
632
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Product]
633
+ #
634
+ # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::Type]
635
+ #
636
+ # @param access_schedule [MetronomeSDK::Models::ScheduleDuration] The schedule that the customer will gain access to the credits.
637
+ #
638
+ # @param applicable_product_ids [Array<String>]
639
+ #
640
+ # @param applicable_product_tags [Array<String>]
641
+ #
642
+ # @param description [String]
643
+ #
644
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
645
+ #
646
+ # @param name [String]
647
+ #
648
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
649
+ #
650
+ # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
651
+ #
652
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit::RateType]
653
+ #
654
+ # @param rollover_fraction [Float]
655
+ #
656
+ # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
657
+ #
658
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
659
+
660
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit#product
661
+ class Product < MetronomeSDK::Internal::Type::BaseModel
662
+ # @!attribute id
663
+ #
664
+ # @return [String]
665
+ required :id, String
666
+
667
+ # @!attribute name
668
+ #
669
+ # @return [String]
670
+ required :name, String
671
+
672
+ # @!method initialize(id:, name:)
673
+ # @param id [String]
674
+ # @param name [String]
675
+ end
676
+
677
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit#type
678
+ module Type
679
+ extend MetronomeSDK::Internal::Type::Enum
680
+
681
+ CREDIT = :CREDIT
682
+
683
+ # @!method self.values
684
+ # @return [Array<Symbol>]
685
+ end
686
+
687
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddCredit#rate_type
688
+ module RateType
689
+ extend MetronomeSDK::Internal::Type::Enum
690
+
691
+ COMMIT_RATE = :COMMIT_RATE
692
+ LIST_RATE = :LIST_RATE
693
+
694
+ # @!method self.values
695
+ # @return [Array<Symbol>]
696
+ end
697
+ end
698
+
699
+ class AddOverride < MetronomeSDK::Internal::Type::BaseModel
700
+ # @!attribute id
701
+ #
702
+ # @return [String]
703
+ required :id, String
704
+
705
+ # @!attribute created_at
706
+ #
707
+ # @return [Time]
708
+ required :created_at, Time
709
+
710
+ # @!attribute starting_at
711
+ #
712
+ # @return [Time]
713
+ required :starting_at, Time
714
+
715
+ # @!attribute applicable_product_tags
716
+ #
717
+ # @return [Array<String>, nil]
718
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
719
+
720
+ # @!attribute ending_before
721
+ #
722
+ # @return [Time, nil]
723
+ optional :ending_before, Time
724
+
725
+ # @!attribute entitled
726
+ #
727
+ # @return [Boolean, nil]
728
+ optional :entitled, MetronomeSDK::Internal::Type::Boolean
729
+
730
+ # @!attribute is_commit_specific
731
+ #
732
+ # @return [Boolean, nil]
733
+ optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
734
+
735
+ # @!attribute multiplier
736
+ #
737
+ # @return [Float, nil]
738
+ optional :multiplier, Float
739
+
740
+ # @!attribute override_specifiers
741
+ #
742
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier>, nil]
743
+ optional :override_specifiers,
744
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier] }
745
+
746
+ # @!attribute override_tiers
747
+ #
748
+ # @return [Array<MetronomeSDK::Models::OverrideTier>, nil]
749
+ optional :override_tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::OverrideTier] }
750
+
751
+ # @!attribute overwrite_rate
752
+ #
753
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate, nil]
754
+ optional :overwrite_rate,
755
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate }
756
+
757
+ # @!attribute priority
758
+ #
759
+ # @return [Float, nil]
760
+ optional :priority, Float
761
+
762
+ # @!attribute product
763
+ #
764
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Product, nil]
765
+ optional :product, -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Product }
766
+
767
+ # @!attribute target
768
+ #
769
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Target, nil]
770
+ optional :target,
771
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Target }
772
+
773
+ # @!attribute type
774
+ #
775
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Type, nil]
776
+ optional :type, enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Type }
777
+
778
+ # @!method initialize(id:, created_at:, starting_at:, applicable_product_tags: nil, ending_before: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, override_specifiers: nil, override_tiers: nil, overwrite_rate: nil, priority: nil, product: nil, target: nil, type: nil)
779
+ # @param id [String]
780
+ # @param created_at [Time]
781
+ # @param starting_at [Time]
782
+ # @param applicable_product_tags [Array<String>]
783
+ # @param ending_before [Time]
784
+ # @param entitled [Boolean]
785
+ # @param is_commit_specific [Boolean]
786
+ # @param multiplier [Float]
787
+ # @param override_specifiers [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier>]
788
+ # @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
789
+ # @param overwrite_rate [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate]
790
+ # @param priority [Float]
791
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Product]
792
+ # @param target [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Target]
793
+ # @param type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::Type]
794
+
795
+ class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
796
+ # @!attribute billing_frequency
797
+ #
798
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier::BillingFrequency, nil]
799
+ optional :billing_frequency,
800
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier::BillingFrequency }
801
+
802
+ # @!attribute commit_ids
803
+ #
804
+ # @return [Array<String>, nil]
805
+ optional :commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
806
+
807
+ # @!attribute presentation_group_values
808
+ #
809
+ # @return [Hash{Symbol=>String, nil}, nil]
810
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true]
811
+
812
+ # @!attribute pricing_group_values
813
+ #
814
+ # @return [Hash{Symbol=>String}, nil]
815
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
816
+
817
+ # @!attribute product_id
818
+ #
819
+ # @return [String, nil]
820
+ optional :product_id, String
821
+
822
+ # @!attribute product_tags
823
+ #
824
+ # @return [Array<String>, nil]
825
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
826
+
827
+ # @!attribute recurring_commit_ids
828
+ #
829
+ # @return [Array<String>, nil]
830
+ optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
831
+
832
+ # @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil)
833
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier::BillingFrequency]
834
+ # @param commit_ids [Array<String>]
835
+ # @param presentation_group_values [Hash{Symbol=>String, nil}]
836
+ # @param pricing_group_values [Hash{Symbol=>String}]
837
+ # @param product_id [String]
838
+ # @param product_tags [Array<String>]
839
+ # @param recurring_commit_ids [Array<String>]
840
+
841
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverrideSpecifier#billing_frequency
842
+ module BillingFrequency
843
+ extend MetronomeSDK::Internal::Type::Enum
844
+
845
+ MONTHLY = :MONTHLY
846
+ QUARTERLY = :QUARTERLY
847
+ ANNUAL = :ANNUAL
848
+ WEEKLY = :WEEKLY
849
+
850
+ # @!method self.values
851
+ # @return [Array<Symbol>]
852
+ end
853
+ end
854
+
855
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride#overwrite_rate
856
+ class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
857
+ # @!attribute rate_type
858
+ #
859
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate::RateType]
860
+ required :rate_type,
861
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate::RateType }
862
+
863
+ # @!attribute credit_type
864
+ #
865
+ # @return [MetronomeSDK::Models::CreditTypeData, nil]
866
+ optional :credit_type, -> { MetronomeSDK::CreditTypeData }
867
+
868
+ # @!attribute custom_rate
869
+ # Only set for CUSTOM rate_type. This field is interpreted by custom rate
870
+ # processors.
871
+ #
872
+ # @return [Hash{Symbol=>Object}, nil]
873
+ optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
874
+
875
+ # @!attribute is_prorated
876
+ # Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
877
+ # set to true.
878
+ #
879
+ # @return [Boolean, nil]
880
+ optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
881
+
882
+ # @!attribute price
883
+ # Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
884
+ # this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
885
+ #
886
+ # @return [Float, nil]
887
+ optional :price, Float
888
+
889
+ # @!attribute quantity
890
+ # Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
891
+ #
892
+ # @return [Float, nil]
893
+ optional :quantity, Float
894
+
895
+ # @!attribute tiers
896
+ # Only set for TIERED rate_type.
897
+ #
898
+ # @return [Array<MetronomeSDK::Models::Tier>, nil]
899
+ optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
900
+
901
+ # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, quantity: nil, tiers: nil)
902
+ # Some parameter documentations has been truncated, see
903
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate}
904
+ # for more details.
905
+ #
906
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate::RateType]
907
+ #
908
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
909
+ #
910
+ # @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
911
+ #
912
+ # @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
913
+ #
914
+ # @param price [Float] Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, t
915
+ #
916
+ # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
917
+ #
918
+ # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
919
+
920
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride::OverwriteRate#rate_type
921
+ module RateType
922
+ extend MetronomeSDK::Internal::Type::Enum
923
+
924
+ FLAT = :FLAT
925
+ PERCENTAGE = :PERCENTAGE
926
+ SUBSCRIPTION = :SUBSCRIPTION
927
+ TIERED = :TIERED
928
+ TIERED_PERCENTAGE = :TIERED_PERCENTAGE
929
+ CUSTOM = :CUSTOM
930
+
931
+ # @!method self.values
932
+ # @return [Array<Symbol>]
933
+ end
934
+ end
935
+
936
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride#product
937
+ class Product < MetronomeSDK::Internal::Type::BaseModel
938
+ # @!attribute id
939
+ #
940
+ # @return [String]
941
+ required :id, String
942
+
943
+ # @!attribute name
944
+ #
945
+ # @return [String]
946
+ required :name, String
947
+
948
+ # @!method initialize(id:, name:)
949
+ # @param id [String]
950
+ # @param name [String]
951
+ end
952
+
953
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride#target
954
+ module Target
955
+ extend MetronomeSDK::Internal::Type::Enum
956
+
957
+ COMMIT_RATE = :COMMIT_RATE
958
+ LIST_RATE = :LIST_RATE
959
+
960
+ # @!method self.values
961
+ # @return [Array<Symbol>]
962
+ end
963
+
964
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddOverride#type
965
+ module Type
966
+ extend MetronomeSDK::Internal::Type::Enum
967
+
968
+ OVERWRITE = :OVERWRITE
969
+ MULTIPLIER = :MULTIPLIER
970
+ TIERED = :TIERED
971
+
972
+ # @!method self.values
973
+ # @return [Array<Symbol>]
974
+ end
975
+ end
976
+
977
+ class AddRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
978
+ # @!attribute id
979
+ #
980
+ # @return [String]
981
+ required :id, String
982
+
983
+ # @!attribute access_amount
984
+ # The amount of commit to grant.
985
+ #
986
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::AccessAmount]
987
+ required :access_amount,
988
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::AccessAmount }
989
+
990
+ # @!attribute commit_duration
991
+ # The amount of time the created commits will be valid for
992
+ #
993
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration]
994
+ required :commit_duration,
995
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration }
996
+
997
+ # @!attribute priority
998
+ # Will be passed down to the individual commits
999
+ #
1000
+ # @return [Float]
1001
+ required :priority, Float
1002
+
1003
+ # @!attribute product
1004
+ #
1005
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Product]
1006
+ required :product,
1007
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Product }
1008
+
1009
+ # @!attribute rate_type
1010
+ # Whether the created commits will use the commit rate or list rate
1011
+ #
1012
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RateType]
1013
+ required :rate_type,
1014
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RateType }
1015
+
1016
+ # @!attribute starting_at
1017
+ # Determines the start time for the first commit
1018
+ #
1019
+ # @return [Time]
1020
+ required :starting_at, Time
1021
+
1022
+ # @!attribute applicable_product_ids
1023
+ # Will be passed down to the individual commits
1024
+ #
1025
+ # @return [Array<String>, nil]
1026
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1027
+
1028
+ # @!attribute applicable_product_tags
1029
+ # Will be passed down to the individual commits
1030
+ #
1031
+ # @return [Array<String>, nil]
1032
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1033
+
1034
+ # @!attribute contract
1035
+ #
1036
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Contract, nil]
1037
+ optional :contract,
1038
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Contract }
1039
+
1040
+ # @!attribute description
1041
+ # Will be passed down to the individual commits
1042
+ #
1043
+ # @return [String, nil]
1044
+ optional :description, String
1045
+
1046
+ # @!attribute ending_before
1047
+ # Determines when the contract will stop creating recurring commits. Optional
1048
+ #
1049
+ # @return [Time, nil]
1050
+ optional :ending_before, Time
1051
+
1052
+ # @!attribute hierarchy_configuration
1053
+ # Optional configuration for recurring credit hierarchy access control
1054
+ #
1055
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1056
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1057
+
1058
+ # @!attribute invoice_amount
1059
+ # The amount the customer should be billed for the commit. Not required.
1060
+ #
1061
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::InvoiceAmount, nil]
1062
+ optional :invoice_amount,
1063
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::InvoiceAmount }
1064
+
1065
+ # @!attribute name
1066
+ # Displayed on invoices. Will be passed through to the individual commits
1067
+ #
1068
+ # @return [String, nil]
1069
+ optional :name, String
1070
+
1071
+ # @!attribute netsuite_sales_order_id
1072
+ # Will be passed down to the individual commits
1073
+ #
1074
+ # @return [String, nil]
1075
+ optional :netsuite_sales_order_id, String
1076
+
1077
+ # @!attribute proration
1078
+ # Determines whether the first and last commit will be prorated. If not provided,
1079
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1080
+ #
1081
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Proration, nil]
1082
+ optional :proration,
1083
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Proration }
1084
+
1085
+ # @!attribute recurrence_frequency
1086
+ # The frequency at which the recurring commits will be created. If not provided: -
1087
+ # The commits will be created on the usage invoice frequency. If provided: - The
1088
+ # period defined in the duration will correspond to this frequency. - Commits will
1089
+ # be created aligned with the recurring commit's starting_at rather than the usage
1090
+ # invoice dates.
1091
+ #
1092
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RecurrenceFrequency, nil]
1093
+ optional :recurrence_frequency,
1094
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RecurrenceFrequency }
1095
+
1096
+ # @!attribute rollover_fraction
1097
+ # Will be passed down to the individual commits. This controls how much of an
1098
+ # individual unexpired commit will roll over upon contract transition. Must be
1099
+ # between 0 and 1.
1100
+ #
1101
+ # @return [Float, nil]
1102
+ optional :rollover_fraction, Float
1103
+
1104
+ # @!attribute specifiers
1105
+ # List of filters that determine what kind of customer usage draws down a commit
1106
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1107
+ # specifiers to contribute to a commit's or credit's drawdown.
1108
+ #
1109
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1110
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1111
+
1112
+ # @!attribute subscription_config
1113
+ # Attach a subscription to the recurring commit/credit.
1114
+ #
1115
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1116
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
1117
+
1118
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1119
+ # Some parameter documentations has been truncated, see
1120
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit}
1121
+ # for more details.
1122
+ #
1123
+ # @param id [String]
1124
+ #
1125
+ # @param access_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::AccessAmount] The amount of commit to grant.
1126
+ #
1127
+ # @param commit_duration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration] The amount of time the created commits will be valid for
1128
+ #
1129
+ # @param priority [Float] Will be passed down to the individual commits
1130
+ #
1131
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Product]
1132
+ #
1133
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
1134
+ #
1135
+ # @param starting_at [Time] Determines the start time for the first commit
1136
+ #
1137
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1138
+ #
1139
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1140
+ #
1141
+ # @param contract [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Contract]
1142
+ #
1143
+ # @param description [String] Will be passed down to the individual commits
1144
+ #
1145
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
1146
+ #
1147
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1148
+ #
1149
+ # @param invoice_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
1150
+ #
1151
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
1152
+ #
1153
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
1154
+ #
1155
+ # @param proration [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1156
+ #
1157
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
1158
+ #
1159
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1160
+ #
1161
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1162
+ #
1163
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
1164
+
1165
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#access_amount
1166
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1167
+ # @!attribute credit_type_id
1168
+ #
1169
+ # @return [String]
1170
+ required :credit_type_id, String
1171
+
1172
+ # @!attribute unit_price
1173
+ #
1174
+ # @return [Float]
1175
+ required :unit_price, Float
1176
+
1177
+ # @!attribute quantity
1178
+ #
1179
+ # @return [Float, nil]
1180
+ optional :quantity, Float
1181
+
1182
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1183
+ # The amount of commit to grant.
1184
+ #
1185
+ # @param credit_type_id [String]
1186
+ # @param unit_price [Float]
1187
+ # @param quantity [Float]
1188
+ end
1189
+
1190
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#commit_duration
1191
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1192
+ # @!attribute value
1193
+ #
1194
+ # @return [Float]
1195
+ required :value, Float
1196
+
1197
+ # @!attribute unit
1198
+ #
1199
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration::Unit, nil]
1200
+ optional :unit,
1201
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration::Unit }
1202
+
1203
+ # @!method initialize(value:, unit: nil)
1204
+ # The amount of time the created commits will be valid for
1205
+ #
1206
+ # @param value [Float]
1207
+ # @param unit [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration::Unit]
1208
+
1209
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::CommitDuration#unit
1210
+ module Unit
1211
+ extend MetronomeSDK::Internal::Type::Enum
1212
+
1213
+ PERIODS = :PERIODS
1214
+
1215
+ # @!method self.values
1216
+ # @return [Array<Symbol>]
1217
+ end
1218
+ end
1219
+
1220
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#product
1221
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1222
+ # @!attribute id
1223
+ #
1224
+ # @return [String]
1225
+ required :id, String
1226
+
1227
+ # @!attribute name
1228
+ #
1229
+ # @return [String]
1230
+ required :name, String
1231
+
1232
+ # @!method initialize(id:, name:)
1233
+ # @param id [String]
1234
+ # @param name [String]
1235
+ end
1236
+
1237
+ # Whether the created commits will use the commit rate or list rate
1238
+ #
1239
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#rate_type
1240
+ module RateType
1241
+ extend MetronomeSDK::Internal::Type::Enum
1242
+
1243
+ COMMIT_RATE = :COMMIT_RATE
1244
+ LIST_RATE = :LIST_RATE
1245
+
1246
+ # @!method self.values
1247
+ # @return [Array<Symbol>]
1248
+ end
1249
+
1250
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#contract
1251
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1252
+ # @!attribute id
1253
+ #
1254
+ # @return [String]
1255
+ required :id, String
1256
+
1257
+ # @!method initialize(id:)
1258
+ # @param id [String]
1259
+ end
1260
+
1261
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#invoice_amount
1262
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1263
+ # @!attribute credit_type_id
1264
+ #
1265
+ # @return [String]
1266
+ required :credit_type_id, String
1267
+
1268
+ # @!attribute quantity
1269
+ #
1270
+ # @return [Float]
1271
+ required :quantity, Float
1272
+
1273
+ # @!attribute unit_price
1274
+ #
1275
+ # @return [Float]
1276
+ required :unit_price, Float
1277
+
1278
+ # @!method initialize(credit_type_id:, quantity:, unit_price:)
1279
+ # The amount the customer should be billed for the commit. Not required.
1280
+ #
1281
+ # @param credit_type_id [String]
1282
+ # @param quantity [Float]
1283
+ # @param unit_price [Float]
1284
+ end
1285
+
1286
+ # Determines whether the first and last commit will be prorated. If not provided,
1287
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1288
+ #
1289
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#proration
1290
+ module Proration
1291
+ extend MetronomeSDK::Internal::Type::Enum
1292
+
1293
+ NONE = :NONE
1294
+ FIRST = :FIRST
1295
+ LAST = :LAST
1296
+ FIRST_AND_LAST = :FIRST_AND_LAST
1297
+
1298
+ # @!method self.values
1299
+ # @return [Array<Symbol>]
1300
+ end
1301
+
1302
+ # The frequency at which the recurring commits will be created. If not provided: -
1303
+ # The commits will be created on the usage invoice frequency. If provided: - The
1304
+ # period defined in the duration will correspond to this frequency. - Commits will
1305
+ # be created aligned with the recurring commit's starting_at rather than the usage
1306
+ # invoice dates.
1307
+ #
1308
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#recurrence_frequency
1309
+ module RecurrenceFrequency
1310
+ extend MetronomeSDK::Internal::Type::Enum
1311
+
1312
+ MONTHLY = :MONTHLY
1313
+ QUARTERLY = :QUARTERLY
1314
+ ANNUAL = :ANNUAL
1315
+ WEEKLY = :WEEKLY
1316
+
1317
+ # @!method self.values
1318
+ # @return [Array<Symbol>]
1319
+ end
1320
+ end
1321
+
1322
+ class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
1323
+ # @!attribute id
1324
+ #
1325
+ # @return [String]
1326
+ required :id, String
1327
+
1328
+ # @!attribute access_amount
1329
+ # The amount of commit to grant.
1330
+ #
1331
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::AccessAmount]
1332
+ required :access_amount,
1333
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::AccessAmount }
1334
+
1335
+ # @!attribute commit_duration
1336
+ # The amount of time the created commits will be valid for
1337
+ #
1338
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration]
1339
+ required :commit_duration,
1340
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration }
1341
+
1342
+ # @!attribute priority
1343
+ # Will be passed down to the individual commits
1344
+ #
1345
+ # @return [Float]
1346
+ required :priority, Float
1347
+
1348
+ # @!attribute product
1349
+ #
1350
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Product]
1351
+ required :product,
1352
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Product }
1353
+
1354
+ # @!attribute rate_type
1355
+ # Whether the created commits will use the commit rate or list rate
1356
+ #
1357
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RateType]
1358
+ required :rate_type,
1359
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RateType }
1360
+
1361
+ # @!attribute starting_at
1362
+ # Determines the start time for the first commit
1363
+ #
1364
+ # @return [Time]
1365
+ required :starting_at, Time
1366
+
1367
+ # @!attribute applicable_product_ids
1368
+ # Will be passed down to the individual commits
1369
+ #
1370
+ # @return [Array<String>, nil]
1371
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1372
+
1373
+ # @!attribute applicable_product_tags
1374
+ # Will be passed down to the individual commits
1375
+ #
1376
+ # @return [Array<String>, nil]
1377
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1378
+
1379
+ # @!attribute contract
1380
+ #
1381
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Contract, nil]
1382
+ optional :contract,
1383
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Contract }
1384
+
1385
+ # @!attribute description
1386
+ # Will be passed down to the individual commits
1387
+ #
1388
+ # @return [String, nil]
1389
+ optional :description, String
1390
+
1391
+ # @!attribute ending_before
1392
+ # Determines when the contract will stop creating recurring commits. Optional
1393
+ #
1394
+ # @return [Time, nil]
1395
+ optional :ending_before, Time
1396
+
1397
+ # @!attribute hierarchy_configuration
1398
+ # Optional configuration for recurring credit hierarchy access control
1399
+ #
1400
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1401
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1402
+
1403
+ # @!attribute name
1404
+ # Displayed on invoices. Will be passed through to the individual commits
1405
+ #
1406
+ # @return [String, nil]
1407
+ optional :name, String
1408
+
1409
+ # @!attribute netsuite_sales_order_id
1410
+ # Will be passed down to the individual commits
1411
+ #
1412
+ # @return [String, nil]
1413
+ optional :netsuite_sales_order_id, String
1414
+
1415
+ # @!attribute proration
1416
+ # Determines whether the first and last commit will be prorated. If not provided,
1417
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1418
+ #
1419
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Proration, nil]
1420
+ optional :proration,
1421
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Proration }
1422
+
1423
+ # @!attribute recurrence_frequency
1424
+ # The frequency at which the recurring commits will be created. If not provided: -
1425
+ # The commits will be created on the usage invoice frequency. If provided: - The
1426
+ # period defined in the duration will correspond to this frequency. - Commits will
1427
+ # be created aligned with the recurring commit's starting_at rather than the usage
1428
+ # invoice dates.
1429
+ #
1430
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RecurrenceFrequency, nil]
1431
+ optional :recurrence_frequency,
1432
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RecurrenceFrequency }
1433
+
1434
+ # @!attribute rollover_fraction
1435
+ # Will be passed down to the individual commits. This controls how much of an
1436
+ # individual unexpired commit will roll over upon contract transition. Must be
1437
+ # between 0 and 1.
1438
+ #
1439
+ # @return [Float, nil]
1440
+ optional :rollover_fraction, Float
1441
+
1442
+ # @!attribute specifiers
1443
+ # List of filters that determine what kind of customer usage draws down a commit
1444
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1445
+ # specifiers to contribute to a commit's or credit's drawdown.
1446
+ #
1447
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1448
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1449
+
1450
+ # @!attribute subscription_config
1451
+ # Attach a subscription to the recurring commit/credit.
1452
+ #
1453
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1454
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
1455
+
1456
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1457
+ # Some parameter documentations has been truncated, see
1458
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit}
1459
+ # for more details.
1460
+ #
1461
+ # @param id [String]
1462
+ #
1463
+ # @param access_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::AccessAmount] The amount of commit to grant.
1464
+ #
1465
+ # @param commit_duration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration] The amount of time the created commits will be valid for
1466
+ #
1467
+ # @param priority [Float] Will be passed down to the individual commits
1468
+ #
1469
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Product]
1470
+ #
1471
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
1472
+ #
1473
+ # @param starting_at [Time] Determines the start time for the first commit
1474
+ #
1475
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1476
+ #
1477
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1478
+ #
1479
+ # @param contract [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Contract]
1480
+ #
1481
+ # @param description [String] Will be passed down to the individual commits
1482
+ #
1483
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
1484
+ #
1485
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
1486
+ #
1487
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
1488
+ #
1489
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
1490
+ #
1491
+ # @param proration [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1492
+ #
1493
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
1494
+ #
1495
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1496
+ #
1497
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1498
+ #
1499
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
1500
+
1501
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#access_amount
1502
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1503
+ # @!attribute credit_type_id
1504
+ #
1505
+ # @return [String]
1506
+ required :credit_type_id, String
1507
+
1508
+ # @!attribute unit_price
1509
+ #
1510
+ # @return [Float]
1511
+ required :unit_price, Float
1512
+
1513
+ # @!attribute quantity
1514
+ #
1515
+ # @return [Float, nil]
1516
+ optional :quantity, Float
1517
+
1518
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1519
+ # The amount of commit to grant.
1520
+ #
1521
+ # @param credit_type_id [String]
1522
+ # @param unit_price [Float]
1523
+ # @param quantity [Float]
1524
+ end
1525
+
1526
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#commit_duration
1527
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1528
+ # @!attribute value
1529
+ #
1530
+ # @return [Float]
1531
+ required :value, Float
1532
+
1533
+ # @!attribute unit
1534
+ #
1535
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration::Unit, nil]
1536
+ optional :unit,
1537
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration::Unit }
1538
+
1539
+ # @!method initialize(value:, unit: nil)
1540
+ # The amount of time the created commits will be valid for
1541
+ #
1542
+ # @param value [Float]
1543
+ # @param unit [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration::Unit]
1544
+
1545
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::CommitDuration#unit
1546
+ module Unit
1547
+ extend MetronomeSDK::Internal::Type::Enum
1548
+
1549
+ PERIODS = :PERIODS
1550
+
1551
+ # @!method self.values
1552
+ # @return [Array<Symbol>]
1553
+ end
1554
+ end
1555
+
1556
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#product
1557
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1558
+ # @!attribute id
1559
+ #
1560
+ # @return [String]
1561
+ required :id, String
1562
+
1563
+ # @!attribute name
1564
+ #
1565
+ # @return [String]
1566
+ required :name, String
1567
+
1568
+ # @!method initialize(id:, name:)
1569
+ # @param id [String]
1570
+ # @param name [String]
1571
+ end
1572
+
1573
+ # Whether the created commits will use the commit rate or list rate
1574
+ #
1575
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#rate_type
1576
+ module RateType
1577
+ extend MetronomeSDK::Internal::Type::Enum
1578
+
1579
+ COMMIT_RATE = :COMMIT_RATE
1580
+ LIST_RATE = :LIST_RATE
1581
+
1582
+ # @!method self.values
1583
+ # @return [Array<Symbol>]
1584
+ end
1585
+
1586
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#contract
1587
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1588
+ # @!attribute id
1589
+ #
1590
+ # @return [String]
1591
+ required :id, String
1592
+
1593
+ # @!method initialize(id:)
1594
+ # @param id [String]
1595
+ end
1596
+
1597
+ # Determines whether the first and last commit will be prorated. If not provided,
1598
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1599
+ #
1600
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#proration
1601
+ module Proration
1602
+ extend MetronomeSDK::Internal::Type::Enum
1603
+
1604
+ NONE = :NONE
1605
+ FIRST = :FIRST
1606
+ LAST = :LAST
1607
+ FIRST_AND_LAST = :FIRST_AND_LAST
1608
+
1609
+ # @!method self.values
1610
+ # @return [Array<Symbol>]
1611
+ end
1612
+
1613
+ # The frequency at which the recurring commits will be created. If not provided: -
1614
+ # The commits will be created on the usage invoice frequency. If provided: - The
1615
+ # period defined in the duration will correspond to this frequency. - Commits will
1616
+ # be created aligned with the recurring commit's starting_at rather than the usage
1617
+ # invoice dates.
1618
+ #
1619
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#recurrence_frequency
1620
+ module RecurrenceFrequency
1621
+ extend MetronomeSDK::Internal::Type::Enum
1622
+
1623
+ MONTHLY = :MONTHLY
1624
+ QUARTERLY = :QUARTERLY
1625
+ ANNUAL = :ANNUAL
1626
+ WEEKLY = :WEEKLY
1627
+
1628
+ # @!method self.values
1629
+ # @return [Array<Symbol>]
1630
+ end
1631
+ end
1632
+
1633
+ class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
1634
+ # @!attribute reseller_type
1635
+ #
1636
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty::ResellerType]
1637
+ required :reseller_type,
1638
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty::ResellerType }
1639
+
1640
+ # @!attribute applicable_product_ids
1641
+ #
1642
+ # @return [Array<String>, nil]
1643
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1644
+
1645
+ # @!attribute applicable_product_tags
1646
+ #
1647
+ # @return [Array<String>, nil]
1648
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1649
+
1650
+ # @!attribute aws_account_number
1651
+ #
1652
+ # @return [String, nil]
1653
+ optional :aws_account_number, String
1654
+
1655
+ # @!attribute aws_offer_id
1656
+ #
1657
+ # @return [String, nil]
1658
+ optional :aws_offer_id, String
1659
+
1660
+ # @!attribute aws_payer_reference_id
1661
+ #
1662
+ # @return [String, nil]
1663
+ optional :aws_payer_reference_id, String
1664
+
1665
+ # @!attribute ending_before
1666
+ #
1667
+ # @return [Time, nil]
1668
+ optional :ending_before, Time, nil?: true
1669
+
1670
+ # @!attribute fraction
1671
+ #
1672
+ # @return [Float, nil]
1673
+ optional :fraction, Float
1674
+
1675
+ # @!attribute gcp_account_id
1676
+ #
1677
+ # @return [String, nil]
1678
+ optional :gcp_account_id, String
1679
+
1680
+ # @!attribute gcp_offer_id
1681
+ #
1682
+ # @return [String, nil]
1683
+ optional :gcp_offer_id, String
1684
+
1685
+ # @!attribute netsuite_reseller_id
1686
+ #
1687
+ # @return [String, nil]
1688
+ optional :netsuite_reseller_id, String
1689
+
1690
+ # @!attribute reseller_contract_value
1691
+ #
1692
+ # @return [Float, nil]
1693
+ optional :reseller_contract_value, Float
1694
+
1695
+ # @!attribute starting_at
1696
+ #
1697
+ # @return [Time, nil]
1698
+ optional :starting_at, Time
1699
+
1700
+ # @!method initialize(reseller_type:, applicable_product_ids: nil, applicable_product_tags: nil, aws_account_number: nil, aws_offer_id: nil, aws_payer_reference_id: nil, ending_before: nil, fraction: nil, gcp_account_id: nil, gcp_offer_id: nil, netsuite_reseller_id: nil, reseller_contract_value: nil, starting_at: nil)
1701
+ # @param reseller_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty::ResellerType]
1702
+ # @param applicable_product_ids [Array<String>]
1703
+ # @param applicable_product_tags [Array<String>]
1704
+ # @param aws_account_number [String]
1705
+ # @param aws_offer_id [String]
1706
+ # @param aws_payer_reference_id [String]
1707
+ # @param ending_before [Time, nil]
1708
+ # @param fraction [Float]
1709
+ # @param gcp_account_id [String]
1710
+ # @param gcp_offer_id [String]
1711
+ # @param netsuite_reseller_id [String]
1712
+ # @param reseller_contract_value [Float]
1713
+ # @param starting_at [Time]
1714
+
1715
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddResellerRoyalty#reseller_type
1716
+ module ResellerType
1717
+ extend MetronomeSDK::Internal::Type::Enum
1718
+
1719
+ AWS = :AWS
1720
+ AWS_PRO_SERVICE = :AWS_PRO_SERVICE
1721
+ GCP = :GCP
1722
+ GCP_PRO_SERVICE = :GCP_PRO_SERVICE
1723
+
1724
+ # @!method self.values
1725
+ # @return [Array<Symbol>]
1726
+ end
1727
+ end
1728
+
1729
+ class AddScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
1730
+ # @!attribute id
1731
+ #
1732
+ # @return [String]
1733
+ required :id, String
1734
+
1735
+ # @!attribute product
1736
+ #
1737
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge::Product]
1738
+ required :product,
1739
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge::Product }
1740
+
1741
+ # @!attribute schedule
1742
+ #
1743
+ # @return [MetronomeSDK::Models::SchedulePointInTime]
1744
+ required :schedule, -> { MetronomeSDK::SchedulePointInTime }
1745
+
1746
+ # @!attribute name
1747
+ # displayed on invoices
1748
+ #
1749
+ # @return [String, nil]
1750
+ optional :name, String
1751
+
1752
+ # @!attribute netsuite_sales_order_id
1753
+ # This field's availability is dependent on your client's configuration.
1754
+ #
1755
+ # @return [String, nil]
1756
+ optional :netsuite_sales_order_id, String
1757
+
1758
+ # @!method initialize(id:, product:, schedule:, name: nil, netsuite_sales_order_id: nil)
1759
+ # @param id [String]
1760
+ #
1761
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge::Product]
1762
+ #
1763
+ # @param schedule [MetronomeSDK::Models::SchedulePointInTime]
1764
+ #
1765
+ # @param name [String] displayed on invoices
1766
+ #
1767
+ # @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
1768
+
1769
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddScheduledCharge#product
1770
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1771
+ # @!attribute id
1772
+ #
1773
+ # @return [String]
1774
+ required :id, String
1775
+
1776
+ # @!attribute name
1777
+ #
1778
+ # @return [String]
1779
+ required :name, String
1780
+
1781
+ # @!method initialize(id:, name:)
1782
+ # @param id [String]
1783
+ # @param name [String]
1784
+ end
1785
+ end
1786
+
1787
+ class AddSubscription < MetronomeSDK::Internal::Type::BaseModel
1788
+ # @!attribute billing_periods
1789
+ # Previous, current, and next billing periods for the subscription.
1790
+ #
1791
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods]
1792
+ required :billing_periods,
1793
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods }
1794
+
1795
+ # @!attribute collection_schedule
1796
+ #
1797
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::CollectionSchedule]
1798
+ required :collection_schedule,
1799
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::CollectionSchedule }
1800
+
1801
+ # @!attribute proration
1802
+ #
1803
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration]
1804
+ required :proration,
1805
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration }
1806
+
1807
+ # @!attribute quantity_management_mode
1808
+ # Determines how the subscription's quantity is controlled. Defaults to
1809
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
1810
+ # directly on the subscription. `initial_quantity` must be provided with this
1811
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
1812
+ # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
1813
+ # user_123) to increment and decrement a subscription quantity, rather than
1814
+ # directly providing the quantity. You must use a **SEAT_BASED** subscription to
1815
+ # use a linked recurring credit with an allocation per seat. `seat_config` must be
1816
+ # provided with this option.
1817
+ #
1818
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantityManagementMode]
1819
+ required :quantity_management_mode,
1820
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantityManagementMode }
1821
+
1822
+ # @!attribute quantity_schedule
1823
+ # List of quantity schedule items for the subscription. Only includes the current
1824
+ # quantity and future quantity changes.
1825
+ #
1826
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantitySchedule>]
1827
+ required :quantity_schedule,
1828
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantitySchedule] }
1829
+
1830
+ # @!attribute starting_at
1831
+ #
1832
+ # @return [Time]
1833
+ required :starting_at, Time
1834
+
1835
+ # @!attribute subscription_rate
1836
+ #
1837
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate]
1838
+ required :subscription_rate,
1839
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate }
1840
+
1841
+ # @!attribute id
1842
+ #
1843
+ # @return [String, nil]
1844
+ optional :id, String
1845
+
1846
+ # @!attribute custom_fields
1847
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1848
+ #
1849
+ # @return [Hash{Symbol=>String}, nil]
1850
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1851
+
1852
+ # @!attribute description
1853
+ #
1854
+ # @return [String, nil]
1855
+ optional :description, String
1856
+
1857
+ # @!attribute ending_before
1858
+ #
1859
+ # @return [Time, nil]
1860
+ optional :ending_before, Time
1861
+
1862
+ # @!attribute fiat_credit_type_id
1863
+ #
1864
+ # @return [String, nil]
1865
+ optional :fiat_credit_type_id, String
1866
+
1867
+ # @!attribute name
1868
+ #
1869
+ # @return [String, nil]
1870
+ optional :name, String
1871
+
1872
+ # @!attribute seat_config
1873
+ #
1874
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SeatConfig, nil]
1875
+ optional :seat_config,
1876
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SeatConfig }
1877
+
1878
+ # @!method initialize(billing_periods:, collection_schedule:, proration:, quantity_management_mode:, quantity_schedule:, starting_at:, subscription_rate:, id: nil, custom_fields: nil, description: nil, ending_before: nil, fiat_credit_type_id: nil, name: nil, seat_config: nil)
1879
+ # Some parameter documentations has been truncated, see
1880
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription}
1881
+ # for more details.
1882
+ #
1883
+ # @param billing_periods [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods] Previous, current, and next billing periods for the subscription.
1884
+ #
1885
+ # @param collection_schedule [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::CollectionSchedule]
1886
+ #
1887
+ # @param proration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration]
1888
+ #
1889
+ # @param quantity_management_mode [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
1890
+ #
1891
+ # @param quantity_schedule [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::QuantitySchedule>] List of quantity schedule items for the subscription. Only includes the current
1892
+ #
1893
+ # @param starting_at [Time]
1894
+ #
1895
+ # @param subscription_rate [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate]
1896
+ #
1897
+ # @param id [String]
1898
+ #
1899
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1900
+ #
1901
+ # @param description [String]
1902
+ #
1903
+ # @param ending_before [Time]
1904
+ #
1905
+ # @param fiat_credit_type_id [String]
1906
+ #
1907
+ # @param name [String]
1908
+ #
1909
+ # @param seat_config [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SeatConfig]
1910
+
1911
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#billing_periods
1912
+ class BillingPeriods < MetronomeSDK::Internal::Type::BaseModel
1913
+ # @!attribute current
1914
+ #
1915
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Current, nil]
1916
+ optional :current,
1917
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Current }
1918
+
1919
+ # @!attribute next_
1920
+ #
1921
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Next, nil]
1922
+ optional :next_,
1923
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Next },
1924
+ api_name: :next
1925
+
1926
+ # @!attribute previous
1927
+ #
1928
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Previous, nil]
1929
+ optional :previous,
1930
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Previous }
1931
+
1932
+ # @!method initialize(current: nil, next_: nil, previous: nil)
1933
+ # Previous, current, and next billing periods for the subscription.
1934
+ #
1935
+ # @param current [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Current]
1936
+ # @param next_ [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Next]
1937
+ # @param previous [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods::Previous]
1938
+
1939
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods#current
1940
+ class Current < MetronomeSDK::Internal::Type::BaseModel
1941
+ # @!attribute ending_before
1942
+ #
1943
+ # @return [Time]
1944
+ required :ending_before, Time
1945
+
1946
+ # @!attribute starting_at
1947
+ #
1948
+ # @return [Time]
1949
+ required :starting_at, Time
1950
+
1951
+ # @!method initialize(ending_before:, starting_at:)
1952
+ # @param ending_before [Time]
1953
+ # @param starting_at [Time]
1954
+ end
1955
+
1956
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods#next_
1957
+ class Next < MetronomeSDK::Internal::Type::BaseModel
1958
+ # @!attribute ending_before
1959
+ #
1960
+ # @return [Time]
1961
+ required :ending_before, Time
1962
+
1963
+ # @!attribute starting_at
1964
+ #
1965
+ # @return [Time]
1966
+ required :starting_at, Time
1967
+
1968
+ # @!method initialize(ending_before:, starting_at:)
1969
+ # @param ending_before [Time]
1970
+ # @param starting_at [Time]
1971
+ end
1972
+
1973
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::BillingPeriods#previous
1974
+ class Previous < MetronomeSDK::Internal::Type::BaseModel
1975
+ # @!attribute ending_before
1976
+ #
1977
+ # @return [Time]
1978
+ required :ending_before, Time
1979
+
1980
+ # @!attribute starting_at
1981
+ #
1982
+ # @return [Time]
1983
+ required :starting_at, Time
1984
+
1985
+ # @!method initialize(ending_before:, starting_at:)
1986
+ # @param ending_before [Time]
1987
+ # @param starting_at [Time]
1988
+ end
1989
+ end
1990
+
1991
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#collection_schedule
1992
+ module CollectionSchedule
1993
+ extend MetronomeSDK::Internal::Type::Enum
1994
+
1995
+ ADVANCE = :ADVANCE
1996
+ ARREARS = :ARREARS
1997
+
1998
+ # @!method self.values
1999
+ # @return [Array<Symbol>]
2000
+ end
2001
+
2002
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#proration
2003
+ class Proration < MetronomeSDK::Internal::Type::BaseModel
2004
+ # @!attribute invoice_behavior
2005
+ #
2006
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration::InvoiceBehavior]
2007
+ required :invoice_behavior,
2008
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration::InvoiceBehavior }
2009
+
2010
+ # @!attribute is_prorated
2011
+ #
2012
+ # @return [Boolean]
2013
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2014
+
2015
+ # @!method initialize(invoice_behavior:, is_prorated:)
2016
+ # @param invoice_behavior [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration::InvoiceBehavior]
2017
+ # @param is_prorated [Boolean]
2018
+
2019
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::Proration#invoice_behavior
2020
+ module InvoiceBehavior
2021
+ extend MetronomeSDK::Internal::Type::Enum
2022
+
2023
+ BILL_IMMEDIATELY = :BILL_IMMEDIATELY
2024
+ BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
2025
+
2026
+ # @!method self.values
2027
+ # @return [Array<Symbol>]
2028
+ end
2029
+ end
2030
+
2031
+ # Determines how the subscription's quantity is controlled. Defaults to
2032
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2033
+ # directly on the subscription. `initial_quantity` must be provided with this
2034
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2035
+ # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
2036
+ # user_123) to increment and decrement a subscription quantity, rather than
2037
+ # directly providing the quantity. You must use a **SEAT_BASED** subscription to
2038
+ # use a linked recurring credit with an allocation per seat. `seat_config` must be
2039
+ # provided with this option.
2040
+ #
2041
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#quantity_management_mode
2042
+ module QuantityManagementMode
2043
+ extend MetronomeSDK::Internal::Type::Enum
2044
+
2045
+ SEAT_BASED = :SEAT_BASED
2046
+ QUANTITY_ONLY = :QUANTITY_ONLY
2047
+
2048
+ # @!method self.values
2049
+ # @return [Array<Symbol>]
2050
+ end
2051
+
2052
+ class QuantitySchedule < MetronomeSDK::Internal::Type::BaseModel
2053
+ # @!attribute quantity
2054
+ #
2055
+ # @return [Float]
2056
+ required :quantity, Float
2057
+
2058
+ # @!attribute starting_at
2059
+ #
2060
+ # @return [Time]
2061
+ required :starting_at, Time
2062
+
2063
+ # @!attribute ending_before
2064
+ #
2065
+ # @return [Time, nil]
2066
+ optional :ending_before, Time
2067
+
2068
+ # @!method initialize(quantity:, starting_at:, ending_before: nil)
2069
+ # @param quantity [Float]
2070
+ # @param starting_at [Time]
2071
+ # @param ending_before [Time]
2072
+ end
2073
+
2074
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#subscription_rate
2075
+ class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
2076
+ # @!attribute billing_frequency
2077
+ #
2078
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::BillingFrequency]
2079
+ required :billing_frequency,
2080
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::BillingFrequency }
2081
+
2082
+ # @!attribute product
2083
+ #
2084
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::Product]
2085
+ required :product,
2086
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::Product }
2087
+
2088
+ # @!method initialize(billing_frequency:, product:)
2089
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::BillingFrequency]
2090
+ # @param product [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate::Product]
2091
+
2092
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate#billing_frequency
2093
+ module BillingFrequency
2094
+ extend MetronomeSDK::Internal::Type::Enum
2095
+
2096
+ MONTHLY = :MONTHLY
2097
+ QUARTERLY = :QUARTERLY
2098
+ ANNUAL = :ANNUAL
2099
+ WEEKLY = :WEEKLY
2100
+
2101
+ # @!method self.values
2102
+ # @return [Array<Symbol>]
2103
+ end
2104
+
2105
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SubscriptionRate#product
2106
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2107
+ # @!attribute id
2108
+ #
2109
+ # @return [String]
2110
+ required :id, String
2111
+
2112
+ # @!attribute name
2113
+ #
2114
+ # @return [String]
2115
+ required :name, String
2116
+
2117
+ # @!method initialize(id:, name:)
2118
+ # @param id [String]
2119
+ # @param name [String]
2120
+ end
2121
+ end
2122
+
2123
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription#seat_config
2124
+ class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
2125
+ # @!attribute seat_group_key
2126
+ # The property name, sent on usage events, that identifies the seat ID associated
2127
+ # with the usage event. For example, the property name might be seat_id or
2128
+ # user_id. The property must be set as a group key on billable metrics and a
2129
+ # presentation/pricing group key on contract products. This allows linked
2130
+ # recurring credits with an allocation per seat to be consumed by only one seat's
2131
+ # usage.
2132
+ #
2133
+ # @return [String]
2134
+ required :seat_group_key, String
2135
+
2136
+ # @!method initialize(seat_group_key:)
2137
+ # Some parameter documentations has been truncated, see
2138
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddSubscription::SeatConfig}
2139
+ # for more details.
2140
+ #
2141
+ # @param seat_group_key [String] The property name, sent on usage events, that identifies the seat ID associated
2142
+ end
2143
+ end
2144
+
2145
+ class AddUsageFilter < MetronomeSDK::Internal::Type::BaseModel
2146
+ # @!attribute group_key
2147
+ #
2148
+ # @return [String]
2149
+ required :group_key, String
2150
+
2151
+ # @!attribute group_values
2152
+ #
2153
+ # @return [Array<String>]
2154
+ required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
2155
+
2156
+ # @!attribute starting_at
2157
+ # This will match contract starting_at value if usage filter is active from the
2158
+ # beginning of the contract.
2159
+ #
2160
+ # @return [Time]
2161
+ required :starting_at, Time
2162
+
2163
+ # @!attribute ending_before
2164
+ # This will match contract ending_before value if usage filter is active until the
2165
+ # end of the contract. It will be undefined if the contract is open-ended.
2166
+ #
2167
+ # @return [Time, nil]
2168
+ optional :ending_before, Time
2169
+
2170
+ # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
2171
+ # Some parameter documentations has been truncated, see
2172
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddUsageFilter} for
2173
+ # more details.
2174
+ #
2175
+ # @param group_key [String]
2176
+ #
2177
+ # @param group_values [Array<String>]
2178
+ #
2179
+ # @param starting_at [Time] This will match contract starting_at value if usage filter is active from the be
2180
+ #
2181
+ # @param ending_before [Time] This will match contract ending_before value if usage filter is active until the
2182
+ end
2183
+
2184
+ class ArchiveCommit < MetronomeSDK::Internal::Type::BaseModel
2185
+ # @!attribute id
2186
+ #
2187
+ # @return [String]
2188
+ required :id, String
2189
+
2190
+ # @!method initialize(id:)
2191
+ # @param id [String]
2192
+ end
2193
+
2194
+ class ArchiveCredit < MetronomeSDK::Internal::Type::BaseModel
2195
+ # @!attribute id
2196
+ #
2197
+ # @return [String]
2198
+ required :id, String
2199
+
2200
+ # @!method initialize(id:)
2201
+ # @param id [String]
2202
+ end
2203
+
2204
+ class ArchiveScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
2205
+ # @!attribute id
2206
+ #
2207
+ # @return [String]
2208
+ required :id, String
2209
+
2210
+ # @!method initialize(id:)
2211
+ # @param id [String]
2212
+ end
2213
+
2214
+ class RemoveOverride < MetronomeSDK::Internal::Type::BaseModel
2215
+ # @!attribute id
2216
+ #
2217
+ # @return [String]
2218
+ required :id, String
2219
+
2220
+ # @!method initialize(id:)
2221
+ # @param id [String]
2222
+ end
2223
+
2224
+ class UpdateCommit < MetronomeSDK::Internal::Type::BaseModel
2225
+ # @!attribute id
2226
+ #
2227
+ # @return [String]
2228
+ required :id, String
2229
+
2230
+ # @!attribute access_schedule
2231
+ #
2232
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule, nil]
2233
+ optional :access_schedule,
2234
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule }
2235
+
2236
+ # @!attribute applicable_product_ids
2237
+ # Which products the commit applies to. If applicable_product_ids,
2238
+ # applicable_product_tags or specifiers are not provided, the commit applies to
2239
+ # all products.
2240
+ #
2241
+ # @return [Array<String>, nil]
2242
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2243
+
2244
+ # @!attribute applicable_product_tags
2245
+ # Which tags the commit applies to. If applicable_product_ids,
2246
+ # applicable_product_tags or specifiers are not provided, the commit applies to
2247
+ # all products.
2248
+ #
2249
+ # @return [Array<String>, nil]
2250
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2251
+
2252
+ # @!attribute description
2253
+ #
2254
+ # @return [String, nil]
2255
+ optional :description, String
2256
+
2257
+ # @!attribute hierarchy_configuration
2258
+ # Optional configuration for commit hierarchy access control
2259
+ #
2260
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
2261
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2262
+
2263
+ # @!attribute invoice_schedule
2264
+ #
2265
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule, nil]
2266
+ optional :invoice_schedule,
2267
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule }
2268
+
2269
+ # @!attribute name
2270
+ #
2271
+ # @return [String, nil]
2272
+ optional :name, String
2273
+
2274
+ # @!attribute netsuite_sales_order_id
2275
+ #
2276
+ # @return [String, nil]
2277
+ optional :netsuite_sales_order_id, String, nil?: true
2278
+
2279
+ # @!attribute priority
2280
+ # If multiple commits are applicable, the one with the lower priority will apply
2281
+ # first.
2282
+ #
2283
+ # @return [Float, nil]
2284
+ optional :priority, Float, nil?: true
2285
+
2286
+ # @!attribute product_id
2287
+ #
2288
+ # @return [String, nil]
2289
+ optional :product_id, String
2290
+
2291
+ # @!attribute rate_type
2292
+ # If set, the commit's rate type was updated to the specified value.
2293
+ #
2294
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::RateType, nil]
2295
+ optional :rate_type,
2296
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::RateType }
2297
+
2298
+ # @!attribute rollover_fraction
2299
+ #
2300
+ # @return [Float, nil]
2301
+ optional :rollover_fraction, Float, nil?: true
2302
+
2303
+ # @!attribute specifiers
2304
+ # List of filters that determine what kind of customer usage draws down a commit
2305
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2306
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2307
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
2308
+ # Instead, to target usage by product or product tag, pass those values in the
2309
+ # body of `specifiers`.
2310
+ #
2311
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
2312
+ optional :specifiers,
2313
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
2314
+ nil?: true
2315
+
2316
+ # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil)
2317
+ # Some parameter documentations has been truncated, see
2318
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit} for
2319
+ # more details.
2320
+ #
2321
+ # @param id [String]
2322
+ #
2323
+ # @param access_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule]
2324
+ #
2325
+ # @param applicable_product_ids [Array<String>, nil] Which products the commit applies to. If applicable_product_ids, applicable_prod
2326
+ #
2327
+ # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
2328
+ #
2329
+ # @param description [String]
2330
+ #
2331
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
2332
+ #
2333
+ # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule]
2334
+ #
2335
+ # @param name [String]
2336
+ #
2337
+ # @param netsuite_sales_order_id [String, nil]
2338
+ #
2339
+ # @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
2340
+ #
2341
+ # @param product_id [String]
2342
+ #
2343
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::RateType] If set, the commit's rate type was updated to the specified value.
2344
+ #
2345
+ # @param rollover_fraction [Float, nil]
2346
+ #
2347
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
2348
+
2349
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit#access_schedule
2350
+ class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
2351
+ # @!attribute add_schedule_items
2352
+ #
2353
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::AddScheduleItem>, nil]
2354
+ optional :add_schedule_items,
2355
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::AddScheduleItem] }
2356
+
2357
+ # @!attribute remove_schedule_items
2358
+ #
2359
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::RemoveScheduleItem>, nil]
2360
+ optional :remove_schedule_items,
2361
+ -> do
2362
+ MetronomeSDK::Internal::Type::ArrayOf[
2363
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::RemoveScheduleItem
2364
+ ]
2365
+ end
2366
+
2367
+ # @!attribute update_schedule_items
2368
+ #
2369
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::UpdateScheduleItem>, nil]
2370
+ optional :update_schedule_items,
2371
+ -> do
2372
+ MetronomeSDK::Internal::Type::ArrayOf[
2373
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::UpdateScheduleItem
2374
+ ]
2375
+ end
2376
+
2377
+ # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
2378
+ # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::AddScheduleItem>]
2379
+ # @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::RemoveScheduleItem>]
2380
+ # @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::AccessSchedule::UpdateScheduleItem>]
2381
+
2382
+ class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2383
+ # @!attribute amount
2384
+ #
2385
+ # @return [Float]
2386
+ required :amount, Float
2387
+
2388
+ # @!attribute ending_before
2389
+ # RFC 3339 timestamp (exclusive)
2390
+ #
2391
+ # @return [Time]
2392
+ required :ending_before, Time
2393
+
2394
+ # @!attribute starting_at
2395
+ # RFC 3339 timestamp (inclusive)
2396
+ #
2397
+ # @return [Time]
2398
+ required :starting_at, Time
2399
+
2400
+ # @!method initialize(amount:, ending_before:, starting_at:)
2401
+ # @param amount [Float]
2402
+ #
2403
+ # @param ending_before [Time] RFC 3339 timestamp (exclusive)
2404
+ #
2405
+ # @param starting_at [Time] RFC 3339 timestamp (inclusive)
2406
+ end
2407
+
2408
+ class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2409
+ # @!attribute id
2410
+ #
2411
+ # @return [String]
2412
+ required :id, String
2413
+
2414
+ # @!method initialize(id:)
2415
+ # @param id [String]
2416
+ end
2417
+
2418
+ class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2419
+ # @!attribute id
2420
+ #
2421
+ # @return [String]
2422
+ required :id, String
2423
+
2424
+ # @!attribute amount
2425
+ #
2426
+ # @return [Float, nil]
2427
+ optional :amount, Float
2428
+
2429
+ # @!attribute ending_before
2430
+ # RFC 3339 timestamp (exclusive)
2431
+ #
2432
+ # @return [Time, nil]
2433
+ optional :ending_before, Time
2434
+
2435
+ # @!attribute starting_at
2436
+ # RFC 3339 timestamp (inclusive)
2437
+ #
2438
+ # @return [Time, nil]
2439
+ optional :starting_at, Time
2440
+
2441
+ # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
2442
+ # @param id [String]
2443
+ #
2444
+ # @param amount [Float]
2445
+ #
2446
+ # @param ending_before [Time] RFC 3339 timestamp (exclusive)
2447
+ #
2448
+ # @param starting_at [Time] RFC 3339 timestamp (inclusive)
2449
+ end
2450
+ end
2451
+
2452
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit#invoice_schedule
2453
+ class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
2454
+ # @!attribute add_schedule_items
2455
+ #
2456
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::AddScheduleItem>, nil]
2457
+ optional :add_schedule_items,
2458
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::AddScheduleItem] }
2459
+
2460
+ # @!attribute remove_schedule_items
2461
+ #
2462
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::RemoveScheduleItem>, nil]
2463
+ optional :remove_schedule_items,
2464
+ -> do
2465
+ MetronomeSDK::Internal::Type::ArrayOf[
2466
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::RemoveScheduleItem
2467
+ ]
2468
+ end
2469
+
2470
+ # @!attribute update_schedule_items
2471
+ #
2472
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::UpdateScheduleItem>, nil]
2473
+ optional :update_schedule_items,
2474
+ -> do
2475
+ MetronomeSDK::Internal::Type::ArrayOf[
2476
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::UpdateScheduleItem
2477
+ ]
2478
+ end
2479
+
2480
+ # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
2481
+ # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::AddScheduleItem>]
2482
+ # @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::RemoveScheduleItem>]
2483
+ # @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit::InvoiceSchedule::UpdateScheduleItem>]
2484
+
2485
+ class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2486
+ # @!attribute timestamp
2487
+ #
2488
+ # @return [Time]
2489
+ required :timestamp, Time
2490
+
2491
+ # @!attribute amount
2492
+ #
2493
+ # @return [Float, nil]
2494
+ optional :amount, Float
2495
+
2496
+ # @!attribute quantity
2497
+ #
2498
+ # @return [Float, nil]
2499
+ optional :quantity, Float
2500
+
2501
+ # @!attribute unit_price
2502
+ #
2503
+ # @return [Float, nil]
2504
+ optional :unit_price, Float
2505
+
2506
+ # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
2507
+ # @param timestamp [Time]
2508
+ # @param amount [Float]
2509
+ # @param quantity [Float]
2510
+ # @param unit_price [Float]
2511
+ end
2512
+
2513
+ class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2514
+ # @!attribute id
2515
+ #
2516
+ # @return [String]
2517
+ required :id, String
2518
+
2519
+ # @!method initialize(id:)
2520
+ # @param id [String]
2521
+ end
2522
+
2523
+ class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2524
+ # @!attribute id
2525
+ #
2526
+ # @return [String]
2527
+ required :id, String
2528
+
2529
+ # @!attribute amount
2530
+ #
2531
+ # @return [Float, nil]
2532
+ optional :amount, Float
2533
+
2534
+ # @!attribute quantity
2535
+ #
2536
+ # @return [Float, nil]
2537
+ optional :quantity, Float
2538
+
2539
+ # @!attribute timestamp
2540
+ #
2541
+ # @return [Time, nil]
2542
+ optional :timestamp, Time
2543
+
2544
+ # @!attribute unit_price
2545
+ #
2546
+ # @return [Float, nil]
2547
+ optional :unit_price, Float
2548
+
2549
+ # @!method initialize(id:, amount: nil, quantity: nil, timestamp: nil, unit_price: nil)
2550
+ # @param id [String]
2551
+ # @param amount [Float]
2552
+ # @param quantity [Float]
2553
+ # @param timestamp [Time]
2554
+ # @param unit_price [Float]
2555
+ end
2556
+ end
2557
+
2558
+ # If set, the commit's rate type was updated to the specified value.
2559
+ #
2560
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCommit#rate_type
2561
+ module RateType
2562
+ extend MetronomeSDK::Internal::Type::Enum
2563
+
2564
+ COMMIT_RATE = :COMMIT_RATE
2565
+ LIST_RATE = :LIST_RATE
2566
+
2567
+ # @!method self.values
2568
+ # @return [Array<Symbol>]
2569
+ end
2570
+ end
2571
+
2572
+ class UpdateCredit < MetronomeSDK::Internal::Type::BaseModel
2573
+ # @!attribute id
2574
+ #
2575
+ # @return [String]
2576
+ required :id, String
2577
+
2578
+ # @!attribute access_schedule
2579
+ #
2580
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule, nil]
2581
+ optional :access_schedule,
2582
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule }
2583
+
2584
+ # @!attribute applicable_product_ids
2585
+ # Which products the credit applies to. If applicable_product_ids,
2586
+ # applicable_product_tags or specifiers are not provided, the credit applies to
2587
+ # all products.
2588
+ #
2589
+ # @return [Array<String>, nil]
2590
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2591
+
2592
+ # @!attribute applicable_product_tags
2593
+ # Which tags the credit applies to. If applicable_product_ids,
2594
+ # applicable_product_tags or specifiers are not provided, the credit applies to
2595
+ # all products.
2596
+ #
2597
+ # @return [Array<String>, nil]
2598
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
2599
+
2600
+ # @!attribute description
2601
+ #
2602
+ # @return [String, nil]
2603
+ optional :description, String
2604
+
2605
+ # @!attribute hierarchy_configuration
2606
+ # Optional configuration for credit hierarchy access control
2607
+ #
2608
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
2609
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
2610
+
2611
+ # @!attribute name
2612
+ #
2613
+ # @return [String, nil]
2614
+ optional :name, String
2615
+
2616
+ # @!attribute netsuite_sales_order_id
2617
+ #
2618
+ # @return [String, nil]
2619
+ optional :netsuite_sales_order_id, String, nil?: true
2620
+
2621
+ # @!attribute priority
2622
+ # If multiple credits are applicable, the one with the lower priority will apply
2623
+ # first.
2624
+ #
2625
+ # @return [Float, nil]
2626
+ optional :priority, Float, nil?: true
2627
+
2628
+ # @!attribute product_id
2629
+ #
2630
+ # @return [String, nil]
2631
+ optional :product_id, String
2632
+
2633
+ # @!attribute rate_type
2634
+ # If set, the credit's rate type was updated to the specified value.
2635
+ #
2636
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::RateType, nil]
2637
+ optional :rate_type,
2638
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::RateType }
2639
+
2640
+ # @!attribute rollover_fraction
2641
+ #
2642
+ # @return [Float, nil]
2643
+ optional :rollover_fraction, Float, nil?: true
2644
+
2645
+ # @!attribute specifiers
2646
+ # List of filters that determine what kind of customer usage draws down a commit
2647
+ # or credit. A customer's usage needs to meet the condition of at least one of the
2648
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
2649
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
2650
+ # Instead, to target usage by product or product tag, pass those values in the
2651
+ # body of `specifiers`.
2652
+ #
2653
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
2654
+ optional :specifiers,
2655
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
2656
+ nil?: true
2657
+
2658
+ # @!method initialize(id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, product_id: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil)
2659
+ # Some parameter documentations has been truncated, see
2660
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit} for
2661
+ # more details.
2662
+ #
2663
+ # @param id [String]
2664
+ #
2665
+ # @param access_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule]
2666
+ #
2667
+ # @param applicable_product_ids [Array<String>, nil] Which products the credit applies to. If applicable_product_ids, applicable_prod
2668
+ #
2669
+ # @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If applicable*product_ids, applicable_product*
2670
+ #
2671
+ # @param description [String]
2672
+ #
2673
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for credit hierarchy access control
2674
+ #
2675
+ # @param name [String]
2676
+ #
2677
+ # @param netsuite_sales_order_id [String, nil]
2678
+ #
2679
+ # @param priority [Float, nil] If multiple credits are applicable, the one with the lower priority will apply f
2680
+ #
2681
+ # @param product_id [String]
2682
+ #
2683
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::RateType] If set, the credit's rate type was updated to the specified value.
2684
+ #
2685
+ # @param rollover_fraction [Float, nil]
2686
+ #
2687
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
2688
+
2689
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit#access_schedule
2690
+ class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
2691
+ # @!attribute add_schedule_items
2692
+ #
2693
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::AddScheduleItem>, nil]
2694
+ optional :add_schedule_items,
2695
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::AddScheduleItem] }
2696
+
2697
+ # @!attribute remove_schedule_items
2698
+ #
2699
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::RemoveScheduleItem>, nil]
2700
+ optional :remove_schedule_items,
2701
+ -> do
2702
+ MetronomeSDK::Internal::Type::ArrayOf[
2703
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::RemoveScheduleItem
2704
+ ]
2705
+ end
2706
+
2707
+ # @!attribute update_schedule_items
2708
+ #
2709
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::UpdateScheduleItem>, nil]
2710
+ optional :update_schedule_items,
2711
+ -> do
2712
+ MetronomeSDK::Internal::Type::ArrayOf[
2713
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::UpdateScheduleItem
2714
+ ]
2715
+ end
2716
+
2717
+ # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
2718
+ # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::AddScheduleItem>]
2719
+ # @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::RemoveScheduleItem>]
2720
+ # @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit::AccessSchedule::UpdateScheduleItem>]
2721
+
2722
+ class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2723
+ # @!attribute amount
2724
+ #
2725
+ # @return [Float]
2726
+ required :amount, Float
2727
+
2728
+ # @!attribute ending_before
2729
+ # RFC 3339 timestamp (exclusive)
2730
+ #
2731
+ # @return [Time]
2732
+ required :ending_before, Time
2733
+
2734
+ # @!attribute starting_at
2735
+ # RFC 3339 timestamp (inclusive)
2736
+ #
2737
+ # @return [Time]
2738
+ required :starting_at, Time
2739
+
2740
+ # @!method initialize(amount:, ending_before:, starting_at:)
2741
+ # @param amount [Float]
2742
+ #
2743
+ # @param ending_before [Time] RFC 3339 timestamp (exclusive)
2744
+ #
2745
+ # @param starting_at [Time] RFC 3339 timestamp (inclusive)
2746
+ end
2747
+
2748
+ class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2749
+ # @!attribute id
2750
+ #
2751
+ # @return [String]
2752
+ required :id, String
2753
+
2754
+ # @!method initialize(id:)
2755
+ # @param id [String]
2756
+ end
2757
+
2758
+ class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2759
+ # @!attribute id
2760
+ #
2761
+ # @return [String]
2762
+ required :id, String
2763
+
2764
+ # @!attribute amount
2765
+ #
2766
+ # @return [Float, nil]
2767
+ optional :amount, Float
2768
+
2769
+ # @!attribute ending_before
2770
+ # RFC 3339 timestamp (exclusive)
2771
+ #
2772
+ # @return [Time, nil]
2773
+ optional :ending_before, Time
2774
+
2775
+ # @!attribute starting_at
2776
+ # RFC 3339 timestamp (inclusive)
2777
+ #
2778
+ # @return [Time, nil]
2779
+ optional :starting_at, Time
2780
+
2781
+ # @!method initialize(id:, amount: nil, ending_before: nil, starting_at: nil)
2782
+ # @param id [String]
2783
+ #
2784
+ # @param amount [Float]
2785
+ #
2786
+ # @param ending_before [Time] RFC 3339 timestamp (exclusive)
2787
+ #
2788
+ # @param starting_at [Time] RFC 3339 timestamp (inclusive)
2789
+ end
2790
+ end
2791
+
2792
+ # If set, the credit's rate type was updated to the specified value.
2793
+ #
2794
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateCredit#rate_type
2795
+ module RateType
2796
+ extend MetronomeSDK::Internal::Type::Enum
2797
+
2798
+ LIST_RATE = :LIST_RATE
2799
+ COMMIT_RATE = :COMMIT_RATE
2800
+
2801
+ # @!method self.values
2802
+ # @return [Array<Symbol>]
2803
+ end
2804
+ end
2805
+
2806
+ class UpdateDiscount < MetronomeSDK::Internal::Type::BaseModel
2807
+ # @!attribute id
2808
+ #
2809
+ # @return [String]
2810
+ required :id, String
2811
+
2812
+ # @!attribute custom_fields
2813
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2814
+ #
2815
+ # @return [Hash{Symbol=>String}, nil]
2816
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
2817
+
2818
+ # @!attribute name
2819
+ #
2820
+ # @return [String, nil]
2821
+ optional :name, String
2822
+
2823
+ # @!attribute netsuite_sales_order_id
2824
+ #
2825
+ # @return [String, nil]
2826
+ optional :netsuite_sales_order_id, String
2827
+
2828
+ # @!attribute schedule
2829
+ # Must provide either schedule_items or recurring_schedule.
2830
+ #
2831
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule, nil]
2832
+ optional :schedule,
2833
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule }
2834
+
2835
+ # @!method initialize(id:, custom_fields: nil, name: nil, netsuite_sales_order_id: nil, schedule: nil)
2836
+ # @param id [String]
2837
+ #
2838
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2839
+ #
2840
+ # @param name [String]
2841
+ #
2842
+ # @param netsuite_sales_order_id [String]
2843
+ #
2844
+ # @param schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule] Must provide either schedule_items or recurring_schedule.
2845
+
2846
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount#schedule
2847
+ class Schedule < MetronomeSDK::Internal::Type::BaseModel
2848
+ # @!attribute credit_type_id
2849
+ # Defaults to USD (cents) if not passed.
2850
+ #
2851
+ # @return [String, nil]
2852
+ optional :credit_type_id, String
2853
+
2854
+ # @!attribute do_not_invoice
2855
+ # This field is only applicable to commit invoice schedules. If true, this
2856
+ # schedule will not generate an invoice.
2857
+ #
2858
+ # @return [Boolean, nil]
2859
+ optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
2860
+
2861
+ # @!attribute recurring_schedule
2862
+ # Enter the unit price and quantity for the charge or instead only send the
2863
+ # amount. If amount is sent, the unit price is assumed to be the amount and
2864
+ # quantity is inferred to be 1.
2865
+ #
2866
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule, nil]
2867
+ optional :recurring_schedule,
2868
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule }
2869
+
2870
+ # @!attribute schedule_items
2871
+ # Either provide amount or provide both unit_price and quantity.
2872
+ #
2873
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::ScheduleItem>, nil]
2874
+ optional :schedule_items,
2875
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::ScheduleItem] }
2876
+
2877
+ # @!method initialize(credit_type_id: nil, do_not_invoice: nil, recurring_schedule: nil, schedule_items: nil)
2878
+ # Some parameter documentations has been truncated, see
2879
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule}
2880
+ # for more details.
2881
+ #
2882
+ # Must provide either schedule_items or recurring_schedule.
2883
+ #
2884
+ # @param credit_type_id [String] Defaults to USD (cents) if not passed.
2885
+ #
2886
+ # @param do_not_invoice [Boolean] This field is only applicable to commit invoice schedules. If true, this schedul
2887
+ #
2888
+ # @param recurring_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule] Enter the unit price and quantity for the charge or instead only send the amount
2889
+ #
2890
+ # @param schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::ScheduleItem>] Either provide amount or provide both unit_price and quantity.
2891
+
2892
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule#recurring_schedule
2893
+ class RecurringSchedule < MetronomeSDK::Internal::Type::BaseModel
2894
+ # @!attribute amount_distribution
2895
+ #
2896
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution]
2897
+ required :amount_distribution,
2898
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution }
2899
+
2900
+ # @!attribute ending_before
2901
+ # RFC 3339 timestamp (exclusive).
2902
+ #
2903
+ # @return [Time]
2904
+ required :ending_before, Time
2905
+
2906
+ # @!attribute frequency
2907
+ #
2908
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::Frequency]
2909
+ required :frequency,
2910
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::Frequency }
2911
+
2912
+ # @!attribute starting_at
2913
+ # RFC 3339 timestamp (inclusive).
2914
+ #
2915
+ # @return [Time]
2916
+ required :starting_at, Time
2917
+
2918
+ # @!attribute amount
2919
+ # Amount for the charge. Can be provided instead of unit_price and quantity. If
2920
+ # amount is sent, the unit_price is assumed to be the amount and quantity is
2921
+ # inferred to be 1.
2922
+ #
2923
+ # @return [Float, nil]
2924
+ optional :amount, Float
2925
+
2926
+ # @!attribute quantity
2927
+ # Quantity for the charge. Will be multiplied by unit_price to determine the
2928
+ # amount and must be specified with unit_price. If specified amount cannot be
2929
+ # provided.
2930
+ #
2931
+ # @return [Float, nil]
2932
+ optional :quantity, Float
2933
+
2934
+ # @!attribute unit_price
2935
+ # Unit price for the charge. Will be multiplied by quantity to determine the
2936
+ # amount and must be specified with quantity. If specified amount cannot be
2937
+ # provided.
2938
+ #
2939
+ # @return [Float, nil]
2940
+ optional :unit_price, Float
2941
+
2942
+ # @!method initialize(amount_distribution:, ending_before:, frequency:, starting_at:, amount: nil, quantity: nil, unit_price: nil)
2943
+ # Some parameter documentations has been truncated, see
2944
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule}
2945
+ # for more details.
2946
+ #
2947
+ # Enter the unit price and quantity for the charge or instead only send the
2948
+ # amount. If amount is sent, the unit price is assumed to be the amount and
2949
+ # quantity is inferred to be 1.
2950
+ #
2951
+ # @param amount_distribution [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution]
2952
+ #
2953
+ # @param ending_before [Time] RFC 3339 timestamp (exclusive).
2954
+ #
2955
+ # @param frequency [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule::Frequency]
2956
+ #
2957
+ # @param starting_at [Time] RFC 3339 timestamp (inclusive).
2958
+ #
2959
+ # @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
2960
+ #
2961
+ # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
2962
+ #
2963
+ # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
2964
+
2965
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule#amount_distribution
2966
+ module AmountDistribution
2967
+ extend MetronomeSDK::Internal::Type::Enum
2968
+
2969
+ DIVIDED = :DIVIDED
2970
+ DIVIDED_ROUNDED = :DIVIDED_ROUNDED
2971
+ EACH = :EACH
2972
+
2973
+ # @!method self.values
2974
+ # @return [Array<Symbol>]
2975
+ end
2976
+
2977
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::RecurringSchedule#frequency
2978
+ module Frequency
2979
+ extend MetronomeSDK::Internal::Type::Enum
2980
+
2981
+ MONTHLY = :MONTHLY
2982
+ QUARTERLY = :QUARTERLY
2983
+ SEMI_ANNUAL = :SEMI_ANNUAL
2984
+ ANNUAL = :ANNUAL
2985
+ WEEKLY = :WEEKLY
2986
+
2987
+ # @!method self.values
2988
+ # @return [Array<Symbol>]
2989
+ end
2990
+ end
2991
+
2992
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
2993
+ # @!attribute timestamp
2994
+ # timestamp of the scheduled event
2995
+ #
2996
+ # @return [Time]
2997
+ required :timestamp, Time
2998
+
2999
+ # @!attribute amount
3000
+ # Amount for the charge. Can be provided instead of unit_price and quantity. If
3001
+ # amount is sent, the unit_price is assumed to be the amount and quantity is
3002
+ # inferred to be 1.
3003
+ #
3004
+ # @return [Float, nil]
3005
+ optional :amount, Float
3006
+
3007
+ # @!attribute quantity
3008
+ # Quantity for the charge. Will be multiplied by unit_price to determine the
3009
+ # amount and must be specified with unit_price. If specified amount cannot be
3010
+ # provided.
3011
+ #
3012
+ # @return [Float, nil]
3013
+ optional :quantity, Float
3014
+
3015
+ # @!attribute unit_price
3016
+ # Unit price for the charge. Will be multiplied by quantity to determine the
3017
+ # amount and must be specified with quantity. If specified amount cannot be
3018
+ # provided.
3019
+ #
3020
+ # @return [Float, nil]
3021
+ optional :unit_price, Float
3022
+
3023
+ # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
3024
+ # Some parameter documentations has been truncated, see
3025
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateDiscount::Schedule::ScheduleItem}
3026
+ # for more details.
3027
+ #
3028
+ # @param timestamp [Time] timestamp of the scheduled event
3029
+ #
3030
+ # @param amount [Float] Amount for the charge. Can be provided instead of unit_price and quantity. If am
3031
+ #
3032
+ # @param quantity [Float] Quantity for the charge. Will be multiplied by unit_price to determine the amoun
3033
+ #
3034
+ # @param unit_price [Float] Unit price for the charge. Will be multiplied by quantity to determine the amoun
3035
+ end
3036
+ end
3037
+ end
3038
+
3039
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit#update_prepaid_balance_threshold_configuration
3040
+ class UpdatePrepaidBalanceThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3041
+ # @!attribute commit
3042
+ #
3043
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::Commit, nil]
3044
+ optional :commit,
3045
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::Commit }
3046
+
3047
+ # @!attribute custom_credit_type_id
3048
+ # If provided, the threshold, recharge-to amount, and the resulting threshold
3049
+ # commit amount will be in terms of this credit type instead of the fiat currency.
3050
+ #
3051
+ # @return [String, nil]
3052
+ optional :custom_credit_type_id, String, nil?: true
3053
+
3054
+ # @!attribute discount_configuration
3055
+ #
3056
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration, nil]
3057
+ optional :discount_configuration,
3058
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration },
3059
+ nil?: true
3060
+
3061
+ # @!attribute is_enabled
3062
+ # When set to false, the contract will not be evaluated against the
3063
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3064
+ # regardless of prior state.
3065
+ #
3066
+ # @return [Boolean, nil]
3067
+ optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
3068
+
3069
+ # @!attribute payment_gate_config
3070
+ #
3071
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
3072
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
3073
+
3074
+ # @!attribute recharge_to_amount
3075
+ # Specify the amount the balance should be recharged to.
3076
+ #
3077
+ # @return [Float, nil]
3078
+ optional :recharge_to_amount, Float
3079
+
3080
+ # @!attribute threshold_amount
3081
+ # Specify the threshold amount for the contract. Each time the contract's balance
3082
+ # lowers to this amount, a threshold charge will be initiated.
3083
+ #
3084
+ # @return [Float, nil]
3085
+ optional :threshold_amount, Float
3086
+
3087
+ # @!attribute threshold_balance_specifiers
3088
+ #
3089
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
3090
+ optional :threshold_balance_specifiers,
3091
+ -> do
3092
+ MetronomeSDK::Internal::Type::ArrayOf[
3093
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier
3094
+ ]
3095
+ end,
3096
+ nil?: true
3097
+
3098
+ # @!method initialize(commit: nil, custom_credit_type_id: nil, discount_configuration: nil, is_enabled: nil, payment_gate_config: nil, recharge_to_amount: nil, threshold_amount: nil, threshold_balance_specifiers: nil)
3099
+ # Some parameter documentations has been truncated, see
3100
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration}
3101
+ # for more details.
3102
+ #
3103
+ # @param commit [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::Commit]
3104
+ #
3105
+ # @param custom_credit_type_id [String, nil] If provided, the threshold, recharge-to amount, and the resulting threshold comm
3106
+ #
3107
+ # @param discount_configuration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration, nil]
3108
+ #
3109
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3110
+ #
3111
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
3112
+ #
3113
+ # @param recharge_to_amount [Float] Specify the amount the balance should be recharged to.
3114
+ #
3115
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's balance
3116
+ #
3117
+ # @param threshold_balance_specifiers [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
3118
+
3119
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration#commit
3120
+ class Commit < MetronomeSDK::Models::UpdateBaseThresholdCommit
3121
+ # @!attribute applicable_product_ids
3122
+ # Which products the threshold commit applies to. If both applicable_product_ids
3123
+ # and applicable_product_tags are not provided, the commit applies to all
3124
+ # products.
3125
+ #
3126
+ # @return [Array<String>, nil]
3127
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
3128
+
3129
+ # @!attribute applicable_product_tags
3130
+ # Which tags the threshold commit applies to. If both applicable_product_ids and
3131
+ # applicable_product_tags are not provided, the commit applies to all products.
3132
+ #
3133
+ # @return [Array<String>, nil]
3134
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
3135
+
3136
+ # @!attribute specifiers
3137
+ # List of filters that determine what kind of customer usage draws down a commit
3138
+ # or credit. A customer's usage needs to meet the condition of at least one of the
3139
+ # specifiers to contribute to a commit's or credit's drawdown. This field cannot
3140
+ # be used together with `applicable_product_ids` or `applicable_product_tags`.
3141
+ # Instead, to target usage by product or product tag, pass those values in the
3142
+ # body of `specifiers`.
3143
+ #
3144
+ # @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
3145
+ optional :specifiers,
3146
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
3147
+ nil?: true
3148
+
3149
+ # @!method initialize(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil)
3150
+ # Some parameter documentations has been truncated, see
3151
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::Commit}
3152
+ # for more details.
3153
+ #
3154
+ # @param applicable_product_ids [Array<String>, nil] Which products the threshold commit applies to. If both applicable_product_ids a
3155
+ #
3156
+ # @param applicable_product_tags [Array<String>, nil] Which tags the threshold commit applies to. If both applicable_product_ids and a
3157
+ #
3158
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil] List of filters that determine what kind of customer usage draws down a commit o
3159
+ end
3160
+
3161
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration#discount_configuration
3162
+ class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
3163
+ # @!attribute cap
3164
+ # Update the discount cap. Set to null to remove an existing cap.
3165
+ #
3166
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil]
3167
+ optional :cap,
3168
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap },
3169
+ nil?: true
3170
+
3171
+ # @!attribute payment_fraction
3172
+ # The fraction of the original amount that the customer pays after applying the
3173
+ # discount. Set to null to remove the discount fraction. For example, 0.85 means
3174
+ # the customer pays 85% of the original amount (a 15% discount).
3175
+ #
3176
+ # @return [Float, nil]
3177
+ optional :payment_fraction, Float, nil?: true
3178
+
3179
+ # @!method initialize(cap: nil, payment_fraction: nil)
3180
+ # Some parameter documentations has been truncated, see
3181
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration}
3182
+ # for more details.
3183
+ #
3184
+ # @param cap [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
3185
+ #
3186
+ # @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
3187
+
3188
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration#cap
3189
+ class Cap < MetronomeSDK::Internal::Type::BaseModel
3190
+ # @!attribute amount
3191
+ # Accumulated spend ceiling above which the discount stops applying.
3192
+ #
3193
+ # @return [Float]
3194
+ required :amount, Float
3195
+
3196
+ # @!attribute spend_tracker_alias
3197
+ # Alias of the spend tracker this cap is measured against.
3198
+ #
3199
+ # @return [String]
3200
+ required :spend_tracker_alias, String
3201
+
3202
+ # @!method initialize(amount:, spend_tracker_alias:)
3203
+ # Update the discount cap. Set to null to remove an existing cap.
3204
+ #
3205
+ # @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
3206
+ #
3207
+ # @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
3208
+ end
3209
+ end
3210
+
3211
+ class ThresholdBalanceSpecifier < MetronomeSDK::Internal::Type::BaseModel
3212
+ # @!attribute exclude
3213
+ #
3214
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
3215
+ required :exclude,
3216
+ -> do
3217
+ MetronomeSDK::Internal::Type::ArrayOf[
3218
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude
3219
+ ]
3220
+ end
3221
+
3222
+ # @!method initialize(exclude:)
3223
+ # @param exclude [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
3224
+
3225
+ class Exclude < MetronomeSDK::Internal::Type::BaseModel
3226
+ # @!attribute custom_field_filters
3227
+ #
3228
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
3229
+ required :custom_field_filters,
3230
+ -> do
3231
+ MetronomeSDK::Internal::Type::ArrayOf[
3232
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter
3233
+ ]
3234
+ end
3235
+
3236
+ # @!method initialize(custom_field_filters:)
3237
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
3238
+
3239
+ class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
3240
+ # @!attribute entity
3241
+ #
3242
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
3243
+ required :entity,
3244
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity }
3245
+
3246
+ # @!attribute key
3247
+ #
3248
+ # @return [String]
3249
+ required :key, String
3250
+
3251
+ # @!attribute value
3252
+ #
3253
+ # @return [String]
3254
+ required :value, String
3255
+
3256
+ # @!method initialize(entity:, key:, value:)
3257
+ # @param entity [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
3258
+ # @param key [String]
3259
+ # @param value [String]
3260
+
3261
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter#entity
3262
+ module Entity
3263
+ extend MetronomeSDK::Internal::Type::Enum
3264
+
3265
+ COMMIT = :Commit
3266
+ CONTRACT_CREDIT = :ContractCredit
3267
+ CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
3268
+
3269
+ # @!method self.values
3270
+ # @return [Array<Symbol>]
3271
+ end
3272
+ end
3273
+ end
3274
+ end
3275
+ end
3276
+
3277
+ class UpdateRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
3278
+ # @!attribute id
3279
+ #
3280
+ # @return [String]
3281
+ required :id, String
3282
+
3283
+ # @!attribute access_amount
3284
+ #
3285
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::AccessAmount, nil]
3286
+ optional :access_amount,
3287
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::AccessAmount }
3288
+
3289
+ # @!attribute ending_before
3290
+ #
3291
+ # @return [Time, nil]
3292
+ optional :ending_before, Time
3293
+
3294
+ # @!attribute invoice_amount
3295
+ #
3296
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::InvoiceAmount, nil]
3297
+ optional :invoice_amount,
3298
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::InvoiceAmount }
3299
+
3300
+ # @!attribute rate_type
3301
+ #
3302
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::RateType, nil]
3303
+ optional :rate_type,
3304
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::RateType }
3305
+
3306
+ # @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil, rate_type: nil)
3307
+ # @param id [String]
3308
+ # @param access_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::AccessAmount]
3309
+ # @param ending_before [Time]
3310
+ # @param invoice_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::InvoiceAmount]
3311
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit::RateType]
3312
+
3313
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit#access_amount
3314
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3315
+ # @!attribute quantity
3316
+ #
3317
+ # @return [Float, nil]
3318
+ optional :quantity, Float
3319
+
3320
+ # @!attribute unit_price
3321
+ #
3322
+ # @return [Float, nil]
3323
+ optional :unit_price, Float
3324
+
3325
+ # @!method initialize(quantity: nil, unit_price: nil)
3326
+ # @param quantity [Float]
3327
+ # @param unit_price [Float]
3328
+ end
3329
+
3330
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit#invoice_amount
3331
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
3332
+ # @!attribute quantity
3333
+ #
3334
+ # @return [Float, nil]
3335
+ optional :quantity, Float
3336
+
3337
+ # @!attribute unit_price
3338
+ #
3339
+ # @return [Float, nil]
3340
+ optional :unit_price, Float
3341
+
3342
+ # @!method initialize(quantity: nil, unit_price: nil)
3343
+ # @param quantity [Float]
3344
+ # @param unit_price [Float]
3345
+ end
3346
+
3347
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCommit#rate_type
3348
+ module RateType
3349
+ extend MetronomeSDK::Internal::Type::Enum
3350
+
3351
+ LIST_RATE = :LIST_RATE
3352
+ COMMIT_RATE = :COMMIT_RATE
3353
+
3354
+ # @!method self.values
3355
+ # @return [Array<Symbol>]
3356
+ end
3357
+ end
3358
+
3359
+ class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
3360
+ # @!attribute id
3361
+ #
3362
+ # @return [String]
3363
+ required :id, String
3364
+
3365
+ # @!attribute access_amount
3366
+ #
3367
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::AccessAmount, nil]
3368
+ optional :access_amount,
3369
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::AccessAmount }
3370
+
3371
+ # @!attribute ending_before
3372
+ #
3373
+ # @return [Time, nil]
3374
+ optional :ending_before, Time
3375
+
3376
+ # @!attribute rate_type
3377
+ #
3378
+ # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::RateType, nil]
3379
+ optional :rate_type,
3380
+ enum: -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::RateType }
3381
+
3382
+ # @!method initialize(id:, access_amount: nil, ending_before: nil, rate_type: nil)
3383
+ # @param id [String]
3384
+ # @param access_amount [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::AccessAmount]
3385
+ # @param ending_before [Time]
3386
+ # @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit::RateType]
3387
+
3388
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit#access_amount
3389
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
3390
+ # @!attribute quantity
3391
+ #
3392
+ # @return [Float, nil]
3393
+ optional :quantity, Float
3394
+
3395
+ # @!attribute unit_price
3396
+ #
3397
+ # @return [Float, nil]
3398
+ optional :unit_price, Float
3399
+
3400
+ # @!method initialize(quantity: nil, unit_price: nil)
3401
+ # @param quantity [Float]
3402
+ # @param unit_price [Float]
3403
+ end
3404
+
3405
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateRecurringCredit#rate_type
3406
+ module RateType
3407
+ extend MetronomeSDK::Internal::Type::Enum
3408
+
3409
+ LIST_RATE = :LIST_RATE
3410
+ COMMIT_RATE = :COMMIT_RATE
3411
+
3412
+ # @!method self.values
3413
+ # @return [Array<Symbol>]
3414
+ end
3415
+ end
3416
+
3417
+ class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
3418
+ # @!attribute date
3419
+ #
3420
+ # @return [Time]
3421
+ required :date, Time
3422
+
3423
+ # @!attribute invoice_id
3424
+ #
3425
+ # @return [String]
3426
+ required :invoice_id, String
3427
+
3428
+ # @!method initialize(date:, invoice_id:)
3429
+ # @param date [Time]
3430
+ # @param invoice_id [String]
3431
+ end
3432
+
3433
+ class UpdateScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
3434
+ # @!attribute id
3435
+ #
3436
+ # @return [String]
3437
+ required :id, String
3438
+
3439
+ # @!attribute invoice_schedule
3440
+ #
3441
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule, nil]
3442
+ optional :invoice_schedule,
3443
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule }
3444
+
3445
+ # @!attribute name
3446
+ #
3447
+ # @return [String, nil]
3448
+ optional :name, String
3449
+
3450
+ # @!attribute netsuite_sales_order_id
3451
+ #
3452
+ # @return [String, nil]
3453
+ optional :netsuite_sales_order_id, String, nil?: true
3454
+
3455
+ # @!method initialize(id:, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil)
3456
+ # @param id [String]
3457
+ # @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule]
3458
+ # @param name [String]
3459
+ # @param netsuite_sales_order_id [String, nil]
3460
+
3461
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge#invoice_schedule
3462
+ class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
3463
+ # @!attribute add_schedule_items
3464
+ #
3465
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>, nil]
3466
+ optional :add_schedule_items,
3467
+ -> do
3468
+ MetronomeSDK::Internal::Type::ArrayOf[
3469
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem
3470
+ ]
3471
+ end
3472
+
3473
+ # @!attribute remove_schedule_items
3474
+ #
3475
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem>, nil]
3476
+ optional :remove_schedule_items,
3477
+ -> do
3478
+ MetronomeSDK::Internal::Type::ArrayOf[
3479
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem
3480
+ ]
3481
+ end
3482
+
3483
+ # @!attribute update_schedule_items
3484
+ #
3485
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem>, nil]
3486
+ optional :update_schedule_items,
3487
+ -> do
3488
+ MetronomeSDK::Internal::Type::ArrayOf[
3489
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem
3490
+ ]
3491
+ end
3492
+
3493
+ # @!method initialize(add_schedule_items: nil, remove_schedule_items: nil, update_schedule_items: nil)
3494
+ # @param add_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::AddScheduleItem>]
3495
+ # @param remove_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::RemoveScheduleItem>]
3496
+ # @param update_schedule_items [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateScheduledCharge::InvoiceSchedule::UpdateScheduleItem>]
3497
+
3498
+ class AddScheduleItem < MetronomeSDK::Internal::Type::BaseModel
3499
+ # @!attribute timestamp
3500
+ #
3501
+ # @return [Time]
3502
+ required :timestamp, Time
3503
+
3504
+ # @!attribute amount
3505
+ #
3506
+ # @return [Float, nil]
3507
+ optional :amount, Float
3508
+
3509
+ # @!attribute quantity
3510
+ #
3511
+ # @return [Float, nil]
3512
+ optional :quantity, Float
3513
+
3514
+ # @!attribute unit_price
3515
+ #
3516
+ # @return [Float, nil]
3517
+ optional :unit_price, Float
3518
+
3519
+ # @!method initialize(timestamp:, amount: nil, quantity: nil, unit_price: nil)
3520
+ # @param timestamp [Time]
3521
+ # @param amount [Float]
3522
+ # @param quantity [Float]
3523
+ # @param unit_price [Float]
3524
+ end
3525
+
3526
+ class RemoveScheduleItem < MetronomeSDK::Internal::Type::BaseModel
3527
+ # @!attribute id
3528
+ #
3529
+ # @return [String]
3530
+ required :id, String
3531
+
3532
+ # @!method initialize(id:)
3533
+ # @param id [String]
3534
+ end
3535
+
3536
+ class UpdateScheduleItem < MetronomeSDK::Internal::Type::BaseModel
3537
+ # @!attribute id
3538
+ #
3539
+ # @return [String]
3540
+ required :id, String
3541
+
3542
+ # @!attribute amount
3543
+ #
3544
+ # @return [Float, nil]
3545
+ optional :amount, Float
3546
+
3547
+ # @!attribute quantity
3548
+ #
3549
+ # @return [Float, nil]
3550
+ optional :quantity, Float
3551
+
3552
+ # @!attribute timestamp
3553
+ #
3554
+ # @return [Time, nil]
3555
+ optional :timestamp, Time
3556
+
3557
+ # @!attribute unit_price
3558
+ #
3559
+ # @return [Float, nil]
3560
+ optional :unit_price, Float
3561
+
3562
+ # @!method initialize(id:, amount: nil, quantity: nil, timestamp: nil, unit_price: nil)
3563
+ # @param id [String]
3564
+ # @param amount [Float]
3565
+ # @param quantity [Float]
3566
+ # @param timestamp [Time]
3567
+ # @param unit_price [Float]
3568
+ end
3569
+ end
3570
+ end
3571
+
3572
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit#update_spend_threshold_configuration
3573
+ class UpdateSpendThresholdConfiguration < MetronomeSDK::Internal::Type::BaseModel
3574
+ # @!attribute commit
3575
+ #
3576
+ # @return [MetronomeSDK::Models::UpdateBaseThresholdCommit, nil]
3577
+ optional :commit, -> { MetronomeSDK::UpdateBaseThresholdCommit }
3578
+
3579
+ # @!attribute discount_configuration
3580
+ #
3581
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration, nil]
3582
+ optional :discount_configuration,
3583
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration },
3584
+ nil?: true
3585
+
3586
+ # @!attribute is_enabled
3587
+ # When set to false, the contract will not be evaluated against the
3588
+ # threshold_amount. Toggling to true will result an immediate evaluation,
3589
+ # regardless of prior state.
3590
+ #
3591
+ # @return [Boolean, nil]
3592
+ optional :is_enabled, MetronomeSDK::Internal::Type::Boolean
3593
+
3594
+ # @!attribute payment_gate_config
3595
+ #
3596
+ # @return [MetronomeSDK::Models::PaymentGateConfigV2, nil]
3597
+ optional :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }
3598
+
3599
+ # @!attribute threshold_amount
3600
+ # Specify the threshold amount for the contract. Each time the contract's usage
3601
+ # hits this amount, a threshold charge will be initiated.
3602
+ #
3603
+ # @return [Float, nil]
3604
+ optional :threshold_amount, Float
3605
+
3606
+ # @!method initialize(commit: nil, discount_configuration: nil, is_enabled: nil, payment_gate_config: nil, threshold_amount: nil)
3607
+ # Some parameter documentations has been truncated, see
3608
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration}
3609
+ # for more details.
3610
+ #
3611
+ # @param commit [MetronomeSDK::Models::UpdateBaseThresholdCommit]
3612
+ #
3613
+ # @param discount_configuration [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration, nil]
3614
+ #
3615
+ # @param is_enabled [Boolean] When set to false, the contract will not be evaluated against the threshold_amou
3616
+ #
3617
+ # @param payment_gate_config [MetronomeSDK::Models::PaymentGateConfigV2]
3618
+ #
3619
+ # @param threshold_amount [Float] Specify the threshold amount for the contract. Each time the contract's usage hi
3620
+
3621
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration#discount_configuration
3622
+ class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
3623
+ # @!attribute cap
3624
+ # Update the discount cap. Set to null to remove an existing cap.
3625
+ #
3626
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil]
3627
+ optional :cap,
3628
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap },
3629
+ nil?: true
3630
+
3631
+ # @!attribute payment_fraction
3632
+ # The fraction of the original amount that the customer pays after applying the
3633
+ # discount. Set to null to remove the discount fraction. For example, 0.85 means
3634
+ # the customer pays 85% of the original amount (a 15% discount).
3635
+ #
3636
+ # @return [Float, nil]
3637
+ optional :payment_fraction, Float, nil?: true
3638
+
3639
+ # @!method initialize(cap: nil, payment_fraction: nil)
3640
+ # Some parameter documentations has been truncated, see
3641
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration}
3642
+ # for more details.
3643
+ #
3644
+ # @param cap [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration::Cap, nil] Update the discount cap. Set to null to remove an existing cap.
3645
+ #
3646
+ # @param payment_fraction [Float, nil] The fraction of the original amount that the customer pays after applying the di
3647
+
3648
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSpendThresholdConfiguration::DiscountConfiguration#cap
3649
+ class Cap < MetronomeSDK::Internal::Type::BaseModel
3650
+ # @!attribute amount
3651
+ # Accumulated spend ceiling above which the discount stops applying.
3652
+ #
3653
+ # @return [Float]
3654
+ required :amount, Float
3655
+
3656
+ # @!attribute spend_tracker_alias
3657
+ # Alias of the spend tracker this cap is measured against.
3658
+ #
3659
+ # @return [String]
3660
+ required :spend_tracker_alias, String
3661
+
3662
+ # @!method initialize(amount:, spend_tracker_alias:)
3663
+ # Update the discount cap. Set to null to remove an existing cap.
3664
+ #
3665
+ # @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
3666
+ #
3667
+ # @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
3668
+ end
3669
+ end
3670
+ end
3671
+
3672
+ class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel
3673
+ # @!attribute id
3674
+ #
3675
+ # @return [String]
3676
+ required :id, String
3677
+
3678
+ # @!attribute ending_before
3679
+ #
3680
+ # @return [Time, nil]
3681
+ optional :ending_before, Time
3682
+
3683
+ # @!attribute quantity_updates
3684
+ #
3685
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::QuantityUpdate>, nil]
3686
+ optional :quantity_updates,
3687
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::QuantityUpdate] }
3688
+
3689
+ # @!attribute seat_updates
3690
+ # Manage subscription seats for subscriptions in SEAT_BASED mode.
3691
+ #
3692
+ # @return [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates, nil]
3693
+ optional :seat_updates,
3694
+ -> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates }
3695
+
3696
+ # @!method initialize(id:, ending_before: nil, quantity_updates: nil, seat_updates: nil)
3697
+ # @param id [String]
3698
+ #
3699
+ # @param ending_before [Time]
3700
+ #
3701
+ # @param quantity_updates [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::QuantityUpdate>]
3702
+ #
3703
+ # @param seat_updates [MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates] Manage subscription seats for subscriptions in SEAT_BASED mode.
3704
+
3705
+ class QuantityUpdate < MetronomeSDK::Internal::Type::BaseModel
3706
+ # @!attribute starting_at
3707
+ #
3708
+ # @return [Time]
3709
+ required :starting_at, Time
3710
+
3711
+ # @!attribute quantity
3712
+ #
3713
+ # @return [Float, nil]
3714
+ optional :quantity, Float
3715
+
3716
+ # @!attribute quantity_delta
3717
+ #
3718
+ # @return [Float, nil]
3719
+ optional :quantity_delta, Float
3720
+
3721
+ # @!method initialize(starting_at:, quantity: nil, quantity_delta: nil)
3722
+ # @param starting_at [Time]
3723
+ # @param quantity [Float]
3724
+ # @param quantity_delta [Float]
3725
+ end
3726
+
3727
+ # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription#seat_updates
3728
+ class SeatUpdates < MetronomeSDK::Internal::Type::BaseModel
3729
+ # @!attribute add_seat_ids
3730
+ # Adds seat IDs to the subscription. If there are unassigned seats, the new seat
3731
+ # IDs will fill these unassigned seats and not increase the total subscription
3732
+ # quantity. Otherwise, if there are more new seat IDs than unassigned seats, the
3733
+ # total subscription quantity will increase.
3734
+ #
3735
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddSeatID>, nil]
3736
+ optional :add_seat_ids,
3737
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddSeatID] }
3738
+
3739
+ # @!attribute add_unassigned_seats
3740
+ # Adds unassigned seats to the subscription. This will increase the total
3741
+ # subscription quantity.
3742
+ #
3743
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddUnassignedSeat>, nil]
3744
+ optional :add_unassigned_seats,
3745
+ -> do
3746
+ MetronomeSDK::Internal::Type::ArrayOf[
3747
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddUnassignedSeat
3748
+ ]
3749
+ end
3750
+
3751
+ # @!attribute remove_seat_ids
3752
+ # Removes seat IDs from the subscription, if possible. If a seat ID is removed,
3753
+ # the total subscription quantity will decrease. Otherwise, if the seat ID is not
3754
+ # found on the subscription, this is a no-op.
3755
+ #
3756
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveSeatID>, nil]
3757
+ optional :remove_seat_ids,
3758
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveSeatID] }
3759
+
3760
+ # @!attribute remove_unassigned_seats
3761
+ # Removes unassigned seats from the subscription. This will decrease the total
3762
+ # subscription quantity if there are are unassigned seats.
3763
+ #
3764
+ # @return [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveUnassignedSeat>, nil]
3765
+ optional :remove_unassigned_seats,
3766
+ -> do
3767
+ MetronomeSDK::Internal::Type::ArrayOf[
3768
+ MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveUnassignedSeat
3769
+ ]
3770
+ end
3771
+
3772
+ # @!method initialize(add_seat_ids: nil, add_unassigned_seats: nil, remove_seat_ids: nil, remove_unassigned_seats: nil)
3773
+ # Some parameter documentations has been truncated, see
3774
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates}
3775
+ # for more details.
3776
+ #
3777
+ # Manage subscription seats for subscriptions in SEAT_BASED mode.
3778
+ #
3779
+ # @param add_seat_ids [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddSeatID>] Adds seat IDs to the subscription. If there are unassigned seats, the new seat
3780
+ #
3781
+ # @param add_unassigned_seats [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddUnassignedSeat>] Adds unassigned seats to the subscription. This will increase the total subscrip
3782
+ #
3783
+ # @param remove_seat_ids [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveSeatID>] Removes seat IDs from the subscription, if possible. If a seat ID is removed, t
3784
+ #
3785
+ # @param remove_unassigned_seats [Array<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveUnassignedSeat>] Removes unassigned seats from the subscription. This will decrease the total sub
3786
+
3787
+ class AddSeatID < MetronomeSDK::Internal::Type::BaseModel
3788
+ # @!attribute seat_ids
3789
+ #
3790
+ # @return [Array<String>]
3791
+ required :seat_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3792
+
3793
+ # @!attribute starting_at
3794
+ # Assigned seats will be added/removed starting at this date.
3795
+ #
3796
+ # @return [Time]
3797
+ required :starting_at, Time
3798
+
3799
+ # @!method initialize(seat_ids:, starting_at:)
3800
+ # @param seat_ids [Array<String>]
3801
+ #
3802
+ # @param starting_at [Time] Assigned seats will be added/removed starting at this date.
3803
+ end
3804
+
3805
+ class AddUnassignedSeat < MetronomeSDK::Internal::Type::BaseModel
3806
+ # @!attribute quantity
3807
+ # The number of unassigned seats on the subscription will increase/decrease by
3808
+ # this delta. Must be greater than 0.
3809
+ #
3810
+ # @return [Float]
3811
+ required :quantity, Float
3812
+
3813
+ # @!attribute starting_at
3814
+ # Unassigned seats will be updated starting at this date.
3815
+ #
3816
+ # @return [Time]
3817
+ required :starting_at, Time
3818
+
3819
+ # @!method initialize(quantity:, starting_at:)
3820
+ # Some parameter documentations has been truncated, see
3821
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::AddUnassignedSeat}
3822
+ # for more details.
3823
+ #
3824
+ # @param quantity [Float] The number of unassigned seats on the subscription will increase/decrease by thi
3825
+ #
3826
+ # @param starting_at [Time] Unassigned seats will be updated starting at this date.
3827
+ end
3828
+
3829
+ class RemoveSeatID < MetronomeSDK::Internal::Type::BaseModel
3830
+ # @!attribute seat_ids
3831
+ #
3832
+ # @return [Array<String>]
3833
+ required :seat_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
3834
+
3835
+ # @!attribute starting_at
3836
+ # Assigned seats will be added/removed starting at this date.
3837
+ #
3838
+ # @return [Time]
3839
+ required :starting_at, Time
3840
+
3841
+ # @!method initialize(seat_ids:, starting_at:)
3842
+ # @param seat_ids [Array<String>]
3843
+ #
3844
+ # @param starting_at [Time] Assigned seats will be added/removed starting at this date.
3845
+ end
3846
+
3847
+ class RemoveUnassignedSeat < MetronomeSDK::Internal::Type::BaseModel
3848
+ # @!attribute quantity
3849
+ # The number of unassigned seats on the subscription will increase/decrease by
3850
+ # this delta. Must be greater than 0.
3851
+ #
3852
+ # @return [Float]
3853
+ required :quantity, Float
3854
+
3855
+ # @!attribute starting_at
3856
+ # Unassigned seats will be updated starting at this date.
3857
+ #
3858
+ # @return [Time]
3859
+ required :starting_at, Time
3860
+
3861
+ # @!method initialize(quantity:, starting_at:)
3862
+ # Some parameter documentations has been truncated, see
3863
+ # {MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdateSubscription::SeatUpdates::RemoveUnassignedSeat}
3864
+ # for more details.
3865
+ #
3866
+ # @param quantity [Float] The number of unassigned seats on the subscription will increase/decrease by thi
3867
+ #
3868
+ # @param starting_at [Time] Unassigned seats will be updated starting at this date.
3869
+ end
3870
+ end
3871
+ end
3872
+ end
3873
+ end
15
3874
  end
16
3875
  end
17
3876
  end