Class: MetronomeSDK::Models::V1::AlertCreateParams

Inherits:
Internal::Type::BaseModel show all
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, SeatFilter

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

Parameters:

  • key (String)
  • value (String) (defaults to: nil)


# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 115

Instance Attribute Details

#alert_typeSymbol, 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_idString?

For threshold notifications of type ‘usage_threshold_reached`, specifies which billable metric to track the usage for.

Returns:

  • (String, nil)


36
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 36

optional :billable_metric_id, String

#credit_grant_type_filtersArray<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

Returns:

  • (Array<String>, nil)


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_idString?

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).

Returns:

  • (String, nil)


53
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 53

optional :credit_type_id, String

#custom_field_filtersArray<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_idString?

If provided, will create this threshold notification for this specific customer. To create a notification for all customers, do not specify a ‘customer_id`.

Returns:

  • (String, nil)


68
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 68

optional :customer_id, String

#evaluate_on_createBoolean?

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.

Returns:

  • (Boolean, nil)


76
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 76

optional :evaluate_on_create, MetronomeSDK::Internal::Type::Boolean

#group_valuesArray<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_filterArray<String>?

Only supported for invoice_total_reached threshold notifications. A list of invoice types to evaluate.

Returns:

  • (Array<String>, nil)


91
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 91

optional :invoice_types_filter, MetronomeSDK::Internal::Type::ArrayOf[String]

#nameString

Name of the threshold notification

Returns:

  • (String)


21
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 21

required :name, String

#plan_idString?

If provided, will create this threshold notification for this specific plan. To create a notification for all customers, do not specify a ‘plan_id`.

Returns:

  • (String, nil)


98
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 98

optional :plan_id, String

#seat_filterMetronomeSDK::Models::V1::AlertCreateParams::SeatFilter?

Required for ‘low_remaining_seat_balance_reached` notifications. The alert is scoped to this seat group key-value pair.



105
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 105

optional :seat_filter, -> { MetronomeSDK::V1::AlertCreateParams::SeatFilter }

#thresholdFloat

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.

Returns:

  • (Float)


29
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 29

required :threshold, Float

#uniqueness_keyString?

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.

Returns:

  • (String, nil)


113
# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 113

optional :uniqueness_key, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/alert_create_params.rb', line 171