metronome-sdk 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
  5. data/lib/metronome_sdk/models/commit.rb +10 -1
  6. data/lib/metronome_sdk/models/contract_v2.rb +290 -7
  7. data/lib/metronome_sdk/models/contract_without_amendments.rb +178 -4
  8. data/lib/metronome_sdk/models/credit.rb +10 -1
  9. data/lib/metronome_sdk/models/override.rb +7 -1
  10. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +10 -2
  11. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +3 -1
  12. data/lib/metronome_sdk/models/subscription.rb +90 -2
  13. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  14. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +17 -4
  15. data/lib/metronome_sdk/models/v1/contract_create_params.rb +290 -10
  16. data/lib/metronome_sdk/models/v1/contract_create_response.rb +178 -4
  17. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  18. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  19. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  20. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  21. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  22. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  23. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  24. data/lib/metronome_sdk/models/v1/package_create_params.rb +279 -10
  25. data/lib/metronome_sdk/models/v1/package_list_response.rb +264 -7
  26. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +264 -7
  27. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +515 -9
  28. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +456 -8
  29. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +456 -8
  30. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  31. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  32. data/lib/metronome_sdk/resources/v1/contracts.rb +68 -1
  33. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  34. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  35. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  36. data/lib/metronome_sdk/version.rb +1 -1
  37. data/lib/metronome_sdk.rb +2 -0
  38. data/rbi/metronome_sdk/models/commit.rbi +13 -0
  39. data/rbi/metronome_sdk/models/contract_v2.rbi +715 -3
  40. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +463 -0
  41. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  42. data/rbi/metronome_sdk/models/override.rbi +9 -0
  43. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +11 -1
  44. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +4 -0
  45. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  46. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  47. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +27 -6
  48. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +719 -9
  49. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +463 -0
  50. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  51. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  52. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  53. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  54. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  55. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  56. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  57. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +706 -9
  58. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +693 -3
  59. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +693 -3
  60. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1333 -40
  61. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +1204 -67
  62. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1204 -67
  63. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  64. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  65. data/rbi/metronome_sdk/resources/v1/contracts.rbi +70 -0
  66. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  67. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  68. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  69. data/sig/metronome_sdk/models/commit.rbs +7 -0
  70. data/sig/metronome_sdk/models/contract_v2.rbs +278 -5
  71. data/sig/metronome_sdk/models/contract_without_amendments.rbs +169 -2
  72. data/sig/metronome_sdk/models/credit.rbs +7 -0
  73. data/sig/metronome_sdk/models/override.rbs +7 -0
  74. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  75. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  76. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +7 -0
  77. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +278 -5
  78. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +167 -2
  79. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  80. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  81. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  82. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  83. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  84. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  85. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  86. data/sig/metronome_sdk/models/v1/package_create_params.rbs +271 -5
  87. data/sig/metronome_sdk/models/v1/package_list_response.rbs +265 -5
  88. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +263 -5
  89. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +468 -5
  90. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +428 -5
  91. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +427 -5
  92. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  93. data/sig/metronome_sdk/resources/v1/contracts.rbs +13 -0
  94. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  95. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  96. metadata +8 -2
@@ -69,11 +69,20 @@ module MetronomeSDK
69
69
  required :type, enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::Type }
70
70
 
71
71
  # @!attribute updated_at
72
- # Timestamp for when the threshold notification was last updated
72
+ # Timestamp for when the threshold notification's customer status was last updated
73
73
  #
74
74
  # @return [Time]
75
75
  required :updated_at, Time
76
76
 
77
+ # @!attribute alert_specifiers
78
+ # Present for `low_remaining_contract_credit_and_commit_balance_reached`
79
+ # notifications. The filters that define the balances that are considered when
80
+ # evaluating the alert.
81
+ #
82
+ # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier>, nil]
83
+ optional :alert_specifiers,
84
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier] }
85
+
77
86
  # @!attribute credit_grant_type_filters
78
87
  # An array of strings, representing a way to filter the credit grant this
79
88
  # threshold notification applies to, by looking at the credit_grant_type field on
@@ -133,7 +142,7 @@ module MetronomeSDK
133
142
  # @return [String, nil]
134
143
  optional :uniqueness_key, String
135
144
 
136
- # @!method initialize(id:, name:, status:, threshold:, type:, updated_at:, credit_grant_type_filters: nil, credit_type: nil, custom_field_filters: nil, group_key_filter: nil, group_values: nil, invoice_types_filter: nil, seat_filter: nil, uniqueness_key: nil)
145
+ # @!method initialize(id:, name:, status:, threshold:, type:, updated_at:, alert_specifiers: nil, credit_grant_type_filters: nil, credit_type: nil, custom_field_filters: nil, group_key_filter: nil, group_values: nil, invoice_types_filter: nil, seat_filter: nil, uniqueness_key: nil)
137
146
  # Some parameter documentations has been truncated, see
138
147
  # {MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert} for more details.
139
148
  #
@@ -147,7 +156,9 @@ module MetronomeSDK
147
156
  #
148
157
  # @param type [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Type] Type of the threshold notification
149
158
  #
150
- # @param updated_at [Time] Timestamp for when the threshold notification was last updated
159
+ # @param updated_at [Time] Timestamp for when the threshold notification's customer status was last updated
160
+ #
161
+ # @param alert_specifiers [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier>] Present for `low_remaining_contract_credit_and_commit_balance_reached` notificat
151
162
  #
152
163
  # @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
153
164
  #
@@ -207,6 +218,122 @@ module MetronomeSDK
207
218
  # @return [Array<Symbol>]
208
219
  end
209
220
 
221
+ class AlertSpecifier < MetronomeSDK::Internal::Type::BaseModel
222
+ # @!attribute custom_field_filters
223
+ # A list of custom field filters for notification types that support advanced
224
+ # filtering
225
+ #
226
+ # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter>, nil]
227
+ optional :custom_field_filters,
228
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter] }
229
+
230
+ # @!attribute exclude
231
+ # If provided, the specifier will not apply to balances that matches the inclusion
232
+ # criteria and any of the excluding values.
233
+ #
234
+ # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude>, nil]
235
+ optional :exclude,
236
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude] }
237
+
238
+ # @!method initialize(custom_field_filters: nil, exclude: nil)
239
+ # Some parameter documentations has been truncated, see
240
+ # {MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier} for
241
+ # more details.
242
+ #
243
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter>] A list of custom field filters for notification types that support advanced filt
244
+ #
245
+ # @param exclude [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude>] If provided, the specifier will not apply to balances that matches the inclusion
246
+
247
+ class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
248
+ # @!attribute entity
249
+ #
250
+ # @return [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter::Entity]
251
+ required :entity,
252
+ enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter::Entity }
253
+
254
+ # @!attribute key
255
+ #
256
+ # @return [String]
257
+ required :key, String
258
+
259
+ # @!attribute value
260
+ #
261
+ # @return [String, nil]
262
+ optional :value, String
263
+
264
+ # @!method initialize(entity:, key:, value: nil)
265
+ # @param entity [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter::Entity]
266
+ # @param key [String]
267
+ # @param value [String]
268
+
269
+ # @see MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::CustomFieldFilter#entity
270
+ module Entity
271
+ extend MetronomeSDK::Internal::Type::Enum
272
+
273
+ CONTRACT = :Contract
274
+ COMMIT = :Commit
275
+ CONTRACT_CREDIT = :ContractCredit
276
+ CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
277
+
278
+ # @!method self.values
279
+ # @return [Array<Symbol>]
280
+ end
281
+ end
282
+
283
+ class Exclude < MetronomeSDK::Internal::Type::BaseModel
284
+ # @!attribute custom_field_filters
285
+ # A list of custom field filters for notification types that support advanced
286
+ # filtering
287
+ #
288
+ # @return [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter>, nil]
289
+ optional :custom_field_filters,
290
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter] }
291
+
292
+ # @!method initialize(custom_field_filters: nil)
293
+ # Some parameter documentations has been truncated, see
294
+ # {MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude}
295
+ # for more details.
296
+ #
297
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter>] A list of custom field filters for notification types that support advanced filt
298
+
299
+ class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
300
+ # @!attribute entity
301
+ #
302
+ # @return [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter::Entity]
303
+ required :entity,
304
+ enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter::Entity }
305
+
306
+ # @!attribute key
307
+ #
308
+ # @return [String]
309
+ required :key, String
310
+
311
+ # @!attribute value
312
+ #
313
+ # @return [String]
314
+ required :value, String
315
+
316
+ # @!method initialize(entity:, key:, value:)
317
+ # @param entity [Symbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter::Entity]
318
+ # @param key [String]
319
+ # @param value [String]
320
+
321
+ # @see MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier::Exclude::CustomFieldFilter#entity
322
+ module Entity
323
+ extend MetronomeSDK::Internal::Type::Enum
324
+
325
+ CONTRACT = :Contract
326
+ COMMIT = :Commit
327
+ CONTRACT_CREDIT = :ContractCredit
328
+ CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
329
+
330
+ # @!method self.values
331
+ # @return [Array<Symbol>]
332
+ end
333
+ end
334
+ end
335
+ end
336
+
210
337
  class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
211
338
  # @!attribute entity
212
339
  #
@@ -77,7 +77,14 @@ module MetronomeSDK
77
77
  # @return [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type, nil]
78
78
  optional :type, enum: -> { MetronomeSDK::V1::Customers::InvoiceListParams::Type }
79
79
 
80
- # @!method initialize(customer_id:, contract_id: nil, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, type: nil, request_options: {})
80
+ # @!attribute webhook_notification_id
81
+ # Indicates that this API request was triggered by a webhook notification with the
82
+ # provided ID.
83
+ #
84
+ # @return [String, nil]
85
+ optional :webhook_notification_id, String
86
+
87
+ # @!method initialize(customer_id:, contract_id: nil, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, type: nil, webhook_notification_id: nil, request_options: {})
81
88
  # Some parameter documentations has been truncated, see
82
89
  # {MetronomeSDK::Models::V1::Customers::InvoiceListParams} for more details.
83
90
  #
@@ -103,6 +110,8 @@ module MetronomeSDK
103
110
  #
104
111
  # @param type [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type] Filter invoices by type. Defaults to returning all invoice types.
105
112
  #
113
+ # @param webhook_notification_id [String] Indicates that this API request was triggered by a webhook notification with the
114
+ #
106
115
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
107
116
 
108
117
  # Invoice sort order by issued_at, e.g. date_asc or date_desc. Defaults to
@@ -143,6 +143,8 @@ module MetronomeSDK
143
143
  PRIMARY_RED = :Primary_red
144
144
  PROGRESS_BAR = :Progress_bar
145
145
  PROGRESS_BAR_BACKGROUND = :Progress_bar_background
146
+ ACTION = :Action
147
+ ACTION_HOVER = :Action_hover
146
148
 
147
149
  # @!method self.values
148
150
  # @return [Array<Symbol>]
@@ -922,9 +922,10 @@ module MetronomeSDK
922
922
 
923
923
  # @!attribute is_commit_specific
924
924
  # Indicates whether the override should only apply to commits. Defaults to
925
- # `false`. If `true`, you can specify relevant commits in `override_specifiers` by
926
- # passing `commit_ids`. if you do not specify `commit_ids`, then the override will
927
- # apply when consuming any prepaid or postpaid commit.
925
+ # `false`. If `true` you can specify relevant commits in `override_specifiers` by
926
+ # passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
927
+ # you do not specify any of these fields, the override will apply when consuming
928
+ # any prepaid commit, postpaid commit, or credit
928
929
  #
929
930
  # @return [Boolean, nil]
930
931
  optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
@@ -998,6 +999,16 @@ module MetronomeSDK
998
999
  # @param type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::Type] Overwrites are prioritized over multipliers and tiered overrides.
999
1000
 
1000
1001
  class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
1002
+ # @!attribute any_commit_or_credit_ids
1003
+ # Can only be used for commit specific overrides. Must be used in conjunction with
1004
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
1005
+ # `presentation_group_values`. Must be used instead of both `commit_ids` and
1006
+ # `recurring_commit_ids` If provided, the override will apply to any specified
1007
+ # commit, credit, recurring commit or recurring credit IDs.
1008
+ #
1009
+ # @return [Array<String>, nil]
1010
+ optional :any_commit_or_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1011
+
1001
1012
  # @!attribute billing_frequency
1002
1013
  #
1003
1014
  # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency, nil]
@@ -1049,11 +1060,13 @@ module MetronomeSDK
1049
1060
  # @return [Array<String>, nil]
1050
1061
  optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1051
1062
 
1052
- # @!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)
1063
+ # @!method initialize(any_commit_or_credit_ids: nil, billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil)
1053
1064
  # Some parameter documentations has been truncated, see
1054
1065
  # {MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier} for
1055
1066
  # more details.
1056
1067
  #
1068
+ # @param any_commit_or_credit_ids [Array<String>] Can only be used for commit specific overrides. Must be used in conjunction with
1069
+ #
1057
1070
  # @param billing_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency]
1058
1071
  #
1059
1072
  # @param commit_ids [Array<String>] Can only be used for commit specific overrides. Must be used in conjunction with
@@ -1354,6 +1367,13 @@ module MetronomeSDK
1354
1367
  # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Proration, nil]
1355
1368
  optional :proration, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Proration }
1356
1369
 
1370
+ # @!attribute proration_rounding
1371
+ # Optional rounding configuration for prorated recurring commit amounts.
1372
+ #
1373
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding, nil]
1374
+ optional :proration_rounding,
1375
+ -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding }
1376
+
1357
1377
  # @!attribute rate_type
1358
1378
  # Whether the created commits will use the commit rate or list rate
1359
1379
  #
@@ -1402,7 +1422,7 @@ module MetronomeSDK
1402
1422
  # @return [String, nil]
1403
1423
  optional :temporary_id, String
1404
1424
 
1405
- # @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, invoice_amount: nil, name: nil, proration: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
1425
+ # @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, invoice_amount: nil, name: nil, proration: nil, proration_rounding: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
1406
1426
  # Some parameter documentations has been truncated, see
1407
1427
  # {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit} for more
1408
1428
  # details.
@@ -1431,9 +1451,11 @@ module MetronomeSDK
1431
1451
  #
1432
1452
  # @param proration [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1433
1453
  #
1454
+ # @param proration_rounding [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding] Optional rounding configuration for prorated recurring commit amounts.
1455
+ #
1434
1456
  # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
1435
1457
  #
1436
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1458
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
1437
1459
  #
1438
1460
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1439
1461
  #
@@ -1615,6 +1637,104 @@ module MetronomeSDK
1615
1637
  # @return [Array<Symbol>]
1616
1638
  end
1617
1639
 
1640
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#proration_rounding
1641
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
1642
+ # @!attribute access
1643
+ #
1644
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access, nil]
1645
+ optional :access, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access }
1646
+
1647
+ # @!attribute invoice
1648
+ #
1649
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice, nil]
1650
+ optional :invoice,
1651
+ -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice }
1652
+
1653
+ # @!method initialize(access: nil, invoice: nil)
1654
+ # Optional rounding configuration for prorated recurring commit amounts.
1655
+ #
1656
+ # @param access [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access]
1657
+ # @param invoice [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice]
1658
+
1659
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding#access
1660
+ class Access < MetronomeSDK::Internal::Type::BaseModel
1661
+ # @!attribute decimal_places
1662
+ # Number of decimal places to round to. Applied directly to the stored monetary
1663
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1664
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1665
+ # dollar).
1666
+ #
1667
+ # @return [Float]
1668
+ required :decimal_places, Float
1669
+
1670
+ # @!attribute rounding_method
1671
+ #
1672
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod]
1673
+ required :rounding_method,
1674
+ enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod }
1675
+
1676
+ # @!method initialize(decimal_places:, rounding_method:)
1677
+ # Some parameter documentations has been truncated, see
1678
+ # {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access}
1679
+ # for more details.
1680
+ #
1681
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
1682
+ #
1683
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod]
1684
+
1685
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access#rounding_method
1686
+ module RoundingMethod
1687
+ extend MetronomeSDK::Internal::Type::Enum
1688
+
1689
+ HALF_UP = :HALF_UP
1690
+ FLOOR = :FLOOR
1691
+ CEILING = :CEILING
1692
+
1693
+ # @!method self.values
1694
+ # @return [Array<Symbol>]
1695
+ end
1696
+ end
1697
+
1698
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding#invoice
1699
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
1700
+ # @!attribute decimal_places
1701
+ # Number of decimal places to round to. Applied directly to the stored monetary
1702
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1703
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1704
+ # dollar).
1705
+ #
1706
+ # @return [Float]
1707
+ required :decimal_places, Float
1708
+
1709
+ # @!attribute rounding_method
1710
+ #
1711
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
1712
+ required :rounding_method,
1713
+ enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod }
1714
+
1715
+ # @!method initialize(decimal_places:, rounding_method:)
1716
+ # Some parameter documentations has been truncated, see
1717
+ # {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice}
1718
+ # for more details.
1719
+ #
1720
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
1721
+ #
1722
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
1723
+
1724
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice#rounding_method
1725
+ module RoundingMethod
1726
+ extend MetronomeSDK::Internal::Type::Enum
1727
+
1728
+ HALF_UP = :HALF_UP
1729
+ FLOOR = :FLOOR
1730
+ CEILING = :CEILING
1731
+
1732
+ # @!method self.values
1733
+ # @return [Array<Symbol>]
1734
+ end
1735
+ end
1736
+ end
1737
+
1618
1738
  # Whether the created commits will use the commit rate or list rate
1619
1739
  #
1620
1740
  # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCommit#rate_type
@@ -1642,6 +1762,7 @@ module MetronomeSDK
1642
1762
  QUARTERLY = :QUARTERLY
1643
1763
  ANNUAL = :ANNUAL
1644
1764
  WEEKLY = :WEEKLY
1765
+ DAILY = :DAILY
1645
1766
 
1646
1767
  # @!method self.values
1647
1768
  # @return [Array<Symbol>]
@@ -1782,6 +1903,13 @@ module MetronomeSDK
1782
1903
  # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Proration, nil]
1783
1904
  optional :proration, enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Proration }
1784
1905
 
1906
+ # @!attribute proration_rounding
1907
+ # Optional rounding configuration for prorated recurring credit amounts.
1908
+ #
1909
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding, nil]
1910
+ optional :proration_rounding,
1911
+ -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding }
1912
+
1785
1913
  # @!attribute rate_type
1786
1914
  # Whether the created commits will use the commit rate or list rate
1787
1915
  #
@@ -1830,7 +1958,7 @@ module MetronomeSDK
1830
1958
  # @return [String, nil]
1831
1959
  optional :temporary_id, String
1832
1960
 
1833
- # @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, name: nil, proration: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
1961
+ # @!method initialize(access_amount:, commit_duration:, priority:, product_id:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, name: nil, proration: nil, proration_rounding: nil, rate_type: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil, temporary_id: nil)
1834
1962
  # Some parameter documentations has been truncated, see
1835
1963
  # {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit} for more
1836
1964
  # details.
@@ -1857,9 +1985,11 @@ module MetronomeSDK
1857
1985
  #
1858
1986
  # @param proration [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1859
1987
  #
1988
+ # @param proration_rounding [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding] Optional rounding configuration for prorated recurring credit amounts.
1989
+ #
1860
1990
  # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
1861
1991
  #
1862
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1992
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
1863
1993
  #
1864
1994
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1865
1995
  #
@@ -2016,6 +2146,58 @@ module MetronomeSDK
2016
2146
  # @return [Array<Symbol>]
2017
2147
  end
2018
2148
 
2149
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#proration_rounding
2150
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
2151
+ # @!attribute access
2152
+ #
2153
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access, nil]
2154
+ optional :access, -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access }
2155
+
2156
+ # @!method initialize(access: nil)
2157
+ # Optional rounding configuration for prorated recurring credit amounts.
2158
+ #
2159
+ # @param access [MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access]
2160
+
2161
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding#access
2162
+ class Access < MetronomeSDK::Internal::Type::BaseModel
2163
+ # @!attribute decimal_places
2164
+ # Number of decimal places to round to. Applied directly to the stored monetary
2165
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
2166
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
2167
+ # dollar).
2168
+ #
2169
+ # @return [Float]
2170
+ required :decimal_places, Float
2171
+
2172
+ # @!attribute rounding_method
2173
+ #
2174
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod]
2175
+ required :rounding_method,
2176
+ enum: -> { MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod }
2177
+
2178
+ # @!method initialize(decimal_places:, rounding_method:)
2179
+ # Some parameter documentations has been truncated, see
2180
+ # {MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access}
2181
+ # for more details.
2182
+ #
2183
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
2184
+ #
2185
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod]
2186
+
2187
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access#rounding_method
2188
+ module RoundingMethod
2189
+ extend MetronomeSDK::Internal::Type::Enum
2190
+
2191
+ HALF_UP = :HALF_UP
2192
+ FLOOR = :FLOOR
2193
+ CEILING = :CEILING
2194
+
2195
+ # @!method self.values
2196
+ # @return [Array<Symbol>]
2197
+ end
2198
+ end
2199
+ end
2200
+
2019
2201
  # Whether the created commits will use the commit rate or list rate
2020
2202
  #
2021
2203
  # @see MetronomeSDK::Models::V1::PackageCreateParams::RecurringCredit#rate_type
@@ -2043,6 +2225,7 @@ module MetronomeSDK
2043
2225
  QUARTERLY = :QUARTERLY
2044
2226
  ANNUAL = :ANNUAL
2045
2227
  WEEKLY = :WEEKLY
2228
+ DAILY = :DAILY
2046
2229
 
2047
2230
  # @!method self.values
2048
2231
  # @return [Array<Symbol>]
@@ -2372,6 +2555,12 @@ module MetronomeSDK
2372
2555
  # @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate]
2373
2556
  required :subscription_rate, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::SubscriptionRate }
2374
2557
 
2558
+ # @!attribute billing_cycle_config
2559
+ #
2560
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig, nil]
2561
+ optional :billing_cycle_config,
2562
+ -> { MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig }
2563
+
2375
2564
  # @!attribute custom_fields
2376
2565
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2377
2566
  #
@@ -2436,7 +2625,7 @@ module MetronomeSDK
2436
2625
  # @return [String, nil]
2437
2626
  optional :temporary_id, String
2438
2627
 
2439
- # @!method initialize(collection_schedule:, proration:, subscription_rate:, custom_fields: nil, description: nil, duration: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, seat_config: nil, starting_at_offset: nil, temporary_id: nil)
2628
+ # @!method initialize(collection_schedule:, proration:, subscription_rate:, billing_cycle_config: nil, custom_fields: nil, description: nil, duration: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, seat_config: nil, starting_at_offset: nil, temporary_id: nil)
2440
2629
  # Some parameter documentations has been truncated, see
2441
2630
  # {MetronomeSDK::Models::V1::PackageCreateParams::Subscription} for more details.
2442
2631
  #
@@ -2446,6 +2635,8 @@ module MetronomeSDK
2446
2635
  #
2447
2636
  # @param subscription_rate [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::SubscriptionRate]
2448
2637
  #
2638
+ # @param billing_cycle_config [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig]
2639
+ #
2449
2640
  # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2450
2641
  #
2451
2642
  # @param description [String]
@@ -2494,7 +2685,12 @@ module MetronomeSDK
2494
2685
  # @return [Boolean, nil]
2495
2686
  optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
2496
2687
 
2497
- # @!method initialize(invoice_behavior: nil, is_prorated: nil)
2688
+ # @!attribute rounding
2689
+ #
2690
+ # @return [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding, nil]
2691
+ optional :rounding, -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding }
2692
+
2693
+ # @!method initialize(invoice_behavior: nil, is_prorated: nil, rounding: nil)
2498
2694
  # Some parameter documentations has been truncated, see
2499
2695
  # {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration} for
2500
2696
  # more details.
@@ -2502,6 +2698,8 @@ module MetronomeSDK
2502
2698
  # @param invoice_behavior [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior] Indicates how mid-period quantity adjustments are invoiced.
2503
2699
  #
2504
2700
  # @param is_prorated [Boolean] Indicates if the partial period will be prorated or charged a full amount.
2701
+ #
2702
+ # @param rounding [MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding]
2505
2703
 
2506
2704
  # Indicates how mid-period quantity adjustments are invoiced.
2507
2705
  # **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
@@ -2519,6 +2717,45 @@ module MetronomeSDK
2519
2717
  # @!method self.values
2520
2718
  # @return [Array<Symbol>]
2521
2719
  end
2720
+
2721
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration#rounding
2722
+ class Rounding < MetronomeSDK::Internal::Type::BaseModel
2723
+ # @!attribute decimal_places
2724
+ # Number of decimal places to round to. Applied directly to the stored monetary
2725
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
2726
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
2727
+ # dollar).
2728
+ #
2729
+ # @return [Float]
2730
+ required :decimal_places, Float
2731
+
2732
+ # @!attribute rounding_method
2733
+ #
2734
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod]
2735
+ required :rounding_method,
2736
+ enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod }
2737
+
2738
+ # @!method initialize(decimal_places:, rounding_method:)
2739
+ # Some parameter documentations has been truncated, see
2740
+ # {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding}
2741
+ # for more details.
2742
+ #
2743
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
2744
+ #
2745
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod]
2746
+
2747
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::Proration::Rounding#rounding_method
2748
+ module RoundingMethod
2749
+ extend MetronomeSDK::Internal::Type::Enum
2750
+
2751
+ HALF_UP = :HALF_UP
2752
+ FLOOR = :FLOOR
2753
+ CEILING = :CEILING
2754
+
2755
+ # @!method self.values
2756
+ # @return [Array<Symbol>]
2757
+ end
2758
+ end
2522
2759
  end
2523
2760
 
2524
2761
  # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#subscription_rate
@@ -2563,6 +2800,38 @@ module MetronomeSDK
2563
2800
  end
2564
2801
  end
2565
2802
 
2803
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#billing_cycle_config
2804
+ class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
2805
+ # @!attribute invoice_placement
2806
+ # Controls whether subscriptions consolidate onto usage invoices. Defaults to
2807
+ # ON_USAGE_INVOICE if omitted.
2808
+ #
2809
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement, nil]
2810
+ optional :invoice_placement,
2811
+ enum: -> { MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement }
2812
+
2813
+ # @!method initialize(invoice_placement: nil)
2814
+ # Some parameter documentations has been truncated, see
2815
+ # {MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig}
2816
+ # for more details.
2817
+ #
2818
+ # @param invoice_placement [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement] Controls whether subscriptions consolidate onto usage invoices. Defaults to ON_U
2819
+
2820
+ # Controls whether subscriptions consolidate onto usage invoices. Defaults to
2821
+ # ON_USAGE_INVOICE if omitted.
2822
+ #
2823
+ # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription::BillingCycleConfig#invoice_placement
2824
+ module InvoicePlacement
2825
+ extend MetronomeSDK::Internal::Type::Enum
2826
+
2827
+ ON_SCHEDULED_INVOICE = :ON_SCHEDULED_INVOICE
2828
+ ON_USAGE_INVOICE = :ON_USAGE_INVOICE
2829
+
2830
+ # @!method self.values
2831
+ # @return [Array<Symbol>]
2832
+ end
2833
+ end
2834
+
2566
2835
  # @see MetronomeSDK::Models::V1::PackageCreateParams::Subscription#duration
2567
2836
  class Duration < MetronomeSDK::Internal::Type::BaseModel
2568
2837
  # @!attribute unit