Class: Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration

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

Overview

See Also:

  • Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties#alert_configuration

Defined Under Namespace

Modules: Type Classes: BalanceAlertStatus, LicenseType, Metric, Plan, PriceFilter, Threshold, 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/subscription_spend_exceeded_webhook_event.rb', line 242

Instance Attribute Details

#balance_alert_status ⇒ Array<Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus>?

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

Parameters:

  • value (::Array[Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus], nil)

Returns:



195
196
197
198
199
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 195

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

#created_at ⇒ Time

The creation time of the resource in Orb.

Parameters:

  • value (Time)

Returns:

  • (Time)


130
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 130

required :created_at, Time

#currency ⇒ String?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


136
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 136

required :currency, String, nil?: true

#customer ⇒ Orb::Models::CustomerMinified?

The customer the alert applies to.

Parameters:

Returns:



142
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 142

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

#enabled ⇒ Boolean

Whether the alert is enabled or disabled.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


148
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 148

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

#grouping_keys ⇒ Array<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)


206
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 206

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

#id ⇒ String

Also referred to as alert_id in this documentation.

Parameters:

  • value (String)

Returns:

  • (String)


124
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 124

required :id, String

#license_type ⇒ Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::LicenseType?

Minified license type for alert serialization.

Parameters:

  • value (Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::LicenseType, nil)

Returns:



212
213
214
215
216
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 212

optional :license_type,
-> {
  Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::LicenseType
},
nil?: true

#metric ⇒ Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Metric?

The metric the alert applies to.

Parameters:

  • value (Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Metric, nil)

Returns:



154
155
156
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 154

required :metric,
-> { Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Metric },
nil?: true

#plan ⇒ Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Plan?

The plan the alert applies to.

Parameters:

  • value (Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Plan, nil)

Returns:



162
163
164
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 162

required :plan,
-> { Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Plan },
nil?: true

#price_filters ⇒ Array<Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter>?

Filters scoping which prices are included in spend and grouped cost alert evaluation. Alerts use the price_id, item_id, and price_type fields only; the alert's pricing unit is reported by currency.

Parameters:

  • value (::Array[Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter], nil)

Returns:



224
225
226
227
228
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 224

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

#subscription ⇒ Orb::Models::SubscriptionMinified?

The subscription the alert applies to.

Parameters:

Returns:



170
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 170

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

#threshold_overrides ⇒ Array<Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::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::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride], nil)

Returns:



236
237
238
239
240
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 236

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

#thresholds ⇒ Array<Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Threshold>?

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

Parameters:

  • value (::Array[Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Threshold], nil)

Returns:



177
178
179
180
181
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 177

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

#type ⇒ Symbol, Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Type

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

Parameters:

  • value (Orb::Models::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::type_)

Returns:



187
188
# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 187

required :type,
enum: -> { Orb::SubscriptionSpendExceededWebhookEvent::Properties::AlertConfiguration::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/subscription_spend_exceeded_webhook_event.rb', line 371

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


143
# File 'sig/orb/models/subscription_spend_exceeded_webhook_event.rbs', line 143

def to_hash: -> {