Class: Orb::Models::Alert

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

Overview

Defined Under Namespace

Modules: Type Classes: BalanceAlertStatus, Metric, Plan

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: , external_plan_id: , name: , plan_version: ) ⇒ Object

Some parameter documentations has been truncated, see Plan for more details.

The plan the alert applies to.

Parameters:

  • id (String, nil) (defaults to: )
  • external_plan_id (String, nil) (defaults to: )

    An optional user-defined ID for this plan resource, used throughout the system a

  • name (String, nil) (defaults to: )
  • plan_version (String) (defaults to: )


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

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.



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.

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.

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.



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

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

#enabledBoolean

Whether the alert is enabled or disabled.

Returns:

  • (Boolean)


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

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

#idString

Also referred to as alert_id in this documentation.

Returns:

  • (String)


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

required :id, String

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

The metric the alert applies to.

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.

Returns:



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

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

#subscriptionOrb::Models::SubscriptionMinified?

The subscription the alert applies to.



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

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

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

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

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.

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 174