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
|
@@ -141,6 +141,13 @@ module MetronomeSDK
|
|
|
141
141
|
# @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
|
|
142
142
|
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
|
|
143
143
|
|
|
144
|
+
# @!attribute spend_trackers
|
|
145
|
+
# Spend trackers attached to this contract.
|
|
146
|
+
#
|
|
147
|
+
# @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker>, nil]
|
|
148
|
+
optional :spend_trackers,
|
|
149
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::SpendTracker] }
|
|
150
|
+
|
|
144
151
|
# @!attribute total_contract_value
|
|
145
152
|
# This field's availability is dependent on your client's configuration.
|
|
146
153
|
#
|
|
@@ -152,7 +159,7 @@ module MetronomeSDK
|
|
|
152
159
|
# @return [MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter, nil]
|
|
153
160
|
optional :usage_filter, -> { MetronomeSDK::ContractWithoutAmendments::UsageFilter }
|
|
154
161
|
|
|
155
|
-
# @!method initialize(commits:, created_at:, created_by:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_statement_schedule:, credits: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: 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, total_contract_value: nil, usage_filter: nil)
|
|
162
|
+
# @!method initialize(commits:, created_at:, created_by:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_statement_schedule:, credits: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, prepaid_balance_threshold_configuration: 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, total_contract_value: nil, usage_filter: nil)
|
|
156
163
|
# Some parameter documentations has been truncated, see
|
|
157
164
|
# {MetronomeSDK::Models::ContractWithoutAmendments} for more details.
|
|
158
165
|
#
|
|
@@ -204,6 +211,8 @@ module MetronomeSDK
|
|
|
204
211
|
#
|
|
205
212
|
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
206
213
|
#
|
|
214
|
+
# @param spend_trackers [Array<MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker>] Spend trackers attached to this contract.
|
|
215
|
+
#
|
|
207
216
|
# @param total_contract_value [Float] This field's availability is dependent on your client's configuration.
|
|
208
217
|
#
|
|
209
218
|
# @param usage_filter [MetronomeSDK::Models::ContractWithoutAmendments::UsageFilter]
|
|
@@ -375,6 +384,14 @@ module MetronomeSDK
|
|
|
375
384
|
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Proration, nil]
|
|
376
385
|
optional :proration, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::Proration }
|
|
377
386
|
|
|
387
|
+
# @!attribute proration_rounding
|
|
388
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
389
|
+
#
|
|
390
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding, nil]
|
|
391
|
+
optional :proration_rounding,
|
|
392
|
+
-> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding },
|
|
393
|
+
nil?: true
|
|
394
|
+
|
|
378
395
|
# @!attribute recurrence_frequency
|
|
379
396
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
380
397
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -408,7 +425,7 @@ module MetronomeSDK
|
|
|
408
425
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
409
426
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
410
427
|
|
|
411
|
-
# @!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)
|
|
428
|
+
# @!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)
|
|
412
429
|
# Some parameter documentations has been truncated, see
|
|
413
430
|
# {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit} for more
|
|
414
431
|
# details.
|
|
@@ -447,7 +464,9 @@ module MetronomeSDK
|
|
|
447
464
|
#
|
|
448
465
|
# @param proration [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
449
466
|
#
|
|
450
|
-
# @param
|
|
467
|
+
# @param proration_rounding [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding, nil] Rounding configuration for prorated recurring commit amounts.
|
|
468
|
+
#
|
|
469
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
|
451
470
|
#
|
|
452
471
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
453
472
|
#
|
|
@@ -592,6 +611,105 @@ module MetronomeSDK
|
|
|
592
611
|
# @return [Array<Symbol>]
|
|
593
612
|
end
|
|
594
613
|
|
|
614
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit#proration_rounding
|
|
615
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
616
|
+
# @!attribute access
|
|
617
|
+
#
|
|
618
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access, nil]
|
|
619
|
+
optional :access,
|
|
620
|
+
-> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access }
|
|
621
|
+
|
|
622
|
+
# @!attribute invoice
|
|
623
|
+
#
|
|
624
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice, nil]
|
|
625
|
+
optional :invoice,
|
|
626
|
+
-> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice }
|
|
627
|
+
|
|
628
|
+
# @!method initialize(access: nil, invoice: nil)
|
|
629
|
+
# Rounding configuration for prorated recurring commit amounts.
|
|
630
|
+
#
|
|
631
|
+
# @param access [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access]
|
|
632
|
+
# @param invoice [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice]
|
|
633
|
+
|
|
634
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding#access
|
|
635
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
636
|
+
# @!attribute decimal_places
|
|
637
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
638
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
639
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
640
|
+
# dollar).
|
|
641
|
+
#
|
|
642
|
+
# @return [Float]
|
|
643
|
+
required :decimal_places, Float
|
|
644
|
+
|
|
645
|
+
# @!attribute rounding_method
|
|
646
|
+
#
|
|
647
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod]
|
|
648
|
+
required :rounding_method,
|
|
649
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod }
|
|
650
|
+
|
|
651
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
652
|
+
# Some parameter documentations has been truncated, see
|
|
653
|
+
# {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access}
|
|
654
|
+
# for more details.
|
|
655
|
+
#
|
|
656
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
657
|
+
#
|
|
658
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access::RoundingMethod]
|
|
659
|
+
|
|
660
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Access#rounding_method
|
|
661
|
+
module RoundingMethod
|
|
662
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
663
|
+
|
|
664
|
+
HALF_UP = :HALF_UP
|
|
665
|
+
FLOOR = :FLOOR
|
|
666
|
+
CEILING = :CEILING
|
|
667
|
+
|
|
668
|
+
# @!method self.values
|
|
669
|
+
# @return [Array<Symbol>]
|
|
670
|
+
end
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding#invoice
|
|
674
|
+
class Invoice < MetronomeSDK::Internal::Type::BaseModel
|
|
675
|
+
# @!attribute decimal_places
|
|
676
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
677
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
678
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
679
|
+
# dollar).
|
|
680
|
+
#
|
|
681
|
+
# @return [Float]
|
|
682
|
+
required :decimal_places, Float
|
|
683
|
+
|
|
684
|
+
# @!attribute rounding_method
|
|
685
|
+
#
|
|
686
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
|
|
687
|
+
required :rounding_method,
|
|
688
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod }
|
|
689
|
+
|
|
690
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
691
|
+
# Some parameter documentations has been truncated, see
|
|
692
|
+
# {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice}
|
|
693
|
+
# for more details.
|
|
694
|
+
#
|
|
695
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
696
|
+
#
|
|
697
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
|
|
698
|
+
|
|
699
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCommit::ProrationRounding::Invoice#rounding_method
|
|
700
|
+
module RoundingMethod
|
|
701
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
702
|
+
|
|
703
|
+
HALF_UP = :HALF_UP
|
|
704
|
+
FLOOR = :FLOOR
|
|
705
|
+
CEILING = :CEILING
|
|
706
|
+
|
|
707
|
+
# @!method self.values
|
|
708
|
+
# @return [Array<Symbol>]
|
|
709
|
+
end
|
|
710
|
+
end
|
|
711
|
+
end
|
|
712
|
+
|
|
595
713
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
596
714
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
597
715
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -606,6 +724,7 @@ module MetronomeSDK
|
|
|
606
724
|
QUARTERLY = :QUARTERLY
|
|
607
725
|
ANNUAL = :ANNUAL
|
|
608
726
|
WEEKLY = :WEEKLY
|
|
727
|
+
DAILY = :DAILY
|
|
609
728
|
|
|
610
729
|
# @!method self.values
|
|
611
730
|
# @return [Array<Symbol>]
|
|
@@ -707,6 +826,14 @@ module MetronomeSDK
|
|
|
707
826
|
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Proration, nil]
|
|
708
827
|
optional :proration, enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::Proration }
|
|
709
828
|
|
|
829
|
+
# @!attribute proration_rounding
|
|
830
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
831
|
+
#
|
|
832
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding, nil]
|
|
833
|
+
optional :proration_rounding,
|
|
834
|
+
-> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding },
|
|
835
|
+
nil?: true
|
|
836
|
+
|
|
710
837
|
# @!attribute recurrence_frequency
|
|
711
838
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
712
839
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
@@ -740,7 +867,7 @@ module MetronomeSDK
|
|
|
740
867
|
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
741
868
|
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
742
869
|
|
|
743
|
-
# @!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)
|
|
870
|
+
# @!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)
|
|
744
871
|
# Some parameter documentations has been truncated, see
|
|
745
872
|
# {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit} for more
|
|
746
873
|
# details.
|
|
@@ -777,7 +904,9 @@ module MetronomeSDK
|
|
|
777
904
|
#
|
|
778
905
|
# @param proration [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
779
906
|
#
|
|
780
|
-
# @param
|
|
907
|
+
# @param proration_rounding [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding, nil] Rounding configuration for prorated recurring credit amounts.
|
|
908
|
+
#
|
|
909
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
|
|
781
910
|
#
|
|
782
911
|
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
783
912
|
#
|
|
@@ -897,6 +1026,59 @@ module MetronomeSDK
|
|
|
897
1026
|
# @return [Array<Symbol>]
|
|
898
1027
|
end
|
|
899
1028
|
|
|
1029
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit#proration_rounding
|
|
1030
|
+
class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
|
|
1031
|
+
# @!attribute access
|
|
1032
|
+
#
|
|
1033
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access, nil]
|
|
1034
|
+
optional :access,
|
|
1035
|
+
-> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access }
|
|
1036
|
+
|
|
1037
|
+
# @!method initialize(access: nil)
|
|
1038
|
+
# Rounding configuration for prorated recurring credit amounts.
|
|
1039
|
+
#
|
|
1040
|
+
# @param access [MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access]
|
|
1041
|
+
|
|
1042
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding#access
|
|
1043
|
+
class Access < MetronomeSDK::Internal::Type::BaseModel
|
|
1044
|
+
# @!attribute decimal_places
|
|
1045
|
+
# Number of decimal places to round to. Applied directly to the stored monetary
|
|
1046
|
+
# representation. Negative values round to powers of 10 (e.g., -2 rounds to
|
|
1047
|
+
# nearest 100 in the stored unit. For USD, this means rounding to the nearest
|
|
1048
|
+
# dollar).
|
|
1049
|
+
#
|
|
1050
|
+
# @return [Float]
|
|
1051
|
+
required :decimal_places, Float
|
|
1052
|
+
|
|
1053
|
+
# @!attribute rounding_method
|
|
1054
|
+
#
|
|
1055
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod]
|
|
1056
|
+
required :rounding_method,
|
|
1057
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod }
|
|
1058
|
+
|
|
1059
|
+
# @!method initialize(decimal_places:, rounding_method:)
|
|
1060
|
+
# Some parameter documentations has been truncated, see
|
|
1061
|
+
# {MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access}
|
|
1062
|
+
# for more details.
|
|
1063
|
+
#
|
|
1064
|
+
# @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
|
|
1065
|
+
#
|
|
1066
|
+
# @param rounding_method [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access::RoundingMethod]
|
|
1067
|
+
|
|
1068
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::RecurringCredit::ProrationRounding::Access#rounding_method
|
|
1069
|
+
module RoundingMethod
|
|
1070
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1071
|
+
|
|
1072
|
+
HALF_UP = :HALF_UP
|
|
1073
|
+
FLOOR = :FLOOR
|
|
1074
|
+
CEILING = :CEILING
|
|
1075
|
+
|
|
1076
|
+
# @!method self.values
|
|
1077
|
+
# @return [Array<Symbol>]
|
|
1078
|
+
end
|
|
1079
|
+
end
|
|
1080
|
+
end
|
|
1081
|
+
|
|
900
1082
|
# The frequency at which the recurring commits will be created. If not provided: -
|
|
901
1083
|
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
902
1084
|
# period defined in the duration will correspond to this frequency. - Commits will
|
|
@@ -911,6 +1093,7 @@ module MetronomeSDK
|
|
|
911
1093
|
QUARTERLY = :QUARTERLY
|
|
912
1094
|
ANNUAL = :ANNUAL
|
|
913
1095
|
WEEKLY = :WEEKLY
|
|
1096
|
+
DAILY = :DAILY
|
|
914
1097
|
|
|
915
1098
|
# @!method self.values
|
|
916
1099
|
# @return [Array<Symbol>]
|
|
@@ -1029,6 +1212,138 @@ module MetronomeSDK
|
|
|
1029
1212
|
# @return [Array<Symbol>]
|
|
1030
1213
|
end
|
|
1031
1214
|
|
|
1215
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
1216
|
+
# @!attribute alias_
|
|
1217
|
+
# Human-readable identifier, unique per contract.
|
|
1218
|
+
#
|
|
1219
|
+
# @return [String]
|
|
1220
|
+
required :alias_, String, api_name: :alias
|
|
1221
|
+
|
|
1222
|
+
# @!attribute applicable_spend_specifiers
|
|
1223
|
+
#
|
|
1224
|
+
# @return [Array<MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier>]
|
|
1225
|
+
required :applicable_spend_specifiers,
|
|
1226
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier] }
|
|
1227
|
+
|
|
1228
|
+
# @!attribute credit_type_id
|
|
1229
|
+
#
|
|
1230
|
+
# @return [String]
|
|
1231
|
+
required :credit_type_id, String
|
|
1232
|
+
|
|
1233
|
+
# @!attribute reset_frequency
|
|
1234
|
+
#
|
|
1235
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ResetFrequency]
|
|
1236
|
+
required :reset_frequency,
|
|
1237
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::SpendTracker::ResetFrequency }
|
|
1238
|
+
|
|
1239
|
+
# @!attribute accumulated_spend
|
|
1240
|
+
#
|
|
1241
|
+
# @return [MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::AccumulatedSpend, nil]
|
|
1242
|
+
optional :accumulated_spend,
|
|
1243
|
+
-> { MetronomeSDK::ContractWithoutAmendments::SpendTracker::AccumulatedSpend }
|
|
1244
|
+
|
|
1245
|
+
# @!method initialize(alias_:, applicable_spend_specifiers:, credit_type_id:, reset_frequency:, accumulated_spend: nil)
|
|
1246
|
+
# @param alias_ [String] Human-readable identifier, unique per contract.
|
|
1247
|
+
#
|
|
1248
|
+
# @param applicable_spend_specifiers [Array<MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier>]
|
|
1249
|
+
#
|
|
1250
|
+
# @param credit_type_id [String]
|
|
1251
|
+
#
|
|
1252
|
+
# @param reset_frequency [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ResetFrequency]
|
|
1253
|
+
#
|
|
1254
|
+
# @param accumulated_spend [MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::AccumulatedSpend]
|
|
1255
|
+
|
|
1256
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
1257
|
+
# @!attribute sources
|
|
1258
|
+
#
|
|
1259
|
+
# @return [Array<Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
1260
|
+
required :sources,
|
|
1261
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[enum: MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source] }
|
|
1262
|
+
|
|
1263
|
+
# @!attribute spend_type
|
|
1264
|
+
#
|
|
1265
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
1266
|
+
required :spend_type,
|
|
1267
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType }
|
|
1268
|
+
|
|
1269
|
+
# @!attribute discounted
|
|
1270
|
+
#
|
|
1271
|
+
# @return [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted, nil]
|
|
1272
|
+
optional :discounted,
|
|
1273
|
+
enum: -> { MetronomeSDK::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted }
|
|
1274
|
+
|
|
1275
|
+
# @!method initialize(sources:, spend_type:, discounted: nil)
|
|
1276
|
+
# @param sources [Array<Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
1277
|
+
# @param spend_type [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
1278
|
+
# @param discounted [Symbol, MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier::Discounted]
|
|
1279
|
+
|
|
1280
|
+
module Source
|
|
1281
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1282
|
+
|
|
1283
|
+
THRESHOLD_RECHARGE = :THRESHOLD_RECHARGE
|
|
1284
|
+
MANUAL = :MANUAL
|
|
1285
|
+
|
|
1286
|
+
# @!method self.values
|
|
1287
|
+
# @return [Array<Symbol>]
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier#spend_type
|
|
1291
|
+
module SpendType
|
|
1292
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1293
|
+
|
|
1294
|
+
COMMIT_PURCHASE = :COMMIT_PURCHASE
|
|
1295
|
+
|
|
1296
|
+
# @!method self.values
|
|
1297
|
+
# @return [Array<Symbol>]
|
|
1298
|
+
end
|
|
1299
|
+
|
|
1300
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker::ApplicableSpendSpecifier#discounted
|
|
1301
|
+
module Discounted
|
|
1302
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1303
|
+
|
|
1304
|
+
ANY = :ANY
|
|
1305
|
+
DISCOUNTED_ONLY = :DISCOUNTED_ONLY
|
|
1306
|
+
UNDISCOUNTED_ONLY = :UNDISCOUNTED_ONLY
|
|
1307
|
+
|
|
1308
|
+
# @!method self.values
|
|
1309
|
+
# @return [Array<Symbol>]
|
|
1310
|
+
end
|
|
1311
|
+
end
|
|
1312
|
+
|
|
1313
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker#reset_frequency
|
|
1314
|
+
module ResetFrequency
|
|
1315
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1316
|
+
|
|
1317
|
+
BILLING_PERIOD = :BILLING_PERIOD
|
|
1318
|
+
|
|
1319
|
+
# @!method self.values
|
|
1320
|
+
# @return [Array<Symbol>]
|
|
1321
|
+
end
|
|
1322
|
+
|
|
1323
|
+
# @see MetronomeSDK::Models::ContractWithoutAmendments::SpendTracker#accumulated_spend
|
|
1324
|
+
class AccumulatedSpend < MetronomeSDK::Internal::Type::BaseModel
|
|
1325
|
+
# @!attribute amount
|
|
1326
|
+
#
|
|
1327
|
+
# @return [Float]
|
|
1328
|
+
required :amount, Float
|
|
1329
|
+
|
|
1330
|
+
# @!attribute period_ending_before
|
|
1331
|
+
#
|
|
1332
|
+
# @return [Time]
|
|
1333
|
+
required :period_ending_before, Time
|
|
1334
|
+
|
|
1335
|
+
# @!attribute period_starting_at
|
|
1336
|
+
#
|
|
1337
|
+
# @return [Time]
|
|
1338
|
+
required :period_starting_at, Time
|
|
1339
|
+
|
|
1340
|
+
# @!method initialize(amount:, period_ending_before:, period_starting_at:)
|
|
1341
|
+
# @param amount [Float]
|
|
1342
|
+
# @param period_ending_before [Time]
|
|
1343
|
+
# @param period_starting_at [Time]
|
|
1344
|
+
end
|
|
1345
|
+
end
|
|
1346
|
+
|
|
1032
1347
|
# @see MetronomeSDK::Models::ContractWithoutAmendments#usage_filter
|
|
1033
1348
|
class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
1034
1349
|
# @!attribute current
|
|
@@ -57,6 +57,13 @@ module MetronomeSDK
|
|
|
57
57
|
# @return [MetronomeSDK::Models::Credit::Contract, nil]
|
|
58
58
|
optional :contract, -> { MetronomeSDK::Credit::Contract }
|
|
59
59
|
|
|
60
|
+
# @!attribute created_by
|
|
61
|
+
# The actor who created this credit. Omitted for system-generated credits such as
|
|
62
|
+
# recurring credits.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :created_by, String
|
|
66
|
+
|
|
60
67
|
# @!attribute custom_fields
|
|
61
68
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
62
69
|
#
|
|
@@ -146,7 +153,7 @@ module MetronomeSDK
|
|
|
146
153
|
# @return [String, nil]
|
|
147
154
|
optional :uniqueness_key, String
|
|
148
155
|
|
|
149
|
-
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_credit_id: nil, rolled_over_from: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil, uniqueness_key: nil)
|
|
156
|
+
# @!method initialize(id:, product:, type:, access_schedule: nil, applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, balance: nil, contract: nil, created_by: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, ledger: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, recurring_credit_id: nil, rolled_over_from: nil, salesforce_opportunity_id: nil, specifiers: nil, subscription_config: nil, uniqueness_key: nil)
|
|
150
157
|
# Some parameter documentations has been truncated, see
|
|
151
158
|
# {MetronomeSDK::Models::Credit} for more details.
|
|
152
159
|
#
|
|
@@ -168,6 +175,8 @@ module MetronomeSDK
|
|
|
168
175
|
#
|
|
169
176
|
# @param contract [MetronomeSDK::Models::Credit::Contract]
|
|
170
177
|
#
|
|
178
|
+
# @param created_by [String] The actor who created this credit. Omitted for system-generated credits such as
|
|
179
|
+
#
|
|
171
180
|
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
172
181
|
#
|
|
173
182
|
# @param description [String]
|
|
@@ -171,6 +171,11 @@ module MetronomeSDK
|
|
|
171
171
|
# @param value [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
|
|
172
172
|
|
|
173
173
|
class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
174
|
+
# @!attribute any_commit_or_credit_ids
|
|
175
|
+
#
|
|
176
|
+
# @return [Array<String>, nil]
|
|
177
|
+
optional :any_commit_or_credit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
178
|
+
|
|
174
179
|
# @!attribute billing_frequency
|
|
175
180
|
#
|
|
176
181
|
# @return [Symbol, MetronomeSDK::Models::Override::OverrideSpecifier::BillingFrequency, nil]
|
|
@@ -206,7 +211,8 @@ module MetronomeSDK
|
|
|
206
211
|
# @return [Array<String>, nil]
|
|
207
212
|
optional :recurring_commit_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
208
213
|
|
|
209
|
-
# @!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)
|
|
214
|
+
# @!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)
|
|
215
|
+
# @param any_commit_or_credit_ids [Array<String>]
|
|
210
216
|
# @param billing_frequency [Symbol, MetronomeSDK::Models::Override::OverrideSpecifier::BillingFrequency]
|
|
211
217
|
# @param commit_ids [Array<String>]
|
|
212
218
|
# @param presentation_group_values [Hash{Symbol=>String, nil}]
|
|
@@ -47,7 +47,15 @@ module MetronomeSDK
|
|
|
47
47
|
optional :discount_configuration,
|
|
48
48
|
-> { MetronomeSDK::PrepaidBalanceThresholdConfiguration::DiscountConfiguration }
|
|
49
49
|
|
|
50
|
-
# @!
|
|
50
|
+
# @!attribute threshold_balance_specifiers
|
|
51
|
+
# Determines which balances are excluded from remaining balance calculation for
|
|
52
|
+
# threshold billing.
|
|
53
|
+
#
|
|
54
|
+
# @return [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>, nil]
|
|
55
|
+
optional :threshold_balance_specifiers,
|
|
56
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier] }
|
|
57
|
+
|
|
58
|
+
# @!method initialize(commit:, is_enabled:, payment_gate_config:, recharge_to_amount:, threshold_amount:, custom_credit_type_id: nil, discount_configuration: nil, threshold_balance_specifiers: nil)
|
|
51
59
|
# Some parameter documentations has been truncated, see
|
|
52
60
|
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration} for more details.
|
|
53
61
|
#
|
|
@@ -64,6 +72,8 @@ module MetronomeSDK
|
|
|
64
72
|
# @param custom_credit_type_id [String] If provided, the threshold, recharge-to amount, and the resulting threshold comm
|
|
65
73
|
#
|
|
66
74
|
# @param discount_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::DiscountConfiguration]
|
|
75
|
+
#
|
|
76
|
+
# @param threshold_balance_specifiers [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>] Determines which balances are excluded from remaining balance calculation for th
|
|
67
77
|
|
|
68
78
|
# @see MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration#commit
|
|
69
79
|
class Commit < MetronomeSDK::Models::BaseThresholdCommit
|
|
@@ -114,12 +124,113 @@ module MetronomeSDK
|
|
|
114
124
|
# @return [Float]
|
|
115
125
|
required :payment_fraction, Float
|
|
116
126
|
|
|
117
|
-
# @!
|
|
127
|
+
# @!attribute cap
|
|
128
|
+
# If provided, the discount stops applying once the spend tracker has accumulated
|
|
129
|
+
# this much spend in the billing period.
|
|
130
|
+
#
|
|
131
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap, nil]
|
|
132
|
+
optional :cap, -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap }
|
|
133
|
+
|
|
134
|
+
# @!method initialize(payment_fraction:, cap: nil)
|
|
118
135
|
# Some parameter documentations has been truncated, see
|
|
119
136
|
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::DiscountConfiguration}
|
|
120
137
|
# for more details.
|
|
121
138
|
#
|
|
122
139
|
# @param payment_fraction [Float] The fraction of the original amount that the customer pays after applying the di
|
|
140
|
+
#
|
|
141
|
+
# @param cap [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::DiscountConfiguration::Cap] If provided, the discount stops applying once the spend tracker has accumulated
|
|
142
|
+
|
|
143
|
+
# @see MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::DiscountConfiguration#cap
|
|
144
|
+
class Cap < MetronomeSDK::Internal::Type::BaseModel
|
|
145
|
+
# @!attribute amount
|
|
146
|
+
# Accumulated spend ceiling above which the discount stops applying.
|
|
147
|
+
#
|
|
148
|
+
# @return [Float]
|
|
149
|
+
required :amount, Float
|
|
150
|
+
|
|
151
|
+
# @!attribute spend_tracker_alias
|
|
152
|
+
# Alias of the spend tracker this cap is measured against.
|
|
153
|
+
#
|
|
154
|
+
# @return [String]
|
|
155
|
+
required :spend_tracker_alias, String
|
|
156
|
+
|
|
157
|
+
# @!method initialize(amount:, spend_tracker_alias:)
|
|
158
|
+
# If provided, the discount stops applying once the spend tracker has accumulated
|
|
159
|
+
# this much spend in the billing period.
|
|
160
|
+
#
|
|
161
|
+
# @param amount [Float] Accumulated spend ceiling above which the discount stops applying.
|
|
162
|
+
#
|
|
163
|
+
# @param spend_tracker_alias [String] Alias of the spend tracker this cap is measured against.
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
class ThresholdBalanceSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
168
|
+
# @!attribute exclude
|
|
169
|
+
# If any of the exclude specifier is met, the balance is not considered when
|
|
170
|
+
# evaluating threshold billing
|
|
171
|
+
#
|
|
172
|
+
# @return [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>]
|
|
173
|
+
required :exclude,
|
|
174
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude] }
|
|
175
|
+
|
|
176
|
+
# @!method initialize(exclude:)
|
|
177
|
+
# Some parameter documentations has been truncated, see
|
|
178
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier}
|
|
179
|
+
# for more details.
|
|
180
|
+
#
|
|
181
|
+
# @param exclude [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude>] If any of the exclude specifier is met, the balance is not considered when evalu
|
|
182
|
+
|
|
183
|
+
class Exclude < MetronomeSDK::Internal::Type::BaseModel
|
|
184
|
+
# @!attribute custom_field_filters
|
|
185
|
+
# If provided, balances with all the custom fields will not be considered when
|
|
186
|
+
# evaluating threshold billing
|
|
187
|
+
#
|
|
188
|
+
# @return [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>]
|
|
189
|
+
required :custom_field_filters,
|
|
190
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter] }
|
|
191
|
+
|
|
192
|
+
# @!method initialize(custom_field_filters:)
|
|
193
|
+
# Some parameter documentations has been truncated, see
|
|
194
|
+
# {MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude}
|
|
195
|
+
# for more details.
|
|
196
|
+
#
|
|
197
|
+
# @param custom_field_filters [Array<MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter>] If provided, balances with all the custom fields will not be considered when eva
|
|
198
|
+
|
|
199
|
+
class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
200
|
+
# @!attribute entity
|
|
201
|
+
#
|
|
202
|
+
# @return [Symbol, MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
203
|
+
required :entity,
|
|
204
|
+
enum: -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity }
|
|
205
|
+
|
|
206
|
+
# @!attribute key
|
|
207
|
+
#
|
|
208
|
+
# @return [String]
|
|
209
|
+
required :key, String
|
|
210
|
+
|
|
211
|
+
# @!attribute value
|
|
212
|
+
#
|
|
213
|
+
# @return [String]
|
|
214
|
+
required :value, String
|
|
215
|
+
|
|
216
|
+
# @!method initialize(entity:, key:, value:)
|
|
217
|
+
# @param entity [Symbol, MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter::Entity]
|
|
218
|
+
# @param key [String]
|
|
219
|
+
# @param value [String]
|
|
220
|
+
|
|
221
|
+
# @see MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier::Exclude::CustomFieldFilter#entity
|
|
222
|
+
module Entity
|
|
223
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
224
|
+
|
|
225
|
+
COMMIT = :Commit
|
|
226
|
+
CONTRACT_CREDIT = :ContractCredit
|
|
227
|
+
CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
|
|
228
|
+
|
|
229
|
+
# @!method self.values
|
|
230
|
+
# @return [Array<Symbol>]
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
123
234
|
end
|
|
124
235
|
end
|
|
125
236
|
end
|