Class: OpenAI::Models::Admin::Organization::OrganizationSpendAlert

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/organization_spend_alert.rb

Overview

Defined Under Namespace

Modules: Currency, Interval Classes: NotificationChannel

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:, currency:, interval:, notification_channel:, threshold_amount:, object: :"organization.spend_alert") ⇒ Object

Represents a spend alert configured at the organization level.

Parameters:



# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 46

Instance Attribute Details

#currencySymbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Currency

The currency for the threshold amount.



19
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 19

required :currency, enum: -> { OpenAI::Admin::Organization::OrganizationSpendAlert::Currency }

#idString

The identifier, which can be referenced in API endpoints.

Returns:

  • (String)


13
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 13

required :id, String

#intervalSymbol, OpenAI::Models::Admin::Organization::OrganizationSpendAlert::Interval

The time interval for evaluating spend against the threshold.



25
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 25

required :interval, enum: -> { OpenAI::Admin::Organization::OrganizationSpendAlert::Interval }

#notification_channelOpenAI::Models::Admin::Organization::OrganizationSpendAlert::NotificationChannel

Email notification settings for a spend alert.



31
32
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 31

required :notification_channel,
-> { OpenAI::Admin::Organization::OrganizationSpendAlert::NotificationChannel }

#objectSymbol, :"organization.spend_alert"

The object type, which is always ‘organization.spend_alert`.

Returns:

  • (Symbol, :"organization.spend_alert")


38
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 38

required :object, const: :"organization.spend_alert"

#threshold_amountInteger

The alert threshold amount, in cents.

Returns:

  • (Integer)


44
# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 44

required :threshold_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/organization_spend_alert.rb', line 69