Class: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/admin/organization/projects/spend_limit_update_params.rb,
sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs
Overview
Defined Under Namespace
Modules: Currency, Interval Classes: NotificationChannel
Instance Attribute Summary collapse
-
#currency ⇒ OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::currency
The currency for the threshold amount.
-
#interval ⇒ OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::interval
The time interval for evaluating spend against the threshold.
-
#notification_channel ⇒ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel?
Configure email notifications when the spend limit is reached.
- #project_id ⇒ String
-
#threshold_amount ⇒ Integer
The hard spend limit amount, in cents.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(project_id:, currency:, interval:, threshold_amount:, notification_channel: nil, request_options: {}) ⇒ SpendLimitUpdateParams
constructor
A new instance of SpendLimitUpdateParams.
- #to_hash ⇒ { project_id: String, currency: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::currency, interval: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::interval, threshold_amount: Integer, ?notification_channel: OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel?, ?request_options: OpenAI::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(project_id:, currency:, interval:, threshold_amount:, notification_channel: nil, request_options: {}) ⇒ SpendLimitUpdateParams
Returns a new instance of SpendLimitUpdateParams.
|
|
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 50
|
Instance Attribute Details
#currency ⇒ OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::currency
The currency for the threshold amount. Currently, only USD is supported.
22 |
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 22 required :currency, enum: -> { OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Currency } |
#interval ⇒ OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::interval
The time interval for evaluating spend against the threshold. Currently, only
month is supported.
29 |
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 29 required :interval, enum: -> { OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Interval } |
#notification_channel ⇒ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel?
Configure email notifications when the spend limit is reached. Leave this out to keep the current settings, or send null to reset to owner-only notifications.
42 43 44 45 46 47 48 |
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 42 optional( :notification_channel, -> { OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel }, nil?: true ) |
#project_id ⇒ String
16 |
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 16 required :project_id, String |
#threshold_amount ⇒ Integer
The hard spend limit amount, in cents.
35 |
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 35 required :threshold_amount, Integer |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/admin/organization/projects/spend_limit_update_params.rb', line 75
|
Instance Method Details
#to_hash ⇒ { project_id: String, currency: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::currency, interval: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::interval, threshold_amount: Integer, ?notification_channel: OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel?, ?request_options: OpenAI::RequestOptions }
55 56 57 58 59 60 61 62 |
# File 'sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs', line 55
def to_hash: -> {
project_id: String,
currency: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::currency,
interval: OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::interval,
threshold_amount: Integer,
?notification_channel: OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel?,
?request_options: OpenAI::RequestOptions
}
|