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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +1 -1
- data/lib/metronome_sdk/models/commit.rb +35 -5
- data/lib/metronome_sdk/models/contract_without_amendments.rb +128 -2
- data/lib/metronome_sdk/models/credit.rb +21 -3
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +9 -11
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +159 -12
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +29 -1
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +2 -0
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +2 -0
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +183 -24
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +570 -14
- data/lib/metronome_sdk/models/v2/contract_list_response.rb +194 -17
- data/lib/metronome_sdk/models/v2/contract_retrieve_response.rb +194 -17
- data/lib/metronome_sdk/resources/v1/alerts.rb +2 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +1 -1
- data/rbi/metronome_sdk/models/commit.rbi +89 -15
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +304 -6
- data/rbi/metronome_sdk/models/credit.rbi +54 -9
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +16 -18
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +349 -15
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +60 -0
- data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +4 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +4 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +385 -27
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1532 -42
- data/rbi/metronome_sdk/models/v2/contract_list_response.rbi +431 -37
- data/rbi/metronome_sdk/models/v2/contract_retrieve_response.rbi +431 -37
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -5
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +4 -0
- data/sig/metronome_sdk/internal/transport/base_client.rbs +1 -1
- data/sig/metronome_sdk/models/commit.rbs +50 -15
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +120 -6
- data/sig/metronome_sdk/models/credit.rbs +30 -9
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +9 -9
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +130 -3
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +21 -0
- data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +130 -3
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +612 -6
- data/sig/metronome_sdk/models/v2/contract_list_response.rbs +205 -30
- data/sig/metronome_sdk/models/v2/contract_retrieve_response.rbs +205 -30
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f9187736fec618127a408109837bbb6e2d715b3ae0debd060599129149fea1e
|
4
|
+
data.tar.gz: d41f6d4d3f47eae6467c52876975a9aa6c2aa40028bd35b364dfef51aa1f3593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -365,7 +365,7 @@ module MetronomeSDK
|
|
365
365
|
#
|
366
366
|
# @raise [MetronomeSDK::Errors::APIError]
|
367
367
|
# @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
|
368
|
-
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
-
# @!
|
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
|
79
|
-
#
|
80
|
-
#
|
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::
|
83
|
-
optional :
|
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,
|
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
|
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
|
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
|