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,
sig/metronome_sdk/models/v1/alert_create_params.rbs

Overview

See Also:

  • MetronomeSDK::Resources::V1::Alerts#create

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

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 124

Instance Attribute Details

#alert_specifiersArray<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_typeSymbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType

Type of the threshold notification

Parameters:

  • value (MetronomeSDK::Models::V1::AlertCreateParams::alert_type)

Returns:



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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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.



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

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


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

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.



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

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

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

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

#nameString

Name of the threshold notification

Parameters:

  • value (String)

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

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.



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

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.

Parameters:

  • value (Float)

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :uniqueness_key, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


109
# File 'sig/metronome_sdk/models/v1/alert_create_params.rbs', line 109

def to_hash: -> {