Class: MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/customers/customer_alert.rb,
sig/metronome_sdk/models/v1/customers/customer_alert.rbs

Overview

See Also:

  • MetronomeSDK::Models::V1::Customers::CustomerAlert#alert

Defined Under Namespace

Modules: Status, Type Classes: AlertSpecifier, CustomFieldFilter, GroupKeyFilter, GroupValue, SeatFilter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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/customers/customer_alert.rb', line 145

Instance Attribute Details

#alert_specifiersArray<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::AlertSpecifier>?

Present for low_remaining_contract_credit_and_commit_balance_reached notifications. The filters that define the balances that are considered when evaluating the alert.



83
84
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 83

optional :alert_specifiers,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::AlertSpecifier] }

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


93
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 93

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

#credit_typeMetronomeSDK::Models::CreditTypeData?

Parameters:

Returns:



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

optional :credit_type, -> { MetronomeSDK::CreditTypeData }, nil?: true

#custom_field_filtersArray<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::CustomFieldFilter>?

A list of custom field filters for notification types that support advanced filtering



105
106
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 105

optional :custom_field_filters,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::CustomFieldFilter] }

#group_key_filterMetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupKeyFilter?

Scopes threshold notification evaluation to a specific presentation group key on individual line items. Only present for spend notifications.



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

optional :group_key_filter, -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupKeyFilter }

#group_valuesArray<MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::GroupValue>?

Only present for spend_threshold_reached notifications. Scope notification to a specific group key on individual line items.



120
121
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 120

optional :group_values,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CustomerAlert::Alert::GroupValue] }

#idString

the Metronome ID of the threshold notification

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

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


128
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 128

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

#nameString

Name of the threshold notification

Parameters:

  • value (String)

Returns:

  • (String)


51
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 51

required :name, String

#seat_filterMetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::SeatFilter?

Only present for low_remaining_seat_balance_reached notifications. The seat group key or seat group key-value pair the alert is scoped to.



135
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 135

optional :seat_filter, -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::SeatFilter }

#statusSymbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Status

Status of the threshold notification

Parameters:

  • value (MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::status)

Returns:



57
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 57

required :status, enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::Status }

#thresholdFloat

Threshold value of the notification policy

Parameters:

  • value (Float)

Returns:

  • (Float)


63
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 63

required :threshold, Float

#typeSymbol, MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::Type

Type of the threshold notification

Parameters:

  • value (MetronomeSDK::Models::V1::Customers::CustomerAlert::Alert::type_)

Returns:



69
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 69

required :type, enum: -> { MetronomeSDK::V1::Customers::CustomerAlert::Alert::Type }

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


143
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 143

optional :uniqueness_key, String

#updated_atTime

Timestamp for when the threshold notification's customer status was last updated

Parameters:

  • value (Time)

Returns:

  • (Time)


75
# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 75

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/customers/customer_alert.rb', line 189

Instance Method Details

#to_hash{

Returns:

  • ({)


127
# File 'sig/metronome_sdk/models/v1/customers/customer_alert.rbs', line 127

def to_hash: -> {