Class: OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/projects/project_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: :"project.spend_alert") ⇒ Object

Represents a spend alert configured at the project level.

Parameters:



# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 47

Instance Attribute Details

#currencySymbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Currency

The currency for the threshold amount.



20
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 20

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

#idString

The identifier, which can be referenced in API endpoints.

Returns:

  • (String)


14
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 14

required :id, String

#intervalSymbol, OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::Interval

The time interval for evaluating spend against the threshold.



26
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 26

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

#notification_channelOpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert::NotificationChannel

Email notification settings for a spend alert.



32
33
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 32

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

#objectSymbol, :"project.spend_alert"

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

Returns:

  • (Symbol, :"project.spend_alert")


39
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 39

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

#threshold_amountInteger

The alert threshold amount, in cents.

Returns:

  • (Integer)


45
# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 45

required :threshold_amount, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/projects/project_spend_alert.rb', line 70