metronome-sdk 3.6.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 +54 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
- data/lib/metronome_sdk/internal/type/enum.rb +0 -25
- data/lib/metronome_sdk/models/commit.rb +36 -1
- data/lib/metronome_sdk/models/contract.rb +140 -1
- data/lib/metronome_sdk/models/contract_v2.rb +457 -8
- data/lib/metronome_sdk/models/contract_without_amendments.rb +320 -5
- 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 +113 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +105 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -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 +46 -5
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +436 -12
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1308 -3
- 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 +394 -11
- data/lib/metronome_sdk/models/v1/package_list_response.rb +374 -8
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +378 -8
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +817 -13
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +4310 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +600 -10
- 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 +71 -2
- 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/resources/v1/packages.rb +6 -5
- data/lib/metronome_sdk/resources/v1.rb +0 -4
- data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -8
- data/rbi/metronome_sdk/models/commit.rbi +61 -0
- data/rbi/metronome_sdk/models/contract.rbi +354 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +1132 -11
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +831 -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 +299 -6
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +287 -6
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
- 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 +81 -6
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1095 -17
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2911 -4
- 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 +1049 -42
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +1051 -54
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +1051 -54
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +2130 -114
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +9749 -4
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1567 -82
- 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 +77 -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/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1.rbi +0 -3
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
- data/sig/metronome_sdk/models/commit.rbs +26 -0
- data/sig/metronome_sdk/models/contract.rbs +151 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +448 -5
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +320 -2
- data/sig/metronome_sdk/models/credit.rbs +7 -0
- data/sig/metronome_sdk/models/override.rbs +7 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
- 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 +26 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +412 -5
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1210 -4
- 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 +386 -5
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +380 -5
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +378 -5
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +751 -14
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4215 -4
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +569 -14
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +14 -0
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +8 -26
- data/lib/metronome_sdk/models/v1/payment.rb +0 -196
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
- data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
- data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
- data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
- data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
- data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
- data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
- data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
|
@@ -286,6 +286,20 @@ module MetronomeSDK
|
|
|
286
286
|
end
|
|
287
287
|
attr_writer :spend_threshold_configuration
|
|
288
288
|
|
|
289
|
+
# Spend trackers attached to this contract.
|
|
290
|
+
sig do
|
|
291
|
+
returns(T.nilable(T::Array[MetronomeSDK::ContractV2::SpendTracker]))
|
|
292
|
+
end
|
|
293
|
+
attr_reader :spend_trackers
|
|
294
|
+
|
|
295
|
+
sig do
|
|
296
|
+
params(
|
|
297
|
+
spend_trackers:
|
|
298
|
+
T::Array[MetronomeSDK::ContractV2::SpendTracker::OrHash]
|
|
299
|
+
).void
|
|
300
|
+
end
|
|
301
|
+
attr_writer :spend_trackers
|
|
302
|
+
|
|
289
303
|
# List of subscriptions on the contract.
|
|
290
304
|
sig do
|
|
291
305
|
returns(T.nilable(T::Array[MetronomeSDK::ContractV2::Subscription]))
|
|
@@ -361,6 +375,8 @@ module MetronomeSDK
|
|
|
361
375
|
MetronomeSDK::ContractV2::ScheduledChargesOnUsageInvoices::OrSymbol,
|
|
362
376
|
spend_threshold_configuration:
|
|
363
377
|
MetronomeSDK::SpendThresholdConfigurationV2::OrHash,
|
|
378
|
+
spend_trackers:
|
|
379
|
+
T::Array[MetronomeSDK::ContractV2::SpendTracker::OrHash],
|
|
364
380
|
subscriptions:
|
|
365
381
|
T::Array[MetronomeSDK::ContractV2::Subscription::OrHash],
|
|
366
382
|
total_contract_value: Float,
|
|
@@ -422,6 +438,8 @@ module MetronomeSDK
|
|
|
422
438
|
# on a separate invoice from usage charges.
|
|
423
439
|
scheduled_charges_on_usage_invoices: nil,
|
|
424
440
|
spend_threshold_configuration: nil,
|
|
441
|
+
# Spend trackers attached to this contract.
|
|
442
|
+
spend_trackers: nil,
|
|
425
443
|
# List of subscriptions on the contract.
|
|
426
444
|
subscriptions: nil,
|
|
427
445
|
total_contract_value: nil,
|
|
@@ -476,6 +494,7 @@ module MetronomeSDK
|
|
|
476
494
|
MetronomeSDK::ContractV2::ScheduledChargesOnUsageInvoices::TaggedSymbol,
|
|
477
495
|
spend_threshold_configuration:
|
|
478
496
|
MetronomeSDK::SpendThresholdConfigurationV2,
|
|
497
|
+
spend_trackers: T::Array[MetronomeSDK::ContractV2::SpendTracker],
|
|
479
498
|
subscriptions: T::Array[MetronomeSDK::ContractV2::Subscription],
|
|
480
499
|
total_contract_value: Float,
|
|
481
500
|
uniqueness_key: String
|
|
@@ -576,6 +595,14 @@ module MetronomeSDK
|
|
|
576
595
|
end
|
|
577
596
|
attr_writer :contract
|
|
578
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
|
+
|
|
579
606
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
580
607
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
581
608
|
attr_reader :custom_fields
|
|
@@ -743,6 +770,22 @@ module MetronomeSDK
|
|
|
743
770
|
end
|
|
744
771
|
attr_writer :specifiers
|
|
745
772
|
|
|
773
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
774
|
+
sig do
|
|
775
|
+
returns(
|
|
776
|
+
T.nilable(MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes)
|
|
777
|
+
)
|
|
778
|
+
end
|
|
779
|
+
attr_reader :spend_tracker_attributes
|
|
780
|
+
|
|
781
|
+
sig do
|
|
782
|
+
params(
|
|
783
|
+
spend_tracker_attributes:
|
|
784
|
+
MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes::OrHash
|
|
785
|
+
).void
|
|
786
|
+
end
|
|
787
|
+
attr_writer :spend_tracker_attributes
|
|
788
|
+
|
|
746
789
|
# Attach a subscription to the recurring commit/credit.
|
|
747
790
|
sig do
|
|
748
791
|
returns(T.nilable(MetronomeSDK::RecurringCommitSubscriptionConfig))
|
|
@@ -770,6 +813,7 @@ module MetronomeSDK
|
|
|
770
813
|
archived_at: Time,
|
|
771
814
|
balance: Float,
|
|
772
815
|
contract: MetronomeSDK::ContractV2::Commit::Contract::OrHash,
|
|
816
|
+
created_by: String,
|
|
773
817
|
custom_fields: T::Hash[Symbol, String],
|
|
774
818
|
description: String,
|
|
775
819
|
hierarchy_configuration:
|
|
@@ -806,6 +850,8 @@ module MetronomeSDK
|
|
|
806
850
|
rollover_fraction: Float,
|
|
807
851
|
salesforce_opportunity_id: String,
|
|
808
852
|
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
|
|
853
|
+
spend_tracker_attributes:
|
|
854
|
+
MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes::OrHash,
|
|
809
855
|
subscription_config:
|
|
810
856
|
MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
|
|
811
857
|
).returns(T.attached_class)
|
|
@@ -837,6 +883,9 @@ module MetronomeSDK
|
|
|
837
883
|
# included in the balance, including future-dated manual ledger entries.
|
|
838
884
|
balance: nil,
|
|
839
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,
|
|
840
889
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
841
890
|
custom_fields: nil,
|
|
842
891
|
description: nil,
|
|
@@ -866,6 +915,8 @@ module MetronomeSDK
|
|
|
866
915
|
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
867
916
|
# specifiers to contribute to a commit's or credit's drawdown.
|
|
868
917
|
specifiers: nil,
|
|
918
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
919
|
+
spend_tracker_attributes: nil,
|
|
869
920
|
# Attach a subscription to the recurring commit/credit.
|
|
870
921
|
subscription_config: nil
|
|
871
922
|
)
|
|
@@ -885,6 +936,7 @@ module MetronomeSDK
|
|
|
885
936
|
archived_at: Time,
|
|
886
937
|
balance: Float,
|
|
887
938
|
contract: MetronomeSDK::ContractV2::Commit::Contract,
|
|
939
|
+
created_by: String,
|
|
888
940
|
custom_fields: T::Hash[Symbol, String],
|
|
889
941
|
description: String,
|
|
890
942
|
hierarchy_configuration:
|
|
@@ -905,6 +957,8 @@ module MetronomeSDK
|
|
|
905
957
|
rollover_fraction: Float,
|
|
906
958
|
salesforce_opportunity_id: String,
|
|
907
959
|
specifiers: T::Array[MetronomeSDK::CommitSpecifier],
|
|
960
|
+
spend_tracker_attributes:
|
|
961
|
+
MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes,
|
|
908
962
|
subscription_config:
|
|
909
963
|
MetronomeSDK::RecurringCommitSubscriptionConfig
|
|
910
964
|
}
|
|
@@ -2337,6 +2391,36 @@ module MetronomeSDK
|
|
|
2337
2391
|
def to_hash
|
|
2338
2392
|
end
|
|
2339
2393
|
end
|
|
2394
|
+
|
|
2395
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
2396
|
+
OrHash =
|
|
2397
|
+
T.type_alias do
|
|
2398
|
+
T.any(
|
|
2399
|
+
MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes,
|
|
2400
|
+
MetronomeSDK::Internal::AnyHash
|
|
2401
|
+
)
|
|
2402
|
+
end
|
|
2403
|
+
|
|
2404
|
+
# If true, this commit is included in spend trackers with discounted set to
|
|
2405
|
+
# DISCOUNTED_ONLY
|
|
2406
|
+
sig { returns(T::Boolean) }
|
|
2407
|
+
attr_accessor :counts_as_discounted
|
|
2408
|
+
|
|
2409
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
2410
|
+
sig do
|
|
2411
|
+
params(counts_as_discounted: T::Boolean).returns(T.attached_class)
|
|
2412
|
+
end
|
|
2413
|
+
def self.new(
|
|
2414
|
+
# If true, this commit is included in spend trackers with discounted set to
|
|
2415
|
+
# DISCOUNTED_ONLY
|
|
2416
|
+
counts_as_discounted:
|
|
2417
|
+
)
|
|
2418
|
+
end
|
|
2419
|
+
|
|
2420
|
+
sig { override.returns({ counts_as_discounted: T::Boolean }) }
|
|
2421
|
+
def to_hash
|
|
2422
|
+
end
|
|
2423
|
+
end
|
|
2340
2424
|
end
|
|
2341
2425
|
|
|
2342
2426
|
class Override < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2547,6 +2631,12 @@ module MetronomeSDK
|
|
|
2547
2631
|
)
|
|
2548
2632
|
end
|
|
2549
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
|
+
|
|
2550
2640
|
sig do
|
|
2551
2641
|
returns(
|
|
2552
2642
|
T.nilable(
|
|
@@ -2606,6 +2696,7 @@ module MetronomeSDK
|
|
|
2606
2696
|
|
|
2607
2697
|
sig do
|
|
2608
2698
|
params(
|
|
2699
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2609
2700
|
billing_frequency:
|
|
2610
2701
|
MetronomeSDK::ContractV2::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
2611
2702
|
commit_ids: T::Array[String],
|
|
@@ -2617,6 +2708,7 @@ module MetronomeSDK
|
|
|
2617
2708
|
).returns(T.attached_class)
|
|
2618
2709
|
end
|
|
2619
2710
|
def self.new(
|
|
2711
|
+
any_commit_or_credit_ids: nil,
|
|
2620
2712
|
billing_frequency: nil,
|
|
2621
2713
|
commit_ids: nil,
|
|
2622
2714
|
presentation_group_values: nil,
|
|
@@ -2630,6 +2722,7 @@ module MetronomeSDK
|
|
|
2630
2722
|
sig do
|
|
2631
2723
|
override.returns(
|
|
2632
2724
|
{
|
|
2725
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
2633
2726
|
billing_frequency:
|
|
2634
2727
|
MetronomeSDK::ContractV2::Override::OverrideSpecifier::BillingFrequency::TaggedSymbol,
|
|
2635
2728
|
commit_ids: T::Array[String],
|
|
@@ -3257,6 +3350,14 @@ module MetronomeSDK
|
|
|
3257
3350
|
sig { params(created_at: Time).void }
|
|
3258
3351
|
attr_writer :created_at
|
|
3259
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
|
+
|
|
3260
3361
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3261
3362
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
3262
3363
|
attr_reader :custom_fields
|
|
@@ -3400,6 +3501,7 @@ module MetronomeSDK
|
|
|
3400
3501
|
balance: Float,
|
|
3401
3502
|
contract: MetronomeSDK::ContractV2::Credit::Contract::OrHash,
|
|
3402
3503
|
created_at: Time,
|
|
3504
|
+
created_by: String,
|
|
3403
3505
|
custom_fields: T::Hash[Symbol, String],
|
|
3404
3506
|
description: String,
|
|
3405
3507
|
hierarchy_configuration:
|
|
@@ -3454,6 +3556,9 @@ module MetronomeSDK
|
|
|
3454
3556
|
# - Recurring credits: latter of credit service period date and parent credit
|
|
3455
3557
|
# start date
|
|
3456
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,
|
|
3457
3562
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3458
3563
|
custom_fields: nil,
|
|
3459
3564
|
description: nil,
|
|
@@ -3496,6 +3601,7 @@ module MetronomeSDK
|
|
|
3496
3601
|
balance: Float,
|
|
3497
3602
|
contract: MetronomeSDK::ContractV2::Credit::Contract,
|
|
3498
3603
|
created_at: Time,
|
|
3604
|
+
created_by: String,
|
|
3499
3605
|
custom_fields: T::Hash[Symbol, String],
|
|
3500
3606
|
description: String,
|
|
3501
3607
|
hierarchy_configuration:
|
|
@@ -5232,6 +5338,26 @@ module MetronomeSDK
|
|
|
5232
5338
|
end
|
|
5233
5339
|
attr_writer :proration
|
|
5234
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
|
+
|
|
5235
5361
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5236
5362
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5237
5363
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5316,6 +5442,10 @@ module MetronomeSDK
|
|
|
5316
5442
|
netsuite_sales_order_id: String,
|
|
5317
5443
|
proration:
|
|
5318
5444
|
MetronomeSDK::ContractV2::RecurringCommit::Proration::OrSymbol,
|
|
5445
|
+
proration_rounding:
|
|
5446
|
+
T.nilable(
|
|
5447
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::OrHash
|
|
5448
|
+
),
|
|
5319
5449
|
recurrence_frequency:
|
|
5320
5450
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
|
5321
5451
|
rollover_fraction: Float,
|
|
@@ -5357,6 +5487,8 @@ module MetronomeSDK
|
|
|
5357
5487
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
5358
5488
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
5359
5489
|
proration: nil,
|
|
5490
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
5491
|
+
proration_rounding: nil,
|
|
5360
5492
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5361
5493
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5362
5494
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5402,6 +5534,10 @@ module MetronomeSDK
|
|
|
5402
5534
|
netsuite_sales_order_id: String,
|
|
5403
5535
|
proration:
|
|
5404
5536
|
MetronomeSDK::ContractV2::RecurringCommit::Proration::TaggedSymbol,
|
|
5537
|
+
proration_rounding:
|
|
5538
|
+
T.nilable(
|
|
5539
|
+
MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding
|
|
5540
|
+
),
|
|
5405
5541
|
recurrence_frequency:
|
|
5406
5542
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
|
|
5407
5543
|
rollover_fraction: Float,
|
|
@@ -5698,6 +5834,255 @@ module MetronomeSDK
|
|
|
5698
5834
|
end
|
|
5699
5835
|
end
|
|
5700
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
|
+
|
|
5701
6086
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5702
6087
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5703
6088
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5735,6 +6120,11 @@ module MetronomeSDK
|
|
|
5735
6120
|
:WEEKLY,
|
|
5736
6121
|
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
5737
6122
|
)
|
|
6123
|
+
DAILY =
|
|
6124
|
+
T.let(
|
|
6125
|
+
:DAILY,
|
|
6126
|
+
MetronomeSDK::ContractV2::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
6127
|
+
)
|
|
5738
6128
|
|
|
5739
6129
|
sig do
|
|
5740
6130
|
override.returns(
|
|
@@ -5900,6 +6290,26 @@ module MetronomeSDK
|
|
|
5900
6290
|
end
|
|
5901
6291
|
attr_writer :proration
|
|
5902
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
|
+
|
|
5903
6313
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
5904
6314
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
5905
6315
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -5982,6 +6392,10 @@ module MetronomeSDK
|
|
|
5982
6392
|
netsuite_sales_order_id: String,
|
|
5983
6393
|
proration:
|
|
5984
6394
|
MetronomeSDK::ContractV2::RecurringCredit::Proration::OrSymbol,
|
|
6395
|
+
proration_rounding:
|
|
6396
|
+
T.nilable(
|
|
6397
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::OrHash
|
|
6398
|
+
),
|
|
5985
6399
|
recurrence_frequency:
|
|
5986
6400
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
|
5987
6401
|
rollover_fraction: Float,
|
|
@@ -6021,6 +6435,8 @@ module MetronomeSDK
|
|
|
6021
6435
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
6022
6436
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
6023
6437
|
proration: nil,
|
|
6438
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
6439
|
+
proration_rounding: nil,
|
|
6024
6440
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
6025
6441
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
6026
6442
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -6064,6 +6480,10 @@ module MetronomeSDK
|
|
|
6064
6480
|
netsuite_sales_order_id: String,
|
|
6065
6481
|
proration:
|
|
6066
6482
|
MetronomeSDK::ContractV2::RecurringCredit::Proration::TaggedSymbol,
|
|
6483
|
+
proration_rounding:
|
|
6484
|
+
T.nilable(
|
|
6485
|
+
MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding
|
|
6486
|
+
),
|
|
6067
6487
|
recurrence_frequency:
|
|
6068
6488
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
|
|
6069
6489
|
rollover_fraction: Float,
|
|
@@ -6322,14 +6742,152 @@ module MetronomeSDK
|
|
|
6322
6742
|
end
|
|
6323
6743
|
end
|
|
6324
6744
|
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
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
|
+
|
|
6883
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
6884
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
6885
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
6886
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
6887
|
+
# invoice dates.
|
|
6888
|
+
module RecurrenceFrequency
|
|
6889
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6890
|
+
|
|
6333
6891
|
TaggedSymbol =
|
|
6334
6892
|
T.type_alias do
|
|
6335
6893
|
T.all(
|
|
@@ -6359,6 +6917,11 @@ module MetronomeSDK
|
|
|
6359
6917
|
:WEEKLY,
|
|
6360
6918
|
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
6361
6919
|
)
|
|
6920
|
+
DAILY =
|
|
6921
|
+
T.let(
|
|
6922
|
+
:DAILY,
|
|
6923
|
+
MetronomeSDK::ContractV2::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
6924
|
+
)
|
|
6362
6925
|
|
|
6363
6926
|
sig do
|
|
6364
6927
|
override.returns(
|
|
@@ -6680,6 +7243,344 @@ module MetronomeSDK
|
|
|
6680
7243
|
end
|
|
6681
7244
|
end
|
|
6682
7245
|
|
|
7246
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
7247
|
+
OrHash =
|
|
7248
|
+
T.type_alias do
|
|
7249
|
+
T.any(
|
|
7250
|
+
MetronomeSDK::ContractV2::SpendTracker,
|
|
7251
|
+
MetronomeSDK::Internal::AnyHash
|
|
7252
|
+
)
|
|
7253
|
+
end
|
|
7254
|
+
|
|
7255
|
+
# Human-readable identifier, unique per contract.
|
|
7256
|
+
sig { returns(String) }
|
|
7257
|
+
attr_accessor :alias_
|
|
7258
|
+
|
|
7259
|
+
sig do
|
|
7260
|
+
returns(
|
|
7261
|
+
T::Array[
|
|
7262
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier
|
|
7263
|
+
]
|
|
7264
|
+
)
|
|
7265
|
+
end
|
|
7266
|
+
attr_accessor :applicable_spend_specifiers
|
|
7267
|
+
|
|
7268
|
+
sig { returns(String) }
|
|
7269
|
+
attr_accessor :credit_type_id
|
|
7270
|
+
|
|
7271
|
+
sig do
|
|
7272
|
+
returns(
|
|
7273
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency::TaggedSymbol
|
|
7274
|
+
)
|
|
7275
|
+
end
|
|
7276
|
+
attr_accessor :reset_frequency
|
|
7277
|
+
|
|
7278
|
+
sig do
|
|
7279
|
+
returns(
|
|
7280
|
+
T.nilable(MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend)
|
|
7281
|
+
)
|
|
7282
|
+
end
|
|
7283
|
+
attr_reader :accumulated_spend
|
|
7284
|
+
|
|
7285
|
+
sig do
|
|
7286
|
+
params(
|
|
7287
|
+
accumulated_spend:
|
|
7288
|
+
MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend::OrHash
|
|
7289
|
+
).void
|
|
7290
|
+
end
|
|
7291
|
+
attr_writer :accumulated_spend
|
|
7292
|
+
|
|
7293
|
+
sig do
|
|
7294
|
+
params(
|
|
7295
|
+
alias_: String,
|
|
7296
|
+
applicable_spend_specifiers:
|
|
7297
|
+
T::Array[
|
|
7298
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::OrHash
|
|
7299
|
+
],
|
|
7300
|
+
credit_type_id: String,
|
|
7301
|
+
reset_frequency:
|
|
7302
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency::OrSymbol,
|
|
7303
|
+
accumulated_spend:
|
|
7304
|
+
MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend::OrHash
|
|
7305
|
+
).returns(T.attached_class)
|
|
7306
|
+
end
|
|
7307
|
+
def self.new(
|
|
7308
|
+
# Human-readable identifier, unique per contract.
|
|
7309
|
+
alias_:,
|
|
7310
|
+
applicable_spend_specifiers:,
|
|
7311
|
+
credit_type_id:,
|
|
7312
|
+
reset_frequency:,
|
|
7313
|
+
accumulated_spend: nil
|
|
7314
|
+
)
|
|
7315
|
+
end
|
|
7316
|
+
|
|
7317
|
+
sig do
|
|
7318
|
+
override.returns(
|
|
7319
|
+
{
|
|
7320
|
+
alias_: String,
|
|
7321
|
+
applicable_spend_specifiers:
|
|
7322
|
+
T::Array[
|
|
7323
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier
|
|
7324
|
+
],
|
|
7325
|
+
credit_type_id: String,
|
|
7326
|
+
reset_frequency:
|
|
7327
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency::TaggedSymbol,
|
|
7328
|
+
accumulated_spend:
|
|
7329
|
+
MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend
|
|
7330
|
+
}
|
|
7331
|
+
)
|
|
7332
|
+
end
|
|
7333
|
+
def to_hash
|
|
7334
|
+
end
|
|
7335
|
+
|
|
7336
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
7337
|
+
OrHash =
|
|
7338
|
+
T.type_alias do
|
|
7339
|
+
T.any(
|
|
7340
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier,
|
|
7341
|
+
MetronomeSDK::Internal::AnyHash
|
|
7342
|
+
)
|
|
7343
|
+
end
|
|
7344
|
+
|
|
7345
|
+
sig do
|
|
7346
|
+
returns(
|
|
7347
|
+
T::Array[
|
|
7348
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
7349
|
+
]
|
|
7350
|
+
)
|
|
7351
|
+
end
|
|
7352
|
+
attr_accessor :sources
|
|
7353
|
+
|
|
7354
|
+
sig do
|
|
7355
|
+
returns(
|
|
7356
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
7357
|
+
)
|
|
7358
|
+
end
|
|
7359
|
+
attr_accessor :spend_type
|
|
7360
|
+
|
|
7361
|
+
sig do
|
|
7362
|
+
returns(
|
|
7363
|
+
T.nilable(
|
|
7364
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7365
|
+
)
|
|
7366
|
+
)
|
|
7367
|
+
end
|
|
7368
|
+
attr_reader :discounted
|
|
7369
|
+
|
|
7370
|
+
sig do
|
|
7371
|
+
params(
|
|
7372
|
+
discounted:
|
|
7373
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
7374
|
+
).void
|
|
7375
|
+
end
|
|
7376
|
+
attr_writer :discounted
|
|
7377
|
+
|
|
7378
|
+
sig do
|
|
7379
|
+
params(
|
|
7380
|
+
sources:
|
|
7381
|
+
T::Array[
|
|
7382
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::OrSymbol
|
|
7383
|
+
],
|
|
7384
|
+
spend_type:
|
|
7385
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType::OrSymbol,
|
|
7386
|
+
discounted:
|
|
7387
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
7388
|
+
).returns(T.attached_class)
|
|
7389
|
+
end
|
|
7390
|
+
def self.new(sources:, spend_type:, discounted: nil)
|
|
7391
|
+
end
|
|
7392
|
+
|
|
7393
|
+
sig do
|
|
7394
|
+
override.returns(
|
|
7395
|
+
{
|
|
7396
|
+
sources:
|
|
7397
|
+
T::Array[
|
|
7398
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
7399
|
+
],
|
|
7400
|
+
spend_type:
|
|
7401
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol,
|
|
7402
|
+
discounted:
|
|
7403
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7404
|
+
}
|
|
7405
|
+
)
|
|
7406
|
+
end
|
|
7407
|
+
def to_hash
|
|
7408
|
+
end
|
|
7409
|
+
|
|
7410
|
+
module Source
|
|
7411
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7412
|
+
|
|
7413
|
+
TaggedSymbol =
|
|
7414
|
+
T.type_alias do
|
|
7415
|
+
T.all(
|
|
7416
|
+
Symbol,
|
|
7417
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source
|
|
7418
|
+
)
|
|
7419
|
+
end
|
|
7420
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7421
|
+
|
|
7422
|
+
THRESHOLD_RECHARGE =
|
|
7423
|
+
T.let(
|
|
7424
|
+
:THRESHOLD_RECHARGE,
|
|
7425
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
7426
|
+
)
|
|
7427
|
+
MANUAL =
|
|
7428
|
+
T.let(
|
|
7429
|
+
:MANUAL,
|
|
7430
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
7431
|
+
)
|
|
7432
|
+
|
|
7433
|
+
sig do
|
|
7434
|
+
override.returns(
|
|
7435
|
+
T::Array[
|
|
7436
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
7437
|
+
]
|
|
7438
|
+
)
|
|
7439
|
+
end
|
|
7440
|
+
def self.values
|
|
7441
|
+
end
|
|
7442
|
+
end
|
|
7443
|
+
|
|
7444
|
+
module SpendType
|
|
7445
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7446
|
+
|
|
7447
|
+
TaggedSymbol =
|
|
7448
|
+
T.type_alias do
|
|
7449
|
+
T.all(
|
|
7450
|
+
Symbol,
|
|
7451
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType
|
|
7452
|
+
)
|
|
7453
|
+
end
|
|
7454
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7455
|
+
|
|
7456
|
+
COMMIT_PURCHASE =
|
|
7457
|
+
T.let(
|
|
7458
|
+
:COMMIT_PURCHASE,
|
|
7459
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
7460
|
+
)
|
|
7461
|
+
|
|
7462
|
+
sig do
|
|
7463
|
+
override.returns(
|
|
7464
|
+
T::Array[
|
|
7465
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
7466
|
+
]
|
|
7467
|
+
)
|
|
7468
|
+
end
|
|
7469
|
+
def self.values
|
|
7470
|
+
end
|
|
7471
|
+
end
|
|
7472
|
+
|
|
7473
|
+
module Discounted
|
|
7474
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7475
|
+
|
|
7476
|
+
TaggedSymbol =
|
|
7477
|
+
T.type_alias do
|
|
7478
|
+
T.all(
|
|
7479
|
+
Symbol,
|
|
7480
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted
|
|
7481
|
+
)
|
|
7482
|
+
end
|
|
7483
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7484
|
+
|
|
7485
|
+
ANY =
|
|
7486
|
+
T.let(
|
|
7487
|
+
:ANY,
|
|
7488
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7489
|
+
)
|
|
7490
|
+
DISCOUNTED_ONLY =
|
|
7491
|
+
T.let(
|
|
7492
|
+
:DISCOUNTED_ONLY,
|
|
7493
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7494
|
+
)
|
|
7495
|
+
UNDISCOUNTED_ONLY =
|
|
7496
|
+
T.let(
|
|
7497
|
+
:UNDISCOUNTED_ONLY,
|
|
7498
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7499
|
+
)
|
|
7500
|
+
|
|
7501
|
+
sig do
|
|
7502
|
+
override.returns(
|
|
7503
|
+
T::Array[
|
|
7504
|
+
MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7505
|
+
]
|
|
7506
|
+
)
|
|
7507
|
+
end
|
|
7508
|
+
def self.values
|
|
7509
|
+
end
|
|
7510
|
+
end
|
|
7511
|
+
end
|
|
7512
|
+
|
|
7513
|
+
module ResetFrequency
|
|
7514
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7515
|
+
|
|
7516
|
+
TaggedSymbol =
|
|
7517
|
+
T.type_alias do
|
|
7518
|
+
T.all(
|
|
7519
|
+
Symbol,
|
|
7520
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency
|
|
7521
|
+
)
|
|
7522
|
+
end
|
|
7523
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7524
|
+
|
|
7525
|
+
BILLING_PERIOD =
|
|
7526
|
+
T.let(
|
|
7527
|
+
:BILLING_PERIOD,
|
|
7528
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency::TaggedSymbol
|
|
7529
|
+
)
|
|
7530
|
+
|
|
7531
|
+
sig do
|
|
7532
|
+
override.returns(
|
|
7533
|
+
T::Array[
|
|
7534
|
+
MetronomeSDK::ContractV2::SpendTracker::ResetFrequency::TaggedSymbol
|
|
7535
|
+
]
|
|
7536
|
+
)
|
|
7537
|
+
end
|
|
7538
|
+
def self.values
|
|
7539
|
+
end
|
|
7540
|
+
end
|
|
7541
|
+
|
|
7542
|
+
class AccumulatedSpend < MetronomeSDK::Internal::Type::BaseModel
|
|
7543
|
+
OrHash =
|
|
7544
|
+
T.type_alias do
|
|
7545
|
+
T.any(
|
|
7546
|
+
MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend,
|
|
7547
|
+
MetronomeSDK::Internal::AnyHash
|
|
7548
|
+
)
|
|
7549
|
+
end
|
|
7550
|
+
|
|
7551
|
+
sig { returns(Float) }
|
|
7552
|
+
attr_accessor :amount
|
|
7553
|
+
|
|
7554
|
+
sig { returns(Time) }
|
|
7555
|
+
attr_accessor :period_ending_before
|
|
7556
|
+
|
|
7557
|
+
sig { returns(Time) }
|
|
7558
|
+
attr_accessor :period_starting_at
|
|
7559
|
+
|
|
7560
|
+
sig do
|
|
7561
|
+
params(
|
|
7562
|
+
amount: Float,
|
|
7563
|
+
period_ending_before: Time,
|
|
7564
|
+
period_starting_at: Time
|
|
7565
|
+
).returns(T.attached_class)
|
|
7566
|
+
end
|
|
7567
|
+
def self.new(amount:, period_ending_before:, period_starting_at:)
|
|
7568
|
+
end
|
|
7569
|
+
|
|
7570
|
+
sig do
|
|
7571
|
+
override.returns(
|
|
7572
|
+
{
|
|
7573
|
+
amount: Float,
|
|
7574
|
+
period_ending_before: Time,
|
|
7575
|
+
period_starting_at: Time
|
|
7576
|
+
}
|
|
7577
|
+
)
|
|
7578
|
+
end
|
|
7579
|
+
def to_hash
|
|
7580
|
+
end
|
|
7581
|
+
end
|
|
7582
|
+
end
|
|
7583
|
+
|
|
6683
7584
|
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
|
6684
7585
|
OrHash =
|
|
6685
7586
|
T.type_alias do
|
|
@@ -6765,6 +7666,23 @@ module MetronomeSDK
|
|
|
6765
7666
|
sig { params(id: String).void }
|
|
6766
7667
|
attr_writer :id
|
|
6767
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
|
+
|
|
6768
7686
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6769
7687
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
6770
7688
|
attr_reader :custom_fields
|
|
@@ -6827,6 +7745,8 @@ module MetronomeSDK
|
|
|
6827
7745
|
subscription_rate:
|
|
6828
7746
|
MetronomeSDK::ContractV2::Subscription::SubscriptionRate::OrHash,
|
|
6829
7747
|
id: String,
|
|
7748
|
+
billing_cycle_config:
|
|
7749
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::OrHash,
|
|
6830
7750
|
custom_fields: T::Hash[Symbol, String],
|
|
6831
7751
|
description: String,
|
|
6832
7752
|
ending_before: Time,
|
|
@@ -6857,6 +7777,7 @@ module MetronomeSDK
|
|
|
6857
7777
|
starting_at:,
|
|
6858
7778
|
subscription_rate:,
|
|
6859
7779
|
id: nil,
|
|
7780
|
+
billing_cycle_config: nil,
|
|
6860
7781
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6861
7782
|
custom_fields: nil,
|
|
6862
7783
|
description: nil,
|
|
@@ -6885,6 +7806,8 @@ module MetronomeSDK
|
|
|
6885
7806
|
subscription_rate:
|
|
6886
7807
|
MetronomeSDK::ContractV2::Subscription::SubscriptionRate,
|
|
6887
7808
|
id: String,
|
|
7809
|
+
billing_cycle_config:
|
|
7810
|
+
MetronomeSDK::ContractV2::Subscription::BillingCycleConfig,
|
|
6888
7811
|
custom_fields: T::Hash[Symbol, String],
|
|
6889
7812
|
description: String,
|
|
6890
7813
|
ending_before: Time,
|
|
@@ -7124,14 +8047,33 @@ module MetronomeSDK
|
|
|
7124
8047
|
sig { returns(T::Boolean) }
|
|
7125
8048
|
attr_accessor :is_prorated
|
|
7126
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
|
+
|
|
7127
8067
|
sig do
|
|
7128
8068
|
params(
|
|
7129
8069
|
invoice_behavior:
|
|
7130
8070
|
MetronomeSDK::ContractV2::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
7131
|
-
is_prorated: T::Boolean
|
|
8071
|
+
is_prorated: T::Boolean,
|
|
8072
|
+
rounding:
|
|
8073
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding::OrHash
|
|
7132
8074
|
).returns(T.attached_class)
|
|
7133
8075
|
end
|
|
7134
|
-
def self.new(invoice_behavior:, is_prorated:)
|
|
8076
|
+
def self.new(invoice_behavior:, is_prorated:, rounding: nil)
|
|
7135
8077
|
end
|
|
7136
8078
|
|
|
7137
8079
|
sig do
|
|
@@ -7139,7 +8081,9 @@ module MetronomeSDK
|
|
|
7139
8081
|
{
|
|
7140
8082
|
invoice_behavior:
|
|
7141
8083
|
MetronomeSDK::ContractV2::Subscription::Proration::InvoiceBehavior::TaggedSymbol,
|
|
7142
|
-
is_prorated: T::Boolean
|
|
8084
|
+
is_prorated: T::Boolean,
|
|
8085
|
+
rounding:
|
|
8086
|
+
MetronomeSDK::ContractV2::Subscription::Proration::Rounding
|
|
7143
8087
|
}
|
|
7144
8088
|
)
|
|
7145
8089
|
end
|
|
@@ -7179,6 +8123,96 @@ module MetronomeSDK
|
|
|
7179
8123
|
def self.values
|
|
7180
8124
|
end
|
|
7181
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
|
|
7182
8216
|
end
|
|
7183
8217
|
|
|
7184
8218
|
# Determines how the subscription's quantity is controlled. Defaults to
|
|
@@ -7388,6 +8422,93 @@ module MetronomeSDK
|
|
|
7388
8422
|
end
|
|
7389
8423
|
end
|
|
7390
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
|
+
|
|
7391
8512
|
class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
7392
8513
|
OrHash =
|
|
7393
8514
|
T.type_alias do
|