Class: Orb::Models::Alert

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/alert.rb,
sig/orb/models/alert.rbs

Overview

See Also:

  • Orb::Resources::Alerts#retrieve

Defined Under Namespace

Modules: Type Classes: BalanceAlertStatus, LicenseType, Metric, Plan, PriceFilter, ThresholdOverride

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

Minified license type for alert serialization.

Parameters:

  • id (String)


# File 'lib/orb/models/alert.rb', line 106

Instance Attribute Details

#balance_alert_statusArray<Orb::Models::Alert::BalanceAlertStatus>?

The current status of the alert. This field is only present for credit balance alerts.

Parameters:

  • value (::Array[Orb::Alert::BalanceAlertStatus], nil)

Returns:



73
74
75
# File 'lib/orb/models/alert.rb', line 73

optional :balance_alert_status,
-> { Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus] },
nil?: true

#created_atTime

The creation time of the resource in Orb.

Parameters:

  • value (Time)

Returns:

  • (Time)


17
# File 'lib/orb/models/alert.rb', line 17

required :created_at, Time

#currencyString?

The name of the currency the credit balance or invoice cost is denominated in.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/orb/models/alert.rb', line 23

required :currency, String, nil?: true

#customerOrb::Models::CustomerMinified?

The customer the alert applies to.

Parameters:

Returns:



29
# File 'lib/orb/models/alert.rb', line 29

required :customer, -> { Orb::CustomerMinified }, nil?: true

#enabledBoolean

Whether the alert is enabled or disabled.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


35
# File 'lib/orb/models/alert.rb', line 35

required :enabled, Orb::Internal::Type::Boolean

#grouping_keysArray<String>?

The property keys to group cost alerts by. Only present for cost alerts with grouping enabled.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


82
# File 'lib/orb/models/alert.rb', line 82

optional :grouping_keys, Orb::Internal::Type::ArrayOf[String], nil?: true

#idString

Also referred to as alert_id in this documentation.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/orb/models/alert.rb', line 11

required :id, String

#license_typeOrb::Models::Alert::LicenseType?

Minified license type for alert serialization.

Parameters:

  • value (Orb::Alert::LicenseType, nil)

Returns:



88
# File 'lib/orb/models/alert.rb', line 88

optional :license_type, -> { Orb::Alert::LicenseType }, nil?: true

#metricOrb::Models::Alert::Metric?

The metric the alert applies to.

Parameters:

  • value (Orb::Alert::Metric, nil)

Returns:



41
# File 'lib/orb/models/alert.rb', line 41

required :metric, -> { Orb::Alert::Metric }, nil?: true

#planOrb::Models::Alert::Plan?

The plan the alert applies to.

Parameters:

  • value (Orb::Alert::Plan, nil)

Returns:



47
# File 'lib/orb/models/alert.rb', line 47

required :plan, -> { Orb::Alert::Plan }, nil?: true

#price_filtersArray<Orb::Models::Alert::PriceFilter>?

Filters scoping which prices are included in grouped cost alert evaluation.

Parameters:

  • value (::Array[Orb::Alert::PriceFilter], nil)

Returns:



94
# File 'lib/orb/models/alert.rb', line 94

optional :price_filters, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter] }, nil?: true

#subscriptionOrb::Models::SubscriptionMinified?

The subscription the alert applies to.

Parameters:

Returns:



53
# File 'lib/orb/models/alert.rb', line 53

required :subscription, -> { Orb::SubscriptionMinified }, nil?: true

#threshold_overridesArray<Orb::Models::Alert::ThresholdOverride>?

Per-group threshold overrides. Each override maps a specific combination of grouping_keys values to a replacement threshold list. Only present for grouped cost alerts that have at least one override.

Parameters:

  • value (::Array[Orb::Alert::ThresholdOverride], nil)

Returns:



102
103
104
# File 'lib/orb/models/alert.rb', line 102

optional :threshold_overrides,
-> { Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride] },
nil?: true

#thresholdsArray<Orb::Models::Threshold>?

The thresholds that define the conditions under which the alert will be triggered.

Parameters:

Returns:



60
# File 'lib/orb/models/alert.rb', line 60

required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }, nil?: true

#typeSymbol, Orb::Models::Alert::Type

The type of alert. This must be a valid alert type.

Parameters:

  • value (Orb::Models::Alert::type_)

Returns:



66
# File 'lib/orb/models/alert.rb', line 66

required :type, enum: -> { Orb::Alert::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/alert.rb', line 212

Instance Method Details

#to_hash{

Returns:

  • ({)


71
# File 'sig/orb/models/alert.rbs', line 71

def to_hash: -> {