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
|
@@ -2187,9 +2187,10 @@ module MetronomeSDK
|
|
|
2187
2187
|
attr_writer :entitled
|
|
2188
2188
|
|
|
2189
2189
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
2190
|
-
# `false`. If `true
|
|
2191
|
-
# passing `commit_ids
|
|
2192
|
-
#
|
|
2190
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
2191
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
2192
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
2193
|
+
# any prepaid commit, postpaid commit, or credit
|
|
2193
2194
|
sig { returns(T.nilable(T::Boolean)) }
|
|
2194
2195
|
attr_reader :is_commit_specific
|
|
2195
2196
|
|
|
@@ -2326,9 +2327,10 @@ module MetronomeSDK
|
|
|
2326
2327
|
duration: nil,
|
|
2327
2328
|
entitled: nil,
|
|
2328
2329
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
2329
|
-
# `false`. If `true
|
|
2330
|
-
# passing `commit_ids
|
|
2331
|
-
#
|
|
2330
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
2331
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
2332
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
2333
|
+
# any prepaid commit, postpaid commit, or credit
|
|
2332
2334
|
is_commit_specific: nil,
|
|
2333
2335
|
# Required for MULTIPLIER type. Must be >=0.
|
|
2334
2336
|
multiplier: nil,
|
|
@@ -2390,6 +2392,17 @@ module MetronomeSDK
|
|
|
2390
2392
|
)
|
|
2391
2393
|
end
|
|
2392
2394
|
|
|
2395
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2396
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2397
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
2398
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
2399
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
2400
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
2401
|
+
attr_reader :any_commit_or_credit_ids
|
|
2402
|
+
|
|
2403
|
+
sig { params(any_commit_or_credit_ids: T::Array[String]).void }
|
|
2404
|
+
attr_writer :any_commit_or_credit_ids
|
|
2405
|
+
|
|
2393
2406
|
sig do
|
|
2394
2407
|
returns(
|
|
2395
2408
|
T.nilable(
|
|
@@ -2462,6 +2475,7 @@ module MetronomeSDK
|
|
|
2462
2475
|
|
|
2463
2476
|
sig do
|
|
2464
2477
|
params(
|
|
2478
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2465
2479
|
billing_frequency:
|
|
2466
2480
|
MetronomeSDK::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
2467
2481
|
commit_ids: T::Array[String],
|
|
@@ -2473,6 +2487,12 @@ module MetronomeSDK
|
|
|
2473
2487
|
).returns(T.attached_class)
|
|
2474
2488
|
end
|
|
2475
2489
|
def self.new(
|
|
2490
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2491
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2492
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
2493
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
2494
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
2495
|
+
any_commit_or_credit_ids: nil,
|
|
2476
2496
|
billing_frequency: nil,
|
|
2477
2497
|
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2478
2498
|
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
@@ -2501,6 +2521,7 @@ module MetronomeSDK
|
|
|
2501
2521
|
sig do
|
|
2502
2522
|
override.returns(
|
|
2503
2523
|
{
|
|
2524
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2504
2525
|
billing_frequency:
|
|
2505
2526
|
MetronomeSDK::V1::PackageCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
2506
2527
|
commit_ids: T::Array[String],
|
|
@@ -3158,6 +3179,24 @@ module MetronomeSDK
|
|
|
3158
3179
|
end
|
|
3159
3180
|
attr_writer :proration
|
|
3160
3181
|
|
|
3182
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
3183
|
+
sig do
|
|
3184
|
+
returns(
|
|
3185
|
+
T.nilable(
|
|
3186
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding
|
|
3187
|
+
)
|
|
3188
|
+
)
|
|
3189
|
+
end
|
|
3190
|
+
attr_reader :proration_rounding
|
|
3191
|
+
|
|
3192
|
+
sig do
|
|
3193
|
+
params(
|
|
3194
|
+
proration_rounding:
|
|
3195
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::OrHash
|
|
3196
|
+
).void
|
|
3197
|
+
end
|
|
3198
|
+
attr_writer :proration_rounding
|
|
3199
|
+
|
|
3161
3200
|
# Whether the created commits will use the commit rate or list rate
|
|
3162
3201
|
sig do
|
|
3163
3202
|
returns(
|
|
@@ -3269,6 +3308,8 @@ module MetronomeSDK
|
|
|
3269
3308
|
name: String,
|
|
3270
3309
|
proration:
|
|
3271
3310
|
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
3311
|
+
proration_rounding:
|
|
3312
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::OrHash,
|
|
3272
3313
|
rate_type:
|
|
3273
3314
|
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
3274
3315
|
recurrence_frequency:
|
|
@@ -3309,6 +3350,8 @@ module MetronomeSDK
|
|
|
3309
3350
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
3310
3351
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
3311
3352
|
proration: nil,
|
|
3353
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
3354
|
+
proration_rounding: nil,
|
|
3312
3355
|
# Whether the created commits will use the commit rate or list rate
|
|
3313
3356
|
rate_type: nil,
|
|
3314
3357
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -3355,6 +3398,8 @@ module MetronomeSDK
|
|
|
3355
3398
|
name: String,
|
|
3356
3399
|
proration:
|
|
3357
3400
|
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
3401
|
+
proration_rounding:
|
|
3402
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding,
|
|
3358
3403
|
rate_type:
|
|
3359
3404
|
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
3360
3405
|
recurrence_frequency:
|
|
@@ -3763,6 +3808,259 @@ module MetronomeSDK
|
|
|
3763
3808
|
end
|
|
3764
3809
|
end
|
|
3765
3810
|
|
|
3811
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
3812
|
+
OrHash =
|
|
3813
|
+
T.type_alias do
|
|
3814
|
+
T.any(
|
|
3815
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding,
|
|
3816
|
+
MetronomeSDK::Internal::AnyHash
|
|
3817
|
+
)
|
|
3818
|
+
end
|
|
3819
|
+
|
|
3820
|
+
sig do
|
|
3821
|
+
returns(
|
|
3822
|
+
T.nilable(
|
|
3823
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access
|
|
3824
|
+
)
|
|
3825
|
+
)
|
|
3826
|
+
end
|
|
3827
|
+
attr_reader :access
|
|
3828
|
+
|
|
3829
|
+
sig do
|
|
3830
|
+
params(
|
|
3831
|
+
access:
|
|
3832
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::OrHash
|
|
3833
|
+
).void
|
|
3834
|
+
end
|
|
3835
|
+
attr_writer :access
|
|
3836
|
+
|
|
3837
|
+
sig do
|
|
3838
|
+
returns(
|
|
3839
|
+
T.nilable(
|
|
3840
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
3841
|
+
)
|
|
3842
|
+
)
|
|
3843
|
+
end
|
|
3844
|
+
attr_reader :invoice
|
|
3845
|
+
|
|
3846
|
+
sig do
|
|
3847
|
+
params(
|
|
3848
|
+
invoice:
|
|
3849
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
3850
|
+
).void
|
|
3851
|
+
end
|
|
3852
|
+
attr_writer :invoice
|
|
3853
|
+
|
|
3854
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
3855
|
+
sig do
|
|
3856
|
+
params(
|
|
3857
|
+
access:
|
|
3858
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::OrHash,
|
|
3859
|
+
invoice:
|
|
3860
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
3861
|
+
).returns(T.attached_class)
|
|
3862
|
+
end
|
|
3863
|
+
def self.new(access: nil, invoice: nil)
|
|
3864
|
+
end
|
|
3865
|
+
|
|
3866
|
+
sig do
|
|
3867
|
+
override.returns(
|
|
3868
|
+
{
|
|
3869
|
+
access:
|
|
3870
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
3871
|
+
invoice:
|
|
3872
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
3873
|
+
}
|
|
3874
|
+
)
|
|
3875
|
+
end
|
|
3876
|
+
def to_hash
|
|
3877
|
+
end
|
|
3878
|
+
|
|
3879
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
3880
|
+
OrHash =
|
|
3881
|
+
T.type_alias do
|
|
3882
|
+
T.any(
|
|
3883
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
3884
|
+
MetronomeSDK::Internal::AnyHash
|
|
3885
|
+
)
|
|
3886
|
+
end
|
|
3887
|
+
|
|
3888
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
3889
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3890
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3891
|
+
# dollar).
|
|
3892
|
+
sig { returns(Float) }
|
|
3893
|
+
attr_accessor :decimal_places
|
|
3894
|
+
|
|
3895
|
+
sig do
|
|
3896
|
+
returns(
|
|
3897
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
3898
|
+
)
|
|
3899
|
+
end
|
|
3900
|
+
attr_accessor :rounding_method
|
|
3901
|
+
|
|
3902
|
+
sig do
|
|
3903
|
+
params(
|
|
3904
|
+
decimal_places: Float,
|
|
3905
|
+
rounding_method:
|
|
3906
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
3907
|
+
).returns(T.attached_class)
|
|
3908
|
+
end
|
|
3909
|
+
def self.new(
|
|
3910
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
3911
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3912
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3913
|
+
# dollar).
|
|
3914
|
+
decimal_places:,
|
|
3915
|
+
rounding_method:
|
|
3916
|
+
)
|
|
3917
|
+
end
|
|
3918
|
+
|
|
3919
|
+
sig do
|
|
3920
|
+
override.returns(
|
|
3921
|
+
{
|
|
3922
|
+
decimal_places: Float,
|
|
3923
|
+
rounding_method:
|
|
3924
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
3925
|
+
}
|
|
3926
|
+
)
|
|
3927
|
+
end
|
|
3928
|
+
def to_hash
|
|
3929
|
+
end
|
|
3930
|
+
|
|
3931
|
+
module RoundingMethod
|
|
3932
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3933
|
+
|
|
3934
|
+
TaggedSymbol =
|
|
3935
|
+
T.type_alias do
|
|
3936
|
+
T.all(
|
|
3937
|
+
Symbol,
|
|
3938
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod
|
|
3939
|
+
)
|
|
3940
|
+
end
|
|
3941
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3942
|
+
|
|
3943
|
+
HALF_UP =
|
|
3944
|
+
T.let(
|
|
3945
|
+
:HALF_UP,
|
|
3946
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
3947
|
+
)
|
|
3948
|
+
FLOOR =
|
|
3949
|
+
T.let(
|
|
3950
|
+
:FLOOR,
|
|
3951
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
3952
|
+
)
|
|
3953
|
+
CEILING =
|
|
3954
|
+
T.let(
|
|
3955
|
+
:CEILING,
|
|
3956
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
3957
|
+
)
|
|
3958
|
+
|
|
3959
|
+
sig do
|
|
3960
|
+
override.returns(
|
|
3961
|
+
T::Array[
|
|
3962
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
3963
|
+
]
|
|
3964
|
+
)
|
|
3965
|
+
end
|
|
3966
|
+
def self.values
|
|
3967
|
+
end
|
|
3968
|
+
end
|
|
3969
|
+
end
|
|
3970
|
+
|
|
3971
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
3972
|
+
OrHash =
|
|
3973
|
+
T.type_alias do
|
|
3974
|
+
T.any(
|
|
3975
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice,
|
|
3976
|
+
MetronomeSDK::Internal::AnyHash
|
|
3977
|
+
)
|
|
3978
|
+
end
|
|
3979
|
+
|
|
3980
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
3981
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3982
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
3983
|
+
# dollar).
|
|
3984
|
+
sig { returns(Float) }
|
|
3985
|
+
attr_accessor :decimal_places
|
|
3986
|
+
|
|
3987
|
+
sig do
|
|
3988
|
+
returns(
|
|
3989
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
3990
|
+
)
|
|
3991
|
+
end
|
|
3992
|
+
attr_accessor :rounding_method
|
|
3993
|
+
|
|
3994
|
+
sig do
|
|
3995
|
+
params(
|
|
3996
|
+
decimal_places: Float,
|
|
3997
|
+
rounding_method:
|
|
3998
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
3999
|
+
).returns(T.attached_class)
|
|
4000
|
+
end
|
|
4001
|
+
def self.new(
|
|
4002
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4003
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4004
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4005
|
+
# dollar).
|
|
4006
|
+
decimal_places:,
|
|
4007
|
+
rounding_method:
|
|
4008
|
+
)
|
|
4009
|
+
end
|
|
4010
|
+
|
|
4011
|
+
sig do
|
|
4012
|
+
override.returns(
|
|
4013
|
+
{
|
|
4014
|
+
decimal_places: Float,
|
|
4015
|
+
rounding_method:
|
|
4016
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4017
|
+
}
|
|
4018
|
+
)
|
|
4019
|
+
end
|
|
4020
|
+
def to_hash
|
|
4021
|
+
end
|
|
4022
|
+
|
|
4023
|
+
module RoundingMethod
|
|
4024
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4025
|
+
|
|
4026
|
+
TaggedSymbol =
|
|
4027
|
+
T.type_alias do
|
|
4028
|
+
T.all(
|
|
4029
|
+
Symbol,
|
|
4030
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
|
|
4031
|
+
)
|
|
4032
|
+
end
|
|
4033
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4034
|
+
|
|
4035
|
+
HALF_UP =
|
|
4036
|
+
T.let(
|
|
4037
|
+
:HALF_UP,
|
|
4038
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4039
|
+
)
|
|
4040
|
+
FLOOR =
|
|
4041
|
+
T.let(
|
|
4042
|
+
:FLOOR,
|
|
4043
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4044
|
+
)
|
|
4045
|
+
CEILING =
|
|
4046
|
+
T.let(
|
|
4047
|
+
:CEILING,
|
|
4048
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4049
|
+
)
|
|
4050
|
+
|
|
4051
|
+
sig do
|
|
4052
|
+
override.returns(
|
|
4053
|
+
T::Array[
|
|
4054
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4055
|
+
]
|
|
4056
|
+
)
|
|
4057
|
+
end
|
|
4058
|
+
def self.values
|
|
4059
|
+
end
|
|
4060
|
+
end
|
|
4061
|
+
end
|
|
4062
|
+
end
|
|
4063
|
+
|
|
3766
4064
|
# Whether the created commits will use the commit rate or list rate
|
|
3767
4065
|
module RateType
|
|
3768
4066
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -3835,6 +4133,11 @@ module MetronomeSDK
|
|
|
3835
4133
|
:WEEKLY,
|
|
3836
4134
|
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
3837
4135
|
)
|
|
4136
|
+
DAILY =
|
|
4137
|
+
T.let(
|
|
4138
|
+
:DAILY,
|
|
4139
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
4140
|
+
)
|
|
3838
4141
|
|
|
3839
4142
|
sig do
|
|
3840
4143
|
override.returns(
|
|
@@ -4124,6 +4427,24 @@ module MetronomeSDK
|
|
|
4124
4427
|
end
|
|
4125
4428
|
attr_writer :proration
|
|
4126
4429
|
|
|
4430
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
4431
|
+
sig do
|
|
4432
|
+
returns(
|
|
4433
|
+
T.nilable(
|
|
4434
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding
|
|
4435
|
+
)
|
|
4436
|
+
)
|
|
4437
|
+
end
|
|
4438
|
+
attr_reader :proration_rounding
|
|
4439
|
+
|
|
4440
|
+
sig do
|
|
4441
|
+
params(
|
|
4442
|
+
proration_rounding:
|
|
4443
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::OrHash
|
|
4444
|
+
).void
|
|
4445
|
+
end
|
|
4446
|
+
attr_writer :proration_rounding
|
|
4447
|
+
|
|
4127
4448
|
# Whether the created commits will use the commit rate or list rate
|
|
4128
4449
|
sig do
|
|
4129
4450
|
returns(
|
|
@@ -4233,6 +4554,8 @@ module MetronomeSDK
|
|
|
4233
4554
|
name: String,
|
|
4234
4555
|
proration:
|
|
4235
4556
|
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
4557
|
+
proration_rounding:
|
|
4558
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::OrHash,
|
|
4236
4559
|
rate_type:
|
|
4237
4560
|
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4238
4561
|
recurrence_frequency:
|
|
@@ -4271,6 +4594,8 @@ module MetronomeSDK
|
|
|
4271
4594
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
4272
4595
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
4273
4596
|
proration: nil,
|
|
4597
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
4598
|
+
proration_rounding: nil,
|
|
4274
4599
|
# Whether the created commits will use the commit rate or list rate
|
|
4275
4600
|
rate_type: nil,
|
|
4276
4601
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -4315,6 +4640,8 @@ module MetronomeSDK
|
|
|
4315
4640
|
name: String,
|
|
4316
4641
|
proration:
|
|
4317
4642
|
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
4643
|
+
proration_rounding:
|
|
4644
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding,
|
|
4318
4645
|
rate_type:
|
|
4319
4646
|
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4320
4647
|
recurrence_frequency:
|
|
@@ -4685,6 +5012,146 @@ module MetronomeSDK
|
|
|
4685
5012
|
end
|
|
4686
5013
|
end
|
|
4687
5014
|
|
|
5015
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
5016
|
+
OrHash =
|
|
5017
|
+
T.type_alias do
|
|
5018
|
+
T.any(
|
|
5019
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding,
|
|
5020
|
+
MetronomeSDK::Internal::AnyHash
|
|
5021
|
+
)
|
|
5022
|
+
end
|
|
5023
|
+
|
|
5024
|
+
sig do
|
|
5025
|
+
returns(
|
|
5026
|
+
T.nilable(
|
|
5027
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5028
|
+
)
|
|
5029
|
+
)
|
|
5030
|
+
end
|
|
5031
|
+
attr_reader :access
|
|
5032
|
+
|
|
5033
|
+
sig do
|
|
5034
|
+
params(
|
|
5035
|
+
access:
|
|
5036
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5037
|
+
).void
|
|
5038
|
+
end
|
|
5039
|
+
attr_writer :access
|
|
5040
|
+
|
|
5041
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5042
|
+
sig do
|
|
5043
|
+
params(
|
|
5044
|
+
access:
|
|
5045
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5046
|
+
).returns(T.attached_class)
|
|
5047
|
+
end
|
|
5048
|
+
def self.new(access: nil)
|
|
5049
|
+
end
|
|
5050
|
+
|
|
5051
|
+
sig do
|
|
5052
|
+
override.returns(
|
|
5053
|
+
{
|
|
5054
|
+
access:
|
|
5055
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5056
|
+
}
|
|
5057
|
+
)
|
|
5058
|
+
end
|
|
5059
|
+
def to_hash
|
|
5060
|
+
end
|
|
5061
|
+
|
|
5062
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
5063
|
+
OrHash =
|
|
5064
|
+
T.type_alias do
|
|
5065
|
+
T.any(
|
|
5066
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access,
|
|
5067
|
+
MetronomeSDK::Internal::AnyHash
|
|
5068
|
+
)
|
|
5069
|
+
end
|
|
5070
|
+
|
|
5071
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5072
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5073
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5074
|
+
# dollar).
|
|
5075
|
+
sig { returns(Float) }
|
|
5076
|
+
attr_accessor :decimal_places
|
|
5077
|
+
|
|
5078
|
+
sig do
|
|
5079
|
+
returns(
|
|
5080
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5081
|
+
)
|
|
5082
|
+
end
|
|
5083
|
+
attr_accessor :rounding_method
|
|
5084
|
+
|
|
5085
|
+
sig do
|
|
5086
|
+
params(
|
|
5087
|
+
decimal_places: Float,
|
|
5088
|
+
rounding_method:
|
|
5089
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5090
|
+
).returns(T.attached_class)
|
|
5091
|
+
end
|
|
5092
|
+
def self.new(
|
|
5093
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5094
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5095
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5096
|
+
# dollar).
|
|
5097
|
+
decimal_places:,
|
|
5098
|
+
rounding_method:
|
|
5099
|
+
)
|
|
5100
|
+
end
|
|
5101
|
+
|
|
5102
|
+
sig do
|
|
5103
|
+
override.returns(
|
|
5104
|
+
{
|
|
5105
|
+
decimal_places: Float,
|
|
5106
|
+
rounding_method:
|
|
5107
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5108
|
+
}
|
|
5109
|
+
)
|
|
5110
|
+
end
|
|
5111
|
+
def to_hash
|
|
5112
|
+
end
|
|
5113
|
+
|
|
5114
|
+
module RoundingMethod
|
|
5115
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
5116
|
+
|
|
5117
|
+
TaggedSymbol =
|
|
5118
|
+
T.type_alias do
|
|
5119
|
+
T.all(
|
|
5120
|
+
Symbol,
|
|
5121
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod
|
|
5122
|
+
)
|
|
5123
|
+
end
|
|
5124
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
5125
|
+
|
|
5126
|
+
HALF_UP =
|
|
5127
|
+
T.let(
|
|
5128
|
+
:HALF_UP,
|
|
5129
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5130
|
+
)
|
|
5131
|
+
FLOOR =
|
|
5132
|
+
T.let(
|
|
5133
|
+
:FLOOR,
|
|
5134
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5135
|
+
)
|
|
5136
|
+
CEILING =
|
|
5137
|
+
T.let(
|
|
5138
|
+
:CEILING,
|
|
5139
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5140
|
+
)
|
|
5141
|
+
|
|
5142
|
+
sig do
|
|
5143
|
+
override.returns(
|
|
5144
|
+
T::Array[
|
|
5145
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5146
|
+
]
|
|
5147
|
+
)
|
|
5148
|
+
end
|
|
5149
|
+
def self.values
|
|
5150
|
+
end
|
|
5151
|
+
end
|
|
5152
|
+
end
|
|
5153
|
+
end
|
|
5154
|
+
|
|
4688
5155
|
# Whether the created commits will use the commit rate or list rate
|
|
4689
5156
|
module RateType
|
|
4690
5157
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -4757,6 +5224,11 @@ module MetronomeSDK
|
|
|
4757
5224
|
:WEEKLY,
|
|
4758
5225
|
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
4759
5226
|
)
|
|
5227
|
+
DAILY =
|
|
5228
|
+
T.let(
|
|
5229
|
+
:DAILY,
|
|
5230
|
+
MetronomeSDK::V1::PackageCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
5231
|
+
)
|
|
4760
5232
|
|
|
4761
5233
|
sig do
|
|
4762
5234
|
override.returns(
|
|
@@ -5569,6 +6041,23 @@ module MetronomeSDK
|
|
|
5569
6041
|
end
|
|
5570
6042
|
attr_writer :subscription_rate
|
|
5571
6043
|
|
|
6044
|
+
sig do
|
|
6045
|
+
returns(
|
|
6046
|
+
T.nilable(
|
|
6047
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig
|
|
6048
|
+
)
|
|
6049
|
+
)
|
|
6050
|
+
end
|
|
6051
|
+
attr_reader :billing_cycle_config
|
|
6052
|
+
|
|
6053
|
+
sig do
|
|
6054
|
+
params(
|
|
6055
|
+
billing_cycle_config:
|
|
6056
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::OrHash
|
|
6057
|
+
).void
|
|
6058
|
+
end
|
|
6059
|
+
attr_writer :billing_cycle_config
|
|
6060
|
+
|
|
5572
6061
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
5573
6062
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
5574
6063
|
attr_reader :custom_fields
|
|
@@ -5693,6 +6182,8 @@ module MetronomeSDK
|
|
|
5693
6182
|
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::OrHash,
|
|
5694
6183
|
subscription_rate:
|
|
5695
6184
|
MetronomeSDK::V1::PackageCreateParams::Subscription::SubscriptionRate::OrHash,
|
|
6185
|
+
billing_cycle_config:
|
|
6186
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::OrHash,
|
|
5696
6187
|
custom_fields: T::Hash[Symbol, String],
|
|
5697
6188
|
description: String,
|
|
5698
6189
|
duration:
|
|
@@ -5712,6 +6203,7 @@ module MetronomeSDK
|
|
|
5712
6203
|
collection_schedule:,
|
|
5713
6204
|
proration:,
|
|
5714
6205
|
subscription_rate:,
|
|
6206
|
+
billing_cycle_config: nil,
|
|
5715
6207
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
5716
6208
|
custom_fields: nil,
|
|
5717
6209
|
description: nil,
|
|
@@ -5751,6 +6243,8 @@ module MetronomeSDK
|
|
|
5751
6243
|
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration,
|
|
5752
6244
|
subscription_rate:
|
|
5753
6245
|
MetronomeSDK::V1::PackageCreateParams::Subscription::SubscriptionRate,
|
|
6246
|
+
billing_cycle_config:
|
|
6247
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig,
|
|
5754
6248
|
custom_fields: T::Hash[Symbol, String],
|
|
5755
6249
|
description: String,
|
|
5756
6250
|
duration:
|
|
@@ -5842,11 +6336,30 @@ module MetronomeSDK
|
|
|
5842
6336
|
sig { params(is_prorated: T::Boolean).void }
|
|
5843
6337
|
attr_writer :is_prorated
|
|
5844
6338
|
|
|
6339
|
+
sig do
|
|
6340
|
+
returns(
|
|
6341
|
+
T.nilable(
|
|
6342
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding
|
|
6343
|
+
)
|
|
6344
|
+
)
|
|
6345
|
+
end
|
|
6346
|
+
attr_reader :rounding
|
|
6347
|
+
|
|
6348
|
+
sig do
|
|
6349
|
+
params(
|
|
6350
|
+
rounding:
|
|
6351
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::OrHash
|
|
6352
|
+
).void
|
|
6353
|
+
end
|
|
6354
|
+
attr_writer :rounding
|
|
6355
|
+
|
|
5845
6356
|
sig do
|
|
5846
6357
|
params(
|
|
5847
6358
|
invoice_behavior:
|
|
5848
6359
|
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
5849
|
-
is_prorated: T::Boolean
|
|
6360
|
+
is_prorated: T::Boolean,
|
|
6361
|
+
rounding:
|
|
6362
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::OrHash
|
|
5850
6363
|
).returns(T.attached_class)
|
|
5851
6364
|
end
|
|
5852
6365
|
def self.new(
|
|
@@ -5857,7 +6370,8 @@ module MetronomeSDK
|
|
|
5857
6370
|
# in-arrears at the end of the period.
|
|
5858
6371
|
invoice_behavior: nil,
|
|
5859
6372
|
# Indicates if the partial period will be prorated or charged a full amount.
|
|
5860
|
-
is_prorated: nil
|
|
6373
|
+
is_prorated: nil,
|
|
6374
|
+
rounding: nil
|
|
5861
6375
|
)
|
|
5862
6376
|
end
|
|
5863
6377
|
|
|
@@ -5866,7 +6380,9 @@ module MetronomeSDK
|
|
|
5866
6380
|
{
|
|
5867
6381
|
invoice_behavior:
|
|
5868
6382
|
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
5869
|
-
is_prorated: T::Boolean
|
|
6383
|
+
is_prorated: T::Boolean,
|
|
6384
|
+
rounding:
|
|
6385
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding
|
|
5870
6386
|
}
|
|
5871
6387
|
)
|
|
5872
6388
|
end
|
|
@@ -5911,6 +6427,98 @@ module MetronomeSDK
|
|
|
5911
6427
|
def self.values
|
|
5912
6428
|
end
|
|
5913
6429
|
end
|
|
6430
|
+
|
|
6431
|
+
class Rounding < MetronomeSDK::Internal::Type::BaseModel
|
|
6432
|
+
OrHash =
|
|
6433
|
+
T.type_alias do
|
|
6434
|
+
T.any(
|
|
6435
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding,
|
|
6436
|
+
MetronomeSDK::Internal::AnyHash
|
|
6437
|
+
)
|
|
6438
|
+
end
|
|
6439
|
+
|
|
6440
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6441
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6442
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
6443
|
+
# dollar).
|
|
6444
|
+
sig { returns(Float) }
|
|
6445
|
+
attr_accessor :decimal_places
|
|
6446
|
+
|
|
6447
|
+
sig do
|
|
6448
|
+
returns(
|
|
6449
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
6450
|
+
)
|
|
6451
|
+
end
|
|
6452
|
+
attr_accessor :rounding_method
|
|
6453
|
+
|
|
6454
|
+
sig do
|
|
6455
|
+
params(
|
|
6456
|
+
decimal_places: Float,
|
|
6457
|
+
rounding_method:
|
|
6458
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
6459
|
+
).returns(T.attached_class)
|
|
6460
|
+
end
|
|
6461
|
+
def self.new(
|
|
6462
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6463
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6464
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
6465
|
+
# dollar).
|
|
6466
|
+
decimal_places:,
|
|
6467
|
+
rounding_method:
|
|
6468
|
+
)
|
|
6469
|
+
end
|
|
6470
|
+
|
|
6471
|
+
sig do
|
|
6472
|
+
override.returns(
|
|
6473
|
+
{
|
|
6474
|
+
decimal_places: Float,
|
|
6475
|
+
rounding_method:
|
|
6476
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
6477
|
+
}
|
|
6478
|
+
)
|
|
6479
|
+
end
|
|
6480
|
+
def to_hash
|
|
6481
|
+
end
|
|
6482
|
+
|
|
6483
|
+
module RoundingMethod
|
|
6484
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6485
|
+
|
|
6486
|
+
TaggedSymbol =
|
|
6487
|
+
T.type_alias do
|
|
6488
|
+
T.all(
|
|
6489
|
+
Symbol,
|
|
6490
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod
|
|
6491
|
+
)
|
|
6492
|
+
end
|
|
6493
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6494
|
+
|
|
6495
|
+
HALF_UP =
|
|
6496
|
+
T.let(
|
|
6497
|
+
:HALF_UP,
|
|
6498
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
6499
|
+
)
|
|
6500
|
+
FLOOR =
|
|
6501
|
+
T.let(
|
|
6502
|
+
:FLOOR,
|
|
6503
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
6504
|
+
)
|
|
6505
|
+
CEILING =
|
|
6506
|
+
T.let(
|
|
6507
|
+
:CEILING,
|
|
6508
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
6509
|
+
)
|
|
6510
|
+
|
|
6511
|
+
sig do
|
|
6512
|
+
override.returns(
|
|
6513
|
+
T::Array[
|
|
6514
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
6515
|
+
]
|
|
6516
|
+
)
|
|
6517
|
+
end
|
|
6518
|
+
def self.values
|
|
6519
|
+
end
|
|
6520
|
+
end
|
|
6521
|
+
end
|
|
5914
6522
|
end
|
|
5915
6523
|
|
|
5916
6524
|
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -6010,6 +6618,95 @@ module MetronomeSDK
|
|
|
6010
6618
|
end
|
|
6011
6619
|
end
|
|
6012
6620
|
|
|
6621
|
+
class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
6622
|
+
OrHash =
|
|
6623
|
+
T.type_alias do
|
|
6624
|
+
T.any(
|
|
6625
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig,
|
|
6626
|
+
MetronomeSDK::Internal::AnyHash
|
|
6627
|
+
)
|
|
6628
|
+
end
|
|
6629
|
+
|
|
6630
|
+
# Controls whether subscriptions consolidate onto usage invoices. Defaults to
|
|
6631
|
+
# ON_USAGE_INVOICE if omitted.
|
|
6632
|
+
sig do
|
|
6633
|
+
returns(
|
|
6634
|
+
T.nilable(
|
|
6635
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
6636
|
+
)
|
|
6637
|
+
)
|
|
6638
|
+
end
|
|
6639
|
+
attr_reader :invoice_placement
|
|
6640
|
+
|
|
6641
|
+
sig do
|
|
6642
|
+
params(
|
|
6643
|
+
invoice_placement:
|
|
6644
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
6645
|
+
).void
|
|
6646
|
+
end
|
|
6647
|
+
attr_writer :invoice_placement
|
|
6648
|
+
|
|
6649
|
+
sig do
|
|
6650
|
+
params(
|
|
6651
|
+
invoice_placement:
|
|
6652
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
6653
|
+
).returns(T.attached_class)
|
|
6654
|
+
end
|
|
6655
|
+
def self.new(
|
|
6656
|
+
# Controls whether subscriptions consolidate onto usage invoices. Defaults to
|
|
6657
|
+
# ON_USAGE_INVOICE if omitted.
|
|
6658
|
+
invoice_placement: nil
|
|
6659
|
+
)
|
|
6660
|
+
end
|
|
6661
|
+
|
|
6662
|
+
sig do
|
|
6663
|
+
override.returns(
|
|
6664
|
+
{
|
|
6665
|
+
invoice_placement:
|
|
6666
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
6667
|
+
}
|
|
6668
|
+
)
|
|
6669
|
+
end
|
|
6670
|
+
def to_hash
|
|
6671
|
+
end
|
|
6672
|
+
|
|
6673
|
+
# Controls whether subscriptions consolidate onto usage invoices. Defaults to
|
|
6674
|
+
# ON_USAGE_INVOICE if omitted.
|
|
6675
|
+
module InvoicePlacement
|
|
6676
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6677
|
+
|
|
6678
|
+
TaggedSymbol =
|
|
6679
|
+
T.type_alias do
|
|
6680
|
+
T.all(
|
|
6681
|
+
Symbol,
|
|
6682
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement
|
|
6683
|
+
)
|
|
6684
|
+
end
|
|
6685
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6686
|
+
|
|
6687
|
+
ON_SCHEDULED_INVOICE =
|
|
6688
|
+
T.let(
|
|
6689
|
+
:ON_SCHEDULED_INVOICE,
|
|
6690
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
6691
|
+
)
|
|
6692
|
+
ON_USAGE_INVOICE =
|
|
6693
|
+
T.let(
|
|
6694
|
+
:ON_USAGE_INVOICE,
|
|
6695
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
6696
|
+
)
|
|
6697
|
+
|
|
6698
|
+
sig do
|
|
6699
|
+
override.returns(
|
|
6700
|
+
T::Array[
|
|
6701
|
+
MetronomeSDK::V1::PackageCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
6702
|
+
]
|
|
6703
|
+
)
|
|
6704
|
+
end
|
|
6705
|
+
def self.values
|
|
6706
|
+
end
|
|
6707
|
+
end
|
|
6708
|
+
end
|
|
6709
|
+
|
|
6013
6710
|
class Duration < MetronomeSDK::Internal::Type::BaseModel
|
|
6014
6711
|
OrHash =
|
|
6015
6712
|
T.type_alias do
|