metronome-sdk 3.7.0 → 3.8.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 +38 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
- data/lib/metronome_sdk/models/commit.rb +10 -1
- data/lib/metronome_sdk/models/contract_v2.rb +290 -7
- data/lib/metronome_sdk/models/contract_without_amendments.rb +178 -4
- data/lib/metronome_sdk/models/credit.rb +10 -1
- data/lib/metronome_sdk/models/override.rb +7 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +10 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +3 -1
- data/lib/metronome_sdk/models/subscription.rb +90 -2
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +17 -4
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +290 -10
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +178 -4
- data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
- data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
- data/lib/metronome_sdk/models/v1/package_create_params.rb +279 -10
- data/lib/metronome_sdk/models/v1/package_list_response.rb +264 -7
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +264 -7
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +515 -9
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +456 -8
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +456 -8
- data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
- data/lib/metronome_sdk/resources/v1/contracts.rb +68 -1
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
- data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -0
- data/rbi/metronome_sdk/models/commit.rbi +13 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +715 -3
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +463 -0
- data/rbi/metronome_sdk/models/credit.rbi +13 -0
- data/rbi/metronome_sdk/models/override.rbi +9 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +11 -1
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +4 -0
- data/rbi/metronome_sdk/models/subscription.rbi +212 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +27 -6
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +719 -9
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +463 -0
- data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
- data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +706 -9
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +693 -3
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +693 -3
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1333 -40
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +1204 -67
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1204 -67
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +70 -0
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
- data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
- data/sig/metronome_sdk/models/commit.rbs +7 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +278 -5
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +169 -2
- data/sig/metronome_sdk/models/credit.rbs +7 -0
- data/sig/metronome_sdk/models/override.rbs +7 -0
- data/sig/metronome_sdk/models/subscription.rbs +88 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +278 -5
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +167 -2
- data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
- data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
- data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +271 -5
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +265 -5
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +263 -5
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +468 -5
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +428 -5
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +427 -5
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +13 -0
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
- metadata +8 -2
|
@@ -3048,9 +3048,10 @@ module MetronomeSDK
|
|
|
3048
3048
|
attr_writer :entitled
|
|
3049
3049
|
|
|
3050
3050
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
3051
|
-
# `false`. If `true
|
|
3052
|
-
# passing `commit_ids
|
|
3053
|
-
#
|
|
3051
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
3052
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
3053
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
3054
|
+
# any prepaid commit, postpaid commit, or credit
|
|
3054
3055
|
sig { returns(T.nilable(T::Boolean)) }
|
|
3055
3056
|
attr_reader :is_commit_specific
|
|
3056
3057
|
|
|
@@ -3217,9 +3218,10 @@ module MetronomeSDK
|
|
|
3217
3218
|
ending_before: nil,
|
|
3218
3219
|
entitled: nil,
|
|
3219
3220
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
3220
|
-
# `false`. If `true
|
|
3221
|
-
# passing `commit_ids
|
|
3222
|
-
#
|
|
3221
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
3222
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
3223
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
3224
|
+
# any prepaid commit, postpaid commit, or credit
|
|
3223
3225
|
is_commit_specific: nil,
|
|
3224
3226
|
# Required for MULTIPLIER type. Must be >=0.
|
|
3225
3227
|
multiplier: nil,
|
|
@@ -3287,6 +3289,17 @@ module MetronomeSDK
|
|
|
3287
3289
|
)
|
|
3288
3290
|
end
|
|
3289
3291
|
|
|
3292
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3293
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3294
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3295
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3296
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
3297
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3298
|
+
attr_reader :any_commit_or_credit_ids
|
|
3299
|
+
|
|
3300
|
+
sig { params(any_commit_or_credit_ids: T::Array[String]).void }
|
|
3301
|
+
attr_writer :any_commit_or_credit_ids
|
|
3302
|
+
|
|
3290
3303
|
sig do
|
|
3291
3304
|
returns(
|
|
3292
3305
|
T.nilable(
|
|
@@ -3359,6 +3372,7 @@ module MetronomeSDK
|
|
|
3359
3372
|
|
|
3360
3373
|
sig do
|
|
3361
3374
|
params(
|
|
3375
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
3362
3376
|
billing_frequency:
|
|
3363
3377
|
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
3364
3378
|
commit_ids: T::Array[String],
|
|
@@ -3370,6 +3384,12 @@ module MetronomeSDK
|
|
|
3370
3384
|
).returns(T.attached_class)
|
|
3371
3385
|
end
|
|
3372
3386
|
def self.new(
|
|
3387
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3388
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3389
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3390
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3391
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
3392
|
+
any_commit_or_credit_ids: nil,
|
|
3373
3393
|
billing_frequency: nil,
|
|
3374
3394
|
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3375
3395
|
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
@@ -3398,6 +3418,7 @@ module MetronomeSDK
|
|
|
3398
3418
|
sig do
|
|
3399
3419
|
override.returns(
|
|
3400
3420
|
{
|
|
3421
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
3401
3422
|
billing_frequency:
|
|
3402
3423
|
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
3403
3424
|
commit_ids: T::Array[String],
|
|
@@ -3965,6 +3986,24 @@ module MetronomeSDK
|
|
|
3965
3986
|
end
|
|
3966
3987
|
attr_writer :proration
|
|
3967
3988
|
|
|
3989
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
3990
|
+
sig do
|
|
3991
|
+
returns(
|
|
3992
|
+
T.nilable(
|
|
3993
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding
|
|
3994
|
+
)
|
|
3995
|
+
)
|
|
3996
|
+
end
|
|
3997
|
+
attr_reader :proration_rounding
|
|
3998
|
+
|
|
3999
|
+
sig do
|
|
4000
|
+
params(
|
|
4001
|
+
proration_rounding:
|
|
4002
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::OrHash
|
|
4003
|
+
).void
|
|
4004
|
+
end
|
|
4005
|
+
attr_writer :proration_rounding
|
|
4006
|
+
|
|
3968
4007
|
# Whether the created commits will use the commit rate or list rate
|
|
3969
4008
|
sig do
|
|
3970
4009
|
returns(
|
|
@@ -4077,6 +4116,8 @@ module MetronomeSDK
|
|
|
4077
4116
|
netsuite_sales_order_id: String,
|
|
4078
4117
|
proration:
|
|
4079
4118
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
4119
|
+
proration_rounding:
|
|
4120
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::OrHash,
|
|
4080
4121
|
rate_type:
|
|
4081
4122
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
4082
4123
|
recurrence_frequency:
|
|
@@ -4119,6 +4160,8 @@ module MetronomeSDK
|
|
|
4119
4160
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
4120
4161
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
4121
4162
|
proration: nil,
|
|
4163
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
4164
|
+
proration_rounding: nil,
|
|
4122
4165
|
# Whether the created commits will use the commit rate or list rate
|
|
4123
4166
|
rate_type: nil,
|
|
4124
4167
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -4166,6 +4209,8 @@ module MetronomeSDK
|
|
|
4166
4209
|
netsuite_sales_order_id: String,
|
|
4167
4210
|
proration:
|
|
4168
4211
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
4212
|
+
proration_rounding:
|
|
4213
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding,
|
|
4169
4214
|
rate_type:
|
|
4170
4215
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
4171
4216
|
recurrence_frequency:
|
|
@@ -4398,6 +4443,259 @@ module MetronomeSDK
|
|
|
4398
4443
|
end
|
|
4399
4444
|
end
|
|
4400
4445
|
|
|
4446
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
4447
|
+
OrHash =
|
|
4448
|
+
T.type_alias do
|
|
4449
|
+
T.any(
|
|
4450
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding,
|
|
4451
|
+
MetronomeSDK::Internal::AnyHash
|
|
4452
|
+
)
|
|
4453
|
+
end
|
|
4454
|
+
|
|
4455
|
+
sig do
|
|
4456
|
+
returns(
|
|
4457
|
+
T.nilable(
|
|
4458
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access
|
|
4459
|
+
)
|
|
4460
|
+
)
|
|
4461
|
+
end
|
|
4462
|
+
attr_reader :access
|
|
4463
|
+
|
|
4464
|
+
sig do
|
|
4465
|
+
params(
|
|
4466
|
+
access:
|
|
4467
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::OrHash
|
|
4468
|
+
).void
|
|
4469
|
+
end
|
|
4470
|
+
attr_writer :access
|
|
4471
|
+
|
|
4472
|
+
sig do
|
|
4473
|
+
returns(
|
|
4474
|
+
T.nilable(
|
|
4475
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
4476
|
+
)
|
|
4477
|
+
)
|
|
4478
|
+
end
|
|
4479
|
+
attr_reader :invoice
|
|
4480
|
+
|
|
4481
|
+
sig do
|
|
4482
|
+
params(
|
|
4483
|
+
invoice:
|
|
4484
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
4485
|
+
).void
|
|
4486
|
+
end
|
|
4487
|
+
attr_writer :invoice
|
|
4488
|
+
|
|
4489
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
4490
|
+
sig do
|
|
4491
|
+
params(
|
|
4492
|
+
access:
|
|
4493
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::OrHash,
|
|
4494
|
+
invoice:
|
|
4495
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
4496
|
+
).returns(T.attached_class)
|
|
4497
|
+
end
|
|
4498
|
+
def self.new(access: nil, invoice: nil)
|
|
4499
|
+
end
|
|
4500
|
+
|
|
4501
|
+
sig do
|
|
4502
|
+
override.returns(
|
|
4503
|
+
{
|
|
4504
|
+
access:
|
|
4505
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
4506
|
+
invoice:
|
|
4507
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
4508
|
+
}
|
|
4509
|
+
)
|
|
4510
|
+
end
|
|
4511
|
+
def to_hash
|
|
4512
|
+
end
|
|
4513
|
+
|
|
4514
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
4515
|
+
OrHash =
|
|
4516
|
+
T.type_alias do
|
|
4517
|
+
T.any(
|
|
4518
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
4519
|
+
MetronomeSDK::Internal::AnyHash
|
|
4520
|
+
)
|
|
4521
|
+
end
|
|
4522
|
+
|
|
4523
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4524
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4525
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4526
|
+
# dollar).
|
|
4527
|
+
sig { returns(Float) }
|
|
4528
|
+
attr_accessor :decimal_places
|
|
4529
|
+
|
|
4530
|
+
sig do
|
|
4531
|
+
returns(
|
|
4532
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4533
|
+
)
|
|
4534
|
+
end
|
|
4535
|
+
attr_accessor :rounding_method
|
|
4536
|
+
|
|
4537
|
+
sig do
|
|
4538
|
+
params(
|
|
4539
|
+
decimal_places: Float,
|
|
4540
|
+
rounding_method:
|
|
4541
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4542
|
+
).returns(T.attached_class)
|
|
4543
|
+
end
|
|
4544
|
+
def self.new(
|
|
4545
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4546
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4547
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4548
|
+
# dollar).
|
|
4549
|
+
decimal_places:,
|
|
4550
|
+
rounding_method:
|
|
4551
|
+
)
|
|
4552
|
+
end
|
|
4553
|
+
|
|
4554
|
+
sig do
|
|
4555
|
+
override.returns(
|
|
4556
|
+
{
|
|
4557
|
+
decimal_places: Float,
|
|
4558
|
+
rounding_method:
|
|
4559
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4560
|
+
}
|
|
4561
|
+
)
|
|
4562
|
+
end
|
|
4563
|
+
def to_hash
|
|
4564
|
+
end
|
|
4565
|
+
|
|
4566
|
+
module RoundingMethod
|
|
4567
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4568
|
+
|
|
4569
|
+
TaggedSymbol =
|
|
4570
|
+
T.type_alias do
|
|
4571
|
+
T.all(
|
|
4572
|
+
Symbol,
|
|
4573
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod
|
|
4574
|
+
)
|
|
4575
|
+
end
|
|
4576
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4577
|
+
|
|
4578
|
+
HALF_UP =
|
|
4579
|
+
T.let(
|
|
4580
|
+
:HALF_UP,
|
|
4581
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4582
|
+
)
|
|
4583
|
+
FLOOR =
|
|
4584
|
+
T.let(
|
|
4585
|
+
:FLOOR,
|
|
4586
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4587
|
+
)
|
|
4588
|
+
CEILING =
|
|
4589
|
+
T.let(
|
|
4590
|
+
:CEILING,
|
|
4591
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4592
|
+
)
|
|
4593
|
+
|
|
4594
|
+
sig do
|
|
4595
|
+
override.returns(
|
|
4596
|
+
T::Array[
|
|
4597
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4598
|
+
]
|
|
4599
|
+
)
|
|
4600
|
+
end
|
|
4601
|
+
def self.values
|
|
4602
|
+
end
|
|
4603
|
+
end
|
|
4604
|
+
end
|
|
4605
|
+
|
|
4606
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
4607
|
+
OrHash =
|
|
4608
|
+
T.type_alias do
|
|
4609
|
+
T.any(
|
|
4610
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice,
|
|
4611
|
+
MetronomeSDK::Internal::AnyHash
|
|
4612
|
+
)
|
|
4613
|
+
end
|
|
4614
|
+
|
|
4615
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4616
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4617
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4618
|
+
# dollar).
|
|
4619
|
+
sig { returns(Float) }
|
|
4620
|
+
attr_accessor :decimal_places
|
|
4621
|
+
|
|
4622
|
+
sig do
|
|
4623
|
+
returns(
|
|
4624
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4625
|
+
)
|
|
4626
|
+
end
|
|
4627
|
+
attr_accessor :rounding_method
|
|
4628
|
+
|
|
4629
|
+
sig do
|
|
4630
|
+
params(
|
|
4631
|
+
decimal_places: Float,
|
|
4632
|
+
rounding_method:
|
|
4633
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4634
|
+
).returns(T.attached_class)
|
|
4635
|
+
end
|
|
4636
|
+
def self.new(
|
|
4637
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4638
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4639
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4640
|
+
# dollar).
|
|
4641
|
+
decimal_places:,
|
|
4642
|
+
rounding_method:
|
|
4643
|
+
)
|
|
4644
|
+
end
|
|
4645
|
+
|
|
4646
|
+
sig do
|
|
4647
|
+
override.returns(
|
|
4648
|
+
{
|
|
4649
|
+
decimal_places: Float,
|
|
4650
|
+
rounding_method:
|
|
4651
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4652
|
+
}
|
|
4653
|
+
)
|
|
4654
|
+
end
|
|
4655
|
+
def to_hash
|
|
4656
|
+
end
|
|
4657
|
+
|
|
4658
|
+
module RoundingMethod
|
|
4659
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4660
|
+
|
|
4661
|
+
TaggedSymbol =
|
|
4662
|
+
T.type_alias do
|
|
4663
|
+
T.all(
|
|
4664
|
+
Symbol,
|
|
4665
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
|
|
4666
|
+
)
|
|
4667
|
+
end
|
|
4668
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4669
|
+
|
|
4670
|
+
HALF_UP =
|
|
4671
|
+
T.let(
|
|
4672
|
+
:HALF_UP,
|
|
4673
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4674
|
+
)
|
|
4675
|
+
FLOOR =
|
|
4676
|
+
T.let(
|
|
4677
|
+
:FLOOR,
|
|
4678
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4679
|
+
)
|
|
4680
|
+
CEILING =
|
|
4681
|
+
T.let(
|
|
4682
|
+
:CEILING,
|
|
4683
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4684
|
+
)
|
|
4685
|
+
|
|
4686
|
+
sig do
|
|
4687
|
+
override.returns(
|
|
4688
|
+
T::Array[
|
|
4689
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4690
|
+
]
|
|
4691
|
+
)
|
|
4692
|
+
end
|
|
4693
|
+
def self.values
|
|
4694
|
+
end
|
|
4695
|
+
end
|
|
4696
|
+
end
|
|
4697
|
+
end
|
|
4698
|
+
|
|
4401
4699
|
# Whether the created commits will use the commit rate or list rate
|
|
4402
4700
|
module RateType
|
|
4403
4701
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -4470,6 +4768,11 @@ module MetronomeSDK
|
|
|
4470
4768
|
:WEEKLY,
|
|
4471
4769
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
4472
4770
|
)
|
|
4771
|
+
DAILY =
|
|
4772
|
+
T.let(
|
|
4773
|
+
:DAILY,
|
|
4774
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
4775
|
+
)
|
|
4473
4776
|
|
|
4474
4777
|
sig do
|
|
4475
4778
|
override.returns(
|
|
@@ -4753,6 +5056,24 @@ module MetronomeSDK
|
|
|
4753
5056
|
end
|
|
4754
5057
|
attr_writer :proration
|
|
4755
5058
|
|
|
5059
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5060
|
+
sig do
|
|
5061
|
+
returns(
|
|
5062
|
+
T.nilable(
|
|
5063
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding
|
|
5064
|
+
)
|
|
5065
|
+
)
|
|
5066
|
+
end
|
|
5067
|
+
attr_reader :proration_rounding
|
|
5068
|
+
|
|
5069
|
+
sig do
|
|
5070
|
+
params(
|
|
5071
|
+
proration_rounding:
|
|
5072
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::OrHash
|
|
5073
|
+
).void
|
|
5074
|
+
end
|
|
5075
|
+
attr_writer :proration_rounding
|
|
5076
|
+
|
|
4756
5077
|
# Whether the created commits will use the commit rate or list rate
|
|
4757
5078
|
sig do
|
|
4758
5079
|
returns(
|
|
@@ -4863,6 +5184,8 @@ module MetronomeSDK
|
|
|
4863
5184
|
netsuite_sales_order_id: String,
|
|
4864
5185
|
proration:
|
|
4865
5186
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
5187
|
+
proration_rounding:
|
|
5188
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::OrHash,
|
|
4866
5189
|
rate_type:
|
|
4867
5190
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4868
5191
|
recurrence_frequency:
|
|
@@ -4903,6 +5226,8 @@ module MetronomeSDK
|
|
|
4903
5226
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
4904
5227
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
4905
5228
|
proration: nil,
|
|
5229
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5230
|
+
proration_rounding: nil,
|
|
4906
5231
|
# Whether the created commits will use the commit rate or list rate
|
|
4907
5232
|
rate_type: nil,
|
|
4908
5233
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -4948,6 +5273,8 @@ module MetronomeSDK
|
|
|
4948
5273
|
netsuite_sales_order_id: String,
|
|
4949
5274
|
proration:
|
|
4950
5275
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
5276
|
+
proration_rounding:
|
|
5277
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding,
|
|
4951
5278
|
rate_type:
|
|
4952
5279
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4953
5280
|
recurrence_frequency:
|
|
@@ -5142,6 +5469,146 @@ module MetronomeSDK
|
|
|
5142
5469
|
end
|
|
5143
5470
|
end
|
|
5144
5471
|
|
|
5472
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
5473
|
+
OrHash =
|
|
5474
|
+
T.type_alias do
|
|
5475
|
+
T.any(
|
|
5476
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding,
|
|
5477
|
+
MetronomeSDK::Internal::AnyHash
|
|
5478
|
+
)
|
|
5479
|
+
end
|
|
5480
|
+
|
|
5481
|
+
sig do
|
|
5482
|
+
returns(
|
|
5483
|
+
T.nilable(
|
|
5484
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5485
|
+
)
|
|
5486
|
+
)
|
|
5487
|
+
end
|
|
5488
|
+
attr_reader :access
|
|
5489
|
+
|
|
5490
|
+
sig do
|
|
5491
|
+
params(
|
|
5492
|
+
access:
|
|
5493
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5494
|
+
).void
|
|
5495
|
+
end
|
|
5496
|
+
attr_writer :access
|
|
5497
|
+
|
|
5498
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5499
|
+
sig do
|
|
5500
|
+
params(
|
|
5501
|
+
access:
|
|
5502
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5503
|
+
).returns(T.attached_class)
|
|
5504
|
+
end
|
|
5505
|
+
def self.new(access: nil)
|
|
5506
|
+
end
|
|
5507
|
+
|
|
5508
|
+
sig do
|
|
5509
|
+
override.returns(
|
|
5510
|
+
{
|
|
5511
|
+
access:
|
|
5512
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5513
|
+
}
|
|
5514
|
+
)
|
|
5515
|
+
end
|
|
5516
|
+
def to_hash
|
|
5517
|
+
end
|
|
5518
|
+
|
|
5519
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
5520
|
+
OrHash =
|
|
5521
|
+
T.type_alias do
|
|
5522
|
+
T.any(
|
|
5523
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access,
|
|
5524
|
+
MetronomeSDK::Internal::AnyHash
|
|
5525
|
+
)
|
|
5526
|
+
end
|
|
5527
|
+
|
|
5528
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5529
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5530
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5531
|
+
# dollar).
|
|
5532
|
+
sig { returns(Float) }
|
|
5533
|
+
attr_accessor :decimal_places
|
|
5534
|
+
|
|
5535
|
+
sig do
|
|
5536
|
+
returns(
|
|
5537
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5538
|
+
)
|
|
5539
|
+
end
|
|
5540
|
+
attr_accessor :rounding_method
|
|
5541
|
+
|
|
5542
|
+
sig do
|
|
5543
|
+
params(
|
|
5544
|
+
decimal_places: Float,
|
|
5545
|
+
rounding_method:
|
|
5546
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5547
|
+
).returns(T.attached_class)
|
|
5548
|
+
end
|
|
5549
|
+
def self.new(
|
|
5550
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5551
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5552
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5553
|
+
# dollar).
|
|
5554
|
+
decimal_places:,
|
|
5555
|
+
rounding_method:
|
|
5556
|
+
)
|
|
5557
|
+
end
|
|
5558
|
+
|
|
5559
|
+
sig do
|
|
5560
|
+
override.returns(
|
|
5561
|
+
{
|
|
5562
|
+
decimal_places: Float,
|
|
5563
|
+
rounding_method:
|
|
5564
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5565
|
+
}
|
|
5566
|
+
)
|
|
5567
|
+
end
|
|
5568
|
+
def to_hash
|
|
5569
|
+
end
|
|
5570
|
+
|
|
5571
|
+
module RoundingMethod
|
|
5572
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
5573
|
+
|
|
5574
|
+
TaggedSymbol =
|
|
5575
|
+
T.type_alias do
|
|
5576
|
+
T.all(
|
|
5577
|
+
Symbol,
|
|
5578
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod
|
|
5579
|
+
)
|
|
5580
|
+
end
|
|
5581
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
5582
|
+
|
|
5583
|
+
HALF_UP =
|
|
5584
|
+
T.let(
|
|
5585
|
+
:HALF_UP,
|
|
5586
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5587
|
+
)
|
|
5588
|
+
FLOOR =
|
|
5589
|
+
T.let(
|
|
5590
|
+
:FLOOR,
|
|
5591
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5592
|
+
)
|
|
5593
|
+
CEILING =
|
|
5594
|
+
T.let(
|
|
5595
|
+
:CEILING,
|
|
5596
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5597
|
+
)
|
|
5598
|
+
|
|
5599
|
+
sig do
|
|
5600
|
+
override.returns(
|
|
5601
|
+
T::Array[
|
|
5602
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5603
|
+
]
|
|
5604
|
+
)
|
|
5605
|
+
end
|
|
5606
|
+
def self.values
|
|
5607
|
+
end
|
|
5608
|
+
end
|
|
5609
|
+
end
|
|
5610
|
+
end
|
|
5611
|
+
|
|
5145
5612
|
# Whether the created commits will use the commit rate or list rate
|
|
5146
5613
|
module RateType
|
|
5147
5614
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -5214,6 +5681,11 @@ module MetronomeSDK
|
|
|
5214
5681
|
:WEEKLY,
|
|
5215
5682
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
5216
5683
|
)
|
|
5684
|
+
DAILY =
|
|
5685
|
+
T.let(
|
|
5686
|
+
:DAILY,
|
|
5687
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
5688
|
+
)
|
|
5217
5689
|
|
|
5218
5690
|
sig do
|
|
5219
5691
|
override.returns(
|
|
@@ -6645,6 +7117,23 @@ module MetronomeSDK
|
|
|
6645
7117
|
end
|
|
6646
7118
|
attr_writer :subscription_rate
|
|
6647
7119
|
|
|
7120
|
+
sig do
|
|
7121
|
+
returns(
|
|
7122
|
+
T.nilable(
|
|
7123
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig
|
|
7124
|
+
)
|
|
7125
|
+
)
|
|
7126
|
+
end
|
|
7127
|
+
attr_reader :billing_cycle_config
|
|
7128
|
+
|
|
7129
|
+
sig do
|
|
7130
|
+
params(
|
|
7131
|
+
billing_cycle_config:
|
|
7132
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::OrHash
|
|
7133
|
+
).void
|
|
7134
|
+
end
|
|
7135
|
+
attr_writer :billing_cycle_config
|
|
7136
|
+
|
|
6648
7137
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6649
7138
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
6650
7139
|
attr_reader :custom_fields
|
|
@@ -6747,6 +7236,8 @@ module MetronomeSDK
|
|
|
6747
7236
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::OrHash,
|
|
6748
7237
|
subscription_rate:
|
|
6749
7238
|
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::OrHash,
|
|
7239
|
+
billing_cycle_config:
|
|
7240
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::OrHash,
|
|
6750
7241
|
custom_fields: T::Hash[Symbol, String],
|
|
6751
7242
|
description: String,
|
|
6752
7243
|
ending_before: Time,
|
|
@@ -6764,6 +7255,7 @@ module MetronomeSDK
|
|
|
6764
7255
|
collection_schedule:,
|
|
6765
7256
|
proration:,
|
|
6766
7257
|
subscription_rate:,
|
|
7258
|
+
billing_cycle_config: nil,
|
|
6767
7259
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6768
7260
|
custom_fields: nil,
|
|
6769
7261
|
description: nil,
|
|
@@ -6803,6 +7295,8 @@ module MetronomeSDK
|
|
|
6803
7295
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration,
|
|
6804
7296
|
subscription_rate:
|
|
6805
7297
|
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate,
|
|
7298
|
+
billing_cycle_config:
|
|
7299
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig,
|
|
6806
7300
|
custom_fields: T::Hash[Symbol, String],
|
|
6807
7301
|
description: String,
|
|
6808
7302
|
ending_before: Time,
|
|
@@ -6892,11 +7386,30 @@ module MetronomeSDK
|
|
|
6892
7386
|
sig { params(is_prorated: T::Boolean).void }
|
|
6893
7387
|
attr_writer :is_prorated
|
|
6894
7388
|
|
|
7389
|
+
sig do
|
|
7390
|
+
returns(
|
|
7391
|
+
T.nilable(
|
|
7392
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding
|
|
7393
|
+
)
|
|
7394
|
+
)
|
|
7395
|
+
end
|
|
7396
|
+
attr_reader :rounding
|
|
7397
|
+
|
|
7398
|
+
sig do
|
|
7399
|
+
params(
|
|
7400
|
+
rounding:
|
|
7401
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::OrHash
|
|
7402
|
+
).void
|
|
7403
|
+
end
|
|
7404
|
+
attr_writer :rounding
|
|
7405
|
+
|
|
6895
7406
|
sig do
|
|
6896
7407
|
params(
|
|
6897
7408
|
invoice_behavior:
|
|
6898
7409
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
6899
|
-
is_prorated: T::Boolean
|
|
7410
|
+
is_prorated: T::Boolean,
|
|
7411
|
+
rounding:
|
|
7412
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::OrHash
|
|
6900
7413
|
).returns(T.attached_class)
|
|
6901
7414
|
end
|
|
6902
7415
|
def self.new(
|
|
@@ -6907,7 +7420,8 @@ module MetronomeSDK
|
|
|
6907
7420
|
# in-arrears at the end of the period.
|
|
6908
7421
|
invoice_behavior: nil,
|
|
6909
7422
|
# Indicates if the partial period will be prorated or charged a full amount.
|
|
6910
|
-
is_prorated: nil
|
|
7423
|
+
is_prorated: nil,
|
|
7424
|
+
rounding: nil
|
|
6911
7425
|
)
|
|
6912
7426
|
end
|
|
6913
7427
|
|
|
@@ -6916,7 +7430,9 @@ module MetronomeSDK
|
|
|
6916
7430
|
{
|
|
6917
7431
|
invoice_behavior:
|
|
6918
7432
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
6919
|
-
is_prorated: T::Boolean
|
|
7433
|
+
is_prorated: T::Boolean,
|
|
7434
|
+
rounding:
|
|
7435
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding
|
|
6920
7436
|
}
|
|
6921
7437
|
)
|
|
6922
7438
|
end
|
|
@@ -6961,6 +7477,98 @@ module MetronomeSDK
|
|
|
6961
7477
|
def self.values
|
|
6962
7478
|
end
|
|
6963
7479
|
end
|
|
7480
|
+
|
|
7481
|
+
class Rounding < MetronomeSDK::Internal::Type::BaseModel
|
|
7482
|
+
OrHash =
|
|
7483
|
+
T.type_alias do
|
|
7484
|
+
T.any(
|
|
7485
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding,
|
|
7486
|
+
MetronomeSDK::Internal::AnyHash
|
|
7487
|
+
)
|
|
7488
|
+
end
|
|
7489
|
+
|
|
7490
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
7491
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
7492
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
7493
|
+
# dollar).
|
|
7494
|
+
sig { returns(Float) }
|
|
7495
|
+
attr_accessor :decimal_places
|
|
7496
|
+
|
|
7497
|
+
sig do
|
|
7498
|
+
returns(
|
|
7499
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7500
|
+
)
|
|
7501
|
+
end
|
|
7502
|
+
attr_accessor :rounding_method
|
|
7503
|
+
|
|
7504
|
+
sig do
|
|
7505
|
+
params(
|
|
7506
|
+
decimal_places: Float,
|
|
7507
|
+
rounding_method:
|
|
7508
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7509
|
+
).returns(T.attached_class)
|
|
7510
|
+
end
|
|
7511
|
+
def self.new(
|
|
7512
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
7513
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
7514
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
7515
|
+
# dollar).
|
|
7516
|
+
decimal_places:,
|
|
7517
|
+
rounding_method:
|
|
7518
|
+
)
|
|
7519
|
+
end
|
|
7520
|
+
|
|
7521
|
+
sig do
|
|
7522
|
+
override.returns(
|
|
7523
|
+
{
|
|
7524
|
+
decimal_places: Float,
|
|
7525
|
+
rounding_method:
|
|
7526
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7527
|
+
}
|
|
7528
|
+
)
|
|
7529
|
+
end
|
|
7530
|
+
def to_hash
|
|
7531
|
+
end
|
|
7532
|
+
|
|
7533
|
+
module RoundingMethod
|
|
7534
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7535
|
+
|
|
7536
|
+
TaggedSymbol =
|
|
7537
|
+
T.type_alias do
|
|
7538
|
+
T.all(
|
|
7539
|
+
Symbol,
|
|
7540
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod
|
|
7541
|
+
)
|
|
7542
|
+
end
|
|
7543
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7544
|
+
|
|
7545
|
+
HALF_UP =
|
|
7546
|
+
T.let(
|
|
7547
|
+
:HALF_UP,
|
|
7548
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7549
|
+
)
|
|
7550
|
+
FLOOR =
|
|
7551
|
+
T.let(
|
|
7552
|
+
:FLOOR,
|
|
7553
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7554
|
+
)
|
|
7555
|
+
CEILING =
|
|
7556
|
+
T.let(
|
|
7557
|
+
:CEILING,
|
|
7558
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7559
|
+
)
|
|
7560
|
+
|
|
7561
|
+
sig do
|
|
7562
|
+
override.returns(
|
|
7563
|
+
T::Array[
|
|
7564
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7565
|
+
]
|
|
7566
|
+
)
|
|
7567
|
+
end
|
|
7568
|
+
def self.values
|
|
7569
|
+
end
|
|
7570
|
+
end
|
|
7571
|
+
end
|
|
6964
7572
|
end
|
|
6965
7573
|
|
|
6966
7574
|
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -7060,6 +7668,108 @@ module MetronomeSDK
|
|
|
7060
7668
|
end
|
|
7061
7669
|
end
|
|
7062
7670
|
|
|
7671
|
+
class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
7672
|
+
OrHash =
|
|
7673
|
+
T.type_alias do
|
|
7674
|
+
T.any(
|
|
7675
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig,
|
|
7676
|
+
MetronomeSDK::Internal::AnyHash
|
|
7677
|
+
)
|
|
7678
|
+
end
|
|
7679
|
+
|
|
7680
|
+
# The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
7681
|
+
# usage invoice billing cycle anchor date.
|
|
7682
|
+
sig { returns(T.nilable(Time)) }
|
|
7683
|
+
attr_reader :anchor_date
|
|
7684
|
+
|
|
7685
|
+
sig { params(anchor_date: Time).void }
|
|
7686
|
+
attr_writer :anchor_date
|
|
7687
|
+
|
|
7688
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7689
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7690
|
+
sig do
|
|
7691
|
+
returns(
|
|
7692
|
+
T.nilable(
|
|
7693
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7694
|
+
)
|
|
7695
|
+
)
|
|
7696
|
+
end
|
|
7697
|
+
attr_reader :invoice_placement
|
|
7698
|
+
|
|
7699
|
+
sig do
|
|
7700
|
+
params(
|
|
7701
|
+
invoice_placement:
|
|
7702
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7703
|
+
).void
|
|
7704
|
+
end
|
|
7705
|
+
attr_writer :invoice_placement
|
|
7706
|
+
|
|
7707
|
+
sig do
|
|
7708
|
+
params(
|
|
7709
|
+
anchor_date: Time,
|
|
7710
|
+
invoice_placement:
|
|
7711
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7712
|
+
).returns(T.attached_class)
|
|
7713
|
+
end
|
|
7714
|
+
def self.new(
|
|
7715
|
+
# The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
7716
|
+
# usage invoice billing cycle anchor date.
|
|
7717
|
+
anchor_date: nil,
|
|
7718
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7719
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7720
|
+
invoice_placement: nil
|
|
7721
|
+
)
|
|
7722
|
+
end
|
|
7723
|
+
|
|
7724
|
+
sig do
|
|
7725
|
+
override.returns(
|
|
7726
|
+
{
|
|
7727
|
+
anchor_date: Time,
|
|
7728
|
+
invoice_placement:
|
|
7729
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7730
|
+
}
|
|
7731
|
+
)
|
|
7732
|
+
end
|
|
7733
|
+
def to_hash
|
|
7734
|
+
end
|
|
7735
|
+
|
|
7736
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7737
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7738
|
+
module InvoicePlacement
|
|
7739
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7740
|
+
|
|
7741
|
+
TaggedSymbol =
|
|
7742
|
+
T.type_alias do
|
|
7743
|
+
T.all(
|
|
7744
|
+
Symbol,
|
|
7745
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement
|
|
7746
|
+
)
|
|
7747
|
+
end
|
|
7748
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7749
|
+
|
|
7750
|
+
ON_SCHEDULED_INVOICE =
|
|
7751
|
+
T.let(
|
|
7752
|
+
:ON_SCHEDULED_INVOICE,
|
|
7753
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7754
|
+
)
|
|
7755
|
+
ON_USAGE_INVOICE =
|
|
7756
|
+
T.let(
|
|
7757
|
+
:ON_USAGE_INVOICE,
|
|
7758
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7759
|
+
)
|
|
7760
|
+
|
|
7761
|
+
sig do
|
|
7762
|
+
override.returns(
|
|
7763
|
+
T::Array[
|
|
7764
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7765
|
+
]
|
|
7766
|
+
)
|
|
7767
|
+
end
|
|
7768
|
+
def self.values
|
|
7769
|
+
end
|
|
7770
|
+
end
|
|
7771
|
+
end
|
|
7772
|
+
|
|
7063
7773
|
# Determines how the subscription's quantity is controlled. Defaults to
|
|
7064
7774
|
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
7065
7775
|
# directly on the subscription. `initial_quantity` must be provided with this
|