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
|
@@ -197,6 +197,13 @@ module MetronomeSDK
|
|
|
197
197
|
# @return [MetronomeSDK::Models::SpendThresholdConfigurationV2, nil]
|
|
198
198
|
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfigurationV2 }
|
|
199
199
|
|
|
200
|
+
# @!attribute spend_trackers
|
|
201
|
+
# Spend trackers attached to this contract.
|
|
202
|
+
#
|
|
203
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::SpendTracker>, nil]
|
|
204
|
+
optional :spend_trackers,
|
|
205
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::SpendTracker] }
|
|
206
|
+
|
|
200
207
|
# @!attribute subscriptions
|
|
201
208
|
# List of subscriptions on the contract.
|
|
202
209
|
#
|
|
@@ -215,7 +222,7 @@ module MetronomeSDK
|
|
|
215
222
|
# @return [String, nil]
|
|
216
223
|
optional :uniqueness_key, String
|
|
217
224
|
|
|
218
|
-
# @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, archived_at: nil, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, discounts: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, uniqueness_key: nil)
|
|
225
|
+
# @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, archived_at: nil, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, discounts: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: nil, priority: nil, professional_services: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, salesforce_opportunity_id: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, spend_trackers: nil, subscriptions: nil, total_contract_value: nil, uniqueness_key: nil)
|
|
219
226
|
# Some parameter documentations has been truncated, see
|
|
220
227
|
# {MetronomeSDK::Models::ContractV2} for more details.
|
|
221
228
|
#
|
|
@@ -285,6 +292,8 @@ module MetronomeSDK
|
|
|
285
292
|
#
|
|
286
293
|
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfigurationV2]
|
|
287
294
|
#
|
|
295
|
+
# @param spend_trackers [Array<MetronomeSDK::Models::ContractV2::SpendTracker>] Spend trackers attached to this contract.
|
|
296
|
+
#
|
|
288
297
|
# @param subscriptions [Array<MetronomeSDK::Models::ContractV2::Subscription>] List of subscriptions on the contract.
|
|
289
298
|
#
|
|
290
299
|
# @param total_contract_value [Float]
|
|
@@ -362,6 +371,13 @@ module MetronomeSDK
|
|
|
362
371
|
# @return [MetronomeSDK::Models::ContractV2::Commit::Contract, nil]
|
|
363
372
|
optional :contract, -> { MetronomeSDK::ContractV2::Commit::Contract }
|
|
364
373
|
|
|
374
|
+
# @!attribute created_by
|
|
375
|
+
# The actor who created this commit. Omitted for system-generated commits such as
|
|
376
|
+
# recurring commits, rollover commits, and threshold commits.
|
|
377
|
+
#
|
|
378
|
+
# @return [String, nil]
|
|
379
|
+
optional :created_by, String
|
|
380
|
+
|
|
365
381
|
# @!attribute custom_fields
|
|
366
382
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
367
383
|
#
|
|
@@ -452,13 +468,19 @@ module MetronomeSDK
|
|
|
452
468
|
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
|
453
469
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
|
454
470
|
|
|
471
|
+
# @!attribute spend_tracker_attributes
|
|
472
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
473
|
+
#
|
|
474
|
+
# @return [MetronomeSDK::Models::ContractV2::Commit::SpendTrackerAttributes, nil]
|
|
475
|
+
optional :spend_tracker_attributes, -> { MetronomeSDK::ContractV2::Commit::SpendTrackerAttributes }
|
|
476
|
+
|
|
455
477
|
# @!attribute subscription_config
|
|
456
478
|
# Attach a subscription to the recurring commit/credit.
|
|
457
479
|
#
|
|
458
480
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
459
481
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
460
482
|
|
|
461
|
-
# @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_commit_id: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
|
|
483
|
+
# @!method initialize(id:, created_at:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, created_by: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_contract: nil, invoice_schedule: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_commit_id: nil, rolled_over_from: nil, rollover_fraction: nil, salesforce_opportunity_id: nil, specifiers: nil, spend_tracker_attributes: nil, subscription_config: nil)
|
|
462
484
|
# Some parameter documentations has been truncated, see
|
|
463
485
|
# {MetronomeSDK::Models::ContractV2::Commit} for more details.
|
|
464
486
|
#
|
|
@@ -484,6 +506,8 @@ module MetronomeSDK
|
|
|
484
506
|
#
|
|
485
507
|
# @param contract [MetronomeSDK::Models::ContractV2::Commit::Contract]
|
|
486
508
|
#
|
|
509
|
+
# @param created_by [String] The actor who created this commit. Omitted for system-generated commits such as
|
|
510
|
+
#
|
|
487
511
|
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
488
512
|
#
|
|
489
513
|
# @param description [String]
|
|
@@ -514,6 +538,8 @@ module MetronomeSDK
|
|
|
514
538
|
#
|
|
515
539
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
|
516
540
|
#
|
|
541
|
+
# @param spend_tracker_attributes [MetronomeSDK::Models::ContractV2::Commit::SpendTrackerAttributes] Optional attributes controlling how this commit interacts with spend trackers.
|
|
542
|
+
#
|
|
517
543
|
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
518
544
|
|
|
519
545
|
# @see MetronomeSDK::Models::ContractV2::Commit#product
|
|
@@ -1230,6 +1256,25 @@ module MetronomeSDK
|
|
|
1230
1256
|
# @param commit_id [String]
|
|
1231
1257
|
# @param contract_id [String]
|
|
1232
1258
|
end
|
|
1259
|
+
|
|
1260
|
+
# @see MetronomeSDK::Models::ContractV2::Commit#spend_tracker_attributes
|
|
1261
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
1262
|
+
# @!attribute counts_as_discounted
|
|
1263
|
+
# If true, this commit is included in spend trackers with discounted set to
|
|
1264
|
+
# DISCOUNTED_ONLY
|
|
1265
|
+
#
|
|
1266
|
+
# @return [Boolean]
|
|
1267
|
+
required :counts_as_discounted, MetronomeSDK::Internal::Type::Boolean
|
|
1268
|
+
|
|
1269
|
+
# @!method initialize(counts_as_discounted:)
|
|
1270
|
+
# Some parameter documentations has been truncated, see
|
|
1271
|
+
# {MetronomeSDK::Models::ContractV2::Commit::SpendTrackerAttributes} for more
|
|
1272
|
+
# details.
|
|
1273
|
+
#
|
|
1274
|
+
# Optional attributes controlling how this commit interacts with spend trackers.
|
|
1275
|
+
#
|
|
1276
|
+
# @param counts_as_discounted [Boolean] If true, this commit is included in spend trackers with discounted set to DISCOU
|
|
1277
|
+
end
|
|
1233
1278
|
end
|
|
1234
1279
|
|
|
1235
1280
|
class Override < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -1327,6 +1372,11 @@ module MetronomeSDK
|
|
|
1327
1372
|
# @param type [Symbol, MetronomeSDK::Models::ContractV2::Override::Type]
|
|
1328
1373
|
|
|
1329
1374
|
class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
1375
|
+
# @!attribute any_commit_or_credit_ids
|
|
1376
|
+
#
|
|
1377
|
+
# @return [Array<String>, nil]
|
|
1378
|
+
optional :any_commit_or_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1379
|
+
|
|
1330
1380
|
# @!attribute billing_frequency
|
|
1331
1381
|
#
|
|
1332
1382
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier::BillingFrequency, nil]
|
|
@@ -1363,7 +1413,8 @@ module MetronomeSDK
|
|
|
1363
1413
|
# @return [Array<String>, nil]
|
|
1364
1414
|
optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
1365
1415
|
|
|
1366
|
-
# @!method initialize(billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil)
|
|
1416
|
+
# @!method initialize(any_commit_or_credit_ids: nil, billing_frequency: nil, commit_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_ids: nil)
|
|
1417
|
+
# @param any_commit_or_credit_ids [Array<String>]
|
|
1367
1418
|
# @param billing_frequency [Symbol, MetronomeSDK::Models::ContractV2::Override::OverrideSpecifier::BillingFrequency]
|
|
1368
1419
|
# @param commit_ids [Array<String>]
|
|
1369
1420
|
# @param presentation_group_values [Hash{Symbol=>String, nil}]
|
|
@@ -1678,6 +1729,13 @@ module MetronomeSDK
|
|
|
1678
1729
|
# @return [Time, nil]
|
|
1679
1730
|
optional :created_at, Time
|
|
1680
1731
|
|
|
1732
|
+
# @!attribute created_by
|
|
1733
|
+
# The actor who created this credit. Omitted for system-generated credits such as
|
|
1734
|
+
# recurring credits.
|
|
1735
|
+
#
|
|
1736
|
+
# @return [String, nil]
|
|
1737
|
+
optional :created_by, String
|
|
1738
|
+
|
|
1681
1739
|
# @!attribute custom_fields
|
|
1682
1740
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1683
1741
|
#
|
|
@@ -1752,7 +1810,7 @@ module MetronomeSDK
|
|
|
1752
1810
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
1753
1811
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
1754
1812
|
|
|
1755
|
-
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, created_at: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, recurring_credit_id: nil, rolled_over_from: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
|
|
1813
|
+
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, archived_at: nil, balance: nil, contract: nil, created_at: nil, created_by: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, recurring_credit_id: nil, rolled_over_from: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil)
|
|
1756
1814
|
# Some parameter documentations has been truncated, see
|
|
1757
1815
|
# {MetronomeSDK::Models::ContractV2::Credit} for more details.
|
|
1758
1816
|
#
|
|
@@ -1778,6 +1836,8 @@ module MetronomeSDK
|
|
|
1778
1836
|
#
|
|
1779
1837
|
# @param created_at [Time] Timestamp of when the credit was created.
|
|
1780
1838
|
#
|
|
1839
|
+
# @param created_by [String] The actor who created this credit. Omitted for system-generated credits such as
|
|
1840
|
+
#
|
|
1781
1841
|
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
1782
1842
|
#
|
|
1783
1843
|
# @param description [String]
|
|
@@ -2627,6 +2687,14 @@ module MetronomeSDK
|
|
|
2627
2687
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::Proration, nil]
|
|
2628
2688
|
optional :proration, enum: -> { MetronomeSDK::ContractV2::RecurringCommit::Proration }
|
|
2629
2689
|
|
|
2690
|
+
# @!attribute proration_rounding
|
|
2691
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
2692
|
+
#
|
|
2693
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding, nil]
|
|
2694
|
+
optional :proration_rounding,
|
|
2695
|
+
-> { MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding },
|
|
2696
|
+
nil?: true
|
|
2697
|
+
|
|
2630
2698
|
# @!attribute recurrence_frequency
|
|
2631
2699
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2632
2700
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -2660,7 +2728,7 @@ module MetronomeSDK
|
|
|
2660
2728
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
2661
2729
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
2662
2730
|
|
|
2663
|
-
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
2731
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, proration_rounding: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
2664
2732
|
# Some parameter documentations has been truncated, see
|
|
2665
2733
|
# {MetronomeSDK::Models::ContractV2::RecurringCommit} for more details.
|
|
2666
2734
|
#
|
|
@@ -2698,6 +2766,8 @@ module MetronomeSDK
|
|
|
2698
2766
|
#
|
|
2699
2767
|
# @param proration [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
2700
2768
|
#
|
|
2769
|
+
# @param proration_rounding [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding, nil] Rounding configuration for prorated recurring commit amounts.
|
|
2770
|
+
#
|
|
2701
2771
|
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
|
2702
2772
|
#
|
|
2703
2773
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
@@ -2842,6 +2912,101 @@ module MetronomeSDK
|
|
|
2842
2912
|
# @return [Array<Symbol>]
|
|
2843
2913
|
end
|
|
2844
2914
|
|
|
2915
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit#proration_rounding
|
|
2916
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
2917
|
+
# @!attribute access
|
|
2918
|
+
#
|
|
2919
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access, nil]
|
|
2920
|
+
optional :access, -> { MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access }
|
|
2921
|
+
|
|
2922
|
+
# @!attribute invoice
|
|
2923
|
+
#
|
|
2924
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice, nil]
|
|
2925
|
+
optional :invoice, -> { MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice }
|
|
2926
|
+
|
|
2927
|
+
# @!method initialize(access: nil, invoice: nil)
|
|
2928
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
2929
|
+
#
|
|
2930
|
+
# @param access [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access]
|
|
2931
|
+
# @param invoice [MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice]
|
|
2932
|
+
|
|
2933
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding#access
|
|
2934
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
2935
|
+
# @!attribute decimal_places
|
|
2936
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
2937
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2938
|
+
# nearest 100 in the stored unit).
|
|
2939
|
+
#
|
|
2940
|
+
# @return [Float]
|
|
2941
|
+
required :decimal_places, Float
|
|
2942
|
+
|
|
2943
|
+
# @!attribute rounding_method
|
|
2944
|
+
#
|
|
2945
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod]
|
|
2946
|
+
required :rounding_method,
|
|
2947
|
+
enum: -> { MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod }
|
|
2948
|
+
|
|
2949
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
2950
|
+
# Some parameter documentations has been truncated, see
|
|
2951
|
+
# {MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access}
|
|
2952
|
+
# for more details.
|
|
2953
|
+
#
|
|
2954
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
2955
|
+
#
|
|
2956
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access::RoundingMethod]
|
|
2957
|
+
|
|
2958
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Access#rounding_method
|
|
2959
|
+
module RoundingMethod
|
|
2960
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2961
|
+
|
|
2962
|
+
HALF_UP = :HALF_UP
|
|
2963
|
+
FLOOR = :FLOOR
|
|
2964
|
+
CEILING = :CEILING
|
|
2965
|
+
|
|
2966
|
+
# @!method self.values
|
|
2967
|
+
# @return [Array<Symbol>]
|
|
2968
|
+
end
|
|
2969
|
+
end
|
|
2970
|
+
|
|
2971
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding#invoice
|
|
2972
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
2973
|
+
# @!attribute decimal_places
|
|
2974
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
2975
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
2976
|
+
# nearest 100 in the stored unit).
|
|
2977
|
+
#
|
|
2978
|
+
# @return [Float]
|
|
2979
|
+
required :decimal_places, Float
|
|
2980
|
+
|
|
2981
|
+
# @!attribute rounding_method
|
|
2982
|
+
#
|
|
2983
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
|
|
2984
|
+
required :rounding_method,
|
|
2985
|
+
enum: -> { MetronomeSDK::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod }
|
|
2986
|
+
|
|
2987
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
2988
|
+
# Some parameter documentations has been truncated, see
|
|
2989
|
+
# {MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice}
|
|
2990
|
+
# for more details.
|
|
2991
|
+
#
|
|
2992
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
2993
|
+
#
|
|
2994
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
|
|
2995
|
+
|
|
2996
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCommit::ProrationRounding::Invoice#rounding_method
|
|
2997
|
+
module RoundingMethod
|
|
2998
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2999
|
+
|
|
3000
|
+
HALF_UP = :HALF_UP
|
|
3001
|
+
FLOOR = :FLOOR
|
|
3002
|
+
CEILING = :CEILING
|
|
3003
|
+
|
|
3004
|
+
# @!method self.values
|
|
3005
|
+
# @return [Array<Symbol>]
|
|
3006
|
+
end
|
|
3007
|
+
end
|
|
3008
|
+
end
|
|
3009
|
+
|
|
2845
3010
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2846
3011
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
2847
3012
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -2856,6 +3021,7 @@ module MetronomeSDK
|
|
|
2856
3021
|
QUARTERLY = :QUARTERLY
|
|
2857
3022
|
ANNUAL = :ANNUAL
|
|
2858
3023
|
WEEKLY = :WEEKLY
|
|
3024
|
+
DAILY = :DAILY
|
|
2859
3025
|
|
|
2860
3026
|
# @!method self.values
|
|
2861
3027
|
# @return [Array<Symbol>]
|
|
@@ -2957,6 +3123,14 @@ module MetronomeSDK
|
|
|
2957
3123
|
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::Proration, nil]
|
|
2958
3124
|
optional :proration, enum: -> { MetronomeSDK::ContractV2::RecurringCredit::Proration }
|
|
2959
3125
|
|
|
3126
|
+
# @!attribute proration_rounding
|
|
3127
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
3128
|
+
#
|
|
3129
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding, nil]
|
|
3130
|
+
optional :proration_rounding,
|
|
3131
|
+
-> { MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding },
|
|
3132
|
+
nil?: true
|
|
3133
|
+
|
|
2960
3134
|
# @!attribute recurrence_frequency
|
|
2961
3135
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2962
3136
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -2990,7 +3164,7 @@ module MetronomeSDK
|
|
|
2990
3164
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
2991
3165
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
2992
3166
|
|
|
2993
|
-
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
3167
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, proration_rounding: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
2994
3168
|
# Some parameter documentations has been truncated, see
|
|
2995
3169
|
# {MetronomeSDK::Models::ContractV2::RecurringCredit} for more details.
|
|
2996
3170
|
#
|
|
@@ -3026,6 +3200,8 @@ module MetronomeSDK
|
|
|
3026
3200
|
#
|
|
3027
3201
|
# @param proration [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
3028
3202
|
#
|
|
3203
|
+
# @param proration_rounding [MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding, nil] Rounding configuration for prorated recurring credit amounts.
|
|
3204
|
+
#
|
|
3029
3205
|
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
|
3030
3206
|
#
|
|
3031
3207
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
@@ -3145,6 +3321,57 @@ module MetronomeSDK
|
|
|
3145
3321
|
# @return [Array<Symbol>]
|
|
3146
3322
|
end
|
|
3147
3323
|
|
|
3324
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit#proration_rounding
|
|
3325
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
3326
|
+
# @!attribute access
|
|
3327
|
+
#
|
|
3328
|
+
# @return [MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access, nil]
|
|
3329
|
+
optional :access, -> { MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access }
|
|
3330
|
+
|
|
3331
|
+
# @!method initialize(access: nil)
|
|
3332
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
3333
|
+
#
|
|
3334
|
+
# @param access [MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access]
|
|
3335
|
+
|
|
3336
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding#access
|
|
3337
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
3338
|
+
# @!attribute decimal_places
|
|
3339
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
3340
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3341
|
+
# nearest 100 in the stored unit).
|
|
3342
|
+
#
|
|
3343
|
+
# @return [Float]
|
|
3344
|
+
required :decimal_places, Float
|
|
3345
|
+
|
|
3346
|
+
# @!attribute rounding_method
|
|
3347
|
+
#
|
|
3348
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod]
|
|
3349
|
+
required :rounding_method,
|
|
3350
|
+
enum: -> { MetronomeSDK::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod }
|
|
3351
|
+
|
|
3352
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
3353
|
+
# Some parameter documentations has been truncated, see
|
|
3354
|
+
# {MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access}
|
|
3355
|
+
# for more details.
|
|
3356
|
+
#
|
|
3357
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
3358
|
+
#
|
|
3359
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access::RoundingMethod]
|
|
3360
|
+
|
|
3361
|
+
# @see MetronomeSDK::Models::ContractV2::RecurringCredit::ProrationRounding::Access#rounding_method
|
|
3362
|
+
module RoundingMethod
|
|
3363
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3364
|
+
|
|
3365
|
+
HALF_UP = :HALF_UP
|
|
3366
|
+
FLOOR = :FLOOR
|
|
3367
|
+
CEILING = :CEILING
|
|
3368
|
+
|
|
3369
|
+
# @!method self.values
|
|
3370
|
+
# @return [Array<Symbol>]
|
|
3371
|
+
end
|
|
3372
|
+
end
|
|
3373
|
+
end
|
|
3374
|
+
|
|
3148
3375
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
3149
3376
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
3150
3377
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -3159,6 +3386,7 @@ module MetronomeSDK
|
|
|
3159
3386
|
QUARTERLY = :QUARTERLY
|
|
3160
3387
|
ANNUAL = :ANNUAL
|
|
3161
3388
|
WEEKLY = :WEEKLY
|
|
3389
|
+
DAILY = :DAILY
|
|
3162
3390
|
|
|
3163
3391
|
# @!method self.values
|
|
3164
3392
|
# @return [Array<Symbol>]
|
|
@@ -3306,6 +3534,136 @@ module MetronomeSDK
|
|
|
3306
3534
|
# @return [Array<Symbol>]
|
|
3307
3535
|
end
|
|
3308
3536
|
|
|
3537
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
3538
|
+
# @!attribute alias_
|
|
3539
|
+
# Human-readable identifier, unique per contract.
|
|
3540
|
+
#
|
|
3541
|
+
# @return [String]
|
|
3542
|
+
required :alias_, String, api_name: :alias
|
|
3543
|
+
|
|
3544
|
+
# @!attribute applicable_spend_specifiers
|
|
3545
|
+
#
|
|
3546
|
+
# @return [Array<MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier>]
|
|
3547
|
+
required :applicable_spend_specifiers,
|
|
3548
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier] }
|
|
3549
|
+
|
|
3550
|
+
# @!attribute credit_type_id
|
|
3551
|
+
#
|
|
3552
|
+
# @return [String]
|
|
3553
|
+
required :credit_type_id, String
|
|
3554
|
+
|
|
3555
|
+
# @!attribute reset_frequency
|
|
3556
|
+
#
|
|
3557
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ResetFrequency]
|
|
3558
|
+
required :reset_frequency, enum: -> { MetronomeSDK::ContractV2::SpendTracker::ResetFrequency }
|
|
3559
|
+
|
|
3560
|
+
# @!attribute accumulated_spend
|
|
3561
|
+
#
|
|
3562
|
+
# @return [MetronomeSDK::Models::ContractV2::SpendTracker::AccumulatedSpend, nil]
|
|
3563
|
+
optional :accumulated_spend, -> { MetronomeSDK::ContractV2::SpendTracker::AccumulatedSpend }
|
|
3564
|
+
|
|
3565
|
+
# @!method initialize(alias_:, applicable_spend_specifiers:, credit_type_id:, reset_frequency:, accumulated_spend: nil)
|
|
3566
|
+
# @param alias_ [String] Human-readable identifier, unique per contract.
|
|
3567
|
+
#
|
|
3568
|
+
# @param applicable_spend_specifiers [Array<MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier>]
|
|
3569
|
+
#
|
|
3570
|
+
# @param credit_type_id [String]
|
|
3571
|
+
#
|
|
3572
|
+
# @param reset_frequency [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ResetFrequency]
|
|
3573
|
+
#
|
|
3574
|
+
# @param accumulated_spend [MetronomeSDK::Models::ContractV2::SpendTracker::AccumulatedSpend]
|
|
3575
|
+
|
|
3576
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
3577
|
+
# @!attribute sources
|
|
3578
|
+
#
|
|
3579
|
+
# @return [Array<Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3580
|
+
required :sources,
|
|
3581
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[enum: MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source] }
|
|
3582
|
+
|
|
3583
|
+
# @!attribute spend_type
|
|
3584
|
+
#
|
|
3585
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3586
|
+
required :spend_type,
|
|
3587
|
+
enum: -> { MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType }
|
|
3588
|
+
|
|
3589
|
+
# @!attribute discounted
|
|
3590
|
+
#
|
|
3591
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted, nil]
|
|
3592
|
+
optional :discounted,
|
|
3593
|
+
enum: -> { MetronomeSDK::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted }
|
|
3594
|
+
|
|
3595
|
+
# @!method initialize(sources:, spend_type:, discounted: nil)
|
|
3596
|
+
# @param sources [Array<Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3597
|
+
# @param spend_type [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3598
|
+
# @param discounted [Symbol, MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier::Discounted]
|
|
3599
|
+
|
|
3600
|
+
module Source
|
|
3601
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3602
|
+
|
|
3603
|
+
THRESHOLD_RECHARGE = :THRESHOLD_RECHARGE
|
|
3604
|
+
MANUAL = :MANUAL
|
|
3605
|
+
|
|
3606
|
+
# @!method self.values
|
|
3607
|
+
# @return [Array<Symbol>]
|
|
3608
|
+
end
|
|
3609
|
+
|
|
3610
|
+
# @see MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier#spend_type
|
|
3611
|
+
module SpendType
|
|
3612
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3613
|
+
|
|
3614
|
+
COMMIT_PURCHASE = :COMMIT_PURCHASE
|
|
3615
|
+
|
|
3616
|
+
# @!method self.values
|
|
3617
|
+
# @return [Array<Symbol>]
|
|
3618
|
+
end
|
|
3619
|
+
|
|
3620
|
+
# @see MetronomeSDK::Models::ContractV2::SpendTracker::ApplicableSpendSpecifier#discounted
|
|
3621
|
+
module Discounted
|
|
3622
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3623
|
+
|
|
3624
|
+
ANY = :ANY
|
|
3625
|
+
DISCOUNTED_ONLY = :DISCOUNTED_ONLY
|
|
3626
|
+
UNDISCOUNTED_ONLY = :UNDISCOUNTED_ONLY
|
|
3627
|
+
|
|
3628
|
+
# @!method self.values
|
|
3629
|
+
# @return [Array<Symbol>]
|
|
3630
|
+
end
|
|
3631
|
+
end
|
|
3632
|
+
|
|
3633
|
+
# @see MetronomeSDK::Models::ContractV2::SpendTracker#reset_frequency
|
|
3634
|
+
module ResetFrequency
|
|
3635
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3636
|
+
|
|
3637
|
+
BILLING_PERIOD = :BILLING_PERIOD
|
|
3638
|
+
|
|
3639
|
+
# @!method self.values
|
|
3640
|
+
# @return [Array<Symbol>]
|
|
3641
|
+
end
|
|
3642
|
+
|
|
3643
|
+
# @see MetronomeSDK::Models::ContractV2::SpendTracker#accumulated_spend
|
|
3644
|
+
class AccumulatedSpend < MetronomeSDK::Internal::Type::BaseModel
|
|
3645
|
+
# @!attribute amount
|
|
3646
|
+
#
|
|
3647
|
+
# @return [Float]
|
|
3648
|
+
required :amount, Float
|
|
3649
|
+
|
|
3650
|
+
# @!attribute period_ending_before
|
|
3651
|
+
#
|
|
3652
|
+
# @return [Time]
|
|
3653
|
+
required :period_ending_before, Time
|
|
3654
|
+
|
|
3655
|
+
# @!attribute period_starting_at
|
|
3656
|
+
#
|
|
3657
|
+
# @return [Time]
|
|
3658
|
+
required :period_starting_at, Time
|
|
3659
|
+
|
|
3660
|
+
# @!method initialize(amount:, period_ending_before:, period_starting_at:)
|
|
3661
|
+
# @param amount [Float]
|
|
3662
|
+
# @param period_ending_before [Time]
|
|
3663
|
+
# @param period_starting_at [Time]
|
|
3664
|
+
end
|
|
3665
|
+
end
|
|
3666
|
+
|
|
3309
3667
|
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
|
3310
3668
|
# @!attribute billing_periods
|
|
3311
3669
|
# Previous, current, and next billing periods for the subscription.
|
|
@@ -3361,6 +3719,11 @@ module MetronomeSDK
|
|
|
3361
3719
|
# @return [String, nil]
|
|
3362
3720
|
optional :id, String
|
|
3363
3721
|
|
|
3722
|
+
# @!attribute billing_cycle_config
|
|
3723
|
+
#
|
|
3724
|
+
# @return [MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig, nil]
|
|
3725
|
+
optional :billing_cycle_config, -> { MetronomeSDK::ContractV2::Subscription::BillingCycleConfig }
|
|
3726
|
+
|
|
3364
3727
|
# @!attribute custom_fields
|
|
3365
3728
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3366
3729
|
#
|
|
@@ -3392,7 +3755,7 @@ module MetronomeSDK
|
|
|
3392
3755
|
# @return [MetronomeSDK::Models::ContractV2::Subscription::SeatConfig, nil]
|
|
3393
3756
|
optional :seat_config, -> { MetronomeSDK::ContractV2::Subscription::SeatConfig }
|
|
3394
3757
|
|
|
3395
|
-
# @!method initialize(billing_periods:, collection_schedule:, proration:, quantity_management_mode:, quantity_schedule:, starting_at:, subscription_rate:, id: nil, custom_fields: nil, description: nil, ending_before: nil, fiat_credit_type_id: nil, name: nil, seat_config: nil)
|
|
3758
|
+
# @!method initialize(billing_periods:, collection_schedule:, proration:, quantity_management_mode:, quantity_schedule:, starting_at:, subscription_rate:, id: nil, billing_cycle_config: nil, custom_fields: nil, description: nil, ending_before: nil, fiat_credit_type_id: nil, name: nil, seat_config: nil)
|
|
3396
3759
|
# Some parameter documentations has been truncated, see
|
|
3397
3760
|
# {MetronomeSDK::Models::ContractV2::Subscription} for more details.
|
|
3398
3761
|
#
|
|
@@ -3412,6 +3775,8 @@ module MetronomeSDK
|
|
|
3412
3775
|
#
|
|
3413
3776
|
# @param id [String]
|
|
3414
3777
|
#
|
|
3778
|
+
# @param billing_cycle_config [MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig]
|
|
3779
|
+
#
|
|
3415
3780
|
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
3416
3781
|
#
|
|
3417
3782
|
# @param description [String]
|
|
@@ -3528,9 +3893,15 @@ module MetronomeSDK
|
|
|
3528
3893
|
# @return [Boolean]
|
|
3529
3894
|
required :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
3530
3895
|
|
|
3531
|
-
# @!
|
|
3896
|
+
# @!attribute rounding
|
|
3897
|
+
#
|
|
3898
|
+
# @return [MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding, nil]
|
|
3899
|
+
optional :rounding, -> { MetronomeSDK::ContractV2::Subscription::Proration::Rounding }
|
|
3900
|
+
|
|
3901
|
+
# @!method initialize(invoice_behavior:, is_prorated:, rounding: nil)
|
|
3532
3902
|
# @param invoice_behavior [Symbol, MetronomeSDK::Models::ContractV2::Subscription::Proration::InvoiceBehavior]
|
|
3533
3903
|
# @param is_prorated [Boolean]
|
|
3904
|
+
# @param rounding [MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding]
|
|
3534
3905
|
|
|
3535
3906
|
# @see MetronomeSDK::Models::ContractV2::Subscription::Proration#invoice_behavior
|
|
3536
3907
|
module InvoiceBehavior
|
|
@@ -3542,6 +3913,44 @@ module MetronomeSDK
|
|
|
3542
3913
|
# @!method self.values
|
|
3543
3914
|
# @return [Array<Symbol>]
|
|
3544
3915
|
end
|
|
3916
|
+
|
|
3917
|
+
# @see MetronomeSDK::Models::ContractV2::Subscription::Proration#rounding
|
|
3918
|
+
class Rounding < MetronomeSDK::Internal::Type::BaseModel
|
|
3919
|
+
# @!attribute decimal_places
|
|
3920
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
3921
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
3922
|
+
# nearest 100 in the stored unit).
|
|
3923
|
+
#
|
|
3924
|
+
# @return [Float]
|
|
3925
|
+
required :decimal_places, Float
|
|
3926
|
+
|
|
3927
|
+
# @!attribute rounding_method
|
|
3928
|
+
#
|
|
3929
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding::RoundingMethod]
|
|
3930
|
+
required :rounding_method,
|
|
3931
|
+
enum: -> { MetronomeSDK::ContractV2::Subscription::Proration::Rounding::RoundingMethod }
|
|
3932
|
+
|
|
3933
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
3934
|
+
# Some parameter documentations has been truncated, see
|
|
3935
|
+
# {MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding} for more
|
|
3936
|
+
# details.
|
|
3937
|
+
#
|
|
3938
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
3939
|
+
#
|
|
3940
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding::RoundingMethod]
|
|
3941
|
+
|
|
3942
|
+
# @see MetronomeSDK::Models::ContractV2::Subscription::Proration::Rounding#rounding_method
|
|
3943
|
+
module RoundingMethod
|
|
3944
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3945
|
+
|
|
3946
|
+
HALF_UP = :HALF_UP
|
|
3947
|
+
FLOOR = :FLOOR
|
|
3948
|
+
CEILING = :CEILING
|
|
3949
|
+
|
|
3950
|
+
# @!method self.values
|
|
3951
|
+
# @return [Array<Symbol>]
|
|
3952
|
+
end
|
|
3953
|
+
end
|
|
3545
3954
|
end
|
|
3546
3955
|
|
|
3547
3956
|
# Determines how the subscription's quantity is controlled. Defaults to
|
|
@@ -3635,6 +4044,46 @@ module MetronomeSDK
|
|
|
3635
4044
|
end
|
|
3636
4045
|
end
|
|
3637
4046
|
|
|
4047
|
+
# @see MetronomeSDK::Models::ContractV2::Subscription#billing_cycle_config
|
|
4048
|
+
class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
4049
|
+
# @!attribute anchor_date
|
|
4050
|
+
# The date this subscription's billing cycle is anchored to.
|
|
4051
|
+
#
|
|
4052
|
+
# @return [Time]
|
|
4053
|
+
required :anchor_date, Time
|
|
4054
|
+
|
|
4055
|
+
# @!attribute invoice_placement
|
|
4056
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
4057
|
+
# own scheduled invoice.
|
|
4058
|
+
#
|
|
4059
|
+
# @return [Symbol, MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement]
|
|
4060
|
+
required :invoice_placement,
|
|
4061
|
+
enum: -> { MetronomeSDK::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement }
|
|
4062
|
+
|
|
4063
|
+
# @!method initialize(anchor_date:, invoice_placement:)
|
|
4064
|
+
# Some parameter documentations has been truncated, see
|
|
4065
|
+
# {MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig} for more
|
|
4066
|
+
# details.
|
|
4067
|
+
#
|
|
4068
|
+
# @param anchor_date [Time] The date this subscription's billing cycle is anchored to.
|
|
4069
|
+
#
|
|
4070
|
+
# @param invoice_placement [Symbol, MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig::InvoicePlacement] Controls whether this subscription consolidates onto usage invoices or gets its
|
|
4071
|
+
|
|
4072
|
+
# Controls whether this subscription consolidates onto usage invoices or gets its
|
|
4073
|
+
# own scheduled invoice.
|
|
4074
|
+
#
|
|
4075
|
+
# @see MetronomeSDK::Models::ContractV2::Subscription::BillingCycleConfig#invoice_placement
|
|
4076
|
+
module InvoicePlacement
|
|
4077
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
4078
|
+
|
|
4079
|
+
ON_SCHEDULED_INVOICE = :ON_SCHEDULED_INVOICE
|
|
4080
|
+
ON_USAGE_INVOICE = :ON_USAGE_INVOICE
|
|
4081
|
+
|
|
4082
|
+
# @!method self.values
|
|
4083
|
+
# @return [Array<Symbol>]
|
|
4084
|
+
end
|
|
4085
|
+
end
|
|
4086
|
+
|
|
3638
4087
|
# @see MetronomeSDK::Models::ContractV2::Subscription#seat_config
|
|
3639
4088
|
class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
3640
4089
|
# @!attribute seat_group_key
|