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
Overview
Defined Under Namespace
Modules: AlertType Classes: CustomFieldFilter, GroupValue
Instance Attribute Summary collapse
-
#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_reached` notifications.
-
#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.
-
#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(alert_type: , name: , threshold: , billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see AlertCreateParams for more details.
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(alert_type: , name: , threshold: , billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::AlertCreateParams for more details.
|
|
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 108
|
Instance Attribute Details
#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.
36 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 36 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
45 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 45 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](app.metronome.com/offering/pricing-units).
53 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 53 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.
60 61 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 60 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`.
68 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 68 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.
76 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 76 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.
83 84 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 83 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.
91 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 91 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`.
98 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 98 optional :plan_id, String |
#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.
106 |
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 106 optional :uniqueness_key, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 161
|