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
|
@@ -595,6 +595,14 @@ module MetronomeSDK
|
|
|
595
595
|
end
|
|
596
596
|
attr_writer :contract
|
|
597
597
|
|
|
598
|
+
# The actor who created this commit. Omitted for system-generated commits such as
|
|
599
|
+
# recurring commits, rollover commits, and threshold commits.
|
|
600
|
+
sig { returns(T.nilable(String)) }
|
|
601
|
+
attr_reader :created_by
|
|
602
|
+
|
|
603
|
+
sig { params(created_by: String).void }
|
|
604
|
+
attr_writer :created_by
|
|
605
|
+
|
|
598
606
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
599
607
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
600
608
|
attr_reader :custom_fields
|
|
@@ -805,6 +813,7 @@ module MetronomeSDK
|
|
|
805
813
|
archived_at: Time,
|
|
806
814
|
balance: Float,
|
|
807
815
|
contract: MetronomeSDK::ContractV2::Commit::Contract::OrHash,
|
|
816
|
+
created_by: String,
|
|
808
817
|
custom_fields: T::Hash[Symbol, String],
|
|
809
818
|
description: String,
|
|
810
819
|
hierarchy_configuration:
|
|
@@ -874,6 +883,9 @@ module MetronomeSDK
|
|
|
874
883
|
# included in the balance, including future-dated manual ledger entries.
|
|
875
884
|
balance: nil,
|
|
876
885
|
contract: nil,
|
|
886
|
+
# The actor who created this commit. Omitted for system-generated commits such as
|
|
887
|
+
# recurring commits, rollover commits, and threshold commits.
|
|
888
|
+
created_by: nil,
|
|
877
889
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
878
890
|
custom_fields: nil,
|
|
879
891
|
description: nil,
|
|
@@ -924,6 +936,7 @@ module MetronomeSDK
|
|
|
924
936
|
archived_at: Time,
|
|
925
937
|
balance: Float,
|
|
926
938
|
contract: MetronomeSDK::ContractV2::Commit::Contract,
|
|
939
|
+
created_by: String,
|
|
927
940
|
custom_fields: T::Hash[Symbol, String],
|
|
928
941
|
description: String,
|
|
929
942
|
hierarchy_configuration:
|
|
@@ -2618,6 +2631,12 @@ module MetronomeSDK
|
|
|
2618
2631
|
)
|
|
2619
2632
|
end
|
|
2620
2633
|
|
|
2634
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
2635
|
+
attr_reader :any_commit_or_credit_ids
|
|
2636
|
+
|
|
2637
|
+
sig { params(any_commit_or_credit_ids: T::Array[String]).void }
|
|
2638
|
+
attr_writer :any_commit_or_credit_ids
|
|
2639
|
+
|
|
2621
2640
|
sig do
|
|
2622
2641
|
returns(
|
|
2623
2642
|
T.nilable(
|
|
@@ -2677,6 +2696,7 @@ module MetronomeSDK
|
|
|
2677
2696
|
|
|
2678
2697
|
sig do
|
|
2679
2698
|
params(
|
|
2699
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2680
2700
|
billing_frequency:
|
|
2681
2701
|
MetronomeSDK::ContractV2::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
2682
2702
|
commit_ids: T::Array[String],
|
|
@@ -2688,6 +2708,7 @@ module MetronomeSDK
|
|
|
2688
2708
|
).returns(T.attached_class)
|
|
2689
2709
|
end
|
|
2690
2710
|
def self.new(
|
|
2711
|
+
any_commit_or_credit_ids: nil,
|
|
2691
2712
|
billing_frequency: nil,
|
|
2692
2713
|
commit_ids: nil,
|
|
2693
2714
|
presentation_group_values: nil,
|
|
@@ -2701,6 +2722,7 @@ module MetronomeSDK
|
|
|
2701
2722
|
sig do
|
|
2702
2723
|
override.returns(
|
|
2703
2724
|
{
|
|
2725
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2704
2726
|
billing_frequency:
|
|
2705
2727
|
MetronomeSDK::ContractV2::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol,
|
|
2706
2728
|
commit_ids: T::Array[String],
|
|
@@ -3328,6 +3350,14 @@ module MetronomeSDK
|
|
|
3328
3350
|
sig { params(created_at: Time).void }
|
|
3329
3351
|
attr_writer :created_at
|
|
3330
3352
|
|
|
3353
|
+
# The actor who created this credit. Omitted for system-generated credits such as
|
|
3354
|
+
# recurring credits.
|
|
3355
|
+
sig { returns(T.nilable(String)) }
|
|
3356
|
+
attr_reader :created_by
|
|
3357
|
+
|
|
3358
|
+
sig { params(created_by: String).void }
|
|
3359
|
+
attr_writer :created_by
|
|
3360
|
+
|
|
3331
3361
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3332
3362
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
3333
3363
|
attr_reader :custom_fields
|
|
@@ -3471,6 +3501,7 @@ module MetronomeSDK
|
|
|
3471
3501
|
balance: Float,
|
|
3472
3502
|
contract: MetronomeSDK::ContractV2::Credit::Contract::OrHash,
|
|
3473
3503
|
created_at: Time,
|
|
3504
|
+
created_by: String,
|
|
3474
3505
|
custom_fields: T::Hash[Symbol, String],
|
|
3475
3506
|
description: String,
|
|
3476
3507
|
hierarchy_configuration:
|
|
@@ -3525,6 +3556,9 @@ module MetronomeSDK
|
|
|
3525
3556
|
# - Recurring credits: latter of credit service period date and parent credit
|
|
3526
3557
|
# start date
|
|
3527
3558
|
created_at: nil,
|
|
3559
|
+
# The actor who created this credit. Omitted for system-generated credits such as
|
|
3560
|
+
# recurring credits.
|
|
3561
|
+
created_by: nil,
|
|
3528
3562
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3529
3563
|
custom_fields: nil,
|
|
3530
3564
|
description: nil,
|
|
@@ -3567,6 +3601,7 @@ module MetronomeSDK
|
|
|
3567
3601
|
balance: Float,
|
|
3568
3602
|
contract: MetronomeSDK::ContractV2::Credit::Contract,
|
|
3569
3603
|
created_at: Time,
|
|
3604
|
+
created_by: String,
|
|
3570
3605
|
custom_fields: T::Hash[Symbol, String],
|
|
3571
3606
|
description: String,
|
|
3572
3607
|
hierarchy_configuration:
|
|
@@ -5303,6 +5338,26 @@ module MetronomeSDK
|
|
|
5303
5338
|
end
|
|
5304
5339
|
attr_writer :proration
|
|
5305
5340
|
|
|
5341
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
5342
|
+
sig do
|
|
5343
|
+
returns(
|
|
5344
|
+
T.nilable(
|
|
5345
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding
|
|
5346
|
+
)
|
|
5347
|
+
)
|
|
5348
|
+
end
|
|
5349
|
+
attr_reader :proration_rounding
|
|
5350
|
+
|
|
5351
|
+
sig do
|
|
5352
|
+
params(
|
|
5353
|
+
proration_rounding:
|
|
5354
|
+
T.nilable(
|
|
5355
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::OrHash
|
|
5356
|
+
)
|
|
5357
|
+
).void
|
|
5358
|
+
end
|
|
5359
|
+
attr_writer :proration_rounding
|
|
5360
|
+
|
|
5306
5361
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5307
5362
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5308
5363
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5387,6 +5442,10 @@ module MetronomeSDK
|
|
|
5387
5442
|
netsuite_sales_order_id: String,
|
|
5388
5443
|
proration:
|
|
5389
5444
|
MetronomeSDK::ContractV2::RecurringCommit::Proration::OrSymbol,
|
|
5445
|
+
proration_rounding:
|
|
5446
|
+
T.nilable(
|
|
5447
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::OrHash
|
|
5448
|
+
),
|
|
5390
5449
|
recurrence_frequency:
|
|
5391
5450
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
|
5392
5451
|
rollover_fraction: Float,
|
|
@@ -5428,6 +5487,8 @@ module MetronomeSDK
|
|
|
5428
5487
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
5429
5488
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
5430
5489
|
proration: nil,
|
|
5490
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
5491
|
+
proration_rounding: nil,
|
|
5431
5492
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5432
5493
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5433
5494
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5473,6 +5534,10 @@ module MetronomeSDK
|
|
|
5473
5534
|
netsuite_sales_order_id: String,
|
|
5474
5535
|
proration:
|
|
5475
5536
|
MetronomeSDK::ContractV2::RecurringCommit::Proration::TaggedSymbol,
|
|
5537
|
+
proration_rounding:
|
|
5538
|
+
T.nilable(
|
|
5539
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding
|
|
5540
|
+
),
|
|
5476
5541
|
recurrence_frequency:
|
|
5477
5542
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
|
|
5478
5543
|
rollover_fraction: Float,
|
|
@@ -5769,6 +5834,255 @@ module MetronomeSDK
|
|
|
5769
5834
|
end
|
|
5770
5835
|
end
|
|
5771
5836
|
|
|
5837
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
5838
|
+
OrHash =
|
|
5839
|
+
T.type_alias do
|
|
5840
|
+
T.any(
|
|
5841
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding,
|
|
5842
|
+
MetronomeSDK::Internal::AnyHash
|
|
5843
|
+
)
|
|
5844
|
+
end
|
|
5845
|
+
|
|
5846
|
+
sig do
|
|
5847
|
+
returns(
|
|
5848
|
+
T.nilable(
|
|
5849
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access
|
|
5850
|
+
)
|
|
5851
|
+
)
|
|
5852
|
+
end
|
|
5853
|
+
attr_reader :access
|
|
5854
|
+
|
|
5855
|
+
sig do
|
|
5856
|
+
params(
|
|
5857
|
+
access:
|
|
5858
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::OrHash
|
|
5859
|
+
).void
|
|
5860
|
+
end
|
|
5861
|
+
attr_writer :access
|
|
5862
|
+
|
|
5863
|
+
sig do
|
|
5864
|
+
returns(
|
|
5865
|
+
T.nilable(
|
|
5866
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice
|
|
5867
|
+
)
|
|
5868
|
+
)
|
|
5869
|
+
end
|
|
5870
|
+
attr_reader :invoice
|
|
5871
|
+
|
|
5872
|
+
sig do
|
|
5873
|
+
params(
|
|
5874
|
+
invoice:
|
|
5875
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
5876
|
+
).void
|
|
5877
|
+
end
|
|
5878
|
+
attr_writer :invoice
|
|
5879
|
+
|
|
5880
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
5881
|
+
sig do
|
|
5882
|
+
params(
|
|
5883
|
+
access:
|
|
5884
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::OrHash,
|
|
5885
|
+
invoice:
|
|
5886
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
5887
|
+
).returns(T.attached_class)
|
|
5888
|
+
end
|
|
5889
|
+
def self.new(access: nil, invoice: nil)
|
|
5890
|
+
end
|
|
5891
|
+
|
|
5892
|
+
sig do
|
|
5893
|
+
override.returns(
|
|
5894
|
+
{
|
|
5895
|
+
access:
|
|
5896
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access,
|
|
5897
|
+
invoice:
|
|
5898
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice
|
|
5899
|
+
}
|
|
5900
|
+
)
|
|
5901
|
+
end
|
|
5902
|
+
def to_hash
|
|
5903
|
+
end
|
|
5904
|
+
|
|
5905
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
5906
|
+
OrHash =
|
|
5907
|
+
T.type_alias do
|
|
5908
|
+
T.any(
|
|
5909
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access,
|
|
5910
|
+
MetronomeSDK::Internal::AnyHash
|
|
5911
|
+
)
|
|
5912
|
+
end
|
|
5913
|
+
|
|
5914
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5915
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5916
|
+
# nearest 100 in the stored unit).
|
|
5917
|
+
sig { returns(Float) }
|
|
5918
|
+
attr_accessor :decimal_places
|
|
5919
|
+
|
|
5920
|
+
sig do
|
|
5921
|
+
returns(
|
|
5922
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5923
|
+
)
|
|
5924
|
+
end
|
|
5925
|
+
attr_accessor :rounding_method
|
|
5926
|
+
|
|
5927
|
+
sig do
|
|
5928
|
+
params(
|
|
5929
|
+
decimal_places: Float,
|
|
5930
|
+
rounding_method:
|
|
5931
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5932
|
+
).returns(T.attached_class)
|
|
5933
|
+
end
|
|
5934
|
+
def self.new(
|
|
5935
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5936
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5937
|
+
# nearest 100 in the stored unit).
|
|
5938
|
+
decimal_places:,
|
|
5939
|
+
rounding_method:
|
|
5940
|
+
)
|
|
5941
|
+
end
|
|
5942
|
+
|
|
5943
|
+
sig do
|
|
5944
|
+
override.returns(
|
|
5945
|
+
{
|
|
5946
|
+
decimal_places: Float,
|
|
5947
|
+
rounding_method:
|
|
5948
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5949
|
+
}
|
|
5950
|
+
)
|
|
5951
|
+
end
|
|
5952
|
+
def to_hash
|
|
5953
|
+
end
|
|
5954
|
+
|
|
5955
|
+
module RoundingMethod
|
|
5956
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
5957
|
+
|
|
5958
|
+
TaggedSymbol =
|
|
5959
|
+
T.type_alias do
|
|
5960
|
+
T.all(
|
|
5961
|
+
Symbol,
|
|
5962
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod
|
|
5963
|
+
)
|
|
5964
|
+
end
|
|
5965
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
5966
|
+
|
|
5967
|
+
HALF_UP =
|
|
5968
|
+
T.let(
|
|
5969
|
+
:HALF_UP,
|
|
5970
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5971
|
+
)
|
|
5972
|
+
FLOOR =
|
|
5973
|
+
T.let(
|
|
5974
|
+
:FLOOR,
|
|
5975
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5976
|
+
)
|
|
5977
|
+
CEILING =
|
|
5978
|
+
T.let(
|
|
5979
|
+
:CEILING,
|
|
5980
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5981
|
+
)
|
|
5982
|
+
|
|
5983
|
+
sig do
|
|
5984
|
+
override.returns(
|
|
5985
|
+
T::Array[
|
|
5986
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5987
|
+
]
|
|
5988
|
+
)
|
|
5989
|
+
end
|
|
5990
|
+
def self.values
|
|
5991
|
+
end
|
|
5992
|
+
end
|
|
5993
|
+
end
|
|
5994
|
+
|
|
5995
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
5996
|
+
OrHash =
|
|
5997
|
+
T.type_alias do
|
|
5998
|
+
T.any(
|
|
5999
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice,
|
|
6000
|
+
MetronomeSDK::Internal::AnyHash
|
|
6001
|
+
)
|
|
6002
|
+
end
|
|
6003
|
+
|
|
6004
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6005
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6006
|
+
# nearest 100 in the stored unit).
|
|
6007
|
+
sig { returns(Float) }
|
|
6008
|
+
attr_accessor :decimal_places
|
|
6009
|
+
|
|
6010
|
+
sig do
|
|
6011
|
+
returns(
|
|
6012
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6013
|
+
)
|
|
6014
|
+
end
|
|
6015
|
+
attr_accessor :rounding_method
|
|
6016
|
+
|
|
6017
|
+
sig do
|
|
6018
|
+
params(
|
|
6019
|
+
decimal_places: Float,
|
|
6020
|
+
rounding_method:
|
|
6021
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
6022
|
+
).returns(T.attached_class)
|
|
6023
|
+
end
|
|
6024
|
+
def self.new(
|
|
6025
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6026
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6027
|
+
# nearest 100 in the stored unit).
|
|
6028
|
+
decimal_places:,
|
|
6029
|
+
rounding_method:
|
|
6030
|
+
)
|
|
6031
|
+
end
|
|
6032
|
+
|
|
6033
|
+
sig do
|
|
6034
|
+
override.returns(
|
|
6035
|
+
{
|
|
6036
|
+
decimal_places: Float,
|
|
6037
|
+
rounding_method:
|
|
6038
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6039
|
+
}
|
|
6040
|
+
)
|
|
6041
|
+
end
|
|
6042
|
+
def to_hash
|
|
6043
|
+
end
|
|
6044
|
+
|
|
6045
|
+
module RoundingMethod
|
|
6046
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6047
|
+
|
|
6048
|
+
TaggedSymbol =
|
|
6049
|
+
T.type_alias do
|
|
6050
|
+
T.all(
|
|
6051
|
+
Symbol,
|
|
6052
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
|
|
6053
|
+
)
|
|
6054
|
+
end
|
|
6055
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6056
|
+
|
|
6057
|
+
HALF_UP =
|
|
6058
|
+
T.let(
|
|
6059
|
+
:HALF_UP,
|
|
6060
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6061
|
+
)
|
|
6062
|
+
FLOOR =
|
|
6063
|
+
T.let(
|
|
6064
|
+
:FLOOR,
|
|
6065
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6066
|
+
)
|
|
6067
|
+
CEILING =
|
|
6068
|
+
T.let(
|
|
6069
|
+
:CEILING,
|
|
6070
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6071
|
+
)
|
|
6072
|
+
|
|
6073
|
+
sig do
|
|
6074
|
+
override.returns(
|
|
6075
|
+
T::Array[
|
|
6076
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
6077
|
+
]
|
|
6078
|
+
)
|
|
6079
|
+
end
|
|
6080
|
+
def self.values
|
|
6081
|
+
end
|
|
6082
|
+
end
|
|
6083
|
+
end
|
|
6084
|
+
end
|
|
6085
|
+
|
|
5772
6086
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5773
6087
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5774
6088
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5806,6 +6120,11 @@ module MetronomeSDK
|
|
|
5806
6120
|
:WEEKLY,
|
|
5807
6121
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
5808
6122
|
)
|
|
6123
|
+
DAILY =
|
|
6124
|
+
T.let(
|
|
6125
|
+
:DAILY,
|
|
6126
|
+
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
6127
|
+
)
|
|
5809
6128
|
|
|
5810
6129
|
sig do
|
|
5811
6130
|
override.returns(
|
|
@@ -5971,6 +6290,26 @@ module MetronomeSDK
|
|
|
5971
6290
|
end
|
|
5972
6291
|
attr_writer :proration
|
|
5973
6292
|
|
|
6293
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
6294
|
+
sig do
|
|
6295
|
+
returns(
|
|
6296
|
+
T.nilable(
|
|
6297
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding
|
|
6298
|
+
)
|
|
6299
|
+
)
|
|
6300
|
+
end
|
|
6301
|
+
attr_reader :proration_rounding
|
|
6302
|
+
|
|
6303
|
+
sig do
|
|
6304
|
+
params(
|
|
6305
|
+
proration_rounding:
|
|
6306
|
+
T.nilable(
|
|
6307
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::OrHash
|
|
6308
|
+
)
|
|
6309
|
+
).void
|
|
6310
|
+
end
|
|
6311
|
+
attr_writer :proration_rounding
|
|
6312
|
+
|
|
5974
6313
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5975
6314
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5976
6315
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -6053,6 +6392,10 @@ module MetronomeSDK
|
|
|
6053
6392
|
netsuite_sales_order_id: String,
|
|
6054
6393
|
proration:
|
|
6055
6394
|
MetronomeSDK::ContractV2::RecurringCredit::Proration::OrSymbol,
|
|
6395
|
+
proration_rounding:
|
|
6396
|
+
T.nilable(
|
|
6397
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::OrHash
|
|
6398
|
+
),
|
|
6056
6399
|
recurrence_frequency:
|
|
6057
6400
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
|
6058
6401
|
rollover_fraction: Float,
|
|
@@ -6092,6 +6435,8 @@ module MetronomeSDK
|
|
|
6092
6435
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
6093
6436
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
6094
6437
|
proration: nil,
|
|
6438
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
6439
|
+
proration_rounding: nil,
|
|
6095
6440
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
6096
6441
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
6097
6442
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -6135,6 +6480,10 @@ module MetronomeSDK
|
|
|
6135
6480
|
netsuite_sales_order_id: String,
|
|
6136
6481
|
proration:
|
|
6137
6482
|
MetronomeSDK::ContractV2::RecurringCredit::Proration::TaggedSymbol,
|
|
6483
|
+
proration_rounding:
|
|
6484
|
+
T.nilable(
|
|
6485
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding
|
|
6486
|
+
),
|
|
6138
6487
|
recurrence_frequency:
|
|
6139
6488
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
|
|
6140
6489
|
rollover_fraction: Float,
|
|
@@ -6393,6 +6742,144 @@ module MetronomeSDK
|
|
|
6393
6742
|
end
|
|
6394
6743
|
end
|
|
6395
6744
|
|
|
6745
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
6746
|
+
OrHash =
|
|
6747
|
+
T.type_alias do
|
|
6748
|
+
T.any(
|
|
6749
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding,
|
|
6750
|
+
MetronomeSDK::Internal::AnyHash
|
|
6751
|
+
)
|
|
6752
|
+
end
|
|
6753
|
+
|
|
6754
|
+
sig do
|
|
6755
|
+
returns(
|
|
6756
|
+
T.nilable(
|
|
6757
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access
|
|
6758
|
+
)
|
|
6759
|
+
)
|
|
6760
|
+
end
|
|
6761
|
+
attr_reader :access
|
|
6762
|
+
|
|
6763
|
+
sig do
|
|
6764
|
+
params(
|
|
6765
|
+
access:
|
|
6766
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::OrHash
|
|
6767
|
+
).void
|
|
6768
|
+
end
|
|
6769
|
+
attr_writer :access
|
|
6770
|
+
|
|
6771
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
6772
|
+
sig do
|
|
6773
|
+
params(
|
|
6774
|
+
access:
|
|
6775
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::OrHash
|
|
6776
|
+
).returns(T.attached_class)
|
|
6777
|
+
end
|
|
6778
|
+
def self.new(access: nil)
|
|
6779
|
+
end
|
|
6780
|
+
|
|
6781
|
+
sig do
|
|
6782
|
+
override.returns(
|
|
6783
|
+
{
|
|
6784
|
+
access:
|
|
6785
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access
|
|
6786
|
+
}
|
|
6787
|
+
)
|
|
6788
|
+
end
|
|
6789
|
+
def to_hash
|
|
6790
|
+
end
|
|
6791
|
+
|
|
6792
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
6793
|
+
OrHash =
|
|
6794
|
+
T.type_alias do
|
|
6795
|
+
T.any(
|
|
6796
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access,
|
|
6797
|
+
MetronomeSDK::Internal::AnyHash
|
|
6798
|
+
)
|
|
6799
|
+
end
|
|
6800
|
+
|
|
6801
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6802
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6803
|
+
# nearest 100 in the stored unit).
|
|
6804
|
+
sig { returns(Float) }
|
|
6805
|
+
attr_accessor :decimal_places
|
|
6806
|
+
|
|
6807
|
+
sig do
|
|
6808
|
+
returns(
|
|
6809
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6810
|
+
)
|
|
6811
|
+
end
|
|
6812
|
+
attr_accessor :rounding_method
|
|
6813
|
+
|
|
6814
|
+
sig do
|
|
6815
|
+
params(
|
|
6816
|
+
decimal_places: Float,
|
|
6817
|
+
rounding_method:
|
|
6818
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
6819
|
+
).returns(T.attached_class)
|
|
6820
|
+
end
|
|
6821
|
+
def self.new(
|
|
6822
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
6823
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
6824
|
+
# nearest 100 in the stored unit).
|
|
6825
|
+
decimal_places:,
|
|
6826
|
+
rounding_method:
|
|
6827
|
+
)
|
|
6828
|
+
end
|
|
6829
|
+
|
|
6830
|
+
sig do
|
|
6831
|
+
override.returns(
|
|
6832
|
+
{
|
|
6833
|
+
decimal_places: Float,
|
|
6834
|
+
rounding_method:
|
|
6835
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6836
|
+
}
|
|
6837
|
+
)
|
|
6838
|
+
end
|
|
6839
|
+
def to_hash
|
|
6840
|
+
end
|
|
6841
|
+
|
|
6842
|
+
module RoundingMethod
|
|
6843
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6844
|
+
|
|
6845
|
+
TaggedSymbol =
|
|
6846
|
+
T.type_alias do
|
|
6847
|
+
T.all(
|
|
6848
|
+
Symbol,
|
|
6849
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod
|
|
6850
|
+
)
|
|
6851
|
+
end
|
|
6852
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6853
|
+
|
|
6854
|
+
HALF_UP =
|
|
6855
|
+
T.let(
|
|
6856
|
+
:HALF_UP,
|
|
6857
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6858
|
+
)
|
|
6859
|
+
FLOOR =
|
|
6860
|
+
T.let(
|
|
6861
|
+
:FLOOR,
|
|
6862
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6863
|
+
)
|
|
6864
|
+
CEILING =
|
|
6865
|
+
T.let(
|
|
6866
|
+
:CEILING,
|
|
6867
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6868
|
+
)
|
|
6869
|
+
|
|
6870
|
+
sig do
|
|
6871
|
+
override.returns(
|
|
6872
|
+
T::Array[
|
|
6873
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
6874
|
+
]
|
|
6875
|
+
)
|
|
6876
|
+
end
|
|
6877
|
+
def self.values
|
|
6878
|
+
end
|
|
6879
|
+
end
|
|
6880
|
+
end
|
|
6881
|
+
end
|
|
6882
|
+
|
|
6396
6883
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
6397
6884
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
6398
6885
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -6430,6 +6917,11 @@ module MetronomeSDK
|
|
|
6430
6917
|
:WEEKLY,
|
|
6431
6918
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
6432
6919
|
)
|
|
6920
|
+
DAILY =
|
|
6921
|
+
T.let(
|
|
6922
|
+
:DAILY,
|
|
6923
|
+
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
6924
|
+
)
|
|
6433
6925
|
|
|
6434
6926
|
sig do
|
|
6435
6927
|
override.returns(
|
|
@@ -7174,6 +7666,23 @@ module MetronomeSDK
|
|
|
7174
7666
|
sig { params(id: String).void }
|
|
7175
7667
|
attr_writer :id
|
|
7176
7668
|
|
|
7669
|
+
sig do
|
|
7670
|
+
returns(
|
|
7671
|
+
T.nilable(
|
|
7672
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig
|
|
7673
|
+
)
|
|
7674
|
+
)
|
|
7675
|
+
end
|
|
7676
|
+
attr_reader :billing_cycle_config
|
|
7677
|
+
|
|
7678
|
+
sig do
|
|
7679
|
+
params(
|
|
7680
|
+
billing_cycle_config:
|
|
7681
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::OrHash
|
|
7682
|
+
).void
|
|
7683
|
+
end
|
|
7684
|
+
attr_writer :billing_cycle_config
|
|
7685
|
+
|
|
7177
7686
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
7178
7687
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
7179
7688
|
attr_reader :custom_fields
|
|
@@ -7236,6 +7745,8 @@ module MetronomeSDK
|
|
|
7236
7745
|
subscription_rate:
|
|
7237
7746
|
MetronomeSDK::ContractV2::Subscription::SubscriptionRate::OrHash,
|
|
7238
7747
|
id: String,
|
|
7748
|
+
billing_cycle_config:
|
|
7749
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::OrHash,
|
|
7239
7750
|
custom_fields: T::Hash[Symbol, String],
|
|
7240
7751
|
description: String,
|
|
7241
7752
|
ending_before: Time,
|
|
@@ -7266,6 +7777,7 @@ module MetronomeSDK
|
|
|
7266
7777
|
starting_at:,
|
|
7267
7778
|
subscription_rate:,
|
|
7268
7779
|
id: nil,
|
|
7780
|
+
billing_cycle_config: nil,
|
|
7269
7781
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
7270
7782
|
custom_fields: nil,
|
|
7271
7783
|
description: nil,
|
|
@@ -7294,6 +7806,8 @@ module MetronomeSDK
|
|
|
7294
7806
|
subscription_rate:
|
|
7295
7807
|
MetronomeSDK::ContractV2::Subscription::SubscriptionRate,
|
|
7296
7808
|
id: String,
|
|
7809
|
+
billing_cycle_config:
|
|
7810
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig,
|
|
7297
7811
|
custom_fields: T::Hash[Symbol, String],
|
|
7298
7812
|
description: String,
|
|
7299
7813
|
ending_before: Time,
|
|
@@ -7533,14 +8047,33 @@ module MetronomeSDK
|
|
|
7533
8047
|
sig { returns(T::Boolean) }
|
|
7534
8048
|
attr_accessor :is_prorated
|
|
7535
8049
|
|
|
8050
|
+
sig do
|
|
8051
|
+
returns(
|
|
8052
|
+
T.nilable(
|
|
8053
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding
|
|
8054
|
+
)
|
|
8055
|
+
)
|
|
8056
|
+
end
|
|
8057
|
+
attr_reader :rounding
|
|
8058
|
+
|
|
8059
|
+
sig do
|
|
8060
|
+
params(
|
|
8061
|
+
rounding:
|
|
8062
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::OrHash
|
|
8063
|
+
).void
|
|
8064
|
+
end
|
|
8065
|
+
attr_writer :rounding
|
|
8066
|
+
|
|
7536
8067
|
sig do
|
|
7537
8068
|
params(
|
|
7538
8069
|
invoice_behavior:
|
|
7539
8070
|
MetronomeSDK::ContractV2::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
7540
|
-
is_prorated: T::Boolean
|
|
8071
|
+
is_prorated: T::Boolean,
|
|
8072
|
+
rounding:
|
|
8073
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::OrHash
|
|
7541
8074
|
).returns(T.attached_class)
|
|
7542
8075
|
end
|
|
7543
|
-
def self.new(invoice_behavior:, is_prorated:)
|
|
8076
|
+
def self.new(invoice_behavior:, is_prorated:, rounding: nil)
|
|
7544
8077
|
end
|
|
7545
8078
|
|
|
7546
8079
|
sig do
|
|
@@ -7548,7 +8081,9 @@ module MetronomeSDK
|
|
|
7548
8081
|
{
|
|
7549
8082
|
invoice_behavior:
|
|
7550
8083
|
MetronomeSDK::ContractV2::Subscription::Proration::InvoiceBehavior::TaggedSymbol,
|
|
7551
|
-
is_prorated: T::Boolean
|
|
8084
|
+
is_prorated: T::Boolean,
|
|
8085
|
+
rounding:
|
|
8086
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding
|
|
7552
8087
|
}
|
|
7553
8088
|
)
|
|
7554
8089
|
end
|
|
@@ -7588,6 +8123,96 @@ module MetronomeSDK
|
|
|
7588
8123
|
def self.values
|
|
7589
8124
|
end
|
|
7590
8125
|
end
|
|
8126
|
+
|
|
8127
|
+
class Rounding < MetronomeSDK::Internal::Type::BaseModel
|
|
8128
|
+
OrHash =
|
|
8129
|
+
T.type_alias do
|
|
8130
|
+
T.any(
|
|
8131
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding,
|
|
8132
|
+
MetronomeSDK::Internal::AnyHash
|
|
8133
|
+
)
|
|
8134
|
+
end
|
|
8135
|
+
|
|
8136
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
8137
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
8138
|
+
# nearest 100 in the stored unit).
|
|
8139
|
+
sig { returns(Float) }
|
|
8140
|
+
attr_accessor :decimal_places
|
|
8141
|
+
|
|
8142
|
+
sig do
|
|
8143
|
+
returns(
|
|
8144
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8145
|
+
)
|
|
8146
|
+
end
|
|
8147
|
+
attr_accessor :rounding_method
|
|
8148
|
+
|
|
8149
|
+
sig do
|
|
8150
|
+
params(
|
|
8151
|
+
decimal_places: Float,
|
|
8152
|
+
rounding_method:
|
|
8153
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
8154
|
+
).returns(T.attached_class)
|
|
8155
|
+
end
|
|
8156
|
+
def self.new(
|
|
8157
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
8158
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
8159
|
+
# nearest 100 in the stored unit).
|
|
8160
|
+
decimal_places:,
|
|
8161
|
+
rounding_method:
|
|
8162
|
+
)
|
|
8163
|
+
end
|
|
8164
|
+
|
|
8165
|
+
sig do
|
|
8166
|
+
override.returns(
|
|
8167
|
+
{
|
|
8168
|
+
decimal_places: Float,
|
|
8169
|
+
rounding_method:
|
|
8170
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8171
|
+
}
|
|
8172
|
+
)
|
|
8173
|
+
end
|
|
8174
|
+
def to_hash
|
|
8175
|
+
end
|
|
8176
|
+
|
|
8177
|
+
module RoundingMethod
|
|
8178
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
8179
|
+
|
|
8180
|
+
TaggedSymbol =
|
|
8181
|
+
T.type_alias do
|
|
8182
|
+
T.all(
|
|
8183
|
+
Symbol,
|
|
8184
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod
|
|
8185
|
+
)
|
|
8186
|
+
end
|
|
8187
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
8188
|
+
|
|
8189
|
+
HALF_UP =
|
|
8190
|
+
T.let(
|
|
8191
|
+
:HALF_UP,
|
|
8192
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8193
|
+
)
|
|
8194
|
+
FLOOR =
|
|
8195
|
+
T.let(
|
|
8196
|
+
:FLOOR,
|
|
8197
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8198
|
+
)
|
|
8199
|
+
CEILING =
|
|
8200
|
+
T.let(
|
|
8201
|
+
:CEILING,
|
|
8202
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8203
|
+
)
|
|
8204
|
+
|
|
8205
|
+
sig do
|
|
8206
|
+
override.returns(
|
|
8207
|
+
T::Array[
|
|
8208
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
8209
|
+
]
|
|
8210
|
+
)
|
|
8211
|
+
end
|
|
8212
|
+
def self.values
|
|
8213
|
+
end
|
|
8214
|
+
end
|
|
8215
|
+
end
|
|
7591
8216
|
end
|
|
7592
8217
|
|
|
7593
8218
|
# Determines how the subscription's quantity is controlled. Defaults to
|
|
@@ -7797,6 +8422,93 @@ module MetronomeSDK
|
|
|
7797
8422
|
end
|
|
7798
8423
|
end
|
|
7799
8424
|
|
|
8425
|
+
class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
8426
|
+
OrHash =
|
|
8427
|
+
T.type_alias do
|
|
8428
|
+
T.any(
|
|
8429
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig,
|
|
8430
|
+
MetronomeSDK::Internal::AnyHash
|
|
8431
|
+
)
|
|
8432
|
+
end
|
|
8433
|
+
|
|
8434
|
+
# The date this subscription's billing cycle is anchored to.
|
|
8435
|
+
sig { returns(Time) }
|
|
8436
|
+
attr_accessor :anchor_date
|
|
8437
|
+
|
|
8438
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
8439
|
+
# own scheduled invoice.
|
|
8440
|
+
sig do
|
|
8441
|
+
returns(
|
|
8442
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
8443
|
+
)
|
|
8444
|
+
end
|
|
8445
|
+
attr_accessor :invoice_placement
|
|
8446
|
+
|
|
8447
|
+
sig do
|
|
8448
|
+
params(
|
|
8449
|
+
anchor_date: Time,
|
|
8450
|
+
invoice_placement:
|
|
8451
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
8452
|
+
).returns(T.attached_class)
|
|
8453
|
+
end
|
|
8454
|
+
def self.new(
|
|
8455
|
+
# The date this subscription's billing cycle is anchored to.
|
|
8456
|
+
anchor_date:,
|
|
8457
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
8458
|
+
# own scheduled invoice.
|
|
8459
|
+
invoice_placement:
|
|
8460
|
+
)
|
|
8461
|
+
end
|
|
8462
|
+
|
|
8463
|
+
sig do
|
|
8464
|
+
override.returns(
|
|
8465
|
+
{
|
|
8466
|
+
anchor_date: Time,
|
|
8467
|
+
invoice_placement:
|
|
8468
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
8469
|
+
}
|
|
8470
|
+
)
|
|
8471
|
+
end
|
|
8472
|
+
def to_hash
|
|
8473
|
+
end
|
|
8474
|
+
|
|
8475
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
8476
|
+
# own scheduled invoice.
|
|
8477
|
+
module InvoicePlacement
|
|
8478
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
8479
|
+
|
|
8480
|
+
TaggedSymbol =
|
|
8481
|
+
T.type_alias do
|
|
8482
|
+
T.all(
|
|
8483
|
+
Symbol,
|
|
8484
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement
|
|
8485
|
+
)
|
|
8486
|
+
end
|
|
8487
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
8488
|
+
|
|
8489
|
+
ON_SCHEDULED_INVOICE =
|
|
8490
|
+
T.let(
|
|
8491
|
+
:ON_SCHEDULED_INVOICE,
|
|
8492
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
8493
|
+
)
|
|
8494
|
+
ON_USAGE_INVOICE =
|
|
8495
|
+
T.let(
|
|
8496
|
+
:ON_USAGE_INVOICE,
|
|
8497
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
8498
|
+
)
|
|
8499
|
+
|
|
8500
|
+
sig do
|
|
8501
|
+
override.returns(
|
|
8502
|
+
T::Array[
|
|
8503
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
8504
|
+
]
|
|
8505
|
+
)
|
|
8506
|
+
end
|
|
8507
|
+
def self.values
|
|
8508
|
+
end
|
|
8509
|
+
end
|
|
8510
|
+
end
|
|
8511
|
+
|
|
7800
8512
|
class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
7801
8513
|
OrHash =
|
|
7802
8514
|
T.type_alias do
|