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
@@ -1583,6 +1583,14 @@ module MetronomeSDK
|
|
1583
1583
|
sig { params(credit_type_id: String).void }
|
1584
1584
|
attr_writer :credit_type_id
|
1585
1585
|
|
1586
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1587
|
+
# schedule will not generate an invoice.
|
1588
|
+
sig { returns(T.nilable(T::Boolean)) }
|
1589
|
+
attr_reader :do_not_invoice
|
1590
|
+
|
1591
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
1592
|
+
attr_writer :do_not_invoice
|
1593
|
+
|
1586
1594
|
# Enter the unit price and quantity for the charge or instead only send the
|
1587
1595
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1588
1596
|
# quantity is inferred to be 1.
|
@@ -1632,6 +1640,7 @@ module MetronomeSDK
|
|
1632
1640
|
sig do
|
1633
1641
|
params(
|
1634
1642
|
credit_type_id: String,
|
1643
|
+
do_not_invoice: T::Boolean,
|
1635
1644
|
recurring_schedule:
|
1636
1645
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::OrHash,
|
1637
1646
|
schedule_items:
|
@@ -1643,6 +1652,9 @@ module MetronomeSDK
|
|
1643
1652
|
def self.new(
|
1644
1653
|
# Defaults to USD (cents) if not passed.
|
1645
1654
|
credit_type_id: nil,
|
1655
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
1656
|
+
# schedule will not generate an invoice.
|
1657
|
+
do_not_invoice: nil,
|
1646
1658
|
# Enter the unit price and quantity for the charge or instead only send the
|
1647
1659
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
1648
1660
|
# quantity is inferred to be 1.
|
@@ -1656,6 +1668,7 @@ module MetronomeSDK
|
|
1656
1668
|
override.returns(
|
1657
1669
|
{
|
1658
1670
|
credit_type_id: String,
|
1671
|
+
do_not_invoice: T::Boolean,
|
1659
1672
|
recurring_schedule:
|
1660
1673
|
MetronomeSDK::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule,
|
1661
1674
|
schedule_items:
|
@@ -2181,12 +2194,27 @@ module MetronomeSDK
|
|
2181
2194
|
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
2182
2195
|
attr_writer :invoice_metadata
|
2183
2196
|
|
2197
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2198
|
+
# session).
|
2199
|
+
#
|
2200
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2201
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2202
|
+
# India), the payment may be declined.
|
2203
|
+
#
|
2204
|
+
# If left blank, will default to false.
|
2205
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2206
|
+
attr_reader :on_session_payment
|
2207
|
+
|
2208
|
+
sig { params(on_session_payment: T::Boolean).void }
|
2209
|
+
attr_writer :on_session_payment
|
2210
|
+
|
2184
2211
|
# Only applicable if using STRIPE as your payment gate type.
|
2185
2212
|
sig do
|
2186
2213
|
params(
|
2187
2214
|
payment_type:
|
2188
2215
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2189
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2216
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2217
|
+
on_session_payment: T::Boolean
|
2190
2218
|
).returns(T.attached_class)
|
2191
2219
|
end
|
2192
2220
|
def self.new(
|
@@ -2194,7 +2222,16 @@ module MetronomeSDK
|
|
2194
2222
|
payment_type:,
|
2195
2223
|
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
2196
2224
|
# your payment type.
|
2197
|
-
invoice_metadata: nil
|
2225
|
+
invoice_metadata: nil,
|
2226
|
+
# If true, the payment will be made assuming the customer is present (i.e. on
|
2227
|
+
# session).
|
2228
|
+
#
|
2229
|
+
# If false, the payment will be made assuming the customer is not present (i.e.
|
2230
|
+
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
2231
|
+
# India), the payment may be declined.
|
2232
|
+
#
|
2233
|
+
# If left blank, will default to false.
|
2234
|
+
on_session_payment: nil
|
2198
2235
|
)
|
2199
2236
|
end
|
2200
2237
|
|
@@ -2203,7 +2240,8 @@ module MetronomeSDK
|
|
2203
2240
|
{
|
2204
2241
|
payment_type:
|
2205
2242
|
MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
2206
|
-
invoice_metadata: T::Hash[Symbol, String]
|
2243
|
+
invoice_metadata: T::Hash[Symbol, String],
|
2244
|
+
on_session_payment: T::Boolean
|
2207
2245
|
}
|
2208
2246
|
)
|
2209
2247
|
end
|
@@ -3202,6 +3240,14 @@ module MetronomeSDK
|
|
3202
3240
|
sig { params(credit_type_id: String).void }
|
3203
3241
|
attr_writer :credit_type_id
|
3204
3242
|
|
3243
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3244
|
+
# schedule will not generate an invoice.
|
3245
|
+
sig { returns(T.nilable(T::Boolean)) }
|
3246
|
+
attr_reader :do_not_invoice
|
3247
|
+
|
3248
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
3249
|
+
attr_writer :do_not_invoice
|
3250
|
+
|
3205
3251
|
# Enter the unit price and quantity for the charge or instead only send the
|
3206
3252
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3207
3253
|
# quantity is inferred to be 1.
|
@@ -3248,6 +3294,7 @@ module MetronomeSDK
|
|
3248
3294
|
sig do
|
3249
3295
|
params(
|
3250
3296
|
credit_type_id: String,
|
3297
|
+
do_not_invoice: T::Boolean,
|
3251
3298
|
recurring_schedule:
|
3252
3299
|
MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::OrHash,
|
3253
3300
|
schedule_items:
|
@@ -3259,6 +3306,9 @@ module MetronomeSDK
|
|
3259
3306
|
def self.new(
|
3260
3307
|
# Defaults to USD (cents) if not passed.
|
3261
3308
|
credit_type_id: nil,
|
3309
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
3310
|
+
# schedule will not generate an invoice.
|
3311
|
+
do_not_invoice: nil,
|
3262
3312
|
# Enter the unit price and quantity for the charge or instead only send the
|
3263
3313
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
3264
3314
|
# quantity is inferred to be 1.
|
@@ -3272,6 +3322,7 @@ module MetronomeSDK
|
|
3272
3322
|
override.returns(
|
3273
3323
|
{
|
3274
3324
|
credit_type_id: String,
|
3325
|
+
do_not_invoice: T::Boolean,
|
3275
3326
|
recurring_schedule:
|
3276
3327
|
MetronomeSDK::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule,
|
3277
3328
|
schedule_items:
|
@@ -5373,6 +5424,24 @@ module MetronomeSDK
|
|
5373
5424
|
end
|
5374
5425
|
attr_writer :specifiers
|
5375
5426
|
|
5427
|
+
# Attach a subscription to the recurring commit/credit.
|
5428
|
+
sig do
|
5429
|
+
returns(
|
5430
|
+
T.nilable(
|
5431
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig
|
5432
|
+
)
|
5433
|
+
)
|
5434
|
+
end
|
5435
|
+
attr_reader :subscription_config
|
5436
|
+
|
5437
|
+
sig do
|
5438
|
+
params(
|
5439
|
+
subscription_config:
|
5440
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::OrHash
|
5441
|
+
).void
|
5442
|
+
end
|
5443
|
+
attr_writer :subscription_config
|
5444
|
+
|
5376
5445
|
# A temporary ID that can be used to reference the recurring commit for commit
|
5377
5446
|
# specific overrides.
|
5378
5447
|
sig { returns(T.nilable(String)) }
|
@@ -5411,6 +5480,8 @@ module MetronomeSDK
|
|
5411
5480
|
T::Array[
|
5412
5481
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier::OrHash
|
5413
5482
|
],
|
5483
|
+
subscription_config:
|
5484
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::OrHash,
|
5414
5485
|
temporary_id: String
|
5415
5486
|
).returns(T.attached_class)
|
5416
5487
|
end
|
@@ -5462,6 +5533,8 @@ module MetronomeSDK
|
|
5462
5533
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
5463
5534
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
5464
5535
|
specifiers: nil,
|
5536
|
+
# Attach a subscription to the recurring commit/credit.
|
5537
|
+
subscription_config: nil,
|
5465
5538
|
# A temporary ID that can be used to reference the recurring commit for commit
|
5466
5539
|
# specific overrides.
|
5467
5540
|
temporary_id: nil
|
@@ -5499,6 +5572,8 @@ module MetronomeSDK
|
|
5499
5572
|
T::Array[
|
5500
5573
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Specifier
|
5501
5574
|
],
|
5575
|
+
subscription_config:
|
5576
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig,
|
5502
5577
|
temporary_id: String
|
5503
5578
|
}
|
5504
5579
|
)
|
@@ -5521,8 +5596,8 @@ module MetronomeSDK
|
|
5521
5596
|
sig { returns(Float) }
|
5522
5597
|
attr_accessor :unit_price
|
5523
5598
|
|
5524
|
-
# This field is
|
5525
|
-
#
|
5599
|
+
# This field is required unless a subscription is attached via
|
5600
|
+
# `subscription_config`.
|
5526
5601
|
sig { returns(T.nilable(Float)) }
|
5527
5602
|
attr_reader :quantity
|
5528
5603
|
|
@@ -5540,8 +5615,8 @@ module MetronomeSDK
|
|
5540
5615
|
def self.new(
|
5541
5616
|
credit_type_id:,
|
5542
5617
|
unit_price:,
|
5543
|
-
# This field is
|
5544
|
-
#
|
5618
|
+
# This field is required unless a subscription is attached via
|
5619
|
+
# `subscription_config`.
|
5545
5620
|
quantity: nil
|
5546
5621
|
)
|
5547
5622
|
end
|
@@ -6153,6 +6228,141 @@ module MetronomeSDK
|
|
6153
6228
|
def to_hash
|
6154
6229
|
end
|
6155
6230
|
end
|
6231
|
+
|
6232
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
6233
|
+
OrHash =
|
6234
|
+
T.type_alias do
|
6235
|
+
T.any(
|
6236
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig,
|
6237
|
+
MetronomeSDK::Internal::AnyHash
|
6238
|
+
)
|
6239
|
+
end
|
6240
|
+
|
6241
|
+
sig do
|
6242
|
+
returns(
|
6243
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig
|
6244
|
+
)
|
6245
|
+
end
|
6246
|
+
attr_reader :apply_seat_increase_config
|
6247
|
+
|
6248
|
+
sig do
|
6249
|
+
params(
|
6250
|
+
apply_seat_increase_config:
|
6251
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
|
6252
|
+
).void
|
6253
|
+
end
|
6254
|
+
attr_writer :apply_seat_increase_config
|
6255
|
+
|
6256
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
6257
|
+
sig { returns(String) }
|
6258
|
+
attr_accessor :subscription_id
|
6259
|
+
|
6260
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6261
|
+
sig do
|
6262
|
+
returns(
|
6263
|
+
T.nilable(
|
6264
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6265
|
+
)
|
6266
|
+
)
|
6267
|
+
end
|
6268
|
+
attr_reader :allocation
|
6269
|
+
|
6270
|
+
sig do
|
6271
|
+
params(
|
6272
|
+
allocation:
|
6273
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6274
|
+
).void
|
6275
|
+
end
|
6276
|
+
attr_writer :allocation
|
6277
|
+
|
6278
|
+
# Attach a subscription to the recurring commit/credit.
|
6279
|
+
sig do
|
6280
|
+
params(
|
6281
|
+
apply_seat_increase_config:
|
6282
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
|
6283
|
+
subscription_id: String,
|
6284
|
+
allocation:
|
6285
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6286
|
+
).returns(T.attached_class)
|
6287
|
+
end
|
6288
|
+
def self.new(
|
6289
|
+
apply_seat_increase_config:,
|
6290
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
6291
|
+
subscription_id:,
|
6292
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6293
|
+
allocation: nil
|
6294
|
+
)
|
6295
|
+
end
|
6296
|
+
|
6297
|
+
sig do
|
6298
|
+
override.returns(
|
6299
|
+
{
|
6300
|
+
apply_seat_increase_config:
|
6301
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
6302
|
+
subscription_id: String,
|
6303
|
+
allocation:
|
6304
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::OrSymbol
|
6305
|
+
}
|
6306
|
+
)
|
6307
|
+
end
|
6308
|
+
def to_hash
|
6309
|
+
end
|
6310
|
+
|
6311
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
6312
|
+
OrHash =
|
6313
|
+
T.type_alias do
|
6314
|
+
T.any(
|
6315
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
6316
|
+
MetronomeSDK::Internal::AnyHash
|
6317
|
+
)
|
6318
|
+
end
|
6319
|
+
|
6320
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
6321
|
+
sig { returns(T::Boolean) }
|
6322
|
+
attr_accessor :is_prorated
|
6323
|
+
|
6324
|
+
sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
|
6325
|
+
def self.new(
|
6326
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
6327
|
+
is_prorated:
|
6328
|
+
)
|
6329
|
+
end
|
6330
|
+
|
6331
|
+
sig { override.returns({ is_prorated: T::Boolean }) }
|
6332
|
+
def to_hash
|
6333
|
+
end
|
6334
|
+
end
|
6335
|
+
|
6336
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
6337
|
+
module Allocation
|
6338
|
+
extend MetronomeSDK::Internal::Type::Enum
|
6339
|
+
|
6340
|
+
TaggedSymbol =
|
6341
|
+
T.type_alias do
|
6342
|
+
T.all(
|
6343
|
+
Symbol,
|
6344
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation
|
6345
|
+
)
|
6346
|
+
end
|
6347
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
6348
|
+
|
6349
|
+
POOLED =
|
6350
|
+
T.let(
|
6351
|
+
:POOLED,
|
6352
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
|
6353
|
+
)
|
6354
|
+
|
6355
|
+
sig do
|
6356
|
+
override.returns(
|
6357
|
+
T::Array[
|
6358
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation::TaggedSymbol
|
6359
|
+
]
|
6360
|
+
)
|
6361
|
+
end
|
6362
|
+
def self.values
|
6363
|
+
end
|
6364
|
+
end
|
6365
|
+
end
|
6156
6366
|
end
|
6157
6367
|
|
6158
6368
|
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
@@ -6362,6 +6572,24 @@ module MetronomeSDK
|
|
6362
6572
|
end
|
6363
6573
|
attr_writer :specifiers
|
6364
6574
|
|
6575
|
+
# Attach a subscription to the recurring commit/credit.
|
6576
|
+
sig do
|
6577
|
+
returns(
|
6578
|
+
T.nilable(
|
6579
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig
|
6580
|
+
)
|
6581
|
+
)
|
6582
|
+
end
|
6583
|
+
attr_reader :subscription_config
|
6584
|
+
|
6585
|
+
sig do
|
6586
|
+
params(
|
6587
|
+
subscription_config:
|
6588
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::OrHash
|
6589
|
+
).void
|
6590
|
+
end
|
6591
|
+
attr_writer :subscription_config
|
6592
|
+
|
6365
6593
|
# A temporary ID that can be used to reference the recurring commit for commit
|
6366
6594
|
# specific overrides.
|
6367
6595
|
sig { returns(T.nilable(String)) }
|
@@ -6398,6 +6626,8 @@ module MetronomeSDK
|
|
6398
6626
|
T::Array[
|
6399
6627
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier::OrHash
|
6400
6628
|
],
|
6629
|
+
subscription_config:
|
6630
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::OrHash,
|
6401
6631
|
temporary_id: String
|
6402
6632
|
).returns(T.attached_class)
|
6403
6633
|
end
|
@@ -6447,6 +6677,8 @@ module MetronomeSDK
|
|
6447
6677
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
6448
6678
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
6449
6679
|
specifiers: nil,
|
6680
|
+
# Attach a subscription to the recurring commit/credit.
|
6681
|
+
subscription_config: nil,
|
6450
6682
|
# A temporary ID that can be used to reference the recurring commit for commit
|
6451
6683
|
# specific overrides.
|
6452
6684
|
temporary_id: nil
|
@@ -6482,6 +6714,8 @@ module MetronomeSDK
|
|
6482
6714
|
T::Array[
|
6483
6715
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Specifier
|
6484
6716
|
],
|
6717
|
+
subscription_config:
|
6718
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig,
|
6485
6719
|
temporary_id: String
|
6486
6720
|
}
|
6487
6721
|
)
|
@@ -6504,8 +6738,8 @@ module MetronomeSDK
|
|
6504
6738
|
sig { returns(Float) }
|
6505
6739
|
attr_accessor :unit_price
|
6506
6740
|
|
6507
|
-
# This field is
|
6508
|
-
#
|
6741
|
+
# This field is required unless a subscription is attached via
|
6742
|
+
# `subscription_config`.
|
6509
6743
|
sig { returns(T.nilable(Float)) }
|
6510
6744
|
attr_reader :quantity
|
6511
6745
|
|
@@ -6523,8 +6757,8 @@ module MetronomeSDK
|
|
6523
6757
|
def self.new(
|
6524
6758
|
credit_type_id:,
|
6525
6759
|
unit_price:,
|
6526
|
-
# This field is
|
6527
|
-
#
|
6760
|
+
# This field is required unless a subscription is attached via
|
6761
|
+
# `subscription_config`.
|
6528
6762
|
quantity: nil
|
6529
6763
|
)
|
6530
6764
|
end
|
@@ -7098,6 +7332,141 @@ module MetronomeSDK
|
|
7098
7332
|
def to_hash
|
7099
7333
|
end
|
7100
7334
|
end
|
7335
|
+
|
7336
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
7337
|
+
OrHash =
|
7338
|
+
T.type_alias do
|
7339
|
+
T.any(
|
7340
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig,
|
7341
|
+
MetronomeSDK::Internal::AnyHash
|
7342
|
+
)
|
7343
|
+
end
|
7344
|
+
|
7345
|
+
sig do
|
7346
|
+
returns(
|
7347
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig
|
7348
|
+
)
|
7349
|
+
end
|
7350
|
+
attr_reader :apply_seat_increase_config
|
7351
|
+
|
7352
|
+
sig do
|
7353
|
+
params(
|
7354
|
+
apply_seat_increase_config:
|
7355
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash
|
7356
|
+
).void
|
7357
|
+
end
|
7358
|
+
attr_writer :apply_seat_increase_config
|
7359
|
+
|
7360
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
7361
|
+
sig { returns(String) }
|
7362
|
+
attr_accessor :subscription_id
|
7363
|
+
|
7364
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7365
|
+
sig do
|
7366
|
+
returns(
|
7367
|
+
T.nilable(
|
7368
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7369
|
+
)
|
7370
|
+
)
|
7371
|
+
end
|
7372
|
+
attr_reader :allocation
|
7373
|
+
|
7374
|
+
sig do
|
7375
|
+
params(
|
7376
|
+
allocation:
|
7377
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7378
|
+
).void
|
7379
|
+
end
|
7380
|
+
attr_writer :allocation
|
7381
|
+
|
7382
|
+
# Attach a subscription to the recurring commit/credit.
|
7383
|
+
sig do
|
7384
|
+
params(
|
7385
|
+
apply_seat_increase_config:
|
7386
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig::OrHash,
|
7387
|
+
subscription_id: String,
|
7388
|
+
allocation:
|
7389
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7390
|
+
).returns(T.attached_class)
|
7391
|
+
end
|
7392
|
+
def self.new(
|
7393
|
+
apply_seat_increase_config:,
|
7394
|
+
# ID of the subscription to configure on the recurring commit/credit.
|
7395
|
+
subscription_id:,
|
7396
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7397
|
+
allocation: nil
|
7398
|
+
)
|
7399
|
+
end
|
7400
|
+
|
7401
|
+
sig do
|
7402
|
+
override.returns(
|
7403
|
+
{
|
7404
|
+
apply_seat_increase_config:
|
7405
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
7406
|
+
subscription_id: String,
|
7407
|
+
allocation:
|
7408
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::OrSymbol
|
7409
|
+
}
|
7410
|
+
)
|
7411
|
+
end
|
7412
|
+
def to_hash
|
7413
|
+
end
|
7414
|
+
|
7415
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
7416
|
+
OrHash =
|
7417
|
+
T.type_alias do
|
7418
|
+
T.any(
|
7419
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
7420
|
+
MetronomeSDK::Internal::AnyHash
|
7421
|
+
)
|
7422
|
+
end
|
7423
|
+
|
7424
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
7425
|
+
sig { returns(T::Boolean) }
|
7426
|
+
attr_accessor :is_prorated
|
7427
|
+
|
7428
|
+
sig { params(is_prorated: T::Boolean).returns(T.attached_class) }
|
7429
|
+
def self.new(
|
7430
|
+
# Indicates whether a mid-period seat increase should be prorated.
|
7431
|
+
is_prorated:
|
7432
|
+
)
|
7433
|
+
end
|
7434
|
+
|
7435
|
+
sig { override.returns({ is_prorated: T::Boolean }) }
|
7436
|
+
def to_hash
|
7437
|
+
end
|
7438
|
+
end
|
7439
|
+
|
7440
|
+
# If set to POOLED, allocation added per seat is pooled across the account.
|
7441
|
+
module Allocation
|
7442
|
+
extend MetronomeSDK::Internal::Type::Enum
|
7443
|
+
|
7444
|
+
TaggedSymbol =
|
7445
|
+
T.type_alias do
|
7446
|
+
T.all(
|
7447
|
+
Symbol,
|
7448
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation
|
7449
|
+
)
|
7450
|
+
end
|
7451
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
7452
|
+
|
7453
|
+
POOLED =
|
7454
|
+
T.let(
|
7455
|
+
:POOLED,
|
7456
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
|
7457
|
+
)
|
7458
|
+
|
7459
|
+
sig do
|
7460
|
+
override.returns(
|
7461
|
+
T::Array[
|
7462
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation::TaggedSymbol
|
7463
|
+
]
|
7464
|
+
)
|
7465
|
+
end
|
7466
|
+
def self.values
|
7467
|
+
end
|
7468
|
+
end
|
7469
|
+
end
|
7101
7470
|
end
|
7102
7471
|
|
7103
7472
|
class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
@@ -7403,6 +7772,12 @@ module MetronomeSDK
|
|
7403
7772
|
end
|
7404
7773
|
attr_writer :schedule
|
7405
7774
|
|
7775
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
7776
|
+
attr_reader :custom_fields
|
7777
|
+
|
7778
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
7779
|
+
attr_writer :custom_fields
|
7780
|
+
|
7406
7781
|
# displayed on invoices
|
7407
7782
|
sig { returns(T.nilable(String)) }
|
7408
7783
|
attr_reader :name
|
@@ -7422,6 +7797,7 @@ module MetronomeSDK
|
|
7422
7797
|
product_id: String,
|
7423
7798
|
schedule:
|
7424
7799
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::OrHash,
|
7800
|
+
custom_fields: T::Hash[Symbol, String],
|
7425
7801
|
name: String,
|
7426
7802
|
netsuite_sales_order_id: String
|
7427
7803
|
).returns(T.attached_class)
|
@@ -7430,6 +7806,7 @@ module MetronomeSDK
|
|
7430
7806
|
product_id:,
|
7431
7807
|
# Must provide either schedule_items or recurring_schedule.
|
7432
7808
|
schedule:,
|
7809
|
+
custom_fields: nil,
|
7433
7810
|
# displayed on invoices
|
7434
7811
|
name: nil,
|
7435
7812
|
# This field's availability is dependent on your client's configuration.
|
@@ -7443,6 +7820,7 @@ module MetronomeSDK
|
|
7443
7820
|
product_id: String,
|
7444
7821
|
schedule:
|
7445
7822
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule,
|
7823
|
+
custom_fields: T::Hash[Symbol, String],
|
7446
7824
|
name: String,
|
7447
7825
|
netsuite_sales_order_id: String
|
7448
7826
|
}
|
@@ -7467,6 +7845,14 @@ module MetronomeSDK
|
|
7467
7845
|
sig { params(credit_type_id: String).void }
|
7468
7846
|
attr_writer :credit_type_id
|
7469
7847
|
|
7848
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7849
|
+
# schedule will not generate an invoice.
|
7850
|
+
sig { returns(T.nilable(T::Boolean)) }
|
7851
|
+
attr_reader :do_not_invoice
|
7852
|
+
|
7853
|
+
sig { params(do_not_invoice: T::Boolean).void }
|
7854
|
+
attr_writer :do_not_invoice
|
7855
|
+
|
7470
7856
|
# Enter the unit price and quantity for the charge or instead only send the
|
7471
7857
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7472
7858
|
# quantity is inferred to be 1.
|
@@ -7513,6 +7899,7 @@ module MetronomeSDK
|
|
7513
7899
|
sig do
|
7514
7900
|
params(
|
7515
7901
|
credit_type_id: String,
|
7902
|
+
do_not_invoice: T::Boolean,
|
7516
7903
|
recurring_schedule:
|
7517
7904
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::OrHash,
|
7518
7905
|
schedule_items:
|
@@ -7524,6 +7911,9 @@ module MetronomeSDK
|
|
7524
7911
|
def self.new(
|
7525
7912
|
# Defaults to USD (cents) if not passed.
|
7526
7913
|
credit_type_id: nil,
|
7914
|
+
# This field is only applicable to commit invoice schedules. If true, this
|
7915
|
+
# schedule will not generate an invoice.
|
7916
|
+
do_not_invoice: nil,
|
7527
7917
|
# Enter the unit price and quantity for the charge or instead only send the
|
7528
7918
|
# amount. If amount is sent, the unit price is assumed to be the amount and
|
7529
7919
|
# quantity is inferred to be 1.
|
@@ -7537,6 +7927,7 @@ module MetronomeSDK
|
|
7537
7927
|
override.returns(
|
7538
7928
|
{
|
7539
7929
|
credit_type_id: String,
|
7930
|
+
do_not_invoice: T::Boolean,
|
7540
7931
|
recurring_schedule:
|
7541
7932
|
MetronomeSDK::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule,
|
7542
7933
|
schedule_items:
|
@@ -8437,6 +8828,14 @@ module MetronomeSDK
|
|
8437
8828
|
sig { params(starting_at: Time).void }
|
8438
8829
|
attr_writer :starting_at
|
8439
8830
|
|
8831
|
+
# A temporary ID used to reference the subscription in recurring commit/credit
|
8832
|
+
# subscription configs created within the same payload.
|
8833
|
+
sig { returns(T.nilable(String)) }
|
8834
|
+
attr_reader :temporary_id
|
8835
|
+
|
8836
|
+
sig { params(temporary_id: String).void }
|
8837
|
+
attr_writer :temporary_id
|
8838
|
+
|
8440
8839
|
sig do
|
8441
8840
|
params(
|
8442
8841
|
collection_schedule:
|
@@ -8450,7 +8849,8 @@ module MetronomeSDK
|
|
8450
8849
|
description: String,
|
8451
8850
|
ending_before: Time,
|
8452
8851
|
name: String,
|
8453
|
-
starting_at: Time
|
8852
|
+
starting_at: Time,
|
8853
|
+
temporary_id: String
|
8454
8854
|
).returns(T.attached_class)
|
8455
8855
|
end
|
8456
8856
|
def self.new(
|
@@ -8467,7 +8867,10 @@ module MetronomeSDK
|
|
8467
8867
|
name: nil,
|
8468
8868
|
# Inclusive start time for the subscription. If not provided, defaults to contract
|
8469
8869
|
# start date
|
8470
|
-
starting_at: nil
|
8870
|
+
starting_at: nil,
|
8871
|
+
# A temporary ID used to reference the subscription in recurring commit/credit
|
8872
|
+
# subscription configs created within the same payload.
|
8873
|
+
temporary_id: nil
|
8471
8874
|
)
|
8472
8875
|
end
|
8473
8876
|
|
@@ -8485,7 +8888,8 @@ module MetronomeSDK
|
|
8485
8888
|
description: String,
|
8486
8889
|
ending_before: Time,
|
8487
8890
|
name: String,
|
8488
|
-
starting_at: Time
|
8891
|
+
starting_at: Time,
|
8892
|
+
temporary_id: String
|
8489
8893
|
}
|
8490
8894
|
)
|
8491
8895
|
end
|
@@ -8535,10 +8939,11 @@ module MetronomeSDK
|
|
8535
8939
|
)
|
8536
8940
|
end
|
8537
8941
|
|
8538
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8539
|
-
#
|
8540
|
-
#
|
8541
|
-
#
|
8942
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
8943
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
8944
|
+
# quantity increase will be billed immediately on the scheduled date.
|
8945
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
8946
|
+
# in-arrears at the end of the period.
|
8542
8947
|
sig do
|
8543
8948
|
returns(
|
8544
8949
|
T.nilable(
|
@@ -8571,10 +8976,11 @@ module MetronomeSDK
|
|
8571
8976
|
).returns(T.attached_class)
|
8572
8977
|
end
|
8573
8978
|
def self.new(
|
8574
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8575
|
-
#
|
8576
|
-
#
|
8577
|
-
#
|
8979
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
8980
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
8981
|
+
# quantity increase will be billed immediately on the scheduled date.
|
8982
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
8983
|
+
# in-arrears at the end of the period.
|
8578
8984
|
invoice_behavior: nil,
|
8579
8985
|
# Indicates if the partial period will be prorated or charged a full amount.
|
8580
8986
|
is_prorated: nil
|
@@ -8593,10 +8999,11 @@ module MetronomeSDK
|
|
8593
8999
|
def to_hash
|
8594
9000
|
end
|
8595
9001
|
|
8596
|
-
# Indicates how mid-period quantity adjustments are invoiced.
|
8597
|
-
#
|
8598
|
-
#
|
8599
|
-
#
|
9002
|
+
# Indicates how mid-period quantity adjustments are invoiced.
|
9003
|
+
# **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
9004
|
+
# quantity increase will be billed immediately on the scheduled date.
|
9005
|
+
# **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
9006
|
+
# in-arrears at the end of the period.
|
8600
9007
|
module InvoiceBehavior
|
8601
9008
|
extend MetronomeSDK::Internal::Type::Enum
|
8602
9009
|
|