Class: MetronomeSDK::Models::V1::AlertCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::V1::AlertCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/metronome_sdk/models/v1/alert_create_params.rb,
sig/metronome_sdk/models/v1/alert_create_params.rbs
Overview
Defined Under Namespace
Modules: AlertType Classes: AlertSpecifier, CustomFieldFilter, GroupValue, SeatFilter
Constant Summary
Constants included from Internal::Type::RequestParameters
Internal::Type::RequestParameters::MetronomeSDK
Instance Attribute Summary collapse
-
#alert_specifiers ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::AlertSpecifier>?
Can be used with only
low_remaining_contract_credit_and_commit_balance_reachednotifications. -
#alert_type ⇒ Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType
Type of the threshold notification.
-
#billable_metric_id ⇒ String?
For threshold notifications of type
usage_threshold_reached, specifies which billable metric to track the usage for. -
#credit_grant_type_filters ⇒ Array<String>?
An array of strings, representing a way to filter the credit grant this threshold notification applies to, by looking at the credit_grant_type field on the credit grant.
-
#credit_type_id ⇒ String?
ID of the credit's currency, defaults to USD.
-
#custom_field_filters ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>?
A list of custom field filters for threshold notification types that support advanced filtering.
-
#customer_id ⇒ String?
If provided, will create this threshold notification for this specific customer.
-
#evaluate_on_create ⇒ Boolean?
If true, the threshold notification will evaluate immediately on customers that already meet the notification threshold.
-
#group_values ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>?
Only present for
spend_threshold_reachednotifications. -
#invoice_types_filter ⇒ Array<String>?
Only supported for invoice_total_reached threshold notifications.
-
#name ⇒ String
Name of the threshold notification.
-
#plan_id ⇒ String?
If provided, will create this threshold notification for this specific plan.
-
#seat_filter ⇒ MetronomeSDK::Models::V1::AlertCreateParams::SeatFilter?
Required for
low_remaining_seat_balance_reachednotifications. -
#threshold ⇒ Float
Threshold value of the notification policy.
-
#uniqueness_key ⇒ String?
Prevents the creation of duplicates.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(key:, value: nil) ⇒ Object constructor
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(key:, value: nil) ⇒ Object
|
|
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 124
|
Instance Attribute Details
#alert_specifiers ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::AlertSpecifier>?
Can be used with only low_remaining_contract_credit_and_commit_balance_reached
notifications. Defines the balances that are considered when evaluating the
alert.
37 38 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 37 optional :alert_specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::AlertSpecifier] } |
#alert_type ⇒ Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType
Type of the threshold notification
15 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 15 required :alert_type, enum: -> { MetronomeSDK::V1::AlertCreateParams::AlertType } |
#billable_metric_id ⇒ String?
For threshold notifications of type usage_threshold_reached, specifies which
billable metric to track the usage for.
45 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 45 optional :billable_metric_id, String |
#credit_grant_type_filters ⇒ Array<String>?
An array of strings, representing a way to filter the credit grant this threshold notification applies to, by looking at the credit_grant_type field on the credit grant. This field is only defined for CreditPercentage and CreditBalance notifications
54 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 54 optional :credit_grant_type_filters, MetronomeSDK::Internal::Type::ArrayOf[String] |
#credit_type_id ⇒ String?
ID of the credit's currency, defaults to USD. If the specific notification type requires a pricing unit/currency, find the ID in the Metronome app.
62 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 62 optional :credit_type_id, String |
#custom_field_filters ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>?
A list of custom field filters for threshold notification types that support advanced filtering. Only present for contract invoices.
69 70 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 69 optional :custom_field_filters, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::CustomFieldFilter] } |
#customer_id ⇒ String?
If provided, will create this threshold notification for this specific customer.
To create a notification for all customers, do not specify a customer_id.
77 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 77 optional :customer_id, String |
#evaluate_on_create ⇒ Boolean?
If true, the threshold notification will evaluate immediately on customers that already meet the notification threshold. If false, it will only evaluate on future customers that trigger the threshold. Defaults to true.
85 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 85 optional :evaluate_on_create, MetronomeSDK::Internal::Type::Boolean |
#group_values ⇒ Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>?
Only present for spend_threshold_reached notifications. Scope notification to
a specific group key on individual line items.
92 93 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 92 optional :group_values, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::AlertCreateParams::GroupValue] } |
#invoice_types_filter ⇒ Array<String>?
Only supported for invoice_total_reached threshold notifications. A list of invoice types to evaluate.
100 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 100 optional :invoice_types_filter, MetronomeSDK::Internal::Type::ArrayOf[String] |
#name ⇒ String
Name of the threshold notification
21 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 21 required :name, String |
#plan_id ⇒ String?
If provided, will create this threshold notification for this specific plan. To
create a notification for all customers, do not specify a plan_id.
107 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 107 optional :plan_id, String |
#seat_filter ⇒ MetronomeSDK::Models::V1::AlertCreateParams::SeatFilter?
Required for low_remaining_seat_balance_reached notifications. The alert is
scoped to this seat group key-value pair.
114 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 114 optional :seat_filter, -> { MetronomeSDK::V1::AlertCreateParams::SeatFilter } |
#threshold ⇒ Float
Threshold value of the notification policy. Depending upon the notification type, this number may represent a financial amount, the days remaining, or a percentage reached.
29 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 29 required :threshold, Float |
#uniqueness_key ⇒ String?
Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.
122 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 122 optional :uniqueness_key, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 182
|
Instance Method Details
#to_hash ⇒ {
109 |
# File 'sig/metronome_sdk/models/v1/alert_create_params.rbs', line 109
def to_hash: -> {
|