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

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

Overview

See Also:

Defined Under Namespace

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

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: ) ⇒ Object

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

Parameters:

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


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

Instance Attribute Details

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


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

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

#credit_typeMetronomeSDK::Models::CreditTypeData?



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

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



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

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.



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

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.



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

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

#idString

the Metronome ID of the threshold notification

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.

Returns:

  • (Array<String>, nil)


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

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

#nameString

Name of the threshold notification

Returns:

  • (String)


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

required :name, String

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

Status of the threshold notification



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

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



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.

Returns:

  • (String, nil)


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

optional :uniqueness_key, String

#updated_atTime

Timestamp for when the threshold notification was last updated

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 169