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
|
@@ -229,6 +229,26 @@ module MetronomeSDK
|
|
|
229
229
|
end
|
|
230
230
|
attr_writer :spend_threshold_configuration
|
|
231
231
|
|
|
232
|
+
# Spend trackers attached to this contract.
|
|
233
|
+
sig do
|
|
234
|
+
returns(
|
|
235
|
+
T.nilable(
|
|
236
|
+
T::Array[MetronomeSDK::ContractWithoutAmendments::SpendTracker]
|
|
237
|
+
)
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
attr_reader :spend_trackers
|
|
241
|
+
|
|
242
|
+
sig do
|
|
243
|
+
params(
|
|
244
|
+
spend_trackers:
|
|
245
|
+
T::Array[
|
|
246
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::OrHash
|
|
247
|
+
]
|
|
248
|
+
).void
|
|
249
|
+
end
|
|
250
|
+
attr_writer :spend_trackers
|
|
251
|
+
|
|
232
252
|
# This field's availability is dependent on your client's configuration.
|
|
233
253
|
sig { returns(T.nilable(Float)) }
|
|
234
254
|
attr_reader :total_contract_value
|
|
@@ -295,6 +315,10 @@ module MetronomeSDK
|
|
|
295
315
|
MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::OrSymbol,
|
|
296
316
|
spend_threshold_configuration:
|
|
297
317
|
MetronomeSDK::SpendThresholdConfiguration::OrHash,
|
|
318
|
+
spend_trackers:
|
|
319
|
+
T::Array[
|
|
320
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::OrHash
|
|
321
|
+
],
|
|
298
322
|
total_contract_value: Float,
|
|
299
323
|
usage_filter:
|
|
300
324
|
MetronomeSDK::ContractWithoutAmendments::UsageFilter::OrHash
|
|
@@ -337,6 +361,8 @@ module MetronomeSDK
|
|
|
337
361
|
# on a separate invoice from usage charges.
|
|
338
362
|
scheduled_charges_on_usage_invoices: nil,
|
|
339
363
|
spend_threshold_configuration: nil,
|
|
364
|
+
# Spend trackers attached to this contract.
|
|
365
|
+
spend_trackers: nil,
|
|
340
366
|
# This field's availability is dependent on your client's configuration.
|
|
341
367
|
total_contract_value: nil,
|
|
342
368
|
usage_filter: nil
|
|
@@ -385,6 +411,8 @@ module MetronomeSDK
|
|
|
385
411
|
MetronomeSDK::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices::TaggedSymbol,
|
|
386
412
|
spend_threshold_configuration:
|
|
387
413
|
MetronomeSDK::SpendThresholdConfiguration,
|
|
414
|
+
spend_trackers:
|
|
415
|
+
T::Array[MetronomeSDK::ContractWithoutAmendments::SpendTracker],
|
|
388
416
|
total_contract_value: Float,
|
|
389
417
|
usage_filter: MetronomeSDK::ContractWithoutAmendments::UsageFilter
|
|
390
418
|
}
|
|
@@ -748,6 +776,26 @@ module MetronomeSDK
|
|
|
748
776
|
end
|
|
749
777
|
attr_writer :proration
|
|
750
778
|
|
|
779
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
780
|
+
sig do
|
|
781
|
+
returns(
|
|
782
|
+
T.nilable(
|
|
783
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding
|
|
784
|
+
)
|
|
785
|
+
)
|
|
786
|
+
end
|
|
787
|
+
attr_reader :proration_rounding
|
|
788
|
+
|
|
789
|
+
sig do
|
|
790
|
+
params(
|
|
791
|
+
proration_rounding:
|
|
792
|
+
T.nilable(
|
|
793
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::OrHash
|
|
794
|
+
)
|
|
795
|
+
).void
|
|
796
|
+
end
|
|
797
|
+
attr_writer :proration_rounding
|
|
798
|
+
|
|
751
799
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
752
800
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
753
801
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -833,6 +881,10 @@ module MetronomeSDK
|
|
|
833
881
|
netsuite_sales_order_id: String,
|
|
834
882
|
proration:
|
|
835
883
|
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::OrSymbol,
|
|
884
|
+
proration_rounding:
|
|
885
|
+
T.nilable(
|
|
886
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::OrHash
|
|
887
|
+
),
|
|
836
888
|
recurrence_frequency:
|
|
837
889
|
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
|
838
890
|
rollover_fraction: Float,
|
|
@@ -874,6 +926,8 @@ module MetronomeSDK
|
|
|
874
926
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
875
927
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
876
928
|
proration: nil,
|
|
929
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
930
|
+
proration_rounding: nil,
|
|
877
931
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
878
932
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
879
933
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -921,6 +975,10 @@ module MetronomeSDK
|
|
|
921
975
|
netsuite_sales_order_id: String,
|
|
922
976
|
proration:
|
|
923
977
|
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration::TaggedSymbol,
|
|
978
|
+
proration_rounding:
|
|
979
|
+
T.nilable(
|
|
980
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding
|
|
981
|
+
),
|
|
924
982
|
recurrence_frequency:
|
|
925
983
|
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
|
|
926
984
|
rollover_fraction: Float,
|
|
@@ -1220,6 +1278,259 @@ module MetronomeSDK
|
|
|
1220
1278
|
end
|
|
1221
1279
|
end
|
|
1222
1280
|
|
|
1281
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
1282
|
+
OrHash =
|
|
1283
|
+
T.type_alias do
|
|
1284
|
+
T.any(
|
|
1285
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding,
|
|
1286
|
+
MetronomeSDK::Internal::AnyHash
|
|
1287
|
+
)
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
sig do
|
|
1291
|
+
returns(
|
|
1292
|
+
T.nilable(
|
|
1293
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access
|
|
1294
|
+
)
|
|
1295
|
+
)
|
|
1296
|
+
end
|
|
1297
|
+
attr_reader :access
|
|
1298
|
+
|
|
1299
|
+
sig do
|
|
1300
|
+
params(
|
|
1301
|
+
access:
|
|
1302
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::OrHash
|
|
1303
|
+
).void
|
|
1304
|
+
end
|
|
1305
|
+
attr_writer :access
|
|
1306
|
+
|
|
1307
|
+
sig do
|
|
1308
|
+
returns(
|
|
1309
|
+
T.nilable(
|
|
1310
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice
|
|
1311
|
+
)
|
|
1312
|
+
)
|
|
1313
|
+
end
|
|
1314
|
+
attr_reader :invoice
|
|
1315
|
+
|
|
1316
|
+
sig do
|
|
1317
|
+
params(
|
|
1318
|
+
invoice:
|
|
1319
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
1320
|
+
).void
|
|
1321
|
+
end
|
|
1322
|
+
attr_writer :invoice
|
|
1323
|
+
|
|
1324
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
1325
|
+
sig do
|
|
1326
|
+
params(
|
|
1327
|
+
access:
|
|
1328
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::OrHash,
|
|
1329
|
+
invoice:
|
|
1330
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::OrHash
|
|
1331
|
+
).returns(T.attached_class)
|
|
1332
|
+
end
|
|
1333
|
+
def self.new(access: nil, invoice: nil)
|
|
1334
|
+
end
|
|
1335
|
+
|
|
1336
|
+
sig do
|
|
1337
|
+
override.returns(
|
|
1338
|
+
{
|
|
1339
|
+
access:
|
|
1340
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access,
|
|
1341
|
+
invoice:
|
|
1342
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice
|
|
1343
|
+
}
|
|
1344
|
+
)
|
|
1345
|
+
end
|
|
1346
|
+
def to_hash
|
|
1347
|
+
end
|
|
1348
|
+
|
|
1349
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
1350
|
+
OrHash =
|
|
1351
|
+
T.type_alias do
|
|
1352
|
+
T.any(
|
|
1353
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access,
|
|
1354
|
+
MetronomeSDK::Internal::AnyHash
|
|
1355
|
+
)
|
|
1356
|
+
end
|
|
1357
|
+
|
|
1358
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
1359
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1360
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1361
|
+
# dollar).
|
|
1362
|
+
sig { returns(Float) }
|
|
1363
|
+
attr_accessor :decimal_places
|
|
1364
|
+
|
|
1365
|
+
sig do
|
|
1366
|
+
returns(
|
|
1367
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1368
|
+
)
|
|
1369
|
+
end
|
|
1370
|
+
attr_accessor :rounding_method
|
|
1371
|
+
|
|
1372
|
+
sig do
|
|
1373
|
+
params(
|
|
1374
|
+
decimal_places: Float,
|
|
1375
|
+
rounding_method:
|
|
1376
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
1377
|
+
).returns(T.attached_class)
|
|
1378
|
+
end
|
|
1379
|
+
def self.new(
|
|
1380
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
1381
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1382
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1383
|
+
# dollar).
|
|
1384
|
+
decimal_places:,
|
|
1385
|
+
rounding_method:
|
|
1386
|
+
)
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
sig do
|
|
1390
|
+
override.returns(
|
|
1391
|
+
{
|
|
1392
|
+
decimal_places: Float,
|
|
1393
|
+
rounding_method:
|
|
1394
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1395
|
+
}
|
|
1396
|
+
)
|
|
1397
|
+
end
|
|
1398
|
+
def to_hash
|
|
1399
|
+
end
|
|
1400
|
+
|
|
1401
|
+
module RoundingMethod
|
|
1402
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1403
|
+
|
|
1404
|
+
TaggedSymbol =
|
|
1405
|
+
T.type_alias do
|
|
1406
|
+
T.all(
|
|
1407
|
+
Symbol,
|
|
1408
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod
|
|
1409
|
+
)
|
|
1410
|
+
end
|
|
1411
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1412
|
+
|
|
1413
|
+
HALF_UP =
|
|
1414
|
+
T.let(
|
|
1415
|
+
:HALF_UP,
|
|
1416
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1417
|
+
)
|
|
1418
|
+
FLOOR =
|
|
1419
|
+
T.let(
|
|
1420
|
+
:FLOOR,
|
|
1421
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1422
|
+
)
|
|
1423
|
+
CEILING =
|
|
1424
|
+
T.let(
|
|
1425
|
+
:CEILING,
|
|
1426
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1427
|
+
)
|
|
1428
|
+
|
|
1429
|
+
sig do
|
|
1430
|
+
override.returns(
|
|
1431
|
+
T::Array[
|
|
1432
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
1433
|
+
]
|
|
1434
|
+
)
|
|
1435
|
+
end
|
|
1436
|
+
def self.values
|
|
1437
|
+
end
|
|
1438
|
+
end
|
|
1439
|
+
end
|
|
1440
|
+
|
|
1441
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
1442
|
+
OrHash =
|
|
1443
|
+
T.type_alias do
|
|
1444
|
+
T.any(
|
|
1445
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice,
|
|
1446
|
+
MetronomeSDK::Internal::AnyHash
|
|
1447
|
+
)
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
1451
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1452
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1453
|
+
# dollar).
|
|
1454
|
+
sig { returns(Float) }
|
|
1455
|
+
attr_accessor :decimal_places
|
|
1456
|
+
|
|
1457
|
+
sig do
|
|
1458
|
+
returns(
|
|
1459
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1460
|
+
)
|
|
1461
|
+
end
|
|
1462
|
+
attr_accessor :rounding_method
|
|
1463
|
+
|
|
1464
|
+
sig do
|
|
1465
|
+
params(
|
|
1466
|
+
decimal_places: Float,
|
|
1467
|
+
rounding_method:
|
|
1468
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
|
|
1469
|
+
).returns(T.attached_class)
|
|
1470
|
+
end
|
|
1471
|
+
def self.new(
|
|
1472
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
1473
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1474
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1475
|
+
# dollar).
|
|
1476
|
+
decimal_places:,
|
|
1477
|
+
rounding_method:
|
|
1478
|
+
)
|
|
1479
|
+
end
|
|
1480
|
+
|
|
1481
|
+
sig do
|
|
1482
|
+
override.returns(
|
|
1483
|
+
{
|
|
1484
|
+
decimal_places: Float,
|
|
1485
|
+
rounding_method:
|
|
1486
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1487
|
+
}
|
|
1488
|
+
)
|
|
1489
|
+
end
|
|
1490
|
+
def to_hash
|
|
1491
|
+
end
|
|
1492
|
+
|
|
1493
|
+
module RoundingMethod
|
|
1494
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1495
|
+
|
|
1496
|
+
TaggedSymbol =
|
|
1497
|
+
T.type_alias do
|
|
1498
|
+
T.all(
|
|
1499
|
+
Symbol,
|
|
1500
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod
|
|
1501
|
+
)
|
|
1502
|
+
end
|
|
1503
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1504
|
+
|
|
1505
|
+
HALF_UP =
|
|
1506
|
+
T.let(
|
|
1507
|
+
:HALF_UP,
|
|
1508
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1509
|
+
)
|
|
1510
|
+
FLOOR =
|
|
1511
|
+
T.let(
|
|
1512
|
+
:FLOOR,
|
|
1513
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1514
|
+
)
|
|
1515
|
+
CEILING =
|
|
1516
|
+
T.let(
|
|
1517
|
+
:CEILING,
|
|
1518
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
sig do
|
|
1522
|
+
override.returns(
|
|
1523
|
+
T::Array[
|
|
1524
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
|
|
1525
|
+
]
|
|
1526
|
+
)
|
|
1527
|
+
end
|
|
1528
|
+
def self.values
|
|
1529
|
+
end
|
|
1530
|
+
end
|
|
1531
|
+
end
|
|
1532
|
+
end
|
|
1533
|
+
|
|
1223
1534
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1224
1535
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1225
1536
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -1257,6 +1568,11 @@ module MetronomeSDK
|
|
|
1257
1568
|
:WEEKLY,
|
|
1258
1569
|
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1259
1570
|
)
|
|
1571
|
+
DAILY =
|
|
1572
|
+
T.let(
|
|
1573
|
+
:DAILY,
|
|
1574
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1575
|
+
)
|
|
1260
1576
|
|
|
1261
1577
|
sig do
|
|
1262
1578
|
override.returns(
|
|
@@ -1435,6 +1751,26 @@ module MetronomeSDK
|
|
|
1435
1751
|
end
|
|
1436
1752
|
attr_writer :proration
|
|
1437
1753
|
|
|
1754
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
1755
|
+
sig do
|
|
1756
|
+
returns(
|
|
1757
|
+
T.nilable(
|
|
1758
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding
|
|
1759
|
+
)
|
|
1760
|
+
)
|
|
1761
|
+
end
|
|
1762
|
+
attr_reader :proration_rounding
|
|
1763
|
+
|
|
1764
|
+
sig do
|
|
1765
|
+
params(
|
|
1766
|
+
proration_rounding:
|
|
1767
|
+
T.nilable(
|
|
1768
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::OrHash
|
|
1769
|
+
)
|
|
1770
|
+
).void
|
|
1771
|
+
end
|
|
1772
|
+
attr_writer :proration_rounding
|
|
1773
|
+
|
|
1438
1774
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1439
1775
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1440
1776
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -1518,6 +1854,10 @@ module MetronomeSDK
|
|
|
1518
1854
|
netsuite_sales_order_id: String,
|
|
1519
1855
|
proration:
|
|
1520
1856
|
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::OrSymbol,
|
|
1857
|
+
proration_rounding:
|
|
1858
|
+
T.nilable(
|
|
1859
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::OrHash
|
|
1860
|
+
),
|
|
1521
1861
|
recurrence_frequency:
|
|
1522
1862
|
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
|
1523
1863
|
rollover_fraction: Float,
|
|
@@ -1557,6 +1897,8 @@ module MetronomeSDK
|
|
|
1557
1897
|
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1558
1898
|
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1559
1899
|
proration: nil,
|
|
1900
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
1901
|
+
proration_rounding: nil,
|
|
1560
1902
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1561
1903
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1562
1904
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -1602,6 +1944,10 @@ module MetronomeSDK
|
|
|
1602
1944
|
netsuite_sales_order_id: String,
|
|
1603
1945
|
proration:
|
|
1604
1946
|
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration::TaggedSymbol,
|
|
1947
|
+
proration_rounding:
|
|
1948
|
+
T.nilable(
|
|
1949
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding
|
|
1950
|
+
),
|
|
1605
1951
|
recurrence_frequency:
|
|
1606
1952
|
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
|
|
1607
1953
|
rollover_fraction: Float,
|
|
@@ -1863,6 +2209,146 @@ module MetronomeSDK
|
|
|
1863
2209
|
end
|
|
1864
2210
|
end
|
|
1865
2211
|
|
|
2212
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
2213
|
+
OrHash =
|
|
2214
|
+
T.type_alias do
|
|
2215
|
+
T.any(
|
|
2216
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding,
|
|
2217
|
+
MetronomeSDK::Internal::AnyHash
|
|
2218
|
+
)
|
|
2219
|
+
end
|
|
2220
|
+
|
|
2221
|
+
sig do
|
|
2222
|
+
returns(
|
|
2223
|
+
T.nilable(
|
|
2224
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access
|
|
2225
|
+
)
|
|
2226
|
+
)
|
|
2227
|
+
end
|
|
2228
|
+
attr_reader :access
|
|
2229
|
+
|
|
2230
|
+
sig do
|
|
2231
|
+
params(
|
|
2232
|
+
access:
|
|
2233
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::OrHash
|
|
2234
|
+
).void
|
|
2235
|
+
end
|
|
2236
|
+
attr_writer :access
|
|
2237
|
+
|
|
2238
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
2239
|
+
sig do
|
|
2240
|
+
params(
|
|
2241
|
+
access:
|
|
2242
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::OrHash
|
|
2243
|
+
).returns(T.attached_class)
|
|
2244
|
+
end
|
|
2245
|
+
def self.new(access: nil)
|
|
2246
|
+
end
|
|
2247
|
+
|
|
2248
|
+
sig do
|
|
2249
|
+
override.returns(
|
|
2250
|
+
{
|
|
2251
|
+
access:
|
|
2252
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access
|
|
2253
|
+
}
|
|
2254
|
+
)
|
|
2255
|
+
end
|
|
2256
|
+
def to_hash
|
|
2257
|
+
end
|
|
2258
|
+
|
|
2259
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
2260
|
+
OrHash =
|
|
2261
|
+
T.type_alias do
|
|
2262
|
+
T.any(
|
|
2263
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access,
|
|
2264
|
+
MetronomeSDK::Internal::AnyHash
|
|
2265
|
+
)
|
|
2266
|
+
end
|
|
2267
|
+
|
|
2268
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
2269
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2270
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2271
|
+
# dollar).
|
|
2272
|
+
sig { returns(Float) }
|
|
2273
|
+
attr_accessor :decimal_places
|
|
2274
|
+
|
|
2275
|
+
sig do
|
|
2276
|
+
returns(
|
|
2277
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2278
|
+
)
|
|
2279
|
+
end
|
|
2280
|
+
attr_accessor :rounding_method
|
|
2281
|
+
|
|
2282
|
+
sig do
|
|
2283
|
+
params(
|
|
2284
|
+
decimal_places: Float,
|
|
2285
|
+
rounding_method:
|
|
2286
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
|
|
2287
|
+
).returns(T.attached_class)
|
|
2288
|
+
end
|
|
2289
|
+
def self.new(
|
|
2290
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
2291
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2292
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
2293
|
+
# dollar).
|
|
2294
|
+
decimal_places:,
|
|
2295
|
+
rounding_method:
|
|
2296
|
+
)
|
|
2297
|
+
end
|
|
2298
|
+
|
|
2299
|
+
sig do
|
|
2300
|
+
override.returns(
|
|
2301
|
+
{
|
|
2302
|
+
decimal_places: Float,
|
|
2303
|
+
rounding_method:
|
|
2304
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2305
|
+
}
|
|
2306
|
+
)
|
|
2307
|
+
end
|
|
2308
|
+
def to_hash
|
|
2309
|
+
end
|
|
2310
|
+
|
|
2311
|
+
module RoundingMethod
|
|
2312
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2313
|
+
|
|
2314
|
+
TaggedSymbol =
|
|
2315
|
+
T.type_alias do
|
|
2316
|
+
T.all(
|
|
2317
|
+
Symbol,
|
|
2318
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod
|
|
2319
|
+
)
|
|
2320
|
+
end
|
|
2321
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2322
|
+
|
|
2323
|
+
HALF_UP =
|
|
2324
|
+
T.let(
|
|
2325
|
+
:HALF_UP,
|
|
2326
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2327
|
+
)
|
|
2328
|
+
FLOOR =
|
|
2329
|
+
T.let(
|
|
2330
|
+
:FLOOR,
|
|
2331
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2332
|
+
)
|
|
2333
|
+
CEILING =
|
|
2334
|
+
T.let(
|
|
2335
|
+
:CEILING,
|
|
2336
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2337
|
+
)
|
|
2338
|
+
|
|
2339
|
+
sig do
|
|
2340
|
+
override.returns(
|
|
2341
|
+
T::Array[
|
|
2342
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
|
|
2343
|
+
]
|
|
2344
|
+
)
|
|
2345
|
+
end
|
|
2346
|
+
def self.values
|
|
2347
|
+
end
|
|
2348
|
+
end
|
|
2349
|
+
end
|
|
2350
|
+
end
|
|
2351
|
+
|
|
1866
2352
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1867
2353
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1868
2354
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -1900,6 +2386,11 @@ module MetronomeSDK
|
|
|
1900
2386
|
:WEEKLY,
|
|
1901
2387
|
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
1902
2388
|
)
|
|
2389
|
+
DAILY =
|
|
2390
|
+
T.let(
|
|
2391
|
+
:DAILY,
|
|
2392
|
+
MetronomeSDK::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2393
|
+
)
|
|
1903
2394
|
|
|
1904
2395
|
sig do
|
|
1905
2396
|
override.returns(
|
|
@@ -2129,6 +2620,346 @@ module MetronomeSDK
|
|
|
2129
2620
|
end
|
|
2130
2621
|
end
|
|
2131
2622
|
|
|
2623
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
2624
|
+
OrHash =
|
|
2625
|
+
T.type_alias do
|
|
2626
|
+
T.any(
|
|
2627
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker,
|
|
2628
|
+
MetronomeSDK::Internal::AnyHash
|
|
2629
|
+
)
|
|
2630
|
+
end
|
|
2631
|
+
|
|
2632
|
+
# Human-readable identifier, unique per contract.
|
|
2633
|
+
sig { returns(String) }
|
|
2634
|
+
attr_accessor :alias_
|
|
2635
|
+
|
|
2636
|
+
sig do
|
|
2637
|
+
returns(
|
|
2638
|
+
T::Array[
|
|
2639
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier
|
|
2640
|
+
]
|
|
2641
|
+
)
|
|
2642
|
+
end
|
|
2643
|
+
attr_accessor :applicable_spend_specifiers
|
|
2644
|
+
|
|
2645
|
+
sig { returns(String) }
|
|
2646
|
+
attr_accessor :credit_type_id
|
|
2647
|
+
|
|
2648
|
+
sig do
|
|
2649
|
+
returns(
|
|
2650
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency::TaggedSymbol
|
|
2651
|
+
)
|
|
2652
|
+
end
|
|
2653
|
+
attr_accessor :reset_frequency
|
|
2654
|
+
|
|
2655
|
+
sig do
|
|
2656
|
+
returns(
|
|
2657
|
+
T.nilable(
|
|
2658
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend
|
|
2659
|
+
)
|
|
2660
|
+
)
|
|
2661
|
+
end
|
|
2662
|
+
attr_reader :accumulated_spend
|
|
2663
|
+
|
|
2664
|
+
sig do
|
|
2665
|
+
params(
|
|
2666
|
+
accumulated_spend:
|
|
2667
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend::OrHash
|
|
2668
|
+
).void
|
|
2669
|
+
end
|
|
2670
|
+
attr_writer :accumulated_spend
|
|
2671
|
+
|
|
2672
|
+
sig do
|
|
2673
|
+
params(
|
|
2674
|
+
alias_: String,
|
|
2675
|
+
applicable_spend_specifiers:
|
|
2676
|
+
T::Array[
|
|
2677
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::OrHash
|
|
2678
|
+
],
|
|
2679
|
+
credit_type_id: String,
|
|
2680
|
+
reset_frequency:
|
|
2681
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency::OrSymbol,
|
|
2682
|
+
accumulated_spend:
|
|
2683
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend::OrHash
|
|
2684
|
+
).returns(T.attached_class)
|
|
2685
|
+
end
|
|
2686
|
+
def self.new(
|
|
2687
|
+
# Human-readable identifier, unique per contract.
|
|
2688
|
+
alias_:,
|
|
2689
|
+
applicable_spend_specifiers:,
|
|
2690
|
+
credit_type_id:,
|
|
2691
|
+
reset_frequency:,
|
|
2692
|
+
accumulated_spend: nil
|
|
2693
|
+
)
|
|
2694
|
+
end
|
|
2695
|
+
|
|
2696
|
+
sig do
|
|
2697
|
+
override.returns(
|
|
2698
|
+
{
|
|
2699
|
+
alias_: String,
|
|
2700
|
+
applicable_spend_specifiers:
|
|
2701
|
+
T::Array[
|
|
2702
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier
|
|
2703
|
+
],
|
|
2704
|
+
credit_type_id: String,
|
|
2705
|
+
reset_frequency:
|
|
2706
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency::TaggedSymbol,
|
|
2707
|
+
accumulated_spend:
|
|
2708
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend
|
|
2709
|
+
}
|
|
2710
|
+
)
|
|
2711
|
+
end
|
|
2712
|
+
def to_hash
|
|
2713
|
+
end
|
|
2714
|
+
|
|
2715
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
2716
|
+
OrHash =
|
|
2717
|
+
T.type_alias do
|
|
2718
|
+
T.any(
|
|
2719
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier,
|
|
2720
|
+
MetronomeSDK::Internal::AnyHash
|
|
2721
|
+
)
|
|
2722
|
+
end
|
|
2723
|
+
|
|
2724
|
+
sig do
|
|
2725
|
+
returns(
|
|
2726
|
+
T::Array[
|
|
2727
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
2728
|
+
]
|
|
2729
|
+
)
|
|
2730
|
+
end
|
|
2731
|
+
attr_accessor :sources
|
|
2732
|
+
|
|
2733
|
+
sig do
|
|
2734
|
+
returns(
|
|
2735
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
2736
|
+
)
|
|
2737
|
+
end
|
|
2738
|
+
attr_accessor :spend_type
|
|
2739
|
+
|
|
2740
|
+
sig do
|
|
2741
|
+
returns(
|
|
2742
|
+
T.nilable(
|
|
2743
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2744
|
+
)
|
|
2745
|
+
)
|
|
2746
|
+
end
|
|
2747
|
+
attr_reader :discounted
|
|
2748
|
+
|
|
2749
|
+
sig do
|
|
2750
|
+
params(
|
|
2751
|
+
discounted:
|
|
2752
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
2753
|
+
).void
|
|
2754
|
+
end
|
|
2755
|
+
attr_writer :discounted
|
|
2756
|
+
|
|
2757
|
+
sig do
|
|
2758
|
+
params(
|
|
2759
|
+
sources:
|
|
2760
|
+
T::Array[
|
|
2761
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::OrSymbol
|
|
2762
|
+
],
|
|
2763
|
+
spend_type:
|
|
2764
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType::OrSymbol,
|
|
2765
|
+
discounted:
|
|
2766
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::OrSymbol
|
|
2767
|
+
).returns(T.attached_class)
|
|
2768
|
+
end
|
|
2769
|
+
def self.new(sources:, spend_type:, discounted: nil)
|
|
2770
|
+
end
|
|
2771
|
+
|
|
2772
|
+
sig do
|
|
2773
|
+
override.returns(
|
|
2774
|
+
{
|
|
2775
|
+
sources:
|
|
2776
|
+
T::Array[
|
|
2777
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
2778
|
+
],
|
|
2779
|
+
spend_type:
|
|
2780
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol,
|
|
2781
|
+
discounted:
|
|
2782
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2783
|
+
}
|
|
2784
|
+
)
|
|
2785
|
+
end
|
|
2786
|
+
def to_hash
|
|
2787
|
+
end
|
|
2788
|
+
|
|
2789
|
+
module Source
|
|
2790
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2791
|
+
|
|
2792
|
+
TaggedSymbol =
|
|
2793
|
+
T.type_alias do
|
|
2794
|
+
T.all(
|
|
2795
|
+
Symbol,
|
|
2796
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source
|
|
2797
|
+
)
|
|
2798
|
+
end
|
|
2799
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2800
|
+
|
|
2801
|
+
THRESHOLD_RECHARGE =
|
|
2802
|
+
T.let(
|
|
2803
|
+
:THRESHOLD_RECHARGE,
|
|
2804
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
2805
|
+
)
|
|
2806
|
+
MANUAL =
|
|
2807
|
+
T.let(
|
|
2808
|
+
:MANUAL,
|
|
2809
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
2810
|
+
)
|
|
2811
|
+
|
|
2812
|
+
sig do
|
|
2813
|
+
override.returns(
|
|
2814
|
+
T::Array[
|
|
2815
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source::TaggedSymbol
|
|
2816
|
+
]
|
|
2817
|
+
)
|
|
2818
|
+
end
|
|
2819
|
+
def self.values
|
|
2820
|
+
end
|
|
2821
|
+
end
|
|
2822
|
+
|
|
2823
|
+
module SpendType
|
|
2824
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2825
|
+
|
|
2826
|
+
TaggedSymbol =
|
|
2827
|
+
T.type_alias do
|
|
2828
|
+
T.all(
|
|
2829
|
+
Symbol,
|
|
2830
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType
|
|
2831
|
+
)
|
|
2832
|
+
end
|
|
2833
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2834
|
+
|
|
2835
|
+
COMMIT_PURCHASE =
|
|
2836
|
+
T.let(
|
|
2837
|
+
:COMMIT_PURCHASE,
|
|
2838
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
2839
|
+
)
|
|
2840
|
+
|
|
2841
|
+
sig do
|
|
2842
|
+
override.returns(
|
|
2843
|
+
T::Array[
|
|
2844
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType::TaggedSymbol
|
|
2845
|
+
]
|
|
2846
|
+
)
|
|
2847
|
+
end
|
|
2848
|
+
def self.values
|
|
2849
|
+
end
|
|
2850
|
+
end
|
|
2851
|
+
|
|
2852
|
+
module Discounted
|
|
2853
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2854
|
+
|
|
2855
|
+
TaggedSymbol =
|
|
2856
|
+
T.type_alias do
|
|
2857
|
+
T.all(
|
|
2858
|
+
Symbol,
|
|
2859
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted
|
|
2860
|
+
)
|
|
2861
|
+
end
|
|
2862
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2863
|
+
|
|
2864
|
+
ANY =
|
|
2865
|
+
T.let(
|
|
2866
|
+
:ANY,
|
|
2867
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2868
|
+
)
|
|
2869
|
+
DISCOUNTED_ONLY =
|
|
2870
|
+
T.let(
|
|
2871
|
+
:DISCOUNTED_ONLY,
|
|
2872
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2873
|
+
)
|
|
2874
|
+
UNDISCOUNTED_ONLY =
|
|
2875
|
+
T.let(
|
|
2876
|
+
:UNDISCOUNTED_ONLY,
|
|
2877
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2878
|
+
)
|
|
2879
|
+
|
|
2880
|
+
sig do
|
|
2881
|
+
override.returns(
|
|
2882
|
+
T::Array[
|
|
2883
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted::TaggedSymbol
|
|
2884
|
+
]
|
|
2885
|
+
)
|
|
2886
|
+
end
|
|
2887
|
+
def self.values
|
|
2888
|
+
end
|
|
2889
|
+
end
|
|
2890
|
+
end
|
|
2891
|
+
|
|
2892
|
+
module ResetFrequency
|
|
2893
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2894
|
+
|
|
2895
|
+
TaggedSymbol =
|
|
2896
|
+
T.type_alias do
|
|
2897
|
+
T.all(
|
|
2898
|
+
Symbol,
|
|
2899
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency
|
|
2900
|
+
)
|
|
2901
|
+
end
|
|
2902
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2903
|
+
|
|
2904
|
+
BILLING_PERIOD =
|
|
2905
|
+
T.let(
|
|
2906
|
+
:BILLING_PERIOD,
|
|
2907
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency::TaggedSymbol
|
|
2908
|
+
)
|
|
2909
|
+
|
|
2910
|
+
sig do
|
|
2911
|
+
override.returns(
|
|
2912
|
+
T::Array[
|
|
2913
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency::TaggedSymbol
|
|
2914
|
+
]
|
|
2915
|
+
)
|
|
2916
|
+
end
|
|
2917
|
+
def self.values
|
|
2918
|
+
end
|
|
2919
|
+
end
|
|
2920
|
+
|
|
2921
|
+
class AccumulatedSpend < MetronomeSDK::Internal::Type::BaseModel
|
|
2922
|
+
OrHash =
|
|
2923
|
+
T.type_alias do
|
|
2924
|
+
T.any(
|
|
2925
|
+
MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend,
|
|
2926
|
+
MetronomeSDK::Internal::AnyHash
|
|
2927
|
+
)
|
|
2928
|
+
end
|
|
2929
|
+
|
|
2930
|
+
sig { returns(Float) }
|
|
2931
|
+
attr_accessor :amount
|
|
2932
|
+
|
|
2933
|
+
sig { returns(Time) }
|
|
2934
|
+
attr_accessor :period_ending_before
|
|
2935
|
+
|
|
2936
|
+
sig { returns(Time) }
|
|
2937
|
+
attr_accessor :period_starting_at
|
|
2938
|
+
|
|
2939
|
+
sig do
|
|
2940
|
+
params(
|
|
2941
|
+
amount: Float,
|
|
2942
|
+
period_ending_before: Time,
|
|
2943
|
+
period_starting_at: Time
|
|
2944
|
+
).returns(T.attached_class)
|
|
2945
|
+
end
|
|
2946
|
+
def self.new(amount:, period_ending_before:, period_starting_at:)
|
|
2947
|
+
end
|
|
2948
|
+
|
|
2949
|
+
sig do
|
|
2950
|
+
override.returns(
|
|
2951
|
+
{
|
|
2952
|
+
amount: Float,
|
|
2953
|
+
period_ending_before: Time,
|
|
2954
|
+
period_starting_at: Time
|
|
2955
|
+
}
|
|
2956
|
+
)
|
|
2957
|
+
end
|
|
2958
|
+
def to_hash
|
|
2959
|
+
end
|
|
2960
|
+
end
|
|
2961
|
+
end
|
|
2962
|
+
|
|
2132
2963
|
class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
2133
2964
|
OrHash =
|
|
2134
2965
|
T.type_alias do
|