metronome-sdk 2.2.0 → 3.0.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +10 -1
  4. data/lib/metronome_sdk/models/commit.rb +69 -1
  5. data/lib/metronome_sdk/models/contract_v2.rb +18 -2
  6. data/lib/metronome_sdk/models/credit.rb +69 -1
  7. data/lib/metronome_sdk/models/rate.rb +1 -11
  8. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +1 -11
  9. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +1 -11
  10. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +1 -11
  11. data/lib/metronome_sdk/models/v1/custom_field_add_key_params.rb +4 -0
  12. data/lib/metronome_sdk/models/v1/custom_field_delete_values_params.rb +4 -0
  13. data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +4 -0
  14. data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +4 -0
  15. data/lib/metronome_sdk/models/v1/custom_field_remove_key_params.rb +4 -0
  16. data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +4 -0
  17. data/lib/metronome_sdk/models/v1/customers/invoice.rb +51 -1
  18. data/lib/metronome_sdk/models/v1/payment.rb +40 -1
  19. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -3
  20. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +1 -1
  21. data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +5 -5
  22. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +7 -7
  23. data/lib/metronome_sdk/resources/v1/customers/plans.rb +5 -5
  24. data/lib/metronome_sdk/resources/v1/customers.rb +7 -7
  25. data/lib/metronome_sdk/resources/v1/plans.rb +2 -2
  26. data/lib/metronome_sdk/resources/v1/usage.rb +7 -7
  27. data/lib/metronome_sdk/version.rb +1 -1
  28. data/rbi/metronome_sdk/models/commit.rbi +171 -0
  29. data/rbi/metronome_sdk/models/contract_v2.rbi +22 -0
  30. data/rbi/metronome_sdk/models/credit.rbi +171 -0
  31. data/rbi/metronome_sdk/models/rate.rbi +3 -18
  32. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +3 -18
  33. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +0 -15
  34. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +3 -18
  35. data/rbi/metronome_sdk/models/v1/custom_field_add_key_params.rbi +20 -0
  36. data/rbi/metronome_sdk/models/v1/custom_field_delete_values_params.rbi +20 -0
  37. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_params.rbi +20 -0
  38. data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +20 -0
  39. data/rbi/metronome_sdk/models/v1/custom_field_remove_key_params.rbi +20 -0
  40. data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +20 -0
  41. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +89 -0
  42. data/rbi/metronome_sdk/models/v1/payment.rbi +79 -0
  43. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +0 -5
  44. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +1 -1
  45. data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +5 -5
  46. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -7
  47. data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +5 -5
  48. data/rbi/metronome_sdk/resources/v1/customers.rbi +7 -7
  49. data/rbi/metronome_sdk/resources/v1/plans.rbi +2 -2
  50. data/rbi/metronome_sdk/resources/v1/usage.rbi +7 -7
  51. data/sig/metronome_sdk/models/commit.rbs +74 -0
  52. data/sig/metronome_sdk/models/contract_v2.rbs +14 -0
  53. data/sig/metronome_sdk/models/credit.rbs +74 -0
  54. data/sig/metronome_sdk/models/rate.rbs +3 -10
  55. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +3 -10
  56. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +1 -8
  57. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +3 -10
  58. data/sig/metronome_sdk/models/v1/custom_field_add_key_params.rbs +8 -0
  59. data/sig/metronome_sdk/models/v1/custom_field_delete_values_params.rbs +8 -0
  60. data/sig/metronome_sdk/models/v1/custom_field_list_keys_params.rbs +8 -0
  61. data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +8 -0
  62. data/sig/metronome_sdk/models/v1/custom_field_remove_key_params.rbs +8 -0
  63. data/sig/metronome_sdk/models/v1/custom_field_set_values_params.rbs +8 -0
  64. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +46 -0
  65. data/sig/metronome_sdk/models/v1/payment.rbs +45 -0
  66. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +0 -1
  67. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24c53b426a786c58cd7f8d4ae93526596c3a4fa93b6b662e5de17309317f36e5
4
- data.tar.gz: 1409a92e54deccc0ae37945c293b208cf27149114eae2509af99fe87a4584ece
3
+ metadata.gz: a988182a5b3f8a91e63e06cc9ed209042ea94b2b5d93b70767ea7b1af2509e65
4
+ data.tar.gz: 54b423b7428e7994d37133d36b0357032f84db951abe9bb5bb5f424c40247241
5
5
  SHA512:
6
- metadata.gz: 7472b69ef8d4e84138a0b0818d3cf770268065044819e86804727fc00dc92c66b4f1e36ffac58131da73983ab124d3872aae8054bbc4731581aab51168eb08b3
7
- data.tar.gz: 5cffe8618d7460adf817768b5a91d0d478c1ed1103211571def61d3e76c5fa31adf91847158d62e188fd170edc88d718f1501c5966249314acd45f92dfa1a716
6
+ metadata.gz: 3ea8e0edd4dc7010d06dd66b20834d5673d79fbfb2c76211bf6c9891f5e836858ad3e8a640e21774e0da7cd9cb9276e1029f8b76b0d867a1d5a95ab195a8773e
7
+ data.tar.gz: 8a585909ec60973a81a8daeed7a6c6bb0a3f11cb88c03be03903f173c5a501a88a07ec42ff4e344abd9151291724e88e55156f0b137ec9640dcb1b0a43e9d2b3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0 (2026-01-17)
4
+
5
+ Full Changelog: [v2.2.0...v3.0.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v2.2.0...v3.0.0)
6
+
7
+ ### Features
8
+
9
+ * [ORCH-739] expose rev rec data in api ([1e5912a](https://github.com/Metronome-Industries/metronome-ruby/commit/1e5912a60dd3bbfb37740057beac9055f96911e4))
10
+ * [ORCH-739] expose rev rec data in api ([ea99ea2](https://github.com/Metronome-Industries/metronome-ruby/commit/ea99ea27275244d1854395b0906bf1402f09308f))
11
+ * add recurring commit ID and subscription config to commit/credit response schema ([87a38ed](https://github.com/Metronome-Industries/metronome-ruby/commit/87a38ed2828cac15073a4650347ff2b6d3c14935))
12
+ * Add support for custom fields on package terms ([e6ca46b](https://github.com/Metronome-Industries/metronome-ruby/commit/e6ca46b3d30e047799c76d5b6e9407622c94f027))
13
+ * remove use list prices config in requests and responses ([44e02d3](https://github.com/Metronome-Industries/metronome-ruby/commit/44e02d367bedd33dca17c34d45006d21ef630abd))
14
+ * Revert [ORCH-739] expose rev rec data in api ([656d322](https://github.com/Metronome-Industries/metronome-ruby/commit/656d322008021add127b8b6a76e70f3576090e2b))
15
+
16
+
17
+ ### Chores
18
+
19
+ * fix typo in descriptions ([fdce90d](https://github.com/Metronome-Industries/metronome-ruby/commit/fdce90df6ae0e1223005482011560ba7eb53821c))
20
+ * **internal:** codegen related update ([64bba19](https://github.com/Metronome-Industries/metronome-ruby/commit/64bba1958c92d4d260271fffc212a7ac904fe881))
21
+ * **internal:** codegen related update ([3237dc8](https://github.com/Metronome-Industries/metronome-ruby/commit/3237dc894931f5a4a4504f545f46be1a0d9b8841))
22
+ * **internal:** update `actions/checkout` version ([5aa0985](https://github.com/Metronome-Industries/metronome-ruby/commit/5aa09854840915a76d003d2e94ea7b25478ca198))
23
+
24
+
25
+ ### Documentation
26
+
27
+ * prominently feature MCP server setup in root SDK readmes ([353dc18](https://github.com/Metronome-Industries/metronome-ruby/commit/353dc181c9ce9b55c3e588849391c257ca6e79d8))
28
+
3
29
  ## 2.2.0 (2025-12-18)
4
30
 
5
31
  Full Changelog: [v2.1.0...v2.2.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v2.1.0...v2.2.0)
data/README.md CHANGED
@@ -4,6 +4,15 @@ The Metronome Ruby library provides convenient access to the Metronome REST API
4
4
 
5
5
  It is generated with [Stainless](https://www.stainless.com/).
6
6
 
7
+ ## MCP Server
8
+
9
+ Use the Metronome MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
10
+
11
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40metronome%2Fmcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtZXRyb25vbWUvbWNwIl19)
12
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40metronome%2Fmcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40metronome%2Fmcp%22%5D%7D)
13
+
14
+ > Note: You may need to set environment variables in your MCP client.
15
+
7
16
  ## Documentation
8
17
 
9
18
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/metronome-sdk).
@@ -17,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
17
26
  <!-- x-release-please-start-version -->
18
27
 
19
28
  ```ruby
20
- gem "metronome-sdk", "~> 2.2.0"
29
+ gem "metronome-sdk", "~> 3.0.0"
21
30
  ```
22
31
 
23
32
  <!-- x-release-please-end -->
@@ -140,6 +140,13 @@ module MetronomeSDK
140
140
  # @return [Symbol, MetronomeSDK::Models::Commit::RateType, nil]
141
141
  optional :rate_type, enum: -> { MetronomeSDK::Commit::RateType }
142
142
 
143
+ # @!attribute recurring_commit_id
144
+ # The ID of the recurring commit that this commit was generated from, if
145
+ # applicable.
146
+ #
147
+ # @return [String, nil]
148
+ optional :recurring_commit_id, String
149
+
143
150
  # @!attribute rolled_over_from
144
151
  #
145
152
  # @return [MetronomeSDK::Models::Commit::RolledOverFrom, nil]
@@ -164,6 +171,13 @@ module MetronomeSDK
164
171
  # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
165
172
  optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
166
173
 
174
+ # @!attribute subscription_config
175
+ # The subscription configuration for this commit, if it was generated from a
176
+ # recurring commit with a subscription attached.
177
+ #
178
+ # @return [MetronomeSDK::Models::Commit::SubscriptionConfig, nil]
179
+ optional :subscription_config, -> { MetronomeSDK::Commit::SubscriptionConfig }
180
+
167
181
  # @!attribute uniqueness_key
168
182
  # Prevents the creation of duplicates. If a request to create a commit or credit
169
183
  # is made with a uniqueness key that was previously used to create a commit or
@@ -173,7 +187,7 @@ module MetronomeSDK
173
187
  # @return [String, nil]
174
188
  optional :uniqueness_key, String
175
189
 
176
- # @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, amount: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, uniqueness_key: nil)
190
+ # @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, amount: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_commit_id: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil, uniqueness_key: nil)
177
191
  # Some parameter documentations has been truncated, see
178
192
  # {MetronomeSDK::Models::Commit} for more details.
179
193
  #
@@ -221,6 +235,8 @@ module MetronomeSDK
221
235
  #
222
236
  # @param rate_type [Symbol, MetronomeSDK::Models::Commit::RateType]
223
237
  #
238
+ # @param recurring_commit_id [String] The ID of the recurring commit that this commit was generated from, if applicabl
239
+ #
224
240
  # @param rolled_over_from [MetronomeSDK::Models::Commit::RolledOverFrom]
225
241
  #
226
242
  # @param rollover_fraction [Float]
@@ -229,6 +245,8 @@ module MetronomeSDK
229
245
  #
230
246
  # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
231
247
  #
248
+ # @param subscription_config [MetronomeSDK::Models::Commit::SubscriptionConfig] The subscription configuration for this commit, if it was generated from a recur
249
+ #
232
250
  # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a commit or credit i
233
251
 
234
252
  # @see MetronomeSDK::Models::Commit#product
@@ -934,6 +952,56 @@ module MetronomeSDK
934
952
  # @param commit_id [String]
935
953
  # @param contract_id [String]
936
954
  end
955
+
956
+ # @see MetronomeSDK::Models::Commit#subscription_config
957
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
958
+ # @!attribute allocation
959
+ #
960
+ # @return [Symbol, MetronomeSDK::Models::Commit::SubscriptionConfig::Allocation, nil]
961
+ optional :allocation, enum: -> { MetronomeSDK::Commit::SubscriptionConfig::Allocation }
962
+
963
+ # @!attribute apply_seat_increase_config
964
+ #
965
+ # @return [MetronomeSDK::Models::Commit::SubscriptionConfig::ApplySeatIncreaseConfig, nil]
966
+ optional :apply_seat_increase_config,
967
+ -> { MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig }
968
+
969
+ # @!attribute subscription_id
970
+ #
971
+ # @return [String, nil]
972
+ optional :subscription_id, String
973
+
974
+ # @!method initialize(allocation: nil, apply_seat_increase_config: nil, subscription_id: nil)
975
+ # The subscription configuration for this commit, if it was generated from a
976
+ # recurring commit with a subscription attached.
977
+ #
978
+ # @param allocation [Symbol, MetronomeSDK::Models::Commit::SubscriptionConfig::Allocation]
979
+ # @param apply_seat_increase_config [MetronomeSDK::Models::Commit::SubscriptionConfig::ApplySeatIncreaseConfig]
980
+ # @param subscription_id [String]
981
+
982
+ # @see MetronomeSDK::Models::Commit::SubscriptionConfig#allocation
983
+ module Allocation
984
+ extend MetronomeSDK::Internal::Type::Enum
985
+
986
+ INDIVIDUAL = :INDIVIDUAL
987
+ POOLED = :POOLED
988
+
989
+ # @!method self.values
990
+ # @return [Array<Symbol>]
991
+ end
992
+
993
+ # @see MetronomeSDK::Models::Commit::SubscriptionConfig#apply_seat_increase_config
994
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
995
+ # @!attribute is_prorated
996
+ # Indicates whether a mid-period seat increase should be prorated.
997
+ #
998
+ # @return [Boolean]
999
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
1000
+
1001
+ # @!method initialize(is_prorated:)
1002
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
1003
+ end
1004
+ end
937
1005
  end
938
1006
  end
939
1007
  end
@@ -421,6 +421,12 @@ module MetronomeSDK
421
421
  # @return [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType, nil]
422
422
  optional :rate_type, enum: -> { MetronomeSDK::ContractV2::Commit::RateType }
423
423
 
424
+ # @!attribute recurring_commit_id
425
+ # The ID of the recurring commit that created this commit
426
+ #
427
+ # @return [String, nil]
428
+ optional :recurring_commit_id, String
429
+
424
430
  # @!attribute rolled_over_from
425
431
  #
426
432
  # @return [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom, nil]
@@ -451,7 +457,7 @@ module MetronomeSDK
451
457
  # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
452
458
  optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
453
459
 
454
- # @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
460
+ # @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_commit_id: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
455
461
  # Some parameter documentations has been truncated, see
456
462
  # {MetronomeSDK::Models::ContractV2::Commit} for more details.
457
463
  #
@@ -497,6 +503,8 @@ module MetronomeSDK
497
503
  #
498
504
  # @param rate_type [Symbol, MetronomeSDK::Models::ContractV2::Commit::RateType]
499
505
  #
506
+ # @param recurring_commit_id [String] The ID of the recurring commit that created this commit
507
+ #
500
508
  # @param rolled_over_from [MetronomeSDK::Models::ContractV2::Commit::RolledOverFrom]
501
509
  #
502
510
  # @param rollover_fraction [Float]
@@ -1706,6 +1714,12 @@ module MetronomeSDK
1706
1714
  # @return [Float, nil]
1707
1715
  optional :priority, Float
1708
1716
 
1717
+ # @!attribute recurring_credit_id
1718
+ # The ID of the recurring credit that created this credit
1719
+ #
1720
+ # @return [String, nil]
1721
+ optional :recurring_credit_id, String
1722
+
1709
1723
  # @!attribute salesforce_opportunity_id
1710
1724
  # This field's availability is dependent on your client's configuration.
1711
1725
  #
@@ -1726,7 +1740,7 @@ module MetronomeSDK
1726
1740
  # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1727
1741
  optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
1728
1742
 
1729
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, created_at: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
1743
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, created_at: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, recurring_credit_id: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
1730
1744
  # Some parameter documentations has been truncated, see
1731
1745
  # {MetronomeSDK::Models::ContractV2::Credit} for more details.
1732
1746
  #
@@ -1764,6 +1778,8 @@ module MetronomeSDK
1764
1778
  #
1765
1779
  # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
1766
1780
  #
1781
+ # @param recurring_credit_id [String] The ID of the recurring credit that created this credit
1782
+ #
1767
1783
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
1768
1784
  #
1769
1785
  # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
@@ -104,6 +104,13 @@ module MetronomeSDK
104
104
  # @return [Symbol, MetronomeSDK::Models::Credit::RateType, nil]
105
105
  optional :rate_type, enum: -> { MetronomeSDK::Credit::RateType }
106
106
 
107
+ # @!attribute recurring_credit_id
108
+ # The ID of the recurring credit that this credit was generated from, if
109
+ # applicable.
110
+ #
111
+ # @return [String, nil]
112
+ optional :recurring_credit_id, String
113
+
107
114
  # @!attribute salesforce_opportunity_id
108
115
  # This field's availability is dependent on your client's configuration.
109
116
  #
@@ -118,6 +125,13 @@ module MetronomeSDK
118
125
  # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
119
126
  optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
120
127
 
128
+ # @!attribute subscription_config
129
+ # The subscription configuration for this credit, if it was generated from a
130
+ # recurring credit with a subscription attached.
131
+ #
132
+ # @return [MetronomeSDK::Models::Credit::SubscriptionConfig, nil]
133
+ optional :subscription_config, -> { MetronomeSDK::Credit::SubscriptionConfig }
134
+
121
135
  # @!attribute uniqueness_key
122
136
  # Prevents the creation of duplicates. If a request to create a commit or credit
123
137
  # is made with a uniqueness key that was previously used to create a commit or
@@ -127,7 +141,7 @@ module MetronomeSDK
127
141
  # @return [String, nil]
128
142
  optional :uniqueness_key, String
129
143
 
130
- # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, salesforce_opportunity_id: nil, specifiers: nil, uniqueness_key: nil)
144
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_credit_id: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil, uniqueness_key: nil)
131
145
  # Some parameter documentations has been truncated, see
132
146
  # {MetronomeSDK::Models::Credit} for more details.
133
147
  #
@@ -165,10 +179,14 @@ module MetronomeSDK
165
179
  #
166
180
  # @param rate_type [Symbol, MetronomeSDK::Models::Credit::RateType]
167
181
  #
182
+ # @param recurring_credit_id [String] The ID of the recurring credit that this credit was generated from, if applicabl
183
+ #
168
184
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
169
185
  #
170
186
  # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
171
187
  #
188
+ # @param subscription_config [MetronomeSDK::Models::Credit::SubscriptionConfig] The subscription configuration for this credit, if it was generated from a recur
189
+ #
172
190
  # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a commit or credit i
173
191
 
174
192
  # @see MetronomeSDK::Models::Credit#product
@@ -543,6 +561,56 @@ module MetronomeSDK
543
561
  # @!method self.values
544
562
  # @return [Array<Symbol>]
545
563
  end
564
+
565
+ # @see MetronomeSDK::Models::Credit#subscription_config
566
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
567
+ # @!attribute allocation
568
+ #
569
+ # @return [Symbol, MetronomeSDK::Models::Credit::SubscriptionConfig::Allocation, nil]
570
+ optional :allocation, enum: -> { MetronomeSDK::Credit::SubscriptionConfig::Allocation }
571
+
572
+ # @!attribute apply_seat_increase_config
573
+ #
574
+ # @return [MetronomeSDK::Models::Credit::SubscriptionConfig::ApplySeatIncreaseConfig, nil]
575
+ optional :apply_seat_increase_config,
576
+ -> { MetronomeSDK::Credit::SubscriptionConfig::ApplySeatIncreaseConfig }
577
+
578
+ # @!attribute subscription_id
579
+ #
580
+ # @return [String, nil]
581
+ optional :subscription_id, String
582
+
583
+ # @!method initialize(allocation: nil, apply_seat_increase_config: nil, subscription_id: nil)
584
+ # The subscription configuration for this credit, if it was generated from a
585
+ # recurring credit with a subscription attached.
586
+ #
587
+ # @param allocation [Symbol, MetronomeSDK::Models::Credit::SubscriptionConfig::Allocation]
588
+ # @param apply_seat_increase_config [MetronomeSDK::Models::Credit::SubscriptionConfig::ApplySeatIncreaseConfig]
589
+ # @param subscription_id [String]
590
+
591
+ # @see MetronomeSDK::Models::Credit::SubscriptionConfig#allocation
592
+ module Allocation
593
+ extend MetronomeSDK::Internal::Type::Enum
594
+
595
+ INDIVIDUAL = :INDIVIDUAL
596
+ POOLED = :POOLED
597
+
598
+ # @!method self.values
599
+ # @return [Array<Symbol>]
600
+ end
601
+
602
+ # @see MetronomeSDK::Models::Credit::SubscriptionConfig#apply_seat_increase_config
603
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
604
+ # @!attribute is_prorated
605
+ # Indicates whether a mid-period seat increase should be prorated.
606
+ #
607
+ # @return [Boolean]
608
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
609
+
610
+ # @!method initialize(is_prorated:)
611
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
612
+ end
613
+ end
546
614
  end
547
615
  end
548
616
  end
@@ -53,15 +53,7 @@ module MetronomeSDK
53
53
  # @return [Array<MetronomeSDK::Models::Tier>, nil]
54
54
  optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
55
55
 
56
- # @!attribute use_list_prices
57
- # Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
58
- # using list prices rather than the standard rates for this product on the
59
- # contract.
60
- #
61
- # @return [Boolean, nil]
62
- optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean
63
-
64
- # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil)
56
+ # @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil)
65
57
  # Some parameter documentations has been truncated, see
66
58
  # {MetronomeSDK::Models::Rate} for more details.
67
59
  #
@@ -80,8 +72,6 @@ module MetronomeSDK
80
72
  # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
81
73
  #
82
74
  # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
83
- #
84
- # @param use_list_prices [Boolean] Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
85
75
 
86
76
  # @see MetronomeSDK::Models::Rate#rate_type
87
77
  module RateType
@@ -120,15 +120,7 @@ module MetronomeSDK
120
120
  # @return [Array<MetronomeSDK::Models::Tier>, nil]
121
121
  optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
122
122
 
123
- # @!attribute use_list_prices
124
- # Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
125
- # using list prices rather than the standard rates for this product on the
126
- # contract.
127
- #
128
- # @return [Boolean, nil]
129
- optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean
130
-
131
- # @!method initialize(entitled:, product_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil)
123
+ # @!method initialize(entitled:, product_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil)
132
124
  # Some parameter documentations has been truncated, see
133
125
  # {MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate} for
134
126
  # more details.
@@ -160,8 +152,6 @@ module MetronomeSDK
160
152
  # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
161
153
  #
162
154
  # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
163
- #
164
- # @param use_list_prices [Boolean] Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
165
155
 
166
156
  # @see MetronomeSDK::Models::V1::Contracts::RateCards::RateAddManyParams::Rate#rate_type
167
157
  module RateType
@@ -108,15 +108,7 @@ module MetronomeSDK
108
108
  # @return [Array<MetronomeSDK::Models::Tier>, nil]
109
109
  optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
110
110
 
111
- # @!attribute use_list_prices
112
- # Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
113
- # using list prices rather than the standard rates for this product on the
114
- # contract.
115
- #
116
- # @return [Boolean, nil]
117
- optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean
118
-
119
- # @!method initialize(entitled:, product_id:, rate_card_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil, request_options: {})
111
+ # @!method initialize(entitled:, product_id:, rate_card_id:, rate_type:, starting_at:, billing_frequency: nil, commit_rate: nil, credit_type_id: nil, custom_rate: nil, ending_before: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, request_options: {})
120
112
  # Some parameter documentations has been truncated, see
121
113
  # {MetronomeSDK::Models::V1::Contracts::RateCards::RateAddParams} for more
122
114
  # details.
@@ -151,8 +143,6 @@ module MetronomeSDK
151
143
  #
152
144
  # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
153
145
  #
154
- # @param use_list_prices [Boolean] Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
155
- #
156
146
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
157
147
 
158
148
  module RateType
@@ -75,15 +75,7 @@ module MetronomeSDK
75
75
  # @return [Array<MetronomeSDK::Models::Tier>, nil]
76
76
  optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
77
77
 
78
- # @!attribute use_list_prices
79
- # Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
80
- # using list prices rather than the standard rates for this product on the
81
- # contract.
82
- #
83
- # @return [Boolean, nil]
84
- optional :use_list_prices, MetronomeSDK::Internal::Type::Boolean
85
-
86
- # @!method initialize(rate_type:, commit_rate: nil, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil, use_list_prices: nil)
78
+ # @!method initialize(rate_type:, commit_rate: nil, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, pricing_group_values: nil, quantity: nil, tiers: nil)
87
79
  # Some parameter documentations has been truncated, see
88
80
  # {MetronomeSDK::Models::V1::Contracts::RateCards::RateAddResponse::Data} for more
89
81
  # details.
@@ -105,8 +97,6 @@ module MetronomeSDK
105
97
  # @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
106
98
  #
107
99
  # @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
108
- #
109
- # @param use_list_prices [Boolean] Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
110
100
 
111
101
  # @see MetronomeSDK::Models::V1::Contracts::RateCards::RateAddResponse::Data#rate_type
112
102
  module RateType
@@ -50,6 +50,10 @@ module MetronomeSDK
50
50
  RATE_CARD = :rate_card
51
51
  SCHEDULED_CHARGE = :scheduled_charge
52
52
  SUBSCRIPTION = :subscription
53
+ PACKAGE_COMMIT = :package_commit
54
+ PACKAGE_CREDIT = :package_credit
55
+ PACKAGE_SUBSCRIPTION = :package_subscription
56
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
53
57
 
54
58
  # @!method self.values
55
59
  # @return [Array<Symbol>]
@@ -50,6 +50,10 @@ module MetronomeSDK
50
50
  RATE_CARD = :rate_card
51
51
  SCHEDULED_CHARGE = :scheduled_charge
52
52
  SUBSCRIPTION = :subscription
53
+ PACKAGE_COMMIT = :package_commit
54
+ PACKAGE_CREDIT = :package_credit
55
+ PACKAGE_SUBSCRIPTION = :package_subscription
56
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
53
57
 
54
58
  # @!method self.values
55
59
  # @return [Array<Symbol>]
@@ -49,6 +49,10 @@ module MetronomeSDK
49
49
  RATE_CARD = :rate_card
50
50
  SCHEDULED_CHARGE = :scheduled_charge
51
51
  SUBSCRIPTION = :subscription
52
+ PACKAGE_COMMIT = :package_commit
53
+ PACKAGE_CREDIT = :package_credit
54
+ PACKAGE_SUBSCRIPTION = :package_subscription
55
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
52
56
 
53
57
  # @!method self.values
54
58
  # @return [Array<Symbol>]
@@ -47,6 +47,10 @@ module MetronomeSDK
47
47
  RATE_CARD = :rate_card
48
48
  SCHEDULED_CHARGE = :scheduled_charge
49
49
  SUBSCRIPTION = :subscription
50
+ PACKAGE_COMMIT = :package_commit
51
+ PACKAGE_CREDIT = :package_credit
52
+ PACKAGE_SUBSCRIPTION = :package_subscription
53
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
50
54
 
51
55
  # @!method self.values
52
56
  # @return [Array<Symbol>]
@@ -44,6 +44,10 @@ module MetronomeSDK
44
44
  RATE_CARD = :rate_card
45
45
  SCHEDULED_CHARGE = :scheduled_charge
46
46
  SUBSCRIPTION = :subscription
47
+ PACKAGE_COMMIT = :package_commit
48
+ PACKAGE_CREDIT = :package_credit
49
+ PACKAGE_SUBSCRIPTION = :package_subscription
50
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
47
51
 
48
52
  # @!method self.values
49
53
  # @return [Array<Symbol>]
@@ -54,6 +54,10 @@ module MetronomeSDK
54
54
  RATE_CARD = :rate_card
55
55
  SCHEDULED_CHARGE = :scheduled_charge
56
56
  SUBSCRIPTION = :subscription
57
+ PACKAGE_COMMIT = :package_commit
58
+ PACKAGE_CREDIT = :package_credit
59
+ PACKAGE_SUBSCRIPTION = :package_subscription
60
+ PACKAGE_SCHEDULED_CHARGE = :package_scheduled_charge
57
61
 
58
62
  # @!method self.values
59
63
  # @return [Array<Symbol>]
@@ -158,6 +158,15 @@ module MetronomeSDK
158
158
  # @return [MetronomeSDK::Models::V1::Customers::Invoice::ResellerRoyalty, nil]
159
159
  optional :reseller_royalty, -> { MetronomeSDK::V1::Customers::Invoice::ResellerRoyalty }
160
160
 
161
+ # @!attribute revenue_system_invoices
162
+ #
163
+ # @return [Array<MetronomeSDK::Models::V1::Customers::Invoice::RevenueSystemInvoice>, nil]
164
+ optional :revenue_system_invoices,
165
+ -> {
166
+ MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice]
167
+ },
168
+ nil?: true
169
+
161
170
  # @!attribute salesforce_opportunity_id
162
171
  # This field's availability is dependent on your client's configuration.
163
172
  #
@@ -175,7 +184,7 @@ module MetronomeSDK
175
184
  # @return [Float, nil]
176
185
  optional :subtotal, Float
177
186
 
178
- # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
187
+ # @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, revenue_system_invoices: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
179
188
  # Some parameter documentations has been truncated, see
180
189
  # {MetronomeSDK::Models::V1::Customers::Invoice} for more details.
181
190
  #
@@ -233,6 +242,8 @@ module MetronomeSDK
233
242
  #
234
243
  # @param reseller_royalty [MetronomeSDK::Models::V1::Customers::Invoice::ResellerRoyalty] Only present for contract invoices with reseller royalties.
235
244
  #
245
+ # @param revenue_system_invoices [Array<MetronomeSDK::Models::V1::Customers::Invoice::RevenueSystemInvoice>, nil]
246
+ #
236
247
  # @param salesforce_opportunity_id [String] This field's availability is dependent on your client's configuration.
237
248
  #
238
249
  # @param start_timestamp [Time] Beginning of the usage period this invoice covers (UTC)
@@ -1370,6 +1381,45 @@ module MetronomeSDK
1370
1381
  # @param gcp_offer_id [String]
1371
1382
  end
1372
1383
  end
1384
+
1385
+ class RevenueSystemInvoice < MetronomeSDK::Internal::Type::BaseModel
1386
+ # @!attribute revenue_system_external_entity_type
1387
+ #
1388
+ # @return [String]
1389
+ required :revenue_system_external_entity_type, String
1390
+
1391
+ # @!attribute revenue_system_provider
1392
+ #
1393
+ # @return [String]
1394
+ required :revenue_system_provider, String
1395
+
1396
+ # @!attribute sync_status
1397
+ #
1398
+ # @return [String]
1399
+ required :sync_status, String
1400
+
1401
+ # @!attribute error_message
1402
+ # The error message from the revenue system, if available.
1403
+ #
1404
+ # @return [String, nil]
1405
+ optional :error_message, String
1406
+
1407
+ # @!attribute revenue_system_external_entity_id
1408
+ #
1409
+ # @return [String, nil]
1410
+ optional :revenue_system_external_entity_id, String
1411
+
1412
+ # @!method initialize(revenue_system_external_entity_type:, revenue_system_provider:, sync_status:, error_message: nil, revenue_system_external_entity_id: nil)
1413
+ # @param revenue_system_external_entity_type [String]
1414
+ #
1415
+ # @param revenue_system_provider [String]
1416
+ #
1417
+ # @param sync_status [String]
1418
+ #
1419
+ # @param error_message [String] The error message from the revenue system, if available.
1420
+ #
1421
+ # @param revenue_system_external_entity_id [String]
1422
+ end
1373
1423
  end
1374
1424
  end
1375
1425
  end