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
|
@@ -379,6 +379,27 @@ module MetronomeSDK
|
|
|
379
379
|
end
|
|
380
380
|
attr_writer :spend_threshold_configuration
|
|
381
381
|
|
|
382
|
+
# Spend trackers to attach to this contract. Aliases must be unique within a
|
|
383
|
+
# contract.
|
|
384
|
+
sig do
|
|
385
|
+
returns(
|
|
386
|
+
T.nilable(
|
|
387
|
+
T::Array[MetronomeSDK::V1::ContractCreateParams::SpendTracker]
|
|
388
|
+
)
|
|
389
|
+
)
|
|
390
|
+
end
|
|
391
|
+
attr_reader :spend_trackers
|
|
392
|
+
|
|
393
|
+
sig do
|
|
394
|
+
params(
|
|
395
|
+
spend_trackers:
|
|
396
|
+
T::Array[
|
|
397
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::OrHash
|
|
398
|
+
]
|
|
399
|
+
).void
|
|
400
|
+
end
|
|
401
|
+
attr_writer :spend_trackers
|
|
402
|
+
|
|
382
403
|
# Optional list of
|
|
383
404
|
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
384
405
|
# to add to the contract.
|
|
@@ -513,6 +534,10 @@ module MetronomeSDK
|
|
|
513
534
|
MetronomeSDK::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices::OrSymbol,
|
|
514
535
|
spend_threshold_configuration:
|
|
515
536
|
MetronomeSDK::SpendThresholdConfiguration::OrHash,
|
|
537
|
+
spend_trackers:
|
|
538
|
+
T::Array[
|
|
539
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::OrHash
|
|
540
|
+
],
|
|
516
541
|
subscriptions:
|
|
517
542
|
T::Array[
|
|
518
543
|
MetronomeSDK::V1::ContractCreateParams::Subscription::OrHash
|
|
@@ -584,6 +609,9 @@ module MetronomeSDK
|
|
|
584
609
|
# on a separate invoice from usage charges.
|
|
585
610
|
scheduled_charges_on_usage_invoices: nil,
|
|
586
611
|
spend_threshold_configuration: nil,
|
|
612
|
+
# Spend trackers to attach to this contract. Aliases must be unique within a
|
|
613
|
+
# contract.
|
|
614
|
+
spend_trackers: nil,
|
|
587
615
|
# Optional list of
|
|
588
616
|
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
589
617
|
# to add to the contract.
|
|
@@ -656,6 +684,8 @@ module MetronomeSDK
|
|
|
656
684
|
MetronomeSDK::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices::OrSymbol,
|
|
657
685
|
spend_threshold_configuration:
|
|
658
686
|
MetronomeSDK::SpendThresholdConfiguration,
|
|
687
|
+
spend_trackers:
|
|
688
|
+
T::Array[MetronomeSDK::V1::ContractCreateParams::SpendTracker],
|
|
659
689
|
subscriptions:
|
|
660
690
|
T::Array[MetronomeSDK::V1::ContractCreateParams::Subscription],
|
|
661
691
|
total_contract_value: Float,
|
|
@@ -1031,6 +1061,24 @@ module MetronomeSDK
|
|
|
1031
1061
|
end
|
|
1032
1062
|
attr_writer :specifiers
|
|
1033
1063
|
|
|
1064
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
1065
|
+
sig do
|
|
1066
|
+
returns(
|
|
1067
|
+
T.nilable(
|
|
1068
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes
|
|
1069
|
+
)
|
|
1070
|
+
)
|
|
1071
|
+
end
|
|
1072
|
+
attr_reader :spend_tracker_attributes
|
|
1073
|
+
|
|
1074
|
+
sig do
|
|
1075
|
+
params(
|
|
1076
|
+
spend_tracker_attributes:
|
|
1077
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes::OrHash
|
|
1078
|
+
).void
|
|
1079
|
+
end
|
|
1080
|
+
attr_writer :spend_tracker_attributes
|
|
1081
|
+
|
|
1034
1082
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
1035
1083
|
# commit specific overrides.
|
|
1036
1084
|
sig { returns(T.nilable(String)) }
|
|
@@ -1062,6 +1110,8 @@ module MetronomeSDK
|
|
|
1062
1110
|
MetronomeSDK::V1::ContractCreateParams::Commit::RateType::OrSymbol,
|
|
1063
1111
|
rollover_fraction: Float,
|
|
1064
1112
|
specifiers: T::Array[MetronomeSDK::CommitSpecifierInput::OrHash],
|
|
1113
|
+
spend_tracker_attributes:
|
|
1114
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes::OrHash,
|
|
1065
1115
|
temporary_id: String
|
|
1066
1116
|
).returns(T.attached_class)
|
|
1067
1117
|
end
|
|
@@ -1108,6 +1158,8 @@ module MetronomeSDK
|
|
|
1108
1158
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1109
1159
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1110
1160
|
specifiers: nil,
|
|
1161
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
1162
|
+
spend_tracker_attributes: nil,
|
|
1111
1163
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
1112
1164
|
# commit specific overrides.
|
|
1113
1165
|
temporary_id: nil
|
|
@@ -1138,6 +1190,8 @@ module MetronomeSDK
|
|
|
1138
1190
|
MetronomeSDK::V1::ContractCreateParams::Commit::RateType::OrSymbol,
|
|
1139
1191
|
rollover_fraction: Float,
|
|
1140
1192
|
specifiers: T::Array[MetronomeSDK::CommitSpecifierInput],
|
|
1193
|
+
spend_tracker_attributes:
|
|
1194
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes,
|
|
1141
1195
|
temporary_id: String
|
|
1142
1196
|
}
|
|
1143
1197
|
)
|
|
@@ -1709,6 +1763,36 @@ module MetronomeSDK
|
|
|
1709
1763
|
def self.values
|
|
1710
1764
|
end
|
|
1711
1765
|
end
|
|
1766
|
+
|
|
1767
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
1768
|
+
OrHash =
|
|
1769
|
+
T.type_alias do
|
|
1770
|
+
T.any(
|
|
1771
|
+
MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes,
|
|
1772
|
+
MetronomeSDK::Internal::AnyHash
|
|
1773
|
+
)
|
|
1774
|
+
end
|
|
1775
|
+
|
|
1776
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
1777
|
+
# DISCOUNTED_ONLY
|
|
1778
|
+
sig { returns(T::Boolean) }
|
|
1779
|
+
attr_accessor :counts_as_discounted
|
|
1780
|
+
|
|
1781
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
1782
|
+
sig do
|
|
1783
|
+
params(counts_as_discounted: T::Boolean).returns(T.attached_class)
|
|
1784
|
+
end
|
|
1785
|
+
def self.new(
|
|
1786
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
1787
|
+
# DISCOUNTED_ONLY
|
|
1788
|
+
counts_as_discounted:
|
|
1789
|
+
)
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
sig { override.returns({ counts_as_discounted: T::Boolean }) }
|
|
1793
|
+
def to_hash
|
|
1794
|
+
end
|
|
1795
|
+
end
|
|
1712
1796
|
end
|
|
1713
1797
|
|
|
1714
1798
|
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2964,9 +3048,10 @@ module MetronomeSDK
|
|
|
2964
3048
|
attr_writer :entitled
|
|
2965
3049
|
|
|
2966
3050
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
2967
|
-
# `false`. If `true
|
|
2968
|
-
# passing `commit_ids
|
|
2969
|
-
#
|
|
3051
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
3052
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
3053
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
3054
|
+
# any prepaid commit, postpaid commit, or credit
|
|
2970
3055
|
sig { returns(T.nilable(T::Boolean)) }
|
|
2971
3056
|
attr_reader :is_commit_specific
|
|
2972
3057
|
|
|
@@ -3133,9 +3218,10 @@ module MetronomeSDK
|
|
|
3133
3218
|
ending_before: nil,
|
|
3134
3219
|
entitled: nil,
|
|
3135
3220
|
# Indicates whether the override should only apply to commits. Defaults to
|
|
3136
|
-
# `false`. If `true
|
|
3137
|
-
# passing `commit_ids
|
|
3138
|
-
#
|
|
3221
|
+
# `false`. If `true` you can specify relevant commits in `override_specifiers` by
|
|
3222
|
+
# passing `commit_ids`, `recurring_commit_ids`, or `any_commit_or_credit_ids`. If
|
|
3223
|
+
# you do not specify any of these fields, the override will apply when consuming
|
|
3224
|
+
# any prepaid commit, postpaid commit, or credit
|
|
3139
3225
|
is_commit_specific: nil,
|
|
3140
3226
|
# Required for MULTIPLIER type. Must be >=0.
|
|
3141
3227
|
multiplier: nil,
|
|
@@ -3203,6 +3289,17 @@ module MetronomeSDK
|
|
|
3203
3289
|
)
|
|
3204
3290
|
end
|
|
3205
3291
|
|
|
3292
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3293
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3294
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3295
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3296
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
3297
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
3298
|
+
attr_reader :any_commit_or_credit_ids
|
|
3299
|
+
|
|
3300
|
+
sig { params(any_commit_or_credit_ids: T::Array[String]).void }
|
|
3301
|
+
attr_writer :any_commit_or_credit_ids
|
|
3302
|
+
|
|
3206
3303
|
sig do
|
|
3207
3304
|
returns(
|
|
3208
3305
|
T.nilable(
|
|
@@ -3275,6 +3372,7 @@ module MetronomeSDK
|
|
|
3275
3372
|
|
|
3276
3373
|
sig do
|
|
3277
3374
|
params(
|
|
3375
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
3278
3376
|
billing_frequency:
|
|
3279
3377
|
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
3280
3378
|
commit_ids: T::Array[String],
|
|
@@ -3286,6 +3384,12 @@ module MetronomeSDK
|
|
|
3286
3384
|
).returns(T.attached_class)
|
|
3287
3385
|
end
|
|
3288
3386
|
def self.new(
|
|
3387
|
+
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3388
|
+
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
3389
|
+
# `presentation_group_values`. Must be used instead of both `commit_ids` and
|
|
3390
|
+
# `recurring_commit_ids` If provided, the override will apply to any specified
|
|
3391
|
+
# commit, credit, recurring commit or recurring credit IDs.
|
|
3392
|
+
any_commit_or_credit_ids: nil,
|
|
3289
3393
|
billing_frequency: nil,
|
|
3290
3394
|
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3291
3395
|
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
@@ -3314,6 +3418,7 @@ module MetronomeSDK
|
|
|
3314
3418
|
sig do
|
|
3315
3419
|
override.returns(
|
|
3316
3420
|
{
|
|
3421
|
+
any_commit_or_credit_ids: T::Array[String],
|
|
3317
3422
|
billing_frequency:
|
|
3318
3423
|
MetronomeSDK::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency::OrSymbol,
|
|
3319
3424
|
commit_ids: T::Array[String],
|
|
@@ -3881,6 +3986,24 @@ module MetronomeSDK
|
|
|
3881
3986
|
end
|
|
3882
3987
|
attr_writer :proration
|
|
3883
3988
|
|
|
3989
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
3990
|
+
sig do
|
|
3991
|
+
returns(
|
|
3992
|
+
T.nilable(
|
|
3993
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding
|
|
3994
|
+
)
|
|
3995
|
+
)
|
|
3996
|
+
end
|
|
3997
|
+
attr_reader :proration_rounding
|
|
3998
|
+
|
|
3999
|
+
sig do
|
|
4000
|
+
params(
|
|
4001
|
+
proration_rounding:
|
|
4002
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::OrHash
|
|
4003
|
+
).void
|
|
4004
|
+
end
|
|
4005
|
+
attr_writer :proration_rounding
|
|
4006
|
+
|
|
3884
4007
|
# Whether the created commits will use the commit rate or list rate
|
|
3885
4008
|
sig do
|
|
3886
4009
|
returns(
|
|
@@ -3993,6 +4116,8 @@ module MetronomeSDK
|
|
|
3993
4116
|
netsuite_sales_order_id: String,
|
|
3994
4117
|
proration:
|
|
3995
4118
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
4119
|
+
proration_rounding:
|
|
4120
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::OrHash,
|
|
3996
4121
|
rate_type:
|
|
3997
4122
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
3998
4123
|
recurrence_frequency:
|
|
@@ -4035,6 +4160,8 @@ module MetronomeSDK
|
|
|
4035
4160
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
4036
4161
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
4037
4162
|
proration: nil,
|
|
4163
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
4164
|
+
proration_rounding: nil,
|
|
4038
4165
|
# Whether the created commits will use the commit rate or list rate
|
|
4039
4166
|
rate_type: nil,
|
|
4040
4167
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -4082,6 +4209,8 @@ module MetronomeSDK
|
|
|
4082
4209
|
netsuite_sales_order_id: String,
|
|
4083
4210
|
proration:
|
|
4084
4211
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::Proration::OrSymbol,
|
|
4212
|
+
proration_rounding:
|
|
4213
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding,
|
|
4085
4214
|
rate_type:
|
|
4086
4215
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RateType::OrSymbol,
|
|
4087
4216
|
recurrence_frequency:
|
|
@@ -4314,6 +4443,259 @@ module MetronomeSDK
|
|
|
4314
4443
|
end
|
|
4315
4444
|
end
|
|
4316
4445
|
|
|
4446
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
4447
|
+
OrHash =
|
|
4448
|
+
T.type_alias do
|
|
4449
|
+
T.any(
|
|
4450
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding,
|
|
4451
|
+
MetronomeSDK::Internal::AnyHash
|
|
4452
|
+
)
|
|
4453
|
+
end
|
|
4454
|
+
|
|
4455
|
+
sig do
|
|
4456
|
+
returns(
|
|
4457
|
+
T.nilable(
|
|
4458
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access
|
|
4459
|
+
)
|
|
4460
|
+
)
|
|
4461
|
+
end
|
|
4462
|
+
attr_reader :access
|
|
4463
|
+
|
|
4464
|
+
sig do
|
|
4465
|
+
params(
|
|
4466
|
+
access:
|
|
4467
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::OrHash
|
|
4468
|
+
).void
|
|
4469
|
+
end
|
|
4470
|
+
attr_writer :access
|
|
4471
|
+
|
|
4472
|
+
sig do
|
|
4473
|
+
returns(
|
|
4474
|
+
T.nilable(
|
|
4475
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
4476
|
+
)
|
|
4477
|
+
)
|
|
4478
|
+
end
|
|
4479
|
+
attr_reader :invoice
|
|
4480
|
+
|
|
4481
|
+
sig do
|
|
4482
|
+
params(
|
|
4483
|
+
invoice:
|
|
4484
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
4485
|
+
).void
|
|
4486
|
+
end
|
|
4487
|
+
attr_writer :invoice
|
|
4488
|
+
|
|
4489
|
+
# Optional rounding configuration for prorated recurring commit amounts.
|
|
4490
|
+
sig do
|
|
4491
|
+
params(
|
|
4492
|
+
access:
|
|
4493
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::OrHash,
|
|
4494
|
+
invoice:
|
|
4495
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
4496
|
+
).returns(T.attached_class)
|
|
4497
|
+
end
|
|
4498
|
+
def self.new(access: nil, invoice: nil)
|
|
4499
|
+
end
|
|
4500
|
+
|
|
4501
|
+
sig do
|
|
4502
|
+
override.returns(
|
|
4503
|
+
{
|
|
4504
|
+
access:
|
|
4505
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
4506
|
+
invoice:
|
|
4507
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice
|
|
4508
|
+
}
|
|
4509
|
+
)
|
|
4510
|
+
end
|
|
4511
|
+
def to_hash
|
|
4512
|
+
end
|
|
4513
|
+
|
|
4514
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
4515
|
+
OrHash =
|
|
4516
|
+
T.type_alias do
|
|
4517
|
+
T.any(
|
|
4518
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access,
|
|
4519
|
+
MetronomeSDK::Internal::AnyHash
|
|
4520
|
+
)
|
|
4521
|
+
end
|
|
4522
|
+
|
|
4523
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4524
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4525
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4526
|
+
# dollar).
|
|
4527
|
+
sig { returns(Float) }
|
|
4528
|
+
attr_accessor :decimal_places
|
|
4529
|
+
|
|
4530
|
+
sig do
|
|
4531
|
+
returns(
|
|
4532
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4533
|
+
)
|
|
4534
|
+
end
|
|
4535
|
+
attr_accessor :rounding_method
|
|
4536
|
+
|
|
4537
|
+
sig do
|
|
4538
|
+
params(
|
|
4539
|
+
decimal_places: Float,
|
|
4540
|
+
rounding_method:
|
|
4541
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4542
|
+
).returns(T.attached_class)
|
|
4543
|
+
end
|
|
4544
|
+
def self.new(
|
|
4545
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4546
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4547
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4548
|
+
# dollar).
|
|
4549
|
+
decimal_places:,
|
|
4550
|
+
rounding_method:
|
|
4551
|
+
)
|
|
4552
|
+
end
|
|
4553
|
+
|
|
4554
|
+
sig do
|
|
4555
|
+
override.returns(
|
|
4556
|
+
{
|
|
4557
|
+
decimal_places: Float,
|
|
4558
|
+
rounding_method:
|
|
4559
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
4560
|
+
}
|
|
4561
|
+
)
|
|
4562
|
+
end
|
|
4563
|
+
def to_hash
|
|
4564
|
+
end
|
|
4565
|
+
|
|
4566
|
+
module RoundingMethod
|
|
4567
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4568
|
+
|
|
4569
|
+
TaggedSymbol =
|
|
4570
|
+
T.type_alias do
|
|
4571
|
+
T.all(
|
|
4572
|
+
Symbol,
|
|
4573
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod
|
|
4574
|
+
)
|
|
4575
|
+
end
|
|
4576
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4577
|
+
|
|
4578
|
+
HALF_UP =
|
|
4579
|
+
T.let(
|
|
4580
|
+
:HALF_UP,
|
|
4581
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4582
|
+
)
|
|
4583
|
+
FLOOR =
|
|
4584
|
+
T.let(
|
|
4585
|
+
:FLOOR,
|
|
4586
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4587
|
+
)
|
|
4588
|
+
CEILING =
|
|
4589
|
+
T.let(
|
|
4590
|
+
:CEILING,
|
|
4591
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4592
|
+
)
|
|
4593
|
+
|
|
4594
|
+
sig do
|
|
4595
|
+
override.returns(
|
|
4596
|
+
T::Array[
|
|
4597
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
4598
|
+
]
|
|
4599
|
+
)
|
|
4600
|
+
end
|
|
4601
|
+
def self.values
|
|
4602
|
+
end
|
|
4603
|
+
end
|
|
4604
|
+
end
|
|
4605
|
+
|
|
4606
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
4607
|
+
OrHash =
|
|
4608
|
+
T.type_alias do
|
|
4609
|
+
T.any(
|
|
4610
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice,
|
|
4611
|
+
MetronomeSDK::Internal::AnyHash
|
|
4612
|
+
)
|
|
4613
|
+
end
|
|
4614
|
+
|
|
4615
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4616
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4617
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4618
|
+
# dollar).
|
|
4619
|
+
sig { returns(Float) }
|
|
4620
|
+
attr_accessor :decimal_places
|
|
4621
|
+
|
|
4622
|
+
sig do
|
|
4623
|
+
returns(
|
|
4624
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4625
|
+
)
|
|
4626
|
+
end
|
|
4627
|
+
attr_accessor :rounding_method
|
|
4628
|
+
|
|
4629
|
+
sig do
|
|
4630
|
+
params(
|
|
4631
|
+
decimal_places: Float,
|
|
4632
|
+
rounding_method:
|
|
4633
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4634
|
+
).returns(T.attached_class)
|
|
4635
|
+
end
|
|
4636
|
+
def self.new(
|
|
4637
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
4638
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
4639
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
4640
|
+
# dollar).
|
|
4641
|
+
decimal_places:,
|
|
4642
|
+
rounding_method:
|
|
4643
|
+
)
|
|
4644
|
+
end
|
|
4645
|
+
|
|
4646
|
+
sig do
|
|
4647
|
+
override.returns(
|
|
4648
|
+
{
|
|
4649
|
+
decimal_places: Float,
|
|
4650
|
+
rounding_method:
|
|
4651
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
4652
|
+
}
|
|
4653
|
+
)
|
|
4654
|
+
end
|
|
4655
|
+
def to_hash
|
|
4656
|
+
end
|
|
4657
|
+
|
|
4658
|
+
module RoundingMethod
|
|
4659
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4660
|
+
|
|
4661
|
+
TaggedSymbol =
|
|
4662
|
+
T.type_alias do
|
|
4663
|
+
T.all(
|
|
4664
|
+
Symbol,
|
|
4665
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
|
|
4666
|
+
)
|
|
4667
|
+
end
|
|
4668
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4669
|
+
|
|
4670
|
+
HALF_UP =
|
|
4671
|
+
T.let(
|
|
4672
|
+
:HALF_UP,
|
|
4673
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4674
|
+
)
|
|
4675
|
+
FLOOR =
|
|
4676
|
+
T.let(
|
|
4677
|
+
:FLOOR,
|
|
4678
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4679
|
+
)
|
|
4680
|
+
CEILING =
|
|
4681
|
+
T.let(
|
|
4682
|
+
:CEILING,
|
|
4683
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4684
|
+
)
|
|
4685
|
+
|
|
4686
|
+
sig do
|
|
4687
|
+
override.returns(
|
|
4688
|
+
T::Array[
|
|
4689
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
4690
|
+
]
|
|
4691
|
+
)
|
|
4692
|
+
end
|
|
4693
|
+
def self.values
|
|
4694
|
+
end
|
|
4695
|
+
end
|
|
4696
|
+
end
|
|
4697
|
+
end
|
|
4698
|
+
|
|
4317
4699
|
# Whether the created commits will use the commit rate or list rate
|
|
4318
4700
|
module RateType
|
|
4319
4701
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -4386,6 +4768,11 @@ module MetronomeSDK
|
|
|
4386
4768
|
:WEEKLY,
|
|
4387
4769
|
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
4388
4770
|
)
|
|
4771
|
+
DAILY =
|
|
4772
|
+
T.let(
|
|
4773
|
+
:DAILY,
|
|
4774
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
4775
|
+
)
|
|
4389
4776
|
|
|
4390
4777
|
sig do
|
|
4391
4778
|
override.returns(
|
|
@@ -4669,6 +5056,24 @@ module MetronomeSDK
|
|
|
4669
5056
|
end
|
|
4670
5057
|
attr_writer :proration
|
|
4671
5058
|
|
|
5059
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5060
|
+
sig do
|
|
5061
|
+
returns(
|
|
5062
|
+
T.nilable(
|
|
5063
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding
|
|
5064
|
+
)
|
|
5065
|
+
)
|
|
5066
|
+
end
|
|
5067
|
+
attr_reader :proration_rounding
|
|
5068
|
+
|
|
5069
|
+
sig do
|
|
5070
|
+
params(
|
|
5071
|
+
proration_rounding:
|
|
5072
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::OrHash
|
|
5073
|
+
).void
|
|
5074
|
+
end
|
|
5075
|
+
attr_writer :proration_rounding
|
|
5076
|
+
|
|
4672
5077
|
# Whether the created commits will use the commit rate or list rate
|
|
4673
5078
|
sig do
|
|
4674
5079
|
returns(
|
|
@@ -4779,6 +5184,8 @@ module MetronomeSDK
|
|
|
4779
5184
|
netsuite_sales_order_id: String,
|
|
4780
5185
|
proration:
|
|
4781
5186
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
5187
|
+
proration_rounding:
|
|
5188
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::OrHash,
|
|
4782
5189
|
rate_type:
|
|
4783
5190
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4784
5191
|
recurrence_frequency:
|
|
@@ -4819,6 +5226,8 @@ module MetronomeSDK
|
|
|
4819
5226
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
4820
5227
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
4821
5228
|
proration: nil,
|
|
5229
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5230
|
+
proration_rounding: nil,
|
|
4822
5231
|
# Whether the created commits will use the commit rate or list rate
|
|
4823
5232
|
rate_type: nil,
|
|
4824
5233
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
@@ -4864,6 +5273,8 @@ module MetronomeSDK
|
|
|
4864
5273
|
netsuite_sales_order_id: String,
|
|
4865
5274
|
proration:
|
|
4866
5275
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::Proration::OrSymbol,
|
|
5276
|
+
proration_rounding:
|
|
5277
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding,
|
|
4867
5278
|
rate_type:
|
|
4868
5279
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RateType::OrSymbol,
|
|
4869
5280
|
recurrence_frequency:
|
|
@@ -5058,15 +5469,155 @@ module MetronomeSDK
|
|
|
5058
5469
|
end
|
|
5059
5470
|
end
|
|
5060
5471
|
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
5064
|
-
|
|
5065
|
-
TaggedSymbol =
|
|
5472
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
5473
|
+
OrHash =
|
|
5066
5474
|
T.type_alias do
|
|
5067
|
-
T.
|
|
5068
|
-
|
|
5069
|
-
MetronomeSDK::
|
|
5475
|
+
T.any(
|
|
5476
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding,
|
|
5477
|
+
MetronomeSDK::Internal::AnyHash
|
|
5478
|
+
)
|
|
5479
|
+
end
|
|
5480
|
+
|
|
5481
|
+
sig do
|
|
5482
|
+
returns(
|
|
5483
|
+
T.nilable(
|
|
5484
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5485
|
+
)
|
|
5486
|
+
)
|
|
5487
|
+
end
|
|
5488
|
+
attr_reader :access
|
|
5489
|
+
|
|
5490
|
+
sig do
|
|
5491
|
+
params(
|
|
5492
|
+
access:
|
|
5493
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5494
|
+
).void
|
|
5495
|
+
end
|
|
5496
|
+
attr_writer :access
|
|
5497
|
+
|
|
5498
|
+
# Optional rounding configuration for prorated recurring credit amounts.
|
|
5499
|
+
sig do
|
|
5500
|
+
params(
|
|
5501
|
+
access:
|
|
5502
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::OrHash
|
|
5503
|
+
).returns(T.attached_class)
|
|
5504
|
+
end
|
|
5505
|
+
def self.new(access: nil)
|
|
5506
|
+
end
|
|
5507
|
+
|
|
5508
|
+
sig do
|
|
5509
|
+
override.returns(
|
|
5510
|
+
{
|
|
5511
|
+
access:
|
|
5512
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access
|
|
5513
|
+
}
|
|
5514
|
+
)
|
|
5515
|
+
end
|
|
5516
|
+
def to_hash
|
|
5517
|
+
end
|
|
5518
|
+
|
|
5519
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
5520
|
+
OrHash =
|
|
5521
|
+
T.type_alias do
|
|
5522
|
+
T.any(
|
|
5523
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access,
|
|
5524
|
+
MetronomeSDK::Internal::AnyHash
|
|
5525
|
+
)
|
|
5526
|
+
end
|
|
5527
|
+
|
|
5528
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5529
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5530
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5531
|
+
# dollar).
|
|
5532
|
+
sig { returns(Float) }
|
|
5533
|
+
attr_accessor :decimal_places
|
|
5534
|
+
|
|
5535
|
+
sig do
|
|
5536
|
+
returns(
|
|
5537
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5538
|
+
)
|
|
5539
|
+
end
|
|
5540
|
+
attr_accessor :rounding_method
|
|
5541
|
+
|
|
5542
|
+
sig do
|
|
5543
|
+
params(
|
|
5544
|
+
decimal_places: Float,
|
|
5545
|
+
rounding_method:
|
|
5546
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5547
|
+
).returns(T.attached_class)
|
|
5548
|
+
end
|
|
5549
|
+
def self.new(
|
|
5550
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
5551
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
5552
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
5553
|
+
# dollar).
|
|
5554
|
+
decimal_places:,
|
|
5555
|
+
rounding_method:
|
|
5556
|
+
)
|
|
5557
|
+
end
|
|
5558
|
+
|
|
5559
|
+
sig do
|
|
5560
|
+
override.returns(
|
|
5561
|
+
{
|
|
5562
|
+
decimal_places: Float,
|
|
5563
|
+
rounding_method:
|
|
5564
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
5565
|
+
}
|
|
5566
|
+
)
|
|
5567
|
+
end
|
|
5568
|
+
def to_hash
|
|
5569
|
+
end
|
|
5570
|
+
|
|
5571
|
+
module RoundingMethod
|
|
5572
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
5573
|
+
|
|
5574
|
+
TaggedSymbol =
|
|
5575
|
+
T.type_alias do
|
|
5576
|
+
T.all(
|
|
5577
|
+
Symbol,
|
|
5578
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod
|
|
5579
|
+
)
|
|
5580
|
+
end
|
|
5581
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
5582
|
+
|
|
5583
|
+
HALF_UP =
|
|
5584
|
+
T.let(
|
|
5585
|
+
:HALF_UP,
|
|
5586
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5587
|
+
)
|
|
5588
|
+
FLOOR =
|
|
5589
|
+
T.let(
|
|
5590
|
+
:FLOOR,
|
|
5591
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5592
|
+
)
|
|
5593
|
+
CEILING =
|
|
5594
|
+
T.let(
|
|
5595
|
+
:CEILING,
|
|
5596
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5597
|
+
)
|
|
5598
|
+
|
|
5599
|
+
sig do
|
|
5600
|
+
override.returns(
|
|
5601
|
+
T::Array[
|
|
5602
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
5603
|
+
]
|
|
5604
|
+
)
|
|
5605
|
+
end
|
|
5606
|
+
def self.values
|
|
5607
|
+
end
|
|
5608
|
+
end
|
|
5609
|
+
end
|
|
5610
|
+
end
|
|
5611
|
+
|
|
5612
|
+
# Whether the created commits will use the commit rate or list rate
|
|
5613
|
+
module RateType
|
|
5614
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
5615
|
+
|
|
5616
|
+
TaggedSymbol =
|
|
5617
|
+
T.type_alias do
|
|
5618
|
+
T.all(
|
|
5619
|
+
Symbol,
|
|
5620
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RateType
|
|
5070
5621
|
)
|
|
5071
5622
|
end
|
|
5072
5623
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -5130,6 +5681,11 @@ module MetronomeSDK
|
|
|
5130
5681
|
:WEEKLY,
|
|
5131
5682
|
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
5132
5683
|
)
|
|
5684
|
+
DAILY =
|
|
5685
|
+
T.let(
|
|
5686
|
+
:DAILY,
|
|
5687
|
+
MetronomeSDK::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
5688
|
+
)
|
|
5133
5689
|
|
|
5134
5690
|
sig do
|
|
5135
5691
|
override.returns(
|
|
@@ -6231,6 +6787,290 @@ module MetronomeSDK
|
|
|
6231
6787
|
end
|
|
6232
6788
|
end
|
|
6233
6789
|
|
|
6790
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
6791
|
+
OrHash =
|
|
6792
|
+
T.type_alias do
|
|
6793
|
+
T.any(
|
|
6794
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker,
|
|
6795
|
+
MetronomeSDK::Internal::AnyHash
|
|
6796
|
+
)
|
|
6797
|
+
end
|
|
6798
|
+
|
|
6799
|
+
# Human-readable identifier, unique per contract.
|
|
6800
|
+
sig { returns(String) }
|
|
6801
|
+
attr_accessor :alias_
|
|
6802
|
+
|
|
6803
|
+
sig do
|
|
6804
|
+
returns(
|
|
6805
|
+
T::Array[
|
|
6806
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier
|
|
6807
|
+
]
|
|
6808
|
+
)
|
|
6809
|
+
end
|
|
6810
|
+
attr_accessor :applicable_spend_specifiers
|
|
6811
|
+
|
|
6812
|
+
sig { returns(String) }
|
|
6813
|
+
attr_accessor :credit_type_id
|
|
6814
|
+
|
|
6815
|
+
sig do
|
|
6816
|
+
returns(
|
|
6817
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency::OrSymbol
|
|
6818
|
+
)
|
|
6819
|
+
end
|
|
6820
|
+
attr_accessor :reset_frequency
|
|
6821
|
+
|
|
6822
|
+
sig do
|
|
6823
|
+
params(
|
|
6824
|
+
alias_: String,
|
|
6825
|
+
applicable_spend_specifiers:
|
|
6826
|
+
T::Array[
|
|
6827
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::OrHash
|
|
6828
|
+
],
|
|
6829
|
+
credit_type_id: String,
|
|
6830
|
+
reset_frequency:
|
|
6831
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency::OrSymbol
|
|
6832
|
+
).returns(T.attached_class)
|
|
6833
|
+
end
|
|
6834
|
+
def self.new(
|
|
6835
|
+
# Human-readable identifier, unique per contract.
|
|
6836
|
+
alias_:,
|
|
6837
|
+
applicable_spend_specifiers:,
|
|
6838
|
+
credit_type_id:,
|
|
6839
|
+
reset_frequency:
|
|
6840
|
+
)
|
|
6841
|
+
end
|
|
6842
|
+
|
|
6843
|
+
sig do
|
|
6844
|
+
override.returns(
|
|
6845
|
+
{
|
|
6846
|
+
alias_: String,
|
|
6847
|
+
applicable_spend_specifiers:
|
|
6848
|
+
T::Array[
|
|
6849
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier
|
|
6850
|
+
],
|
|
6851
|
+
credit_type_id: String,
|
|
6852
|
+
reset_frequency:
|
|
6853
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency::OrSymbol
|
|
6854
|
+
}
|
|
6855
|
+
)
|
|
6856
|
+
end
|
|
6857
|
+
def to_hash
|
|
6858
|
+
end
|
|
6859
|
+
|
|
6860
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
6861
|
+
OrHash =
|
|
6862
|
+
T.type_alias do
|
|
6863
|
+
T.any(
|
|
6864
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier,
|
|
6865
|
+
MetronomeSDK::Internal::AnyHash
|
|
6866
|
+
)
|
|
6867
|
+
end
|
|
6868
|
+
|
|
6869
|
+
sig do
|
|
6870
|
+
returns(
|
|
6871
|
+
T::Array[
|
|
6872
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::OrSymbol
|
|
6873
|
+
]
|
|
6874
|
+
)
|
|
6875
|
+
end
|
|
6876
|
+
attr_accessor :sources
|
|
6877
|
+
|
|
6878
|
+
sig do
|
|
6879
|
+
returns(
|
|
6880
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType::OrSymbol
|
|
6881
|
+
)
|
|
6882
|
+
end
|
|
6883
|
+
attr_accessor :spend_type
|
|
6884
|
+
|
|
6885
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
6886
|
+
sig do
|
|
6887
|
+
returns(
|
|
6888
|
+
T.nilable(
|
|
6889
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
6890
|
+
)
|
|
6891
|
+
)
|
|
6892
|
+
end
|
|
6893
|
+
attr_reader :discounted
|
|
6894
|
+
|
|
6895
|
+
sig do
|
|
6896
|
+
params(
|
|
6897
|
+
discounted:
|
|
6898
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
6899
|
+
).void
|
|
6900
|
+
end
|
|
6901
|
+
attr_writer :discounted
|
|
6902
|
+
|
|
6903
|
+
sig do
|
|
6904
|
+
params(
|
|
6905
|
+
sources:
|
|
6906
|
+
T::Array[
|
|
6907
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::OrSymbol
|
|
6908
|
+
],
|
|
6909
|
+
spend_type:
|
|
6910
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType::OrSymbol,
|
|
6911
|
+
discounted:
|
|
6912
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
6913
|
+
).returns(T.attached_class)
|
|
6914
|
+
end
|
|
6915
|
+
def self.new(
|
|
6916
|
+
sources:,
|
|
6917
|
+
spend_type:,
|
|
6918
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
6919
|
+
discounted: nil
|
|
6920
|
+
)
|
|
6921
|
+
end
|
|
6922
|
+
|
|
6923
|
+
sig do
|
|
6924
|
+
override.returns(
|
|
6925
|
+
{
|
|
6926
|
+
sources:
|
|
6927
|
+
T::Array[
|
|
6928
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::OrSymbol
|
|
6929
|
+
],
|
|
6930
|
+
spend_type:
|
|
6931
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType::OrSymbol,
|
|
6932
|
+
discounted:
|
|
6933
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
6934
|
+
}
|
|
6935
|
+
)
|
|
6936
|
+
end
|
|
6937
|
+
def to_hash
|
|
6938
|
+
end
|
|
6939
|
+
|
|
6940
|
+
module Source
|
|
6941
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6942
|
+
|
|
6943
|
+
TaggedSymbol =
|
|
6944
|
+
T.type_alias do
|
|
6945
|
+
T.all(
|
|
6946
|
+
Symbol,
|
|
6947
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source
|
|
6948
|
+
)
|
|
6949
|
+
end
|
|
6950
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6951
|
+
|
|
6952
|
+
THRESHOLD_RECHARGE =
|
|
6953
|
+
T.let(
|
|
6954
|
+
:THRESHOLD_RECHARGE,
|
|
6955
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
6956
|
+
)
|
|
6957
|
+
MANUAL =
|
|
6958
|
+
T.let(
|
|
6959
|
+
:MANUAL,
|
|
6960
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
6961
|
+
)
|
|
6962
|
+
|
|
6963
|
+
sig do
|
|
6964
|
+
override.returns(
|
|
6965
|
+
T::Array[
|
|
6966
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
6967
|
+
]
|
|
6968
|
+
)
|
|
6969
|
+
end
|
|
6970
|
+
def self.values
|
|
6971
|
+
end
|
|
6972
|
+
end
|
|
6973
|
+
|
|
6974
|
+
module SpendType
|
|
6975
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
6976
|
+
|
|
6977
|
+
TaggedSymbol =
|
|
6978
|
+
T.type_alias do
|
|
6979
|
+
T.all(
|
|
6980
|
+
Symbol,
|
|
6981
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType
|
|
6982
|
+
)
|
|
6983
|
+
end
|
|
6984
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
6985
|
+
|
|
6986
|
+
COMMIT_PURCHASE =
|
|
6987
|
+
T.let(
|
|
6988
|
+
:COMMIT_PURCHASE,
|
|
6989
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
6990
|
+
)
|
|
6991
|
+
|
|
6992
|
+
sig do
|
|
6993
|
+
override.returns(
|
|
6994
|
+
T::Array[
|
|
6995
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
6996
|
+
]
|
|
6997
|
+
)
|
|
6998
|
+
end
|
|
6999
|
+
def self.values
|
|
7000
|
+
end
|
|
7001
|
+
end
|
|
7002
|
+
|
|
7003
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
7004
|
+
module Discounted
|
|
7005
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7006
|
+
|
|
7007
|
+
TaggedSymbol =
|
|
7008
|
+
T.type_alias do
|
|
7009
|
+
T.all(
|
|
7010
|
+
Symbol,
|
|
7011
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted
|
|
7012
|
+
)
|
|
7013
|
+
end
|
|
7014
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7015
|
+
|
|
7016
|
+
ANY =
|
|
7017
|
+
T.let(
|
|
7018
|
+
:ANY,
|
|
7019
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7020
|
+
)
|
|
7021
|
+
DISCOUNTED_ONLY =
|
|
7022
|
+
T.let(
|
|
7023
|
+
:DISCOUNTED_ONLY,
|
|
7024
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7025
|
+
)
|
|
7026
|
+
UNDISCOUNTED_ONLY =
|
|
7027
|
+
T.let(
|
|
7028
|
+
:UNDISCOUNTED_ONLY,
|
|
7029
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7030
|
+
)
|
|
7031
|
+
|
|
7032
|
+
sig do
|
|
7033
|
+
override.returns(
|
|
7034
|
+
T::Array[
|
|
7035
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
7036
|
+
]
|
|
7037
|
+
)
|
|
7038
|
+
end
|
|
7039
|
+
def self.values
|
|
7040
|
+
end
|
|
7041
|
+
end
|
|
7042
|
+
end
|
|
7043
|
+
|
|
7044
|
+
module ResetFrequency
|
|
7045
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7046
|
+
|
|
7047
|
+
TaggedSymbol =
|
|
7048
|
+
T.type_alias do
|
|
7049
|
+
T.all(
|
|
7050
|
+
Symbol,
|
|
7051
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency
|
|
7052
|
+
)
|
|
7053
|
+
end
|
|
7054
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7055
|
+
|
|
7056
|
+
BILLING_PERIOD =
|
|
7057
|
+
T.let(
|
|
7058
|
+
:BILLING_PERIOD,
|
|
7059
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency::TaggedSymbol
|
|
7060
|
+
)
|
|
7061
|
+
|
|
7062
|
+
sig do
|
|
7063
|
+
override.returns(
|
|
7064
|
+
T::Array[
|
|
7065
|
+
MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency::TaggedSymbol
|
|
7066
|
+
]
|
|
7067
|
+
)
|
|
7068
|
+
end
|
|
7069
|
+
def self.values
|
|
7070
|
+
end
|
|
7071
|
+
end
|
|
7072
|
+
end
|
|
7073
|
+
|
|
6234
7074
|
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
|
6235
7075
|
OrHash =
|
|
6236
7076
|
T.type_alias do
|
|
@@ -6277,6 +7117,23 @@ module MetronomeSDK
|
|
|
6277
7117
|
end
|
|
6278
7118
|
attr_writer :subscription_rate
|
|
6279
7119
|
|
|
7120
|
+
sig do
|
|
7121
|
+
returns(
|
|
7122
|
+
T.nilable(
|
|
7123
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig
|
|
7124
|
+
)
|
|
7125
|
+
)
|
|
7126
|
+
end
|
|
7127
|
+
attr_reader :billing_cycle_config
|
|
7128
|
+
|
|
7129
|
+
sig do
|
|
7130
|
+
params(
|
|
7131
|
+
billing_cycle_config:
|
|
7132
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::OrHash
|
|
7133
|
+
).void
|
|
7134
|
+
end
|
|
7135
|
+
attr_writer :billing_cycle_config
|
|
7136
|
+
|
|
6280
7137
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6281
7138
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
6282
7139
|
attr_reader :custom_fields
|
|
@@ -6379,6 +7236,8 @@ module MetronomeSDK
|
|
|
6379
7236
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::OrHash,
|
|
6380
7237
|
subscription_rate:
|
|
6381
7238
|
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate::OrHash,
|
|
7239
|
+
billing_cycle_config:
|
|
7240
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::OrHash,
|
|
6382
7241
|
custom_fields: T::Hash[Symbol, String],
|
|
6383
7242
|
description: String,
|
|
6384
7243
|
ending_before: Time,
|
|
@@ -6396,6 +7255,7 @@ module MetronomeSDK
|
|
|
6396
7255
|
collection_schedule:,
|
|
6397
7256
|
proration:,
|
|
6398
7257
|
subscription_rate:,
|
|
7258
|
+
billing_cycle_config: nil,
|
|
6399
7259
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
6400
7260
|
custom_fields: nil,
|
|
6401
7261
|
description: nil,
|
|
@@ -6435,6 +7295,8 @@ module MetronomeSDK
|
|
|
6435
7295
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration,
|
|
6436
7296
|
subscription_rate:
|
|
6437
7297
|
MetronomeSDK::V1::ContractCreateParams::Subscription::SubscriptionRate,
|
|
7298
|
+
billing_cycle_config:
|
|
7299
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig,
|
|
6438
7300
|
custom_fields: T::Hash[Symbol, String],
|
|
6439
7301
|
description: String,
|
|
6440
7302
|
ending_before: Time,
|
|
@@ -6524,11 +7386,30 @@ module MetronomeSDK
|
|
|
6524
7386
|
sig { params(is_prorated: T::Boolean).void }
|
|
6525
7387
|
attr_writer :is_prorated
|
|
6526
7388
|
|
|
7389
|
+
sig do
|
|
7390
|
+
returns(
|
|
7391
|
+
T.nilable(
|
|
7392
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding
|
|
7393
|
+
)
|
|
7394
|
+
)
|
|
7395
|
+
end
|
|
7396
|
+
attr_reader :rounding
|
|
7397
|
+
|
|
7398
|
+
sig do
|
|
7399
|
+
params(
|
|
7400
|
+
rounding:
|
|
7401
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::OrHash
|
|
7402
|
+
).void
|
|
7403
|
+
end
|
|
7404
|
+
attr_writer :rounding
|
|
7405
|
+
|
|
6527
7406
|
sig do
|
|
6528
7407
|
params(
|
|
6529
7408
|
invoice_behavior:
|
|
6530
7409
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
6531
|
-
is_prorated: T::Boolean
|
|
7410
|
+
is_prorated: T::Boolean,
|
|
7411
|
+
rounding:
|
|
7412
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::OrHash
|
|
6532
7413
|
).returns(T.attached_class)
|
|
6533
7414
|
end
|
|
6534
7415
|
def self.new(
|
|
@@ -6539,7 +7420,8 @@ module MetronomeSDK
|
|
|
6539
7420
|
# in-arrears at the end of the period.
|
|
6540
7421
|
invoice_behavior: nil,
|
|
6541
7422
|
# Indicates if the partial period will be prorated or charged a full amount.
|
|
6542
|
-
is_prorated: nil
|
|
7423
|
+
is_prorated: nil,
|
|
7424
|
+
rounding: nil
|
|
6543
7425
|
)
|
|
6544
7426
|
end
|
|
6545
7427
|
|
|
@@ -6548,7 +7430,9 @@ module MetronomeSDK
|
|
|
6548
7430
|
{
|
|
6549
7431
|
invoice_behavior:
|
|
6550
7432
|
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior::OrSymbol,
|
|
6551
|
-
is_prorated: T::Boolean
|
|
7433
|
+
is_prorated: T::Boolean,
|
|
7434
|
+
rounding:
|
|
7435
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding
|
|
6552
7436
|
}
|
|
6553
7437
|
)
|
|
6554
7438
|
end
|
|
@@ -6593,6 +7477,98 @@ module MetronomeSDK
|
|
|
6593
7477
|
def self.values
|
|
6594
7478
|
end
|
|
6595
7479
|
end
|
|
7480
|
+
|
|
7481
|
+
class Rounding < MetronomeSDK::Internal::Type::BaseModel
|
|
7482
|
+
OrHash =
|
|
7483
|
+
T.type_alias do
|
|
7484
|
+
T.any(
|
|
7485
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding,
|
|
7486
|
+
MetronomeSDK::Internal::AnyHash
|
|
7487
|
+
)
|
|
7488
|
+
end
|
|
7489
|
+
|
|
7490
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
7491
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
7492
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
7493
|
+
# dollar).
|
|
7494
|
+
sig { returns(Float) }
|
|
7495
|
+
attr_accessor :decimal_places
|
|
7496
|
+
|
|
7497
|
+
sig do
|
|
7498
|
+
returns(
|
|
7499
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7500
|
+
)
|
|
7501
|
+
end
|
|
7502
|
+
attr_accessor :rounding_method
|
|
7503
|
+
|
|
7504
|
+
sig do
|
|
7505
|
+
params(
|
|
7506
|
+
decimal_places: Float,
|
|
7507
|
+
rounding_method:
|
|
7508
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7509
|
+
).returns(T.attached_class)
|
|
7510
|
+
end
|
|
7511
|
+
def self.new(
|
|
7512
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
7513
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
7514
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
7515
|
+
# dollar).
|
|
7516
|
+
decimal_places:,
|
|
7517
|
+
rounding_method:
|
|
7518
|
+
)
|
|
7519
|
+
end
|
|
7520
|
+
|
|
7521
|
+
sig do
|
|
7522
|
+
override.returns(
|
|
7523
|
+
{
|
|
7524
|
+
decimal_places: Float,
|
|
7525
|
+
rounding_method:
|
|
7526
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::OrSymbol
|
|
7527
|
+
}
|
|
7528
|
+
)
|
|
7529
|
+
end
|
|
7530
|
+
def to_hash
|
|
7531
|
+
end
|
|
7532
|
+
|
|
7533
|
+
module RoundingMethod
|
|
7534
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7535
|
+
|
|
7536
|
+
TaggedSymbol =
|
|
7537
|
+
T.type_alias do
|
|
7538
|
+
T.all(
|
|
7539
|
+
Symbol,
|
|
7540
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod
|
|
7541
|
+
)
|
|
7542
|
+
end
|
|
7543
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7544
|
+
|
|
7545
|
+
HALF_UP =
|
|
7546
|
+
T.let(
|
|
7547
|
+
:HALF_UP,
|
|
7548
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7549
|
+
)
|
|
7550
|
+
FLOOR =
|
|
7551
|
+
T.let(
|
|
7552
|
+
:FLOOR,
|
|
7553
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7554
|
+
)
|
|
7555
|
+
CEILING =
|
|
7556
|
+
T.let(
|
|
7557
|
+
:CEILING,
|
|
7558
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7559
|
+
)
|
|
7560
|
+
|
|
7561
|
+
sig do
|
|
7562
|
+
override.returns(
|
|
7563
|
+
T::Array[
|
|
7564
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::Proration::Rounding::RoundingMethod::TaggedSymbol
|
|
7565
|
+
]
|
|
7566
|
+
)
|
|
7567
|
+
end
|
|
7568
|
+
def self.values
|
|
7569
|
+
end
|
|
7570
|
+
end
|
|
7571
|
+
end
|
|
6596
7572
|
end
|
|
6597
7573
|
|
|
6598
7574
|
class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -6692,6 +7668,108 @@ module MetronomeSDK
|
|
|
6692
7668
|
end
|
|
6693
7669
|
end
|
|
6694
7670
|
|
|
7671
|
+
class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
7672
|
+
OrHash =
|
|
7673
|
+
T.type_alias do
|
|
7674
|
+
T.any(
|
|
7675
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig,
|
|
7676
|
+
MetronomeSDK::Internal::AnyHash
|
|
7677
|
+
)
|
|
7678
|
+
end
|
|
7679
|
+
|
|
7680
|
+
# The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
7681
|
+
# usage invoice billing cycle anchor date.
|
|
7682
|
+
sig { returns(T.nilable(Time)) }
|
|
7683
|
+
attr_reader :anchor_date
|
|
7684
|
+
|
|
7685
|
+
sig { params(anchor_date: Time).void }
|
|
7686
|
+
attr_writer :anchor_date
|
|
7687
|
+
|
|
7688
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7689
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7690
|
+
sig do
|
|
7691
|
+
returns(
|
|
7692
|
+
T.nilable(
|
|
7693
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7694
|
+
)
|
|
7695
|
+
)
|
|
7696
|
+
end
|
|
7697
|
+
attr_reader :invoice_placement
|
|
7698
|
+
|
|
7699
|
+
sig do
|
|
7700
|
+
params(
|
|
7701
|
+
invoice_placement:
|
|
7702
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7703
|
+
).void
|
|
7704
|
+
end
|
|
7705
|
+
attr_writer :invoice_placement
|
|
7706
|
+
|
|
7707
|
+
sig do
|
|
7708
|
+
params(
|
|
7709
|
+
anchor_date: Time,
|
|
7710
|
+
invoice_placement:
|
|
7711
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7712
|
+
).returns(T.attached_class)
|
|
7713
|
+
end
|
|
7714
|
+
def self.new(
|
|
7715
|
+
# The date to anchor the billing cycle to. If omitted, defaults to the contract's
|
|
7716
|
+
# usage invoice billing cycle anchor date.
|
|
7717
|
+
anchor_date: nil,
|
|
7718
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7719
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7720
|
+
invoice_placement: nil
|
|
7721
|
+
)
|
|
7722
|
+
end
|
|
7723
|
+
|
|
7724
|
+
sig do
|
|
7725
|
+
override.returns(
|
|
7726
|
+
{
|
|
7727
|
+
anchor_date: Time,
|
|
7728
|
+
invoice_placement:
|
|
7729
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::OrSymbol
|
|
7730
|
+
}
|
|
7731
|
+
)
|
|
7732
|
+
end
|
|
7733
|
+
def to_hash
|
|
7734
|
+
end
|
|
7735
|
+
|
|
7736
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
7737
|
+
# own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
|
|
7738
|
+
module InvoicePlacement
|
|
7739
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
7740
|
+
|
|
7741
|
+
TaggedSymbol =
|
|
7742
|
+
T.type_alias do
|
|
7743
|
+
T.all(
|
|
7744
|
+
Symbol,
|
|
7745
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement
|
|
7746
|
+
)
|
|
7747
|
+
end
|
|
7748
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
7749
|
+
|
|
7750
|
+
ON_SCHEDULED_INVOICE =
|
|
7751
|
+
T.let(
|
|
7752
|
+
:ON_SCHEDULED_INVOICE,
|
|
7753
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7754
|
+
)
|
|
7755
|
+
ON_USAGE_INVOICE =
|
|
7756
|
+
T.let(
|
|
7757
|
+
:ON_USAGE_INVOICE,
|
|
7758
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7759
|
+
)
|
|
7760
|
+
|
|
7761
|
+
sig do
|
|
7762
|
+
override.returns(
|
|
7763
|
+
T::Array[
|
|
7764
|
+
MetronomeSDK::V1::ContractCreateParams::Subscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
|
|
7765
|
+
]
|
|
7766
|
+
)
|
|
7767
|
+
end
|
|
7768
|
+
def self.values
|
|
7769
|
+
end
|
|
7770
|
+
end
|
|
7771
|
+
end
|
|
7772
|
+
|
|
6695
7773
|
# Determines how the subscription's quantity is controlled. Defaults to
|
|
6696
7774
|
# QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
6697
7775
|
# directly on the subscription. `initial_quantity` must be provided with this
|