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
@@ -930,6 +930,8 @@ module MetronomeSDK
|
|
930
930
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
931
931
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
932
932
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
933
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
934
|
+
# body of `specifiers`.
|
933
935
|
sig do
|
934
936
|
returns(
|
935
937
|
T.nilable(
|
@@ -1033,6 +1035,8 @@ module MetronomeSDK
|
|
1033
1035
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
1034
1036
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
1035
1037
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
1038
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
1039
|
+
# body of `specifiers`.
|
1036
1040
|
specifiers: nil,
|
1037
1041
|
# A temporary ID for the commit that can be used to reference the commit for
|
1038
1042
|
# commit specific overrides.
|
@@ -1494,13 +1498,21 @@ module MetronomeSDK
|
|
1494
1498
|
)
|
1495
1499
|
end
|
1496
1500
|
|
1497
|
-
# Defaults to USD if not passed.
|
1501
|
+
# Defaults to USD (cents) if not passed.
|
1498
1502
|
sig { returns(T.nilable(String)) }
|
1499
1503
|
attr_reader :credit_type_id
|
1500
1504
|
|
1501
1505
|
sig { params(credit_type_id: String).void }
|
1502
1506
|
attr_writer :credit_type_id
|
1503
1507
|
|
1508
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1509
|
+
# schedule will not generate an invoice.
|
1510
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1511
|
+
attr_reader :do_not_invoice
|
1512
|
+
|
1513
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
1514
|
+
attr_writer :do_not_invoice
|
1515
|
+
|
1504
1516
|
# Enter the unit price and quantity for the charge or instead only send the
|
1505
1517
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1506
1518
|
# quantity is inferred to be 1.
|
@@ -1550,6 +1562,7 @@ module MetronomeSDK
|
|
1550
1562
|
sig do
|
1551
1563
|
params(
|
1552
1564
|
credit_type_id: String,
|
1565
|
+
do_not_invoice: T::Boolean,
|
1553
1566
|
recurring_schedule:
|
1554
1567
|
MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::OrHash,
|
1555
1568
|
schedule_items:
|
@@ -1559,8 +1572,11 @@ module MetronomeSDK
|
|
1559
1572
|
).returns(T.attached_class)
|
1560
1573
|
end
|
1561
1574
|
def self.new(
|
1562
|
-
# Defaults to USD if not passed.
|
1575
|
+
# Defaults to USD (cents) if not passed.
|
1563
1576
|
credit_type_id: nil,
|
1577
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1578
|
+
# schedule will not generate an invoice.
|
1579
|
+
do_not_invoice: nil,
|
1564
1580
|
# Enter the unit price and quantity for the charge or instead only send the
|
1565
1581
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1566
1582
|
# quantity is inferred to be 1.
|
@@ -1574,6 +1590,7 @@ module MetronomeSDK
|
|
1574
1590
|
override.returns(
|
1575
1591
|
{
|
1576
1592
|
credit_type_id: String,
|
1593
|
+
do_not_invoice: T::Boolean,
|
1577
1594
|
recurring_schedule:
|
1578
1595
|
MetronomeSDK::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule,
|
1579
1596
|
schedule_items:
|
@@ -2104,12 +2121,27 @@ module MetronomeSDK
|
|
2104
2121
|
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
2105
2122
|
attr_writer :invoice_metadata
|
2106
2123
|
|
2124
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2125
|
+
# session).
|
2126
|
+
#
|
2127
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2128
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2129
|
+
# India), the payment may be declined.
|
2130
|
+
#
|
2131
|
+
# If left blank, will default to false.
|
2132
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2133
|
+
attr_reader :on_session_payment
|
2134
|
+
|
2135
|
+
sig { params(on_session_payment: T::Boolean).void }
|
2136
|
+
attr_writer :on_session_payment
|
2137
|
+
|
2107
2138
|
# Only applicable if using STRIPE as your payment gateway type.
|
2108
2139
|
sig do
|
2109
2140
|
params(
|
2110
2141
|
payment_type:
|
2111
2142
|
MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2112
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2143
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2144
|
+
on_session_payment: T::Boolean
|
2113
2145
|
).returns(T.attached_class)
|
2114
2146
|
end
|
2115
2147
|
def self.new(
|
@@ -2117,7 +2149,16 @@ module MetronomeSDK
|
|
2117
2149
|
payment_type:,
|
2118
2150
|
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
2119
2151
|
# your payment type.
|
2120
|
-
invoice_metadata: nil
|
2152
|
+
invoice_metadata: nil,
|
2153
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2154
|
+
# session).
|
2155
|
+
#
|
2156
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2157
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2158
|
+
# India), the payment may be declined.
|
2159
|
+
#
|
2160
|
+
# If left blank, will default to false.
|
2161
|
+
on_session_payment: nil
|
2121
2162
|
)
|
2122
2163
|
end
|
2123
2164
|
|
@@ -2126,7 +2167,8 @@ module MetronomeSDK
|
|
2126
2167
|
{
|
2127
2168
|
payment_type:
|
2128
2169
|
MetronomeSDK::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2129
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2170
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2171
|
+
on_session_payment: T::Boolean
|
2130
2172
|
}
|
2131
2173
|
)
|
2132
2174
|
end
|
@@ -2441,6 +2483,8 @@ module MetronomeSDK
|
|
2441
2483
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2442
2484
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
2443
2485
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
2486
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
2487
|
+
# body of `specifiers`.
|
2444
2488
|
sig do
|
2445
2489
|
returns(
|
2446
2490
|
T.nilable(
|
@@ -2511,6 +2555,8 @@ module MetronomeSDK
|
|
2511
2555
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
2512
2556
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
2513
2557
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
2558
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
2559
|
+
# body of `specifiers`.
|
2514
2560
|
specifiers: nil
|
2515
2561
|
)
|
2516
2562
|
end
|
@@ -3113,13 +3159,21 @@ module MetronomeSDK
|
|
3113
3159
|
)
|
3114
3160
|
end
|
3115
3161
|
|
3116
|
-
# Defaults to USD if not passed.
|
3162
|
+
# Defaults to USD (cents) if not passed.
|
3117
3163
|
sig { returns(T.nilable(String)) }
|
3118
3164
|
attr_reader :credit_type_id
|
3119
3165
|
|
3120
3166
|
sig { params(credit_type_id: String).void }
|
3121
3167
|
attr_writer :credit_type_id
|
3122
3168
|
|
3169
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3170
|
+
# schedule will not generate an invoice.
|
3171
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3172
|
+
attr_reader :do_not_invoice
|
3173
|
+
|
3174
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
3175
|
+
attr_writer :do_not_invoice
|
3176
|
+
|
3123
3177
|
# Enter the unit price and quantity for the charge or instead only send the
|
3124
3178
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3125
3179
|
# quantity is inferred to be 1.
|
@@ -3166,6 +3220,7 @@ module MetronomeSDK
|
|
3166
3220
|
sig do
|
3167
3221
|
params(
|
3168
3222
|
credit_type_id: String,
|
3223
|
+
do_not_invoice: T::Boolean,
|
3169
3224
|
recurring_schedule:
|
3170
3225
|
MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::OrHash,
|
3171
3226
|
schedule_items:
|
@@ -3175,8 +3230,11 @@ module MetronomeSDK
|
|
3175
3230
|
).returns(T.attached_class)
|
3176
3231
|
end
|
3177
3232
|
def self.new(
|
3178
|
-
# Defaults to USD if not passed.
|
3233
|
+
# Defaults to USD (cents) if not passed.
|
3179
3234
|
credit_type_id: nil,
|
3235
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3236
|
+
# schedule will not generate an invoice.
|
3237
|
+
do_not_invoice: nil,
|
3180
3238
|
# Enter the unit price and quantity for the charge or instead only send the
|
3181
3239
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3182
3240
|
# quantity is inferred to be 1.
|
@@ -3190,6 +3248,7 @@ module MetronomeSDK
|
|
3190
3248
|
override.returns(
|
3191
3249
|
{
|
3192
3250
|
credit_type_id: String,
|
3251
|
+
do_not_invoice: T::Boolean,
|
3193
3252
|
recurring_schedule:
|
3194
3253
|
MetronomeSDK::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule,
|
3195
3254
|
schedule_items:
|
@@ -4369,6 +4428,8 @@ module MetronomeSDK
|
|
4369
4428
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
4370
4429
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
4371
4430
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
4431
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
4432
|
+
# body of `specifiers`.
|
4372
4433
|
sig do
|
4373
4434
|
returns(
|
4374
4435
|
T.nilable(
|
@@ -4423,6 +4484,8 @@ module MetronomeSDK
|
|
4423
4484
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
4424
4485
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
4425
4486
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
4487
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
4488
|
+
# body of `specifiers`.
|
4426
4489
|
specifiers: nil
|
4427
4490
|
)
|
4428
4491
|
end
|
@@ -5036,7 +5099,7 @@ module MetronomeSDK
|
|
5036
5099
|
sig { params(ending_before: Time).void }
|
5037
5100
|
attr_writer :ending_before
|
5038
5101
|
|
5039
|
-
# Optional configuration for recurring
|
5102
|
+
# Optional configuration for recurring credit hierarchy access control
|
5040
5103
|
sig do
|
5041
5104
|
returns(
|
5042
5105
|
T.nilable(
|
@@ -5158,6 +5221,8 @@ module MetronomeSDK
|
|
5158
5221
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
5159
5222
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
5160
5223
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
5224
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
5225
|
+
# body of `specifiers`.
|
5161
5226
|
sig do
|
5162
5227
|
returns(
|
5163
5228
|
T.nilable(
|
@@ -5179,6 +5244,24 @@ module MetronomeSDK
|
|
5179
5244
|
end
|
5180
5245
|
attr_writer :specifiers
|
5181
5246
|
|
5247
|
+
# Attach a subscription to the recurring commit/credit.
|
5248
|
+
sig do
|
5249
|
+
returns(
|
5250
|
+
T.nilable(
|
5251
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig
|
5252
|
+
)
|
5253
|
+
)
|
5254
|
+
end
|
5255
|
+
attr_reader :subscription_config
|
5256
|
+
|
5257
|
+
sig do
|
5258
|
+
params(
|
5259
|
+
subscription_config:
|
5260
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::OrHash
|
5261
|
+
).void
|
5262
|
+
end
|
5263
|
+
attr_writer :subscription_config
|
5264
|
+
|
5182
5265
|
# A temporary ID that can be used to reference the recurring commit for commit
|
5183
5266
|
# specific overrides.
|
5184
5267
|
sig { returns(T.nilable(String)) }
|
@@ -5217,6 +5300,8 @@ module MetronomeSDK
|
|
5217
5300
|
T::Array[
|
5218
5301
|
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Specifier::OrHash
|
5219
5302
|
],
|
5303
|
+
subscription_config:
|
5304
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::OrHash,
|
5220
5305
|
temporary_id: String
|
5221
5306
|
).returns(T.attached_class)
|
5222
5307
|
end
|
@@ -5240,7 +5325,7 @@ module MetronomeSDK
|
|
5240
5325
|
description: nil,
|
5241
5326
|
# Determines when the contract will stop creating recurring commits. optional
|
5242
5327
|
ending_before: nil,
|
5243
|
-
# Optional configuration for recurring
|
5328
|
+
# Optional configuration for recurring credit hierarchy access control
|
5244
5329
|
hierarchy_configuration: nil,
|
5245
5330
|
# The amount the customer should be billed for the commit. Not required.
|
5246
5331
|
invoice_amount: nil,
|
@@ -5267,7 +5352,11 @@ module MetronomeSDK
|
|
5267
5352
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
5268
5353
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
5269
5354
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
5355
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
5356
|
+
# body of `specifiers`.
|
5270
5357
|
specifiers: nil,
|
5358
|
+
# Attach a subscription to the recurring commit/credit.
|
5359
|
+
subscription_config: nil,
|
5271
5360
|
# A temporary ID that can be used to reference the recurring commit for commit
|
5272
5361
|
# specific overrides.
|
5273
5362
|
temporary_id: nil
|
@@ -5305,6 +5394,8 @@ module MetronomeSDK
|
|
5305
5394
|
T::Array[
|
5306
5395
|
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Specifier
|
5307
5396
|
],
|
5397
|
+
subscription_config:
|
5398
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig,
|
5308
5399
|
temporary_id: String
|
5309
5400
|
}
|
5310
5401
|
)
|
@@ -5327,8 +5418,8 @@ module MetronomeSDK
|
|
5327
5418
|
sig { returns(Float) }
|
5328
5419
|
attr_accessor :unit_price
|
5329
5420
|
|
5330
|
-
# This field is
|
5331
|
-
#
|
5421
|
+
# This field is required unless a subscription is attached via
|
5422
|
+
# `subscription_config`.
|
5332
5423
|
sig { returns(T.nilable(Float)) }
|
5333
5424
|
attr_reader :quantity
|
5334
5425
|
|
@@ -5346,8 +5437,8 @@ module MetronomeSDK
|
|
5346
5437
|
def self.new(
|
5347
5438
|
credit_type_id:,
|
5348
5439
|
unit_price:,
|
5349
|
-
# This field is
|
5350
|
-
#
|
5440
|
+
# This field is required unless a subscription is attached via
|
5441
|
+
# `subscription_config`.
|
5351
5442
|
quantity: nil
|
5352
5443
|
)
|
5353
5444
|
end
|
@@ -5465,7 +5556,7 @@ module MetronomeSDK
|
|
5465
5556
|
end
|
5466
5557
|
attr_accessor :child_access
|
5467
5558
|
|
5468
|
-
# Optional configuration for recurring
|
5559
|
+
# Optional configuration for recurring credit hierarchy access control
|
5469
5560
|
sig do
|
5470
5561
|
params(
|
5471
5562
|
child_access:
|
@@ -5959,6 +6050,141 @@ module MetronomeSDK
|
|
5959
6050
|
def to_hash
|
5960
6051
|
end
|
5961
6052
|
end
|
6053
|
+
|
6054
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
6055
|
+
OrHash =
|
6056
|
+
T.type_alias do
|
6057
|
+
T.any(
|
6058
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig,
|
6059
|
+
MetronomeSDK::Internal::AnyHash
|
6060
|
+
)
|
6061
|
+
end
|
6062
|
+
|
6063
|
+
sig do
|
6064
|
+
returns(
|
6065
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
|
6066
|
+
)
|
6067
|
+
end
|
6068
|
+
attr_reader :apply_seat_increase_config
|
6069
|
+
|
6070
|
+
sig do
|
6071
|
+
params(
|
6072
|
+
apply_seat_increase_config:
|
6073
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
|
6074
|
+
).void
|
6075
|
+
end
|
6076
|
+
attr_writer :apply_seat_increase_config
|
6077
|
+
|
6078
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
6079
|
+
sig { returns(String) }
|
6080
|
+
attr_accessor :subscription_id
|
6081
|
+
|
6082
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6083
|
+
sig do
|
6084
|
+
returns(
|
6085
|
+
T.nilable(
|
6086
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6087
|
+
)
|
6088
|
+
)
|
6089
|
+
end
|
6090
|
+
attr_reader :allocation
|
6091
|
+
|
6092
|
+
sig do
|
6093
|
+
params(
|
6094
|
+
allocation:
|
6095
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6096
|
+
).void
|
6097
|
+
end
|
6098
|
+
attr_writer :allocation
|
6099
|
+
|
6100
|
+
# Attach a subscription to the recurring commit/credit.
|
6101
|
+
sig do
|
6102
|
+
params(
|
6103
|
+
apply_seat_increase_config:
|
6104
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
|
6105
|
+
subscription_id: String,
|
6106
|
+
allocation:
|
6107
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6108
|
+
).returns(T.attached_class)
|
6109
|
+
end
|
6110
|
+
def self.new(
|
6111
|
+
apply_seat_increase_config:,
|
6112
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
6113
|
+
subscription_id:,
|
6114
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6115
|
+
allocation: nil
|
6116
|
+
)
|
6117
|
+
end
|
6118
|
+
|
6119
|
+
sig do
|
6120
|
+
override.returns(
|
6121
|
+
{
|
6122
|
+
apply_seat_increase_config:
|
6123
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
6124
|
+
subscription_id: String,
|
6125
|
+
allocation:
|
6126
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6127
|
+
}
|
6128
|
+
)
|
6129
|
+
end
|
6130
|
+
def to_hash
|
6131
|
+
end
|
6132
|
+
|
6133
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
6134
|
+
OrHash =
|
6135
|
+
T.type_alias do
|
6136
|
+
T.any(
|
6137
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
6138
|
+
MetronomeSDK::Internal::AnyHash
|
6139
|
+
)
|
6140
|
+
end
|
6141
|
+
|
6142
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
6143
|
+
sig { returns(T::Boolean) }
|
6144
|
+
attr_accessor :is_prorated
|
6145
|
+
|
6146
|
+
sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
|
6147
|
+
def self.new(
|
6148
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
6149
|
+
is_prorated:
|
6150
|
+
)
|
6151
|
+
end
|
6152
|
+
|
6153
|
+
sig { override.returns({ is_prorated: T::Boolean }) }
|
6154
|
+
def to_hash
|
6155
|
+
end
|
6156
|
+
end
|
6157
|
+
|
6158
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6159
|
+
module Allocation
|
6160
|
+
extend MetronomeSDK::Internal::Type::Enum
|
6161
|
+
|
6162
|
+
TaggedSymbol =
|
6163
|
+
T.type_alias do
|
6164
|
+
T.all(
|
6165
|
+
Symbol,
|
6166
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation
|
6167
|
+
)
|
6168
|
+
end
|
6169
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
6170
|
+
|
6171
|
+
POOLED =
|
6172
|
+
T.let(
|
6173
|
+
:POOLED,
|
6174
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
|
6175
|
+
)
|
6176
|
+
|
6177
|
+
sig do
|
6178
|
+
override.returns(
|
6179
|
+
T::Array[
|
6180
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
|
6181
|
+
]
|
6182
|
+
)
|
6183
|
+
end
|
6184
|
+
def self.values
|
6185
|
+
end
|
6186
|
+
end
|
6187
|
+
end
|
5962
6188
|
end
|
5963
6189
|
|
5964
6190
|
class AddRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
@@ -6043,7 +6269,7 @@ module MetronomeSDK
|
|
6043
6269
|
sig { params(ending_before: Time).void }
|
6044
6270
|
attr_writer :ending_before
|
6045
6271
|
|
6046
|
-
# Optional configuration for recurring
|
6272
|
+
# Optional configuration for recurring credit hierarchy access control
|
6047
6273
|
sig do
|
6048
6274
|
returns(
|
6049
6275
|
T.nilable(
|
@@ -6147,6 +6373,8 @@ module MetronomeSDK
|
|
6147
6373
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
6148
6374
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
6149
6375
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
6376
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
6377
|
+
# body of `specifiers`.
|
6150
6378
|
sig do
|
6151
6379
|
returns(
|
6152
6380
|
T.nilable(
|
@@ -6168,6 +6396,24 @@ module MetronomeSDK
|
|
6168
6396
|
end
|
6169
6397
|
attr_writer :specifiers
|
6170
6398
|
|
6399
|
+
# Attach a subscription to the recurring commit/credit.
|
6400
|
+
sig do
|
6401
|
+
returns(
|
6402
|
+
T.nilable(
|
6403
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig
|
6404
|
+
)
|
6405
|
+
)
|
6406
|
+
end
|
6407
|
+
attr_reader :subscription_config
|
6408
|
+
|
6409
|
+
sig do
|
6410
|
+
params(
|
6411
|
+
subscription_config:
|
6412
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::OrHash
|
6413
|
+
).void
|
6414
|
+
end
|
6415
|
+
attr_writer :subscription_config
|
6416
|
+
|
6171
6417
|
# A temporary ID that can be used to reference the recurring commit for commit
|
6172
6418
|
# specific overrides.
|
6173
6419
|
sig { returns(T.nilable(String)) }
|
@@ -6204,6 +6450,8 @@ module MetronomeSDK
|
|
6204
6450
|
T::Array[
|
6205
6451
|
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Specifier::OrHash
|
6206
6452
|
],
|
6453
|
+
subscription_config:
|
6454
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::OrHash,
|
6207
6455
|
temporary_id: String
|
6208
6456
|
).returns(T.attached_class)
|
6209
6457
|
end
|
@@ -6227,7 +6475,7 @@ module MetronomeSDK
|
|
6227
6475
|
description: nil,
|
6228
6476
|
# Determines when the contract will stop creating recurring commits. optional
|
6229
6477
|
ending_before: nil,
|
6230
|
-
# Optional configuration for recurring
|
6478
|
+
# Optional configuration for recurring credit hierarchy access control
|
6231
6479
|
hierarchy_configuration: nil,
|
6232
6480
|
# displayed on invoices. will be passed through to the individual commits
|
6233
6481
|
name: nil,
|
@@ -6252,7 +6500,11 @@ module MetronomeSDK
|
|
6252
6500
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
6253
6501
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
6254
6502
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
6503
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
6504
|
+
# body of `specifiers`.
|
6255
6505
|
specifiers: nil,
|
6506
|
+
# Attach a subscription to the recurring commit/credit.
|
6507
|
+
subscription_config: nil,
|
6256
6508
|
# A temporary ID that can be used to reference the recurring commit for commit
|
6257
6509
|
# specific overrides.
|
6258
6510
|
temporary_id: nil
|
@@ -6288,6 +6540,8 @@ module MetronomeSDK
|
|
6288
6540
|
T::Array[
|
6289
6541
|
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Specifier
|
6290
6542
|
],
|
6543
|
+
subscription_config:
|
6544
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig,
|
6291
6545
|
temporary_id: String
|
6292
6546
|
}
|
6293
6547
|
)
|
@@ -6310,8 +6564,8 @@ module MetronomeSDK
|
|
6310
6564
|
sig { returns(Float) }
|
6311
6565
|
attr_accessor :unit_price
|
6312
6566
|
|
6313
|
-
# This field is
|
6314
|
-
#
|
6567
|
+
# This field is required unless a subscription is attached via
|
6568
|
+
# `subscription_config`.
|
6315
6569
|
sig { returns(T.nilable(Float)) }
|
6316
6570
|
attr_reader :quantity
|
6317
6571
|
|
@@ -6329,8 +6583,8 @@ module MetronomeSDK
|
|
6329
6583
|
def self.new(
|
6330
6584
|
credit_type_id:,
|
6331
6585
|
unit_price:,
|
6332
|
-
# This field is
|
6333
|
-
#
|
6586
|
+
# This field is required unless a subscription is attached via
|
6587
|
+
# `subscription_config`.
|
6334
6588
|
quantity: nil
|
6335
6589
|
)
|
6336
6590
|
end
|
@@ -6448,7 +6702,7 @@ module MetronomeSDK
|
|
6448
6702
|
end
|
6449
6703
|
attr_accessor :child_access
|
6450
6704
|
|
6451
|
-
# Optional configuration for recurring
|
6705
|
+
# Optional configuration for recurring credit hierarchy access control
|
6452
6706
|
sig do
|
6453
6707
|
params(
|
6454
6708
|
child_access:
|
@@ -6904,6 +7158,141 @@ module MetronomeSDK
|
|
6904
7158
|
def to_hash
|
6905
7159
|
end
|
6906
7160
|
end
|
7161
|
+
|
7162
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
7163
|
+
OrHash =
|
7164
|
+
T.type_alias do
|
7165
|
+
T.any(
|
7166
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig,
|
7167
|
+
MetronomeSDK::Internal::AnyHash
|
7168
|
+
)
|
7169
|
+
end
|
7170
|
+
|
7171
|
+
sig do
|
7172
|
+
returns(
|
7173
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
|
7174
|
+
)
|
7175
|
+
end
|
7176
|
+
attr_reader :apply_seat_increase_config
|
7177
|
+
|
7178
|
+
sig do
|
7179
|
+
params(
|
7180
|
+
apply_seat_increase_config:
|
7181
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
|
7182
|
+
).void
|
7183
|
+
end
|
7184
|
+
attr_writer :apply_seat_increase_config
|
7185
|
+
|
7186
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
7187
|
+
sig { returns(String) }
|
7188
|
+
attr_accessor :subscription_id
|
7189
|
+
|
7190
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7191
|
+
sig do
|
7192
|
+
returns(
|
7193
|
+
T.nilable(
|
7194
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7195
|
+
)
|
7196
|
+
)
|
7197
|
+
end
|
7198
|
+
attr_reader :allocation
|
7199
|
+
|
7200
|
+
sig do
|
7201
|
+
params(
|
7202
|
+
allocation:
|
7203
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7204
|
+
).void
|
7205
|
+
end
|
7206
|
+
attr_writer :allocation
|
7207
|
+
|
7208
|
+
# Attach a subscription to the recurring commit/credit.
|
7209
|
+
sig do
|
7210
|
+
params(
|
7211
|
+
apply_seat_increase_config:
|
7212
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
|
7213
|
+
subscription_id: String,
|
7214
|
+
allocation:
|
7215
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7216
|
+
).returns(T.attached_class)
|
7217
|
+
end
|
7218
|
+
def self.new(
|
7219
|
+
apply_seat_increase_config:,
|
7220
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
7221
|
+
subscription_id:,
|
7222
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7223
|
+
allocation: nil
|
7224
|
+
)
|
7225
|
+
end
|
7226
|
+
|
7227
|
+
sig do
|
7228
|
+
override.returns(
|
7229
|
+
{
|
7230
|
+
apply_seat_increase_config:
|
7231
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
7232
|
+
subscription_id: String,
|
7233
|
+
allocation:
|
7234
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7235
|
+
}
|
7236
|
+
)
|
7237
|
+
end
|
7238
|
+
def to_hash
|
7239
|
+
end
|
7240
|
+
|
7241
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
7242
|
+
OrHash =
|
7243
|
+
T.type_alias do
|
7244
|
+
T.any(
|
7245
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
7246
|
+
MetronomeSDK::Internal::AnyHash
|
7247
|
+
)
|
7248
|
+
end
|
7249
|
+
|
7250
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
7251
|
+
sig { returns(T::Boolean) }
|
7252
|
+
attr_accessor :is_prorated
|
7253
|
+
|
7254
|
+
sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
|
7255
|
+
def self.new(
|
7256
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
7257
|
+
is_prorated:
|
7258
|
+
)
|
7259
|
+
end
|
7260
|
+
|
7261
|
+
sig { override.returns({ is_prorated: T::Boolean }) }
|
7262
|
+
def to_hash
|
7263
|
+
end
|
7264
|
+
end
|
7265
|
+
|
7266
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7267
|
+
module Allocation
|
7268
|
+
extend MetronomeSDK::Internal::Type::Enum
|
7269
|
+
|
7270
|
+
TaggedSymbol =
|
7271
|
+
T.type_alias do
|
7272
|
+
T.all(
|
7273
|
+
Symbol,
|
7274
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation
|
7275
|
+
)
|
7276
|
+
end
|
7277
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
7278
|
+
|
7279
|
+
POOLED =
|
7280
|
+
T.let(
|
7281
|
+
:POOLED,
|
7282
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
|
7283
|
+
)
|
7284
|
+
|
7285
|
+
sig do
|
7286
|
+
override.returns(
|
7287
|
+
T::Array[
|
7288
|
+
MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
|
7289
|
+
]
|
7290
|
+
)
|
7291
|
+
end
|
7292
|
+
def self.values
|
7293
|
+
end
|
7294
|
+
end
|
7295
|
+
end
|
6907
7296
|
end
|
6908
7297
|
|
6909
7298
|
class AddResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
@@ -7217,6 +7606,12 @@ module MetronomeSDK
|
|
7217
7606
|
end
|
7218
7607
|
attr_writer :schedule
|
7219
7608
|
|
7609
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
7610
|
+
attr_reader :custom_fields
|
7611
|
+
|
7612
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
7613
|
+
attr_writer :custom_fields
|
7614
|
+
|
7220
7615
|
# displayed on invoices
|
7221
7616
|
sig { returns(T.nilable(String)) }
|
7222
7617
|
attr_reader :name
|
@@ -7236,6 +7631,7 @@ module MetronomeSDK
|
|
7236
7631
|
product_id: String,
|
7237
7632
|
schedule:
|
7238
7633
|
MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::OrHash,
|
7634
|
+
custom_fields: T::Hash[Symbol, String],
|
7239
7635
|
name: String,
|
7240
7636
|
netsuite_sales_order_id: String
|
7241
7637
|
).returns(T.attached_class)
|
@@ -7244,6 +7640,7 @@ module MetronomeSDK
|
|
7244
7640
|
product_id:,
|
7245
7641
|
# Must provide either schedule_items or recurring_schedule.
|
7246
7642
|
schedule:,
|
7643
|
+
custom_fields: nil,
|
7247
7644
|
# displayed on invoices
|
7248
7645
|
name: nil,
|
7249
7646
|
# This field's availability is dependent on your client's configuration.
|
@@ -7257,6 +7654,7 @@ module MetronomeSDK
|
|
7257
7654
|
product_id: String,
|
7258
7655
|
schedule:
|
7259
7656
|
MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule,
|
7657
|
+
custom_fields: T::Hash[Symbol, String],
|
7260
7658
|
name: String,
|
7261
7659
|
netsuite_sales_order_id: String
|
7262
7660
|
}
|
@@ -7274,13 +7672,21 @@ module MetronomeSDK
|
|
7274
7672
|
)
|
7275
7673
|
end
|
7276
7674
|
|
7277
|
-
# Defaults to USD if not passed.
|
7675
|
+
# Defaults to USD (cents) if not passed.
|
7278
7676
|
sig { returns(T.nilable(String)) }
|
7279
7677
|
attr_reader :credit_type_id
|
7280
7678
|
|
7281
7679
|
sig { params(credit_type_id: String).void }
|
7282
7680
|
attr_writer :credit_type_id
|
7283
7681
|
|
7682
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7683
|
+
# schedule will not generate an invoice.
|
7684
|
+
sig { returns(T.nilable(T::Boolean)) }
|
7685
|
+
attr_reader :do_not_invoice
|
7686
|
+
|
7687
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
7688
|
+
attr_writer :do_not_invoice
|
7689
|
+
|
7284
7690
|
# Enter the unit price and quantity for the charge or instead only send the
|
7285
7691
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7286
7692
|
# quantity is inferred to be 1.
|
@@ -7327,6 +7733,7 @@ module MetronomeSDK
|
|
7327
7733
|
sig do
|
7328
7734
|
params(
|
7329
7735
|
credit_type_id: String,
|
7736
|
+
do_not_invoice: T::Boolean,
|
7330
7737
|
recurring_schedule:
|
7331
7738
|
MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::OrHash,
|
7332
7739
|
schedule_items:
|
@@ -7336,8 +7743,11 @@ module MetronomeSDK
|
|
7336
7743
|
).returns(T.attached_class)
|
7337
7744
|
end
|
7338
7745
|
def self.new(
|
7339
|
-
# Defaults to USD if not passed.
|
7746
|
+
# Defaults to USD (cents) if not passed.
|
7340
7747
|
credit_type_id: nil,
|
7748
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7749
|
+
# schedule will not generate an invoice.
|
7750
|
+
do_not_invoice: nil,
|
7341
7751
|
# Enter the unit price and quantity for the charge or instead only send the
|
7342
7752
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7343
7753
|
# quantity is inferred to be 1.
|
@@ -7351,6 +7761,7 @@ module MetronomeSDK
|
|
7351
7761
|
override.returns(
|
7352
7762
|
{
|
7353
7763
|
credit_type_id: String,
|
7764
|
+
do_not_invoice: T::Boolean,
|
7354
7765
|
recurring_schedule:
|
7355
7766
|
MetronomeSDK::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule,
|
7356
7767
|
schedule_items:
|
@@ -8221,6 +8632,14 @@ module MetronomeSDK
|
|
8221
8632
|
sig { params(starting_at: Time).void }
|
8222
8633
|
attr_writer :starting_at
|
8223
8634
|
|
8635
|
+
# A temporary ID used to reference the subscription in recurring commit/credit
|
8636
|
+
# subscription configs created within the same payload.
|
8637
|
+
sig { returns(T.nilable(String)) }
|
8638
|
+
attr_reader :temporary_id
|
8639
|
+
|
8640
|
+
sig { params(temporary_id: String).void }
|
8641
|
+
attr_writer :temporary_id
|
8642
|
+
|
8224
8643
|
sig do
|
8225
8644
|
params(
|
8226
8645
|
collection_schedule:
|
@@ -8234,7 +8653,8 @@ module MetronomeSDK
|
|
8234
8653
|
description: String,
|
8235
8654
|
ending_before: Time,
|
8236
8655
|
name: String,
|
8237
|
-
starting_at: Time
|
8656
|
+
starting_at: Time,
|
8657
|
+
temporary_id: String
|
8238
8658
|
).returns(T.attached_class)
|
8239
8659
|
end
|
8240
8660
|
def self.new(
|
@@ -8250,7 +8670,10 @@ module MetronomeSDK
|
|
8250
8670
|
name: nil,
|
8251
8671
|
# Inclusive start time for the subscription. If not provided, defaults to contract
|
8252
8672
|
# start date
|
8253
|
-
starting_at: nil
|
8673
|
+
starting_at: nil,
|
8674
|
+
# A temporary ID used to reference the subscription in recurring commit/credit
|
8675
|
+
# subscription configs created within the same payload.
|
8676
|
+
temporary_id: nil
|
8254
8677
|
)
|
8255
8678
|
end
|
8256
8679
|
|
@@ -8268,7 +8691,8 @@ module MetronomeSDK
|
|
8268
8691
|
description: String,
|
8269
8692
|
ending_before: Time,
|
8270
8693
|
name: String,
|
8271
|
-
starting_at: Time
|
8694
|
+
starting_at: Time,
|
8695
|
+
temporary_id: String
|
8272
8696
|
}
|
8273
8697
|
)
|
8274
8698
|
end
|
@@ -8318,10 +8742,11 @@ module MetronomeSDK
|
|
8318
8742
|
)
|
8319
8743
|
end
|
8320
8744
|
|
8321
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8322
|
-
#
|
8323
|
-
#
|
8324
|
-
#
|
8745
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
8746
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
8747
|
+
# quantity increase will be billed immediately on the scheduled date.
|
8748
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
8749
|
+
# in-arrears at the end of the period.
|
8325
8750
|
sig do
|
8326
8751
|
returns(
|
8327
8752
|
T.nilable(
|
@@ -8354,10 +8779,11 @@ module MetronomeSDK
|
|
8354
8779
|
).returns(T.attached_class)
|
8355
8780
|
end
|
8356
8781
|
def self.new(
|
8357
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8358
|
-
#
|
8359
|
-
#
|
8360
|
-
#
|
8782
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
8783
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
8784
|
+
# quantity increase will be billed immediately on the scheduled date.
|
8785
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
8786
|
+
# in-arrears at the end of the period.
|
8361
8787
|
invoice_behavior: nil,
|
8362
8788
|
# Indicates if the partial period will be prorated or charged a full amount.
|
8363
8789
|
is_prorated: nil
|
@@ -8376,10 +8802,11 @@ module MetronomeSDK
|
|
8376
8802
|
def to_hash
|
8377
8803
|
end
|
8378
8804
|
|
8379
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8380
|
-
#
|
8381
|
-
#
|
8382
|
-
#
|
8805
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
8806
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
8807
|
+
# quantity increase will be billed immediately on the scheduled date.
|
8808
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
8809
|
+
# in-arrears at the end of the period.
|
8383
8810
|
module InvoiceBehavior
|
8384
8811
|
extend MetronomeSDK::Internal::Type::Enum
|
8385
8812
|
|
@@ -8676,6 +9103,9 @@ module MetronomeSDK
|
|
8676
9103
|
sig { returns(T.nilable(String)) }
|
8677
9104
|
attr_accessor :netsuite_sales_order_id
|
8678
9105
|
|
9106
|
+
sig { returns(T.nilable(Float)) }
|
9107
|
+
attr_accessor :priority
|
9108
|
+
|
8679
9109
|
sig { returns(T.nilable(String)) }
|
8680
9110
|
attr_reader :product_id
|
8681
9111
|
|
@@ -8697,6 +9127,7 @@ module MetronomeSDK
|
|
8697
9127
|
invoice_schedule:
|
8698
9128
|
MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule::OrHash,
|
8699
9129
|
netsuite_sales_order_id: T.nilable(String),
|
9130
|
+
priority: T.nilable(Float),
|
8700
9131
|
product_id: String,
|
8701
9132
|
rollover_fraction: T.nilable(Float)
|
8702
9133
|
).returns(T.attached_class)
|
@@ -8716,6 +9147,7 @@ module MetronomeSDK
|
|
8716
9147
|
hierarchy_configuration: nil,
|
8717
9148
|
invoice_schedule: nil,
|
8718
9149
|
netsuite_sales_order_id: nil,
|
9150
|
+
priority: nil,
|
8719
9151
|
product_id: nil,
|
8720
9152
|
rollover_fraction: nil
|
8721
9153
|
)
|
@@ -8734,6 +9166,7 @@ module MetronomeSDK
|
|
8734
9166
|
invoice_schedule:
|
8735
9167
|
MetronomeSDK::V2::ContractEditParams::UpdateCommit::InvoiceSchedule,
|
8736
9168
|
netsuite_sales_order_id: T.nilable(String),
|
9169
|
+
priority: T.nilable(Float),
|
8737
9170
|
product_id: String,
|
8738
9171
|
rollover_fraction: T.nilable(Float)
|
8739
9172
|
}
|
@@ -9583,6 +10016,9 @@ module MetronomeSDK
|
|
9583
10016
|
sig { returns(T.nilable(String)) }
|
9584
10017
|
attr_accessor :netsuite_sales_order_id
|
9585
10018
|
|
10019
|
+
sig { returns(T.nilable(Float)) }
|
10020
|
+
attr_accessor :priority
|
10021
|
+
|
9586
10022
|
sig { returns(T.nilable(String)) }
|
9587
10023
|
attr_reader :product_id
|
9588
10024
|
|
@@ -9599,6 +10035,7 @@ module MetronomeSDK
|
|
9599
10035
|
hierarchy_configuration:
|
9600
10036
|
MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration::OrHash,
|
9601
10037
|
netsuite_sales_order_id: T.nilable(String),
|
10038
|
+
priority: T.nilable(Float),
|
9602
10039
|
product_id: String
|
9603
10040
|
).returns(T.attached_class)
|
9604
10041
|
end
|
@@ -9616,6 +10053,7 @@ module MetronomeSDK
|
|
9616
10053
|
# Optional configuration for commit hierarchy access control
|
9617
10054
|
hierarchy_configuration: nil,
|
9618
10055
|
netsuite_sales_order_id: nil,
|
10056
|
+
priority: nil,
|
9619
10057
|
product_id: nil
|
9620
10058
|
)
|
9621
10059
|
end
|
@@ -9631,6 +10069,7 @@ module MetronomeSDK
|
|
9631
10069
|
hierarchy_configuration:
|
9632
10070
|
MetronomeSDK::V2::ContractEditParams::UpdateCredit::HierarchyConfiguration,
|
9633
10071
|
netsuite_sales_order_id: T.nilable(String),
|
10072
|
+
priority: T.nilable(Float),
|
9634
10073
|
product_id: String
|
9635
10074
|
}
|
9636
10075
|
)
|
@@ -10315,6 +10754,8 @@ module MetronomeSDK
|
|
10315
10754
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
10316
10755
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
10317
10756
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
10757
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
10758
|
+
# body of `specifiers`.
|
10318
10759
|
sig do
|
10319
10760
|
returns(
|
10320
10761
|
T.nilable(
|
@@ -10360,6 +10801,8 @@ module MetronomeSDK
|
|
10360
10801
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
10361
10802
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
10362
10803
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
10804
|
+
# Instead, to target usage by product or product tag, pass those values in the
|
10805
|
+
# body of `specifiers`.
|
10363
10806
|
specifiers: nil
|
10364
10807
|
)
|
10365
10808
|
end
|