metronome-sdk 0.1.0 → 0.2.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +1 -1
  5. data/lib/metronome_sdk/models/commit.rb +35 -5
  6. data/lib/metronome_sdk/models/contract_without_amendments.rb +128 -2
  7. data/lib/metronome_sdk/models/credit.rb +21 -3
  8. data/lib/metronome_sdk/models/v1/alert_create_params.rb +9 -11
  9. data/lib/metronome_sdk/models/v1/contract_create_params.rb +159 -12
  10. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +29 -1
  11. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  12. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +2 -0
  13. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +2 -0
  14. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +183 -24
  15. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +570 -14
  16. data/lib/metronome_sdk/models/v2/contract_list_response.rb +194 -17
  17. data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +194 -17
  18. data/lib/metronome_sdk/resources/v1/alerts.rb +2 -2
  19. data/lib/metronome_sdk/version.rb +1 -1
  20. data/rbi/metronome_sdk/internal/transport/base_client.rbi +1 -1
  21. data/rbi/metronome_sdk/models/commit.rbi +89 -15
  22. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +304 -6
  23. data/rbi/metronome_sdk/models/credit.rbi +54 -9
  24. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +16 -18
  25. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +349 -15
  26. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +60 -0
  27. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  28. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +4 -0
  29. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +4 -0
  30. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +385 -27
  31. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1532 -42
  32. data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +431 -37
  33. data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +431 -37
  34. data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -5
  35. data/rbi/metronome_sdk/resources/v2/contracts.rbi +4 -0
  36. data/sig/metronome_sdk/internal/transport/base_client.rbs +1 -1
  37. data/sig/metronome_sdk/models/commit.rbs +50 -15
  38. data/sig/metronome_sdk/models/contract_without_amendments.rbs +120 -6
  39. data/sig/metronome_sdk/models/credit.rbs +30 -9
  40. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +9 -9
  41. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +130 -3
  42. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +21 -0
  43. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  44. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +130 -3
  45. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +612 -6
  46. data/sig/metronome_sdk/models/v2/contract_list_response.rbs +205 -30
  47. data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +205 -30
  48. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -1
  49. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f4ff0f17b280b8084d27b79a761e6ab88ffe486ef89d0e6eb293ed03bd30c1a
4
- data.tar.gz: a9dc39b1d257fc714c2a2cc523098fb84533ac07cfcddfc9b02d0ba28651e368
3
+ metadata.gz: 1f9187736fec618127a408109837bbb6e2d715b3ae0debd060599129149fea1e
4
+ data.tar.gz: d41f6d4d3f47eae6467c52876975a9aa6c2aa40028bd35b364dfef51aa1f3593
5
5
  SHA512:
6
- metadata.gz: 406759335a7c9a236c5743e7f3127de60773ea9e7984444d3e19fa2640f20355d6f82cffb86588ab691d0a66b537acb3ee003176c8d3400e0d8fc9a8b1a1b17b
7
- data.tar.gz: f030ece1727f3e6742106c2d49c748ffe33285307ee54049f32eaab33d0926c7b3574b45487ecdf48ab4216070e1bfb36e0a774b9388c72ab8ac0a46411b0c2c
6
+ metadata.gz: 337a65e90e271961a81fb9f54a24b9da95b8570043e2c62946638799c7ca15fb16f747e60db4fb81a2f7bf870210b4428e34ab1550a1229f4e4df2d23549bdf3
7
+ data.tar.gz: 73612d3f74abcd90e3ee46c16bbeb68837c3cb1da6206171ac0535a7e638e684e9c6495be268cf90f65d319ad2400d75f99628a049c0b171e301a89e72235c4c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2025-07-31)
4
+
5
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v0.1.0...v0.2.0)
6
+
7
+ ### Features
8
+ * **api:** Add support for spend threshold alerts for specific group keys. See [updated alert documentation](https://docs.metronome.com/manage-product-access/create-manage-alerts/#spend-alerts).
9
+ * **api:** Add support for recurring commits linked to subscriptions. See documentation for [hybrid billing models](https://docs.metronome.com/launch-guides/hybrid-business/#implement-a-hybrid-model-for-a-customer).
10
+ * **api:** Add support for new styles in embeddable dashboards.
11
+ * **api:** Add reference to contract on commit objects.
12
+
13
+ ### Chores
14
+
15
+ * **docs:** Improved documentation.
16
+
3
17
  ## 0.1.0 (2025-07-24)
4
18
 
5
19
  Full Changelog: [v0.1.0-alpha.4...v0.1.0](https://github.com/Metronome-Industries/metronome-ruby/compare/v0.1.0-alpha.4...v0.1.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "metronome-sdk", "~> 0.1.0"
20
+ gem "metronome-sdk", "~> 0.2.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -365,7 +365,7 @@ module MetronomeSDK
365
365
  #
366
366
  # @raise [MetronomeSDK::Errors::APIError]
367
367
  # @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
368
- private def send_request(request, redirect_count:, retry_count:, send_retry_header:)
368
+ def send_request(request, redirect_count:, retry_count:, send_retry_header:)
369
369
  url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout)
370
370
  input = {
371
371
  **request.except(:timeout),
@@ -479,12 +479,18 @@ module MetronomeSDK
479
479
  MetronomeSDK::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type
480
480
  }
481
481
 
482
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
482
+ # @!attribute contract_id
483
+ #
484
+ # @return [String, nil]
485
+ optional :contract_id, String
486
+
487
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
483
488
  # @param amount [Float]
484
489
  # @param invoice_id [String]
485
490
  # @param segment_id [String]
486
491
  # @param timestamp [Time]
487
492
  # @param type [Symbol, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
493
+ # @param contract_id [String]
488
494
 
489
495
  # @see MetronomeSDK::Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry#type
490
496
  module Type
@@ -605,12 +611,18 @@ module MetronomeSDK
605
611
  # @return [Symbol, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
606
612
  required :type, enum: -> { MetronomeSDK::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type }
607
613
 
608
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
614
+ # @!attribute contract_id
615
+ #
616
+ # @return [String, nil]
617
+ optional :contract_id, String
618
+
619
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
609
620
  # @param amount [Float]
610
621
  # @param invoice_id [String]
611
622
  # @param segment_id [String]
612
623
  # @param timestamp [Time]
613
624
  # @param type [Symbol, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
625
+ # @param contract_id [String]
614
626
 
615
627
  # @see MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry#type
616
628
  module Type
@@ -649,12 +661,18 @@ module MetronomeSDK
649
661
  # @return [Symbol, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
650
662
  required :type, enum: -> { MetronomeSDK::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type }
651
663
 
652
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
664
+ # @!attribute contract_id
665
+ #
666
+ # @return [String, nil]
667
+ optional :contract_id, String
668
+
669
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
653
670
  # @param amount [Float]
654
671
  # @param invoice_id [String]
655
672
  # @param segment_id [String]
656
673
  # @param timestamp [Time]
657
674
  # @param type [Symbol, MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
675
+ # @param contract_id [String]
658
676
 
659
677
  # @see MetronomeSDK::Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry#type
660
678
  module Type
@@ -772,12 +790,18 @@ module MetronomeSDK
772
790
  MetronomeSDK::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type
773
791
  }
774
792
 
775
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
793
+ # @!attribute contract_id
794
+ #
795
+ # @return [String, nil]
796
+ optional :contract_id, String
797
+
798
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
776
799
  # @param amount [Float]
777
800
  # @param invoice_id [String]
778
801
  # @param segment_id [String]
779
802
  # @param timestamp [Time]
780
803
  # @param type [Symbol, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
804
+ # @param contract_id [String]
781
805
 
782
806
  # @see MetronomeSDK::Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry#type
783
807
  module Type
@@ -855,11 +879,17 @@ module MetronomeSDK
855
879
  # @return [Symbol, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
856
880
  required :type, enum: -> { MetronomeSDK::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type }
857
881
 
858
- # @!method initialize(amount:, invoice_id:, timestamp:, type:)
882
+ # @!attribute contract_id
883
+ #
884
+ # @return [String, nil]
885
+ optional :contract_id, String
886
+
887
+ # @!method initialize(amount:, invoice_id:, timestamp:, type:, contract_id: nil)
859
888
  # @param amount [Float]
860
889
  # @param invoice_id [String]
861
890
  # @param timestamp [Time]
862
891
  # @param type [Symbol, MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
892
+ # @param contract_id [String]
863
893
 
864
894
  # @see MetronomeSDK::Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry#type
865
895
  module Type
@@ -836,7 +836,14 @@ module MetronomeSDK
836
836
  MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Specifier]
837
837
  }
838
838
 
839
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil)
839
+ # @!attribute subscription_config
840
+ # Attach a subscription to the recurring commit/credit.
841
+ #
842
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig, nil]
843
+ optional :subscription_config,
844
+ -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig }
845
+
846
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
840
847
  # Some parameter documentations has been truncated, see
841
848
  # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit} for more
842
849
  # details.
@@ -880,6 +887,8 @@ module MetronomeSDK
880
887
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
881
888
  #
882
889
  # @param specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
890
+ #
891
+ # @param subscription_config [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
883
892
 
884
893
  # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#access_amount
885
894
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -1185,6 +1194,60 @@ module MetronomeSDK
1185
1194
  #
1186
1195
  # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1187
1196
  end
1197
+
1198
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#subscription_config
1199
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
1200
+ # @!attribute allocation
1201
+ #
1202
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::Allocation]
1203
+ required :allocation,
1204
+ enum: -> {
1205
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::Allocation
1206
+ }
1207
+
1208
+ # @!attribute apply_seat_increase_config
1209
+ #
1210
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1211
+ required :apply_seat_increase_config,
1212
+ -> {
1213
+ MetronomeSDK::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
1214
+ }
1215
+
1216
+ # @!attribute subscription_id
1217
+ #
1218
+ # @return [String]
1219
+ required :subscription_id, String
1220
+
1221
+ # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
1222
+ # Attach a subscription to the recurring commit/credit.
1223
+ #
1224
+ # @param allocation [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::Allocation]
1225
+ # @param apply_seat_increase_config [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1226
+ # @param subscription_id [String]
1227
+
1228
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig#allocation
1229
+ module Allocation
1230
+ extend MetronomeSDK::Internal::Type::Enum
1231
+
1232
+ INDIVIDUAL = :INDIVIDUAL
1233
+ POOLED = :POOLED
1234
+
1235
+ # @!method self.values
1236
+ # @return [Array<Symbol>]
1237
+ end
1238
+
1239
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::SubscriptionConfig#apply_seat_increase_config
1240
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
1241
+ # @!attribute is_prorated
1242
+ # Indicates whether a mid-period seat increase should be prorated.
1243
+ #
1244
+ # @return [Boolean]
1245
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
1246
+
1247
+ # @!method initialize(is_prorated:)
1248
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
1249
+ end
1250
+ end
1188
1251
  end
1189
1252
 
1190
1253
  class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
@@ -1316,7 +1379,14 @@ module MetronomeSDK
1316
1379
  MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Specifier]
1317
1380
  }
1318
1381
 
1319
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil)
1382
+ # @!attribute subscription_config
1383
+ # Attach a subscription to the recurring commit/credit.
1384
+ #
1385
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig, nil]
1386
+ optional :subscription_config,
1387
+ -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig }
1388
+
1389
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1320
1390
  # Some parameter documentations has been truncated, see
1321
1391
  # {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit} for more
1322
1392
  # details.
@@ -1358,6 +1428,8 @@ module MetronomeSDK
1358
1428
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1359
1429
  #
1360
1430
  # @param specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
1431
+ #
1432
+ # @param subscription_config [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
1361
1433
 
1362
1434
  # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#access_amount
1363
1435
  class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
@@ -1638,6 +1710,60 @@ module MetronomeSDK
1638
1710
  #
1639
1711
  # @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
1640
1712
  end
1713
+
1714
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#subscription_config
1715
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
1716
+ # @!attribute allocation
1717
+ #
1718
+ # @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::Allocation]
1719
+ required :allocation,
1720
+ enum: -> {
1721
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::Allocation
1722
+ }
1723
+
1724
+ # @!attribute apply_seat_increase_config
1725
+ #
1726
+ # @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
1727
+ required :apply_seat_increase_config,
1728
+ -> {
1729
+ MetronomeSDK::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
1730
+ }
1731
+
1732
+ # @!attribute subscription_id
1733
+ #
1734
+ # @return [String]
1735
+ required :subscription_id, String
1736
+
1737
+ # @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
1738
+ # Attach a subscription to the recurring commit/credit.
1739
+ #
1740
+ # @param allocation [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::Allocation]
1741
+ # @param apply_seat_increase_config [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
1742
+ # @param subscription_id [String]
1743
+
1744
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig#allocation
1745
+ module Allocation
1746
+ extend MetronomeSDK::Internal::Type::Enum
1747
+
1748
+ INDIVIDUAL = :INDIVIDUAL
1749
+ POOLED = :POOLED
1750
+
1751
+ # @!method self.values
1752
+ # @return [Array<Symbol>]
1753
+ end
1754
+
1755
+ # @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::SubscriptionConfig#apply_seat_increase_config
1756
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
1757
+ # @!attribute is_prorated
1758
+ # Indicates whether a mid-period seat increase should be prorated.
1759
+ #
1760
+ # @return [Boolean]
1761
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
1762
+
1763
+ # @!method initialize(is_prorated:)
1764
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
1765
+ end
1766
+ end
1641
1767
  end
1642
1768
 
1643
1769
  class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
@@ -398,12 +398,18 @@ module MetronomeSDK
398
398
  required :type,
399
399
  enum: -> { MetronomeSDK::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type }
400
400
 
401
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
401
+ # @!attribute contract_id
402
+ #
403
+ # @return [String, nil]
404
+ optional :contract_id, String
405
+
406
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
402
407
  # @param amount [Float]
403
408
  # @param invoice_id [String]
404
409
  # @param segment_id [String]
405
410
  # @param timestamp [Time]
406
411
  # @param type [Symbol, MetronomeSDK::Models::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
412
+ # @param contract_id [String]
407
413
 
408
414
  # @see MetronomeSDK::Models::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry#type
409
415
  module Type
@@ -480,12 +486,18 @@ module MetronomeSDK
480
486
  # @return [Symbol, MetronomeSDK::Models::Credit::Ledger::CreditCanceledLedgerEntry::Type]
481
487
  required :type, enum: -> { MetronomeSDK::Credit::Ledger::CreditCanceledLedgerEntry::Type }
482
488
 
483
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
489
+ # @!attribute contract_id
490
+ #
491
+ # @return [String, nil]
492
+ optional :contract_id, String
493
+
494
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
484
495
  # @param amount [Float]
485
496
  # @param invoice_id [String]
486
497
  # @param segment_id [String]
487
498
  # @param timestamp [Time]
488
499
  # @param type [Symbol, MetronomeSDK::Models::Credit::Ledger::CreditCanceledLedgerEntry::Type]
500
+ # @param contract_id [String]
489
501
 
490
502
  # @see MetronomeSDK::Models::Credit::Ledger::CreditCanceledLedgerEntry#type
491
503
  module Type
@@ -524,12 +536,18 @@ module MetronomeSDK
524
536
  # @return [Symbol, MetronomeSDK::Models::Credit::Ledger::CreditCreditedLedgerEntry::Type]
525
537
  required :type, enum: -> { MetronomeSDK::Credit::Ledger::CreditCreditedLedgerEntry::Type }
526
538
 
527
- # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:)
539
+ # @!attribute contract_id
540
+ #
541
+ # @return [String, nil]
542
+ optional :contract_id, String
543
+
544
+ # @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
528
545
  # @param amount [Float]
529
546
  # @param invoice_id [String]
530
547
  # @param segment_id [String]
531
548
  # @param timestamp [Time]
532
549
  # @param type [Symbol, MetronomeSDK::Models::Credit::Ledger::CreditCreditedLedgerEntry::Type]
550
+ # @param contract_id [String]
533
551
 
534
552
  # @see MetronomeSDK::Models::Credit::Ledger::CreditCreditedLedgerEntry#type
535
553
  module Type
@@ -75,12 +75,13 @@ module MetronomeSDK
75
75
  # @return [Boolean, nil]
76
76
  optional :evaluate_on_create, MetronomeSDK::Internal::Type::Boolean
77
77
 
78
- # @!attribute group_key_filter
79
- # Scopes alert evaluation to a specific presentation group key on individual line
80
- # items. Only present for spend alerts.
78
+ # @!attribute group_values
79
+ # Only present for `spend_threshold_reached` alerts. Scope alert to a specific
80
+ # group key on individual line items.
81
81
  #
82
- # @return [MetronomeSDK::Models::V1::AlertCreateParams::GroupKeyFilter, nil]
83
- optional :group_key_filter, -> { MetronomeSDK::V1::AlertCreateParams::GroupKeyFilter }
82
+ # @return [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>, nil]
83
+ optional :group_values,
84
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::GroupValue] }
84
85
 
85
86
  # @!attribute invoice_types_filter
86
87
  # Only supported for invoice_total_reached alerts. A list of invoice types to
@@ -104,7 +105,7 @@ module MetronomeSDK
104
105
  # @return [String, nil]
105
106
  optional :uniqueness_key, String
106
107
 
107
- # @!method initialize(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_key_filter: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {})
108
+ # @!method initialize(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {})
108
109
  # Some parameter documentations has been truncated, see
109
110
  # {MetronomeSDK::Models::V1::AlertCreateParams} for more details.
110
111
  #
@@ -126,7 +127,7 @@ module MetronomeSDK
126
127
  #
127
128
  # @param evaluate_on_create [Boolean] If true, the alert will evaluate immediately on customers that already meet the
128
129
  #
129
- # @param group_key_filter [MetronomeSDK::Models::V1::AlertCreateParams::GroupKeyFilter] Scopes alert evaluation to a specific presentation group key on individual line
130
+ # @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` alerts. Scope alert to a specific gro
130
131
  #
131
132
  # @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached alerts. A list of invoice types to eval
132
133
  #
@@ -195,7 +196,7 @@ module MetronomeSDK
195
196
  end
196
197
  end
197
198
 
198
- class GroupKeyFilter < MetronomeSDK::Internal::Type::BaseModel
199
+ class GroupValue < MetronomeSDK::Internal::Type::BaseModel
199
200
  # @!attribute key
200
201
  #
201
202
  # @return [String]
@@ -207,9 +208,6 @@ module MetronomeSDK
207
208
  required :value, String
208
209
 
209
210
  # @!method initialize(key:, value:)
210
- # Scopes alert evaluation to a specific presentation group key on individual line
211
- # items. Only present for spend alerts.
212
- #
213
211
  # @param key [String]
214
212
  # @param value [String]
215
213
  end