metronome-sdk 0.1.0 → 0.3.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 +39 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +1 -1
- data/lib/metronome_sdk/internal/type/array_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/base_model.rb +3 -1
- data/lib/metronome_sdk/internal/type/converter.rb +27 -0
- data/lib/metronome_sdk/internal/type/hash_of.rb +1 -0
- data/lib/metronome_sdk/internal/type/union.rb +9 -7
- 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/schedule_point_in_time.rb +14 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +9 -11
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +54 -5
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +219 -23
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +29 -1
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +13 -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 +12 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +12 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +259 -37
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +602 -15
- 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/resources/v1/contracts/products.rb +3 -1
- data/lib/metronome_sdk/resources/v2/contracts.rb +6 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +1 -1
- data/rbi/metronome_sdk/internal/type/converter.rbi +58 -0
- data/rbi/metronome_sdk/internal/type/union.rbi +9 -2
- 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/schedule_point_in_time.rbi +17 -1
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +16 -18
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +76 -3
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +433 -26
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +60 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +16 -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 +14 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +14 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +481 -38
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1565 -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/v1/contracts/products.rbi +2 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +12 -0
- data/sig/metronome_sdk/internal/transport/base_client.rbs +1 -1
- data/sig/metronome_sdk/internal/type/converter.rbs +17 -0
- data/sig/metronome_sdk/internal/type/union.rbs +2 -2
- 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/schedule_point_in_time.rbs +7 -0
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +9 -9
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +38 -3
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +168 -6
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/commit_create_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +21 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +5 -0
- data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +5 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +5 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +178 -6
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +629 -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
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +1 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +2 -2
@@ -765,12 +765,18 @@ module MetronomeSDK
|
|
765
765
|
required :type,
|
766
766
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
|
767
767
|
|
768
|
-
# @!
|
768
|
+
# @!attribute contract_id
|
769
|
+
#
|
770
|
+
# @return [String, nil]
|
771
|
+
optional :contract_id, String
|
772
|
+
|
773
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
769
774
|
# @param amount [Float]
|
770
775
|
# @param invoice_id [String]
|
771
776
|
# @param segment_id [String]
|
772
777
|
# @param timestamp [Time]
|
773
778
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
779
|
+
# @param contract_id [String]
|
774
780
|
|
775
781
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry#type
|
776
782
|
module Type
|
@@ -894,12 +900,18 @@ module MetronomeSDK
|
|
894
900
|
required :type,
|
895
901
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type }
|
896
902
|
|
897
|
-
# @!
|
903
|
+
# @!attribute contract_id
|
904
|
+
#
|
905
|
+
# @return [String, nil]
|
906
|
+
optional :contract_id, String
|
907
|
+
|
908
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
898
909
|
# @param amount [Float]
|
899
910
|
# @param invoice_id [String]
|
900
911
|
# @param segment_id [String]
|
901
912
|
# @param timestamp [Time]
|
902
913
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type]
|
914
|
+
# @param contract_id [String]
|
903
915
|
|
904
916
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCanceledLedgerEntry#type
|
905
917
|
module Type
|
@@ -939,12 +951,18 @@ module MetronomeSDK
|
|
939
951
|
required :type,
|
940
952
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type }
|
941
953
|
|
942
|
-
# @!
|
954
|
+
# @!attribute contract_id
|
955
|
+
#
|
956
|
+
# @return [String, nil]
|
957
|
+
optional :contract_id, String
|
958
|
+
|
959
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
943
960
|
# @param amount [Float]
|
944
961
|
# @param invoice_id [String]
|
945
962
|
# @param segment_id [String]
|
946
963
|
# @param timestamp [Time]
|
947
964
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type]
|
965
|
+
# @param contract_id [String]
|
948
966
|
|
949
967
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PrepaidCommitCreditedLedgerEntry#type
|
950
968
|
module Type
|
@@ -1056,12 +1074,18 @@ module MetronomeSDK
|
|
1056
1074
|
required :type,
|
1057
1075
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type }
|
1058
1076
|
|
1059
|
-
# @!
|
1077
|
+
# @!attribute contract_id
|
1078
|
+
#
|
1079
|
+
# @return [String, nil]
|
1080
|
+
optional :contract_id, String
|
1081
|
+
|
1082
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
1060
1083
|
# @param amount [Float]
|
1061
1084
|
# @param invoice_id [String]
|
1062
1085
|
# @param segment_id [String]
|
1063
1086
|
# @param timestamp [Time]
|
1064
1087
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type]
|
1088
|
+
# @param contract_id [String]
|
1065
1089
|
|
1066
1090
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry#type
|
1067
1091
|
module Type
|
@@ -1141,11 +1165,17 @@ module MetronomeSDK
|
|
1141
1165
|
required :type,
|
1142
1166
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type }
|
1143
1167
|
|
1144
|
-
# @!
|
1168
|
+
# @!attribute contract_id
|
1169
|
+
#
|
1170
|
+
# @return [String, nil]
|
1171
|
+
optional :contract_id, String
|
1172
|
+
|
1173
|
+
# @!method initialize(amount:, invoice_id:, timestamp:, type:, contract_id: nil)
|
1145
1174
|
# @param amount [Float]
|
1146
1175
|
# @param invoice_id [String]
|
1147
1176
|
# @param timestamp [Time]
|
1148
1177
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type]
|
1178
|
+
# @param contract_id [String]
|
1149
1179
|
|
1150
1180
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Commit::Ledger::PostpaidCommitTrueupLedgerEntry#type
|
1151
1181
|
module Type
|
@@ -2111,12 +2141,18 @@ module MetronomeSDK
|
|
2111
2141
|
required :type,
|
2112
2142
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type }
|
2113
2143
|
|
2114
|
-
# @!
|
2144
|
+
# @!attribute contract_id
|
2145
|
+
#
|
2146
|
+
# @return [String, nil]
|
2147
|
+
optional :contract_id, String
|
2148
|
+
|
2149
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
2115
2150
|
# @param amount [Float]
|
2116
2151
|
# @param invoice_id [String]
|
2117
2152
|
# @param segment_id [String]
|
2118
2153
|
# @param timestamp [Time]
|
2119
2154
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type]
|
2155
|
+
# @param contract_id [String]
|
2120
2156
|
|
2121
2157
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry#type
|
2122
2158
|
module Type
|
@@ -2195,12 +2231,18 @@ module MetronomeSDK
|
|
2195
2231
|
required :type,
|
2196
2232
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry::Type }
|
2197
2233
|
|
2198
|
-
# @!
|
2234
|
+
# @!attribute contract_id
|
2235
|
+
#
|
2236
|
+
# @return [String, nil]
|
2237
|
+
optional :contract_id, String
|
2238
|
+
|
2239
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
2199
2240
|
# @param amount [Float]
|
2200
2241
|
# @param invoice_id [String]
|
2201
2242
|
# @param segment_id [String]
|
2202
2243
|
# @param timestamp [Time]
|
2203
2244
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry::Type]
|
2245
|
+
# @param contract_id [String]
|
2204
2246
|
|
2205
2247
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCanceledLedgerEntry#type
|
2206
2248
|
module Type
|
@@ -2240,12 +2282,18 @@ module MetronomeSDK
|
|
2240
2282
|
required :type,
|
2241
2283
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry::Type }
|
2242
2284
|
|
2243
|
-
# @!
|
2285
|
+
# @!attribute contract_id
|
2286
|
+
#
|
2287
|
+
# @return [String, nil]
|
2288
|
+
optional :contract_id, String
|
2289
|
+
|
2290
|
+
# @!method initialize(amount:, invoice_id:, segment_id:, timestamp:, type:, contract_id: nil)
|
2244
2291
|
# @param amount [Float]
|
2245
2292
|
# @param invoice_id [String]
|
2246
2293
|
# @param segment_id [String]
|
2247
2294
|
# @param timestamp [Time]
|
2248
2295
|
# @param type [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry::Type]
|
2296
|
+
# @param contract_id [String]
|
2249
2297
|
|
2250
2298
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::Credit::Ledger::CreditCreditedLedgerEntry#type
|
2251
2299
|
module Type
|
@@ -2381,6 +2429,12 @@ module MetronomeSDK
|
|
2381
2429
|
|
2382
2430
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data#customer_billing_provider_configuration
|
2383
2431
|
class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
2432
|
+
# @!attribute id
|
2433
|
+
# ID of Customer's billing provider configuration.
|
2434
|
+
#
|
2435
|
+
# @return [String]
|
2436
|
+
required :id, String
|
2437
|
+
|
2384
2438
|
# @!attribute billing_provider
|
2385
2439
|
#
|
2386
2440
|
# @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::BillingProvider]
|
@@ -2393,10 +2447,13 @@ module MetronomeSDK
|
|
2393
2447
|
required :delivery_method,
|
2394
2448
|
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::DeliveryMethod }
|
2395
2449
|
|
2396
|
-
# @!method initialize(billing_provider:, delivery_method:)
|
2450
|
+
# @!method initialize(id:, billing_provider:, delivery_method:)
|
2397
2451
|
# This field's availability is dependent on your client's configuration.
|
2398
2452
|
#
|
2453
|
+
# @param id [String] ID of Customer's billing provider configuration.
|
2454
|
+
#
|
2399
2455
|
# @param billing_provider [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::BillingProvider]
|
2456
|
+
#
|
2400
2457
|
# @param delivery_method [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration::DeliveryMethod]
|
2401
2458
|
|
2402
2459
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::CustomerBillingProviderConfiguration#billing_provider
|
@@ -2656,6 +2713,8 @@ module MetronomeSDK
|
|
2656
2713
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2657
2714
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
2658
2715
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
2716
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
2717
|
+
# body of `specifiers`.
|
2659
2718
|
#
|
2660
2719
|
# @return [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::PrepaidBalanceThresholdConfiguration::Commit::Specifier>, nil]
|
2661
2720
|
optional :specifiers,
|
@@ -2950,7 +3009,7 @@ module MetronomeSDK
|
|
2950
3009
|
optional :ending_before, Time
|
2951
3010
|
|
2952
3011
|
# @!attribute hierarchy_configuration
|
2953
|
-
# Optional configuration for recurring
|
3012
|
+
# Optional configuration for recurring credit hierarchy access control
|
2954
3013
|
#
|
2955
3014
|
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration, nil]
|
2956
3015
|
optional :hierarchy_configuration,
|
@@ -3011,7 +3070,14 @@ module MetronomeSDK
|
|
3011
3070
|
optional :specifiers,
|
3012
3071
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier] }
|
3013
3072
|
|
3014
|
-
# @!
|
3073
|
+
# @!attribute subscription_config
|
3074
|
+
# Attach a subscription to the recurring commit/credit.
|
3075
|
+
#
|
3076
|
+
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig, nil]
|
3077
|
+
optional :subscription_config,
|
3078
|
+
-> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig }
|
3079
|
+
|
3080
|
+
# @!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)
|
3015
3081
|
# Some parameter documentations has been truncated, see
|
3016
3082
|
# {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit} for
|
3017
3083
|
# more details.
|
@@ -3040,7 +3106,7 @@ module MetronomeSDK
|
|
3040
3106
|
#
|
3041
3107
|
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
3042
3108
|
#
|
3043
|
-
# @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration] Optional configuration for recurring
|
3109
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
|
3044
3110
|
#
|
3045
3111
|
# @param invoice_amount [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
|
3046
3112
|
#
|
@@ -3055,6 +3121,8 @@ module MetronomeSDK
|
|
3055
3121
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
3056
3122
|
#
|
3057
3123
|
# @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
|
3124
|
+
#
|
3125
|
+
# @param subscription_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
3058
3126
|
|
3059
3127
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#access_amount
|
3060
3128
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
@@ -3161,7 +3229,7 @@ module MetronomeSDK
|
|
3161
3229
|
union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess }
|
3162
3230
|
|
3163
3231
|
# @!method initialize(child_access:)
|
3164
|
-
# Optional configuration for recurring
|
3232
|
+
# Optional configuration for recurring credit hierarchy access control
|
3165
3233
|
#
|
3166
3234
|
# @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
|
3167
3235
|
|
@@ -3346,6 +3414,56 @@ module MetronomeSDK
|
|
3346
3414
|
#
|
3347
3415
|
# @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
|
3348
3416
|
end
|
3417
|
+
|
3418
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit#subscription_config
|
3419
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
3420
|
+
# @!attribute allocation
|
3421
|
+
#
|
3422
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation]
|
3423
|
+
required :allocation,
|
3424
|
+
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation }
|
3425
|
+
|
3426
|
+
# @!attribute apply_seat_increase_config
|
3427
|
+
#
|
3428
|
+
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
3429
|
+
required :apply_seat_increase_config,
|
3430
|
+
-> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
|
3431
|
+
|
3432
|
+
# @!attribute subscription_id
|
3433
|
+
#
|
3434
|
+
# @return [String]
|
3435
|
+
required :subscription_id, String
|
3436
|
+
|
3437
|
+
# @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
|
3438
|
+
# Attach a subscription to the recurring commit/credit.
|
3439
|
+
#
|
3440
|
+
# @param allocation [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::Allocation]
|
3441
|
+
# @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
3442
|
+
# @param subscription_id [String]
|
3443
|
+
|
3444
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig#allocation
|
3445
|
+
module Allocation
|
3446
|
+
extend MetronomeSDK::Internal::Type::Enum
|
3447
|
+
|
3448
|
+
INDIVIDUAL = :INDIVIDUAL
|
3449
|
+
POOLED = :POOLED
|
3450
|
+
|
3451
|
+
# @!method self.values
|
3452
|
+
# @return [Array<Symbol>]
|
3453
|
+
end
|
3454
|
+
|
3455
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCommit::SubscriptionConfig#apply_seat_increase_config
|
3456
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
3457
|
+
# @!attribute is_prorated
|
3458
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
3459
|
+
#
|
3460
|
+
# @return [Boolean]
|
3461
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
3462
|
+
|
3463
|
+
# @!method initialize(is_prorated:)
|
3464
|
+
# @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
|
3465
|
+
end
|
3466
|
+
end
|
3349
3467
|
end
|
3350
3468
|
|
3351
3469
|
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
@@ -3424,7 +3542,7 @@ module MetronomeSDK
|
|
3424
3542
|
optional :ending_before, Time
|
3425
3543
|
|
3426
3544
|
# @!attribute hierarchy_configuration
|
3427
|
-
# Optional configuration for recurring
|
3545
|
+
# Optional configuration for recurring credit hierarchy access control
|
3428
3546
|
#
|
3429
3547
|
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration, nil]
|
3430
3548
|
optional :hierarchy_configuration,
|
@@ -3478,7 +3596,14 @@ module MetronomeSDK
|
|
3478
3596
|
optional :specifiers,
|
3479
3597
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier] }
|
3480
3598
|
|
3481
|
-
# @!
|
3599
|
+
# @!attribute subscription_config
|
3600
|
+
# Attach a subscription to the recurring commit/credit.
|
3601
|
+
#
|
3602
|
+
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig, nil]
|
3603
|
+
optional :subscription_config,
|
3604
|
+
-> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig }
|
3605
|
+
|
3606
|
+
# @!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)
|
3482
3607
|
# Some parameter documentations has been truncated, see
|
3483
3608
|
# {MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit} for
|
3484
3609
|
# more details.
|
@@ -3507,7 +3632,7 @@ module MetronomeSDK
|
|
3507
3632
|
#
|
3508
3633
|
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
3509
3634
|
#
|
3510
|
-
# @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration] Optional configuration for recurring
|
3635
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration] Optional configuration for recurring credit hierarchy access control
|
3511
3636
|
#
|
3512
3637
|
# @param name [String] Displayed on invoices. Will be passed through to the individual commits
|
3513
3638
|
#
|
@@ -3520,6 +3645,8 @@ module MetronomeSDK
|
|
3520
3645
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
3521
3646
|
#
|
3522
3647
|
# @param specifiers [Array<MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::Specifier>] List of filters that determine what kind of customer usage draws down a commit o
|
3648
|
+
#
|
3649
|
+
# @param subscription_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
3523
3650
|
|
3524
3651
|
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#access_amount
|
3525
3652
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
@@ -3626,7 +3753,7 @@ module MetronomeSDK
|
|
3626
3753
|
union: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess }
|
3627
3754
|
|
3628
3755
|
# @!method initialize(child_access:)
|
3629
|
-
# Optional configuration for recurring
|
3756
|
+
# Optional configuration for recurring credit hierarchy access control
|
3630
3757
|
#
|
3631
3758
|
# @param child_access [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::HierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs]
|
3632
3759
|
|
@@ -3786,6 +3913,56 @@ module MetronomeSDK
|
|
3786
3913
|
#
|
3787
3914
|
# @param product_tags [Array<String>] If provided, the specifier will only apply to products with all the specified ta
|
3788
3915
|
end
|
3916
|
+
|
3917
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit#subscription_config
|
3918
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
3919
|
+
# @!attribute allocation
|
3920
|
+
#
|
3921
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation]
|
3922
|
+
required :allocation,
|
3923
|
+
enum: -> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation }
|
3924
|
+
|
3925
|
+
# @!attribute apply_seat_increase_config
|
3926
|
+
#
|
3927
|
+
# @return [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
3928
|
+
required :apply_seat_increase_config,
|
3929
|
+
-> { MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
|
3930
|
+
|
3931
|
+
# @!attribute subscription_id
|
3932
|
+
#
|
3933
|
+
# @return [String]
|
3934
|
+
required :subscription_id, String
|
3935
|
+
|
3936
|
+
# @!method initialize(allocation:, apply_seat_increase_config:, subscription_id:)
|
3937
|
+
# Attach a subscription to the recurring commit/credit.
|
3938
|
+
#
|
3939
|
+
# @param allocation [Symbol, MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::Allocation]
|
3940
|
+
# @param apply_seat_increase_config [MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
|
3941
|
+
# @param subscription_id [String]
|
3942
|
+
|
3943
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig#allocation
|
3944
|
+
module Allocation
|
3945
|
+
extend MetronomeSDK::Internal::Type::Enum
|
3946
|
+
|
3947
|
+
INDIVIDUAL = :INDIVIDUAL
|
3948
|
+
POOLED = :POOLED
|
3949
|
+
|
3950
|
+
# @!method self.values
|
3951
|
+
# @return [Array<Symbol>]
|
3952
|
+
end
|
3953
|
+
|
3954
|
+
# @see MetronomeSDK::Models::V2::ContractRetrieveResponse::Data::RecurringCredit::SubscriptionConfig#apply_seat_increase_config
|
3955
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
3956
|
+
# @!attribute is_prorated
|
3957
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
3958
|
+
#
|
3959
|
+
# @return [Boolean]
|
3960
|
+
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
3961
|
+
|
3962
|
+
# @!method initialize(is_prorated:)
|
3963
|
+
# @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
|
3964
|
+
end
|
3965
|
+
end
|
3789
3966
|
end
|
3790
3967
|
|
3791
3968
|
class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
@@ -9,7 +9,7 @@ module MetronomeSDK
|
|
9
9
|
#
|
10
10
|
# Create a new alert
|
11
11
|
#
|
12
|
-
# @overload create(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,
|
12
|
+
# @overload create(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: {})
|
13
13
|
#
|
14
14
|
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the alert
|
15
15
|
#
|
@@ -29,7 +29,7 @@ module MetronomeSDK
|
|
29
29
|
#
|
30
30
|
# @param evaluate_on_create [Boolean] If true, the alert will evaluate immediately on customers that already meet the
|
31
31
|
#
|
32
|
-
# @param
|
32
|
+
# @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` alerts. Scope alert to a specific gro
|
33
33
|
#
|
34
34
|
# @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached alerts. A list of invoice types to eval
|
35
35
|
#
|
@@ -10,7 +10,7 @@ module MetronomeSDK
|
|
10
10
|
#
|
11
11
|
# Create a new product
|
12
12
|
#
|
13
|
-
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
13
|
+
# @overload create(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
14
14
|
#
|
15
15
|
# @param name [String] displayed on invoices
|
16
16
|
#
|
@@ -22,6 +22,8 @@ module MetronomeSDK
|
|
22
22
|
#
|
23
23
|
# @param composite_tags [Array<String>] Required for COMPOSITE products
|
24
24
|
#
|
25
|
+
# @param custom_fields [Hash{Symbol=>String}]
|
26
|
+
#
|
25
27
|
# @param exclude_free_usage [Boolean] Beta feature only available for composite products. If true, products with $0 wi
|
26
28
|
#
|
27
29
|
# @param is_refundable [Boolean] This field's availability is dependent on your client's configuration. Defaults
|
@@ -161,7 +161,7 @@ module MetronomeSDK
|
|
161
161
|
# Edit a customer or contract commit. Contract commits can only be edited using
|
162
162
|
# this endpoint if contract editing is enabled.
|
163
163
|
#
|
164
|
-
# @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, product_id: nil, specifiers: nil, request_options: {})
|
164
|
+
# @overload edit_commit(commit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, invoice_contract_id: nil, invoice_schedule: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
|
165
165
|
#
|
166
166
|
# @param commit_id [String] ID of the commit to edit
|
167
167
|
#
|
@@ -177,6 +177,8 @@ module MetronomeSDK
|
|
177
177
|
#
|
178
178
|
# @param invoice_schedule [MetronomeSDK::Models::V2::ContractEditCommitParams::InvoiceSchedule]
|
179
179
|
#
|
180
|
+
# @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
|
181
|
+
#
|
180
182
|
# @param product_id [String]
|
181
183
|
#
|
182
184
|
# @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCommitParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
|
@@ -203,7 +205,7 @@ module MetronomeSDK
|
|
203
205
|
# Edit a customer or contract credit. Contract credits can only be edited using
|
204
206
|
# this endpoint if contract editing is enabled.
|
205
207
|
#
|
206
|
-
# @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, product_id: nil, specifiers: nil, request_options: {})
|
208
|
+
# @overload edit_credit(credit_id:, customer_id:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, priority: nil, product_id: nil, specifiers: nil, request_options: {})
|
207
209
|
#
|
208
210
|
# @param credit_id [String] ID of the credit to edit
|
209
211
|
#
|
@@ -215,6 +217,8 @@ module MetronomeSDK
|
|
215
217
|
#
|
216
218
|
# @param applicable_product_tags [Array<String>, nil] Which tags the credit applies to. If both applicable*product_ids and applicable*
|
217
219
|
#
|
220
|
+
# @param priority [Float, nil] If multiple commits are applicable, the one with the lower priority will apply f
|
221
|
+
#
|
218
222
|
# @param product_id [String]
|
219
223
|
#
|
220
224
|
# @param specifiers [Array<MetronomeSDK::Models::V2::ContractEditCreditParams::Specifier>, nil] List of filters that determine what kind of customer usage draws down a commit o
|
@@ -92,6 +92,64 @@ module MetronomeSDK
|
|
92
92
|
def self.type_info(spec)
|
93
93
|
end
|
94
94
|
|
95
|
+
# @api private
|
96
|
+
sig do
|
97
|
+
params(
|
98
|
+
type_info:
|
99
|
+
T.any(
|
100
|
+
{
|
101
|
+
const:
|
102
|
+
T.nilable(
|
103
|
+
T.any(NilClass, T::Boolean, Integer, Float, Symbol)
|
104
|
+
),
|
105
|
+
enum:
|
106
|
+
T.nilable(
|
107
|
+
T.proc.returns(
|
108
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
109
|
+
)
|
110
|
+
),
|
111
|
+
union:
|
112
|
+
T.nilable(
|
113
|
+
T.proc.returns(
|
114
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
115
|
+
)
|
116
|
+
)
|
117
|
+
},
|
118
|
+
T.proc.returns(
|
119
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
120
|
+
),
|
121
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
122
|
+
),
|
123
|
+
spec:
|
124
|
+
T.any(
|
125
|
+
{
|
126
|
+
const:
|
127
|
+
T.nilable(
|
128
|
+
T.any(NilClass, T::Boolean, Integer, Float, Symbol)
|
129
|
+
),
|
130
|
+
enum:
|
131
|
+
T.nilable(
|
132
|
+
T.proc.returns(
|
133
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
134
|
+
)
|
135
|
+
),
|
136
|
+
union:
|
137
|
+
T.nilable(
|
138
|
+
T.proc.returns(
|
139
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
140
|
+
)
|
141
|
+
)
|
142
|
+
},
|
143
|
+
T.proc.returns(
|
144
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
145
|
+
),
|
146
|
+
MetronomeSDK::Internal::Type::Converter::Input
|
147
|
+
)
|
148
|
+
).returns(MetronomeSDK::Internal::AnyHash)
|
149
|
+
end
|
150
|
+
def self.meta_info(type_info, spec)
|
151
|
+
end
|
152
|
+
|
95
153
|
# @api private
|
96
154
|
sig do
|
97
155
|
params(translate_names: T::Boolean).returns(
|
@@ -16,7 +16,8 @@ module MetronomeSDK
|
|
16
16
|
T::Array[
|
17
17
|
[
|
18
18
|
T.nilable(Symbol),
|
19
|
-
T.proc.returns(MetronomeSDK::Internal::Type::Converter::Input)
|
19
|
+
T.proc.returns(MetronomeSDK::Internal::Type::Converter::Input),
|
20
|
+
MetronomeSDK::Internal::AnyHash
|
20
21
|
]
|
21
22
|
]
|
22
23
|
)
|
@@ -25,7 +26,13 @@ module MetronomeSDK
|
|
25
26
|
end
|
26
27
|
|
27
28
|
# @api private
|
28
|
-
sig
|
29
|
+
sig do
|
30
|
+
returns(
|
31
|
+
T::Array[
|
32
|
+
[T.nilable(Symbol), T.anything, MetronomeSDK::Internal::AnyHash]
|
33
|
+
]
|
34
|
+
)
|
35
|
+
end
|
29
36
|
protected def derefed_variants
|
30
37
|
end
|
31
38
|
|