metronome-sdk 3.9.0 → 3.10.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/models/commit.rb +9 -1
  5. data/lib/metronome_sdk/models/contract_v2.rb +29 -12
  6. data/lib/metronome_sdk/models/contract_without_amendments.rb +8 -5
  7. data/lib/metronome_sdk/models/v1/contract_create_params.rb +8 -5
  8. data/lib/metronome_sdk/models/v1/contract_create_response.rb +8 -5
  9. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +27 -1
  10. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +32 -5
  11. data/lib/metronome_sdk/models/v1/package_create_params.rb +8 -4
  12. data/lib/metronome_sdk/models/v1/package_list_response.rb +8 -4
  13. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +8 -4
  14. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +11 -1
  15. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +11 -1
  16. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +12 -8
  17. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +8 -4
  18. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +8 -4
  19. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +11 -14
  20. data/lib/metronome_sdk/resources/v1/dashboards.rb +6 -9
  21. data/lib/metronome_sdk/resources/v2/contracts.rb +6 -2
  22. data/lib/metronome_sdk/version.rb +1 -1
  23. data/rbi/metronome_sdk/models/commit.rbi +11 -0
  24. data/rbi/metronome_sdk/models/contract_v2.rbi +47 -19
  25. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +12 -11
  26. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +12 -11
  27. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +12 -11
  28. data/rbi/metronome_sdk/models/v1/contracts/rate_card_update_params.rbi +67 -0
  29. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +96 -5
  30. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +12 -6
  31. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +12 -6
  32. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +12 -6
  33. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +12 -0
  34. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +12 -0
  35. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +18 -18
  36. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +12 -6
  37. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +12 -6
  38. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +15 -13
  39. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +6 -9
  40. data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
  41. data/sig/metronome_sdk/models/commit.rbs +7 -0
  42. data/sig/metronome_sdk/models/contract_v2.rbs +16 -10
  43. data/sig/metronome_sdk/models/contract_without_amendments.rbs +1 -2
  44. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +1 -2
  45. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1 -2
  46. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_params.rbs +28 -0
  47. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +39 -4
  48. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +5 -0
  49. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +5 -0
  50. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +8 -12
  51. data/sig/metronome_sdk/resources/v1/contracts/rate_cards.rbs +1 -0
  52. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  53. metadata +2 -2
@@ -25,6 +25,14 @@ module MetronomeSDK
25
25
  # @return [MetronomeSDK::Models::V2::ContractEditCreditParams::AccessSchedule, nil]
26
26
  optional :access_schedule, -> { MetronomeSDK::V2::ContractEditCreditParams::AccessSchedule }
27
27
 
28
+ # @!attribute applicable_contract_ids
29
+ # Which contracts the customer-level credit applies to. If set to null, the credit
30
+ # applies to all of the customer's contracts. This field cannot be set on a
31
+ # contract-level credit.
32
+ #
33
+ # @return [Array<String>, nil]
34
+ optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String], nil?: true
35
+
28
36
  # @!attribute applicable_product_ids
29
37
  # Which products the credit applies to. If both applicable_product_ids and
30
38
  # applicable_product_tags are not provided, the credit applies to all products.
@@ -90,7 +98,7 @@ module MetronomeSDK
90
98
  -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] },
91
99
  nil?: true
92
100
 
93
- # @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
101
+ # @!method initialize(credit_id:, customer_id:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
94
102
  # Some parameter documentations has been truncated, see
95
103
  # {MetronomeSDK::Models::V2::ContractEditCreditParams} for more details.
96
104
  #
@@ -100,6 +108,8 @@ module MetronomeSDK
100
108
  #
101
109
  # @param access_schedule [MetronomeSDK::Models::V2::ContractEditCreditParams::AccessSchedule]
102
110
  #
111
+ # @param applicable_contract_ids [Array<String>, nil] Which contracts the customer-level credit applies to. If set to null, the credit
112
+ #
103
113
  # @param applicable_product_ids [Array<String>, nil] Which products the credit applies to. If both applicable_product_ids and applica
104
114
  #
105
115
  # @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
@@ -360,7 +360,7 @@ module MetronomeSDK
360
360
  # @!attribute billing_provider_configuration_id
361
361
  #
362
362
  # @return [String, nil]
363
- optional :billing_provider_configuration_id, String
363
+ optional :billing_provider_configuration_id, String, nil?: true
364
364
 
365
365
  # @!attribute delivery_method
366
366
  #
@@ -370,7 +370,7 @@ module MetronomeSDK
370
370
 
371
371
  # @!method initialize(billing_provider: nil, billing_provider_configuration_id: nil, delivery_method: nil)
372
372
  # @param billing_provider [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::BillingProvider]
373
- # @param billing_provider_configuration_id [String]
373
+ # @param billing_provider_configuration_id [String, nil]
374
374
  # @param delivery_method [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::DeliveryMethod]
375
375
 
376
376
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration#billing_provider
@@ -1979,7 +1979,8 @@ module MetronomeSDK
1979
1979
  # The commits will be created on the usage invoice frequency. If provided: - The
1980
1980
  # period defined in the duration will correspond to this frequency. - Commits will
1981
1981
  # be created aligned with the recurring commit's starting_at rather than the usage
1982
- # invoice dates.
1982
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1983
+ # are unable to be created with seat-based subscriptions
1983
1984
  #
1984
1985
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency, nil]
1985
1986
  optional :recurrence_frequency,
@@ -2285,7 +2286,8 @@ module MetronomeSDK
2285
2286
  # The commits will be created on the usage invoice frequency. If provided: - The
2286
2287
  # period defined in the duration will correspond to this frequency. - Commits will
2287
2288
  # be created aligned with the recurring commit's starting_at rather than the usage
2288
- # invoice dates.
2289
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2290
+ # are unable to be created with seat-based subscriptions
2289
2291
  #
2290
2292
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCommit#recurrence_frequency
2291
2293
  module RecurrenceFrequency
@@ -2463,7 +2465,8 @@ module MetronomeSDK
2463
2465
  # The commits will be created on the usage invoice frequency. If provided: - The
2464
2466
  # period defined in the duration will correspond to this frequency. - Commits will
2465
2467
  # be created aligned with the recurring commit's starting_at rather than the usage
2466
- # invoice dates.
2468
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2469
+ # are unable to be created with seat-based subscriptions
2467
2470
  #
2468
2471
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency, nil]
2469
2472
  optional :recurrence_frequency,
@@ -2697,7 +2700,8 @@ module MetronomeSDK
2697
2700
  # The commits will be created on the usage invoice frequency. If provided: - The
2698
2701
  # period defined in the duration will correspond to this frequency. - Commits will
2699
2702
  # be created aligned with the recurring commit's starting_at rather than the usage
2700
- # invoice dates.
2703
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2704
+ # are unable to be created with seat-based subscriptions
2701
2705
  #
2702
2706
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRecurringCredit#recurrence_frequency
2703
2707
  module RecurrenceFrequency
@@ -2945,14 +2949,14 @@ module MetronomeSDK
2945
2949
  # @!attribute revenue_system_configuration_id
2946
2950
  #
2947
2951
  # @return [String, nil]
2948
- optional :revenue_system_configuration_id, String
2952
+ optional :revenue_system_configuration_id, String, nil?: true
2949
2953
 
2950
2954
  # @!method initialize(delivery_method: nil, provider: nil, revenue_system_configuration_id: nil)
2951
2955
  # @param delivery_method [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRevenueSystemConfigurationUpdate::RevenueSystemConfiguration::DeliveryMethod]
2952
2956
  #
2953
2957
  # @param provider [Symbol, MetronomeSDK::Models::V2::ContractEditParams::AddRevenueSystemConfigurationUpdate::RevenueSystemConfiguration::Provider] The revenue system provider type.
2954
2958
  #
2955
- # @param revenue_system_configuration_id [String]
2959
+ # @param revenue_system_configuration_id [String, nil]
2956
2960
 
2957
2961
  # @see MetronomeSDK::Models::V2::ContractEditParams::AddRevenueSystemConfigurationUpdate::RevenueSystemConfiguration#delivery_method
2958
2962
  module DeliveryMethod
@@ -1101,7 +1101,8 @@ module MetronomeSDK
1101
1101
  # The commits will be created on the usage invoice frequency. If provided: - The
1102
1102
  # period defined in the duration will correspond to this frequency. - Commits will
1103
1103
  # be created aligned with the recurring commit's starting_at rather than the usage
1104
- # invoice dates.
1104
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1105
+ # are unable to be created with seat-based subscriptions
1105
1106
  #
1106
1107
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit::RecurrenceFrequency, nil]
1107
1108
  optional :recurrence_frequency,
@@ -1416,7 +1417,8 @@ module MetronomeSDK
1416
1417
  # The commits will be created on the usage invoice frequency. If provided: - The
1417
1418
  # period defined in the duration will correspond to this frequency. - Commits will
1418
1419
  # be created aligned with the recurring commit's starting_at rather than the usage
1419
- # invoice dates.
1420
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1421
+ # are unable to be created with seat-based subscriptions
1420
1422
  #
1421
1423
  # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCommit#recurrence_frequency
1422
1424
  module RecurrenceFrequency
@@ -1547,7 +1549,8 @@ module MetronomeSDK
1547
1549
  # The commits will be created on the usage invoice frequency. If provided: - The
1548
1550
  # period defined in the duration will correspond to this frequency. - Commits will
1549
1551
  # be created aligned with the recurring commit's starting_at rather than the usage
1550
- # invoice dates.
1552
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1553
+ # are unable to be created with seat-based subscriptions
1551
1554
  #
1552
1555
  # @return [Symbol, MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit::RecurrenceFrequency, nil]
1553
1556
  optional :recurrence_frequency,
@@ -1790,7 +1793,8 @@ module MetronomeSDK
1790
1793
  # The commits will be created on the usage invoice frequency. If provided: - The
1791
1794
  # period defined in the duration will correspond to this frequency. - Commits will
1792
1795
  # be created aligned with the recurring commit's starting_at rather than the usage
1793
- # invoice dates.
1796
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1797
+ # are unable to be created with seat-based subscriptions
1794
1798
  #
1795
1799
  # @see MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::AddRecurringCredit#recurrence_frequency
1796
1800
  module RecurrenceFrequency
@@ -1092,7 +1092,8 @@ module MetronomeSDK
1092
1092
  # The commits will be created on the usage invoice frequency. If provided: - The
1093
1093
  # period defined in the duration will correspond to this frequency. - Commits will
1094
1094
  # be created aligned with the recurring commit's starting_at rather than the usage
1095
- # invoice dates.
1095
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1096
+ # are unable to be created with seat-based subscriptions
1096
1097
  #
1097
1098
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency, nil]
1098
1099
  optional :recurrence_frequency,
@@ -1407,7 +1408,8 @@ module MetronomeSDK
1407
1408
  # The commits will be created on the usage invoice frequency. If provided: - The
1408
1409
  # period defined in the duration will correspond to this frequency. - Commits will
1409
1410
  # be created aligned with the recurring commit's starting_at rather than the usage
1410
- # invoice dates.
1411
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1412
+ # are unable to be created with seat-based subscriptions
1411
1413
  #
1412
1414
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit#recurrence_frequency
1413
1415
  module RecurrenceFrequency
@@ -1538,7 +1540,8 @@ module MetronomeSDK
1538
1540
  # The commits will be created on the usage invoice frequency. If provided: - The
1539
1541
  # period defined in the duration will correspond to this frequency. - Commits will
1540
1542
  # be created aligned with the recurring commit's starting_at rather than the usage
1541
- # invoice dates.
1543
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1544
+ # are unable to be created with seat-based subscriptions
1542
1545
  #
1543
1546
  # @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency, nil]
1544
1547
  optional :recurrence_frequency,
@@ -1781,7 +1784,8 @@ module MetronomeSDK
1781
1784
  # The commits will be created on the usage invoice frequency. If provided: - The
1782
1785
  # period defined in the duration will correspond to this frequency. - Commits will
1783
1786
  # be created aligned with the recurring commit's starting_at rather than the usage
1784
- # invoice dates.
1787
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1788
+ # are unable to be created with seat-based subscriptions
1785
1789
  #
1786
1790
  # @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit#recurrence_frequency
1787
1791
  module RecurrenceFrequency
@@ -112,24 +112,19 @@ module MetronomeSDK
112
112
  # Some parameter documentations has been truncated, see
113
113
  # {MetronomeSDK::Models::V1::Contracts::RateCardUpdateParams} for more details.
114
114
  #
115
- # Update the metadata properties of an existing rate card, including its name,
116
- # description, and aliases. This endpoint is designed for managing rate card
117
- # identity and reference aliases rather than modifying pricing rates.
118
- #
119
- # Modifies the descriptive properties and alias configuration of a rate card
120
- # without affecting the underlying pricing rates or schedules. This allows you to
121
- # update how a rate card is identified and referenced throughout your system.
115
+ # Update a rate card's name, description, aliases, and credit type conversion
116
+ # rates. This endpoint does not affect underlying pricing rates or schedules.
122
117
  #
123
118
  # ### Use this endpoint to:
124
119
  #
125
- # - Rate card renaming: Update display names or descriptions for organizational
120
+ # - Rename rate cards: Update display names or descriptions for organizational
126
121
  # clarity
127
- # - Alias management: Add, modify, or schedule alias transitions for seamless rate
128
- # card migrations
129
- # - Documentation updates: Keep rate card descriptions current with business
122
+ # - Manage aliases: Add, modify, or schedule alias transitions for seamless and
123
+ # code-free rate card migrations
124
+ # - Update documentation: Keep rate card descriptions current with business
130
125
  # context
131
- # - Self-serve provisioning setup: Configure aliases to enable code-free rate card
132
- # transitions
126
+ # - Configure custom pricing units: Add credit type conversions to enable rates
127
+ # with different pricing units
133
128
  #
134
129
  # #### Active contract impact:
135
130
  #
@@ -165,10 +160,12 @@ module MetronomeSDK
165
160
  # your PLG workflow using that alias will automatically reference the new rate
166
161
  # card
167
162
  #
168
- # @overload update(rate_card_id:, aliases: nil, description: nil, name: nil, request_options: {})
163
+ # @overload update(rate_card_id:, add_credit_type_conversions: nil, aliases: nil, description: nil, name: nil, request_options: {})
169
164
  #
170
165
  # @param rate_card_id [String] ID of the rate card to update
171
166
  #
167
+ # @param add_credit_type_conversions [Array<MetronomeSDK::Models::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion>] Add credit type conversions for using custom pricing units in rates. Existing co
168
+ #
172
169
  # @param aliases [Array<MetronomeSDK::Models::V1::Contracts::RateCardUpdateParams::Alias>] Reference this alias when creating a contract. If the same alias is assigned to
173
170
  #
174
171
  # @param description [String]
@@ -30,16 +30,13 @@ module MetronomeSDK
30
30
  #
31
31
  # - Dashboard types: Choose from `invoices`, `usage`, or `commits_and_credits`
32
32
  # - Customization options:
33
- # - `dashboard_options`: Configure dashboard behavior. For the invoices
34
- # dashboard, supported keys include: `show_zero_usage_line_items`
35
- # ("true"/"false"), `hide_voided_invoices` ("true"/"false"), `contract_id`
36
- # (UUID, filters invoices by contract), `invoice_type` ("USAGE" or
37
- # "SCHEDULED", filters by invoice type), `invoice_status_filter` ("VOID",
38
- # "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL"), and
39
- # `billable_status_filter` ("BILLABLE", "UNBILLABLE", or "ALL")
33
+ # - `dashboard_options`: Configure dashboard behavior. Supported for the
34
+ # invoices dashboard only. Available keys include:
35
+ # `show_zero_usage_line_items` ("true"/"false"), `contract_id` (UUID, filters
36
+ # invoices by contract), `invoice_type` ("USAGE" or "SCHEDULED", filters by
37
+ # invoice type), and `invoice_status_filter` ("VOID", "FINALIZED", "DRAFT",
38
+ # "FINALIZED_AND_DRAFT", or "ALL")
40
39
  # - `color_overrides`: Match your brand's color palette
41
- # - `bm_group_key_overrides`: Customize how dimensions are displayed (for the
42
- # usage embeddable dashboard)
43
40
  # - Iframe implementation: Embed the returned URL directly in an iframe element
44
41
  # - Responsive design: Dashboards automatically adapt to container dimensions
45
42
  #
@@ -236,7 +236,7 @@ module MetronomeSDK
236
236
  # finalized invoice. You can void the invoice beforehand and then remove the
237
237
  # access schedule segment.
238
238
  #
239
- # @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_contract_id: nil, invoice_schedule: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
239
+ # @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, invoice_contract_id: nil, invoice_schedule: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
240
240
  #
241
241
  # @param commit_id [String] ID of the commit to edit
242
242
  #
@@ -244,6 +244,8 @@ module MetronomeSDK
244
244
  #
245
245
  # @param access_schedule [MetronomeSDK::Models::V2::ContractEditCommitParams::AccessSchedule]
246
246
  #
247
+ # @param applicable_contract_ids [Array<String>, nil] Which contracts the customer-level commit applies to. If set to null, the commit
248
+ #
247
249
  # @param applicable_product_ids [Array<String>, nil] Which products the commit applies to. If applicable_product_ids, applicable_prod
248
250
  #
249
251
  # @param applicable_product_tags [Array<String>, nil] Which tags the commit applies to. If applicable*product_ids, applicable_product*
@@ -302,7 +304,7 @@ module MetronomeSDK
302
304
  # invoice. You can void the invoice beforehand and then remove the access
303
305
  # schedule segment.
304
306
  #
305
- # @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
307
+ # @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, hierarchy_configuration: nil, name: nil, priority: nil, product_id: nil, rate_type: nil, specifiers: nil, request_options: {})
306
308
  #
307
309
  # @param credit_id [String] ID of the credit to edit
308
310
  #
@@ -310,6 +312,8 @@ module MetronomeSDK
310
312
  #
311
313
  # @param access_schedule [MetronomeSDK::Models::V2::ContractEditCreditParams::AccessSchedule]
312
314
  #
315
+ # @param applicable_contract_ids [Array<String>, nil] Which contracts the customer-level credit applies to. If set to null, the credit
316
+ #
313
317
  # @param applicable_product_ids [Array<String>, nil] Which products the credit applies to. If both applicable_product_ids and applica
314
318
  #
315
319
  # @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MetronomeSDK
4
- VERSION = "3.9.0"
4
+ VERSION = "3.10.0"
5
5
  end
@@ -91,6 +91,13 @@ module MetronomeSDK
91
91
  sig { params(contract: MetronomeSDK::Commit::Contract::OrHash).void }
92
92
  attr_writer :contract
93
93
 
94
+ # The ratio of the amount paid for the commit to the amount of credit granted.
95
+ sig { returns(T.nilable(Float)) }
96
+ attr_reader :cost_basis
97
+
98
+ sig { params(cost_basis: Float).void }
99
+ attr_writer :cost_basis
100
+
94
101
  # The actor who created this commit. Omitted for system-generated commits such as
95
102
  # recurring commits, rollover commits, and threshold commits.
96
103
  sig { returns(T.nilable(String)) }
@@ -293,6 +300,7 @@ module MetronomeSDK
293
300
  archived_at: Time,
294
301
  balance: Float,
295
302
  contract: MetronomeSDK::Commit::Contract::OrHash,
303
+ cost_basis: Float,
296
304
  created_by: String,
297
305
  custom_fields: T::Hash[Symbol, String],
298
306
  description: String,
@@ -365,6 +373,8 @@ module MetronomeSDK
365
373
  # included in the balance, including future-dated manual ledger entries.
366
374
  balance: nil,
367
375
  contract: nil,
376
+ # The ratio of the amount paid for the commit to the amount of credit granted.
377
+ cost_basis: nil,
368
378
  # The actor who created this commit. Omitted for system-generated commits such as
369
379
  # recurring commits, rollover commits, and threshold commits.
370
380
  created_by: nil,
@@ -426,6 +436,7 @@ module MetronomeSDK
426
436
  archived_at: Time,
427
437
  balance: Float,
428
438
  contract: MetronomeSDK::Commit::Contract,
439
+ cost_basis: Float,
429
440
  created_by: String,
430
441
  custom_fields: T::Hash[Symbol, String],
431
442
  description: String,
@@ -661,6 +661,13 @@ module MetronomeSDK
661
661
  end
662
662
  attr_writer :contract
663
663
 
664
+ # The ratio of the amount paid for the commit to the amount of credit granted.
665
+ sig { returns(T.nilable(Float)) }
666
+ attr_reader :cost_basis
667
+
668
+ sig { params(cost_basis: Float).void }
669
+ attr_writer :cost_basis
670
+
664
671
  # The actor who created this commit. Omitted for system-generated commits such as
665
672
  # recurring commits, rollover commits, and threshold commits.
666
673
  sig { returns(T.nilable(String)) }
@@ -879,6 +886,7 @@ module MetronomeSDK
879
886
  archived_at: Time,
880
887
  balance: Float,
881
888
  contract: MetronomeSDK::ContractV2::Commit::Contract::OrHash,
889
+ cost_basis: Float,
882
890
  created_by: String,
883
891
  custom_fields: T::Hash[Symbol, String],
884
892
  description: String,
@@ -949,6 +957,8 @@ module MetronomeSDK
949
957
  # included in the balance, including future-dated manual ledger entries.
950
958
  balance: nil,
951
959
  contract: nil,
960
+ # The ratio of the amount paid for the commit to the amount of credit granted.
961
+ cost_basis: nil,
952
962
  # The actor who created this commit. Omitted for system-generated commits such as
953
963
  # recurring commits, rollover commits, and threshold commits.
954
964
  created_by: nil,
@@ -1002,6 +1012,7 @@ module MetronomeSDK
1002
1012
  archived_at: Time,
1003
1013
  balance: Float,
1004
1014
  contract: MetronomeSDK::ContractV2::Commit::Contract,
1015
+ cost_basis: Float,
1005
1016
  created_by: String,
1006
1017
  custom_fields: T::Hash[Symbol, String],
1007
1018
  description: String,
@@ -3150,11 +3161,6 @@ module MetronomeSDK
3150
3161
  end
3151
3162
  OrSymbol = T.type_alias { T.any(Symbol, String) }
3152
3163
 
3153
- SUPERSEDE =
3154
- T.let(
3155
- :SUPERSEDE,
3156
- MetronomeSDK::ContractV2::Transition::Type::TaggedSymbol
3157
- )
3158
3164
  RENEWAL =
3159
3165
  T.let(
3160
3166
  :RENEWAL,
@@ -3335,7 +3341,9 @@ module MetronomeSDK
3335
3341
 
3336
3342
  sig do
3337
3343
  returns(
3338
- MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration
3344
+ T.nilable(
3345
+ MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration
3346
+ )
3339
3347
  )
3340
3348
  end
3341
3349
  attr_reader :billing_provider_configuration
@@ -3343,7 +3351,9 @@ module MetronomeSDK
3343
3351
  sig do
3344
3352
  params(
3345
3353
  billing_provider_configuration:
3346
- MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration::OrHash
3354
+ T.nilable(
3355
+ MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration::OrHash
3356
+ )
3347
3357
  ).void
3348
3358
  end
3349
3359
  attr_writer :billing_provider_configuration
@@ -3363,7 +3373,9 @@ module MetronomeSDK
3363
3373
  sig do
3364
3374
  params(
3365
3375
  billing_provider_configuration:
3366
- MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration::OrHash,
3376
+ T.nilable(
3377
+ MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration::OrHash
3378
+ ),
3367
3379
  effective_at: Time,
3368
3380
  effective_until: Time
3369
3381
  ).returns(T.attached_class)
@@ -3382,7 +3394,9 @@ module MetronomeSDK
3382
3394
  override.returns(
3383
3395
  {
3384
3396
  billing_provider_configuration:
3385
- MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration,
3397
+ T.nilable(
3398
+ MetronomeSDK::ContractV2::BillingProviderConfigurationSchedule::BillingProviderConfiguration
3399
+ ),
3386
3400
  effective_at: Time,
3387
3401
  effective_until: Time
3388
3402
  }
@@ -5763,7 +5777,8 @@ module MetronomeSDK
5763
5777
  # The commits will be created on the usage invoice frequency. If provided: - The
5764
5778
  # period defined in the duration will correspond to this frequency. - Commits will
5765
5779
  # be created aligned with the recurring commit's starting_at rather than the usage
5766
- # invoice dates.
5780
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5781
+ # are unable to be created with seat-based subscriptions
5767
5782
  sig do
5768
5783
  returns(
5769
5784
  T.nilable(
@@ -5894,7 +5909,8 @@ module MetronomeSDK
5894
5909
  # The commits will be created on the usage invoice frequency. If provided: - The
5895
5910
  # period defined in the duration will correspond to this frequency. - Commits will
5896
5911
  # be created aligned with the recurring commit's starting_at rather than the usage
5897
- # invoice dates.
5912
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5913
+ # are unable to be created with seat-based subscriptions
5898
5914
  recurrence_frequency: nil,
5899
5915
  # Will be passed down to the individual commits. This controls how much of an
5900
5916
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -6488,7 +6504,8 @@ module MetronomeSDK
6488
6504
  # The commits will be created on the usage invoice frequency. If provided: - The
6489
6505
  # period defined in the duration will correspond to this frequency. - Commits will
6490
6506
  # be created aligned with the recurring commit's starting_at rather than the usage
6491
- # invoice dates.
6507
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
6508
+ # are unable to be created with seat-based subscriptions
6492
6509
  module RecurrenceFrequency
6493
6510
  extend MetronomeSDK::Internal::Type::Enum
6494
6511
 
@@ -6715,7 +6732,8 @@ module MetronomeSDK
6715
6732
  # The commits will be created on the usage invoice frequency. If provided: - The
6716
6733
  # period defined in the duration will correspond to this frequency. - Commits will
6717
6734
  # be created aligned with the recurring commit's starting_at rather than the usage
6718
- # invoice dates.
6735
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
6736
+ # are unable to be created with seat-based subscriptions
6719
6737
  sig do
6720
6738
  returns(
6721
6739
  T.nilable(
@@ -6842,7 +6860,8 @@ module MetronomeSDK
6842
6860
  # The commits will be created on the usage invoice frequency. If provided: - The
6843
6861
  # period defined in the duration will correspond to this frequency. - Commits will
6844
6862
  # be created aligned with the recurring commit's starting_at rather than the usage
6845
- # invoice dates.
6863
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
6864
+ # are unable to be created with seat-based subscriptions
6846
6865
  recurrence_frequency: nil,
6847
6866
  # Will be passed down to the individual commits. This controls how much of an
6848
6867
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -7285,7 +7304,8 @@ module MetronomeSDK
7285
7304
  # The commits will be created on the usage invoice frequency. If provided: - The
7286
7305
  # period defined in the duration will correspond to this frequency. - Commits will
7287
7306
  # be created aligned with the recurring commit's starting_at rather than the usage
7288
- # invoice dates.
7307
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
7308
+ # are unable to be created with seat-based subscriptions
7289
7309
  module RecurrenceFrequency
7290
7310
  extend MetronomeSDK::Internal::Type::Enum
7291
7311
 
@@ -7625,7 +7645,9 @@ module MetronomeSDK
7625
7645
 
7626
7646
  sig do
7627
7647
  returns(
7628
- MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration
7648
+ T.nilable(
7649
+ MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration
7650
+ )
7629
7651
  )
7630
7652
  end
7631
7653
  attr_reader :revenue_system_configuration
@@ -7633,7 +7655,9 @@ module MetronomeSDK
7633
7655
  sig do
7634
7656
  params(
7635
7657
  revenue_system_configuration:
7636
- MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration::OrHash
7658
+ T.nilable(
7659
+ MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration::OrHash
7660
+ )
7637
7661
  ).void
7638
7662
  end
7639
7663
  attr_writer :revenue_system_configuration
@@ -7650,7 +7674,9 @@ module MetronomeSDK
7650
7674
  params(
7651
7675
  effective_at: Time,
7652
7676
  revenue_system_configuration:
7653
- MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration::OrHash,
7677
+ T.nilable(
7678
+ MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration::OrHash
7679
+ ),
7654
7680
  effective_until: Time
7655
7681
  ).returns(T.attached_class)
7656
7682
  end
@@ -7669,7 +7695,9 @@ module MetronomeSDK
7669
7695
  {
7670
7696
  effective_at: Time,
7671
7697
  revenue_system_configuration:
7672
- MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration,
7698
+ T.nilable(
7699
+ MetronomeSDK::ContractV2::RevenueSystemConfigurationSchedule::RevenueSystemConfiguration
7700
+ ),
7673
7701
  effective_until: Time
7674
7702
  }
7675
7703
  )
@@ -479,11 +479,6 @@ module MetronomeSDK
479
479
  end
480
480
  OrSymbol = T.type_alias { T.any(Symbol, String) }
481
481
 
482
- SUPERSEDE =
483
- T.let(
484
- :SUPERSEDE,
485
- MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
486
- )
487
482
  RENEWAL =
488
483
  T.let(
489
484
  :RENEWAL,
@@ -800,7 +795,8 @@ module MetronomeSDK
800
795
  # The commits will be created on the usage invoice frequency. If provided: - The
801
796
  # period defined in the duration will correspond to this frequency. - Commits will
802
797
  # be created aligned with the recurring commit's starting_at rather than the usage
803
- # invoice dates.
798
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
799
+ # are unable to be created with seat-based subscriptions
804
800
  sig do
805
801
  returns(
806
802
  T.nilable(
@@ -932,7 +928,8 @@ module MetronomeSDK
932
928
  # The commits will be created on the usage invoice frequency. If provided: - The
933
929
  # period defined in the duration will correspond to this frequency. - Commits will
934
930
  # be created aligned with the recurring commit's starting_at rather than the usage
935
- # invoice dates.
931
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
932
+ # are unable to be created with seat-based subscriptions
936
933
  recurrence_frequency: nil,
937
934
  # Will be passed down to the individual commits. This controls how much of an
938
935
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -1535,7 +1532,8 @@ module MetronomeSDK
1535
1532
  # The commits will be created on the usage invoice frequency. If provided: - The
1536
1533
  # period defined in the duration will correspond to this frequency. - Commits will
1537
1534
  # be created aligned with the recurring commit's starting_at rather than the usage
1538
- # invoice dates.
1535
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1536
+ # are unable to be created with seat-based subscriptions
1539
1537
  module RecurrenceFrequency
1540
1538
  extend MetronomeSDK::Internal::Type::Enum
1541
1539
 
@@ -1775,7 +1773,8 @@ module MetronomeSDK
1775
1773
  # The commits will be created on the usage invoice frequency. If provided: - The
1776
1774
  # period defined in the duration will correspond to this frequency. - Commits will
1777
1775
  # be created aligned with the recurring commit's starting_at rather than the usage
1778
- # invoice dates.
1776
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1777
+ # are unable to be created with seat-based subscriptions
1779
1778
  sig do
1780
1779
  returns(
1781
1780
  T.nilable(
@@ -1903,7 +1902,8 @@ module MetronomeSDK
1903
1902
  # The commits will be created on the usage invoice frequency. If provided: - The
1904
1903
  # period defined in the duration will correspond to this frequency. - Commits will
1905
1904
  # be created aligned with the recurring commit's starting_at rather than the usage
1906
- # invoice dates.
1905
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1906
+ # are unable to be created with seat-based subscriptions
1907
1907
  recurrence_frequency: nil,
1908
1908
  # Will be passed down to the individual commits. This controls how much of an
1909
1909
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -2353,7 +2353,8 @@ module MetronomeSDK
2353
2353
  # The commits will be created on the usage invoice frequency. If provided: - The
2354
2354
  # period defined in the duration will correspond to this frequency. - Commits will
2355
2355
  # be created aligned with the recurring commit's starting_at rather than the usage
2356
- # invoice dates.
2356
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2357
+ # are unable to be created with seat-based subscriptions
2357
2358
  module RecurrenceFrequency
2358
2359
  extend MetronomeSDK::Internal::Type::Enum
2359
2360