Class: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit
- Defined in:
- lib/openai/models/admin/organization/projects/project_spend_limit.rb,
sig/openai/models/admin/organization/projects/project_spend_limit.rbs
Overview
Defined Under Namespace
Modules: Currency, Interval Classes: Enforcement, NotificationChannel
Instance Attribute Summary collapse
-
#currency ⇒ OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::currency
The currency for the threshold amount.
-
#enforcement ⇒ OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement
The current enforcement state of the hard spend limit.
-
#interval ⇒ OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::interval
The time interval for evaluating spend against the threshold.
-
#notification_channel ⇒ OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel?
Email notifications sent when the hard spend limit is reached.
-
#object ⇒ :"project.spend_limit"
The object type, which is always
project.spend_limit. -
#threshold_amount ⇒ Integer
The hard spend limit amount, in cents.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(currency:, enforcement:, interval:, threshold_amount:, notification_channel: nil, object: :"project.spend_limit") ⇒ ProjectSpendLimit
constructor
A new instance of ProjectSpendLimit.
- #to_hash ⇒ { currency: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::currency, enforcement: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement, interval: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::interval, ?object: :"project.spend_limit", threshold_amount: Integer, ?notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel }
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(currency:, enforcement:, interval:, threshold_amount:, notification_channel: nil, object: :"project.spend_limit") ⇒ ProjectSpendLimit
Returns a new instance of ProjectSpendLimit.
|
|
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 50
|
Instance Attribute Details
#currency ⇒ OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::currency
The currency for the threshold amount. Currently, only USD is supported.
14 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 14 required :currency, union: -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Currency } |
#enforcement ⇒ OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement
The current enforcement state of the hard spend limit.
20 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 20 required :enforcement, -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement } |
#interval ⇒ OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::interval
The time interval for evaluating spend against the threshold. Currently, only
month is supported.
27 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 27 required :interval, union: -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Interval } |
#notification_channel ⇒ OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel?
Email notifications sent when the hard spend limit is reached.
45 46 47 48 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 45 optional( :notification_channel, -> { OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel } ) |
#object ⇒ :"project.spend_limit"
The object type, which is always project.spend_limit.
33 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 33 required :object, const: :"project.spend_limit" |
#threshold_amount ⇒ Integer
The hard spend limit amount, in cents.
39 |
# File 'lib/openai/models/admin/organization/projects/project_spend_limit.rb', line 39 required :threshold_amount, Integer |
Instance Method Details
#to_hash ⇒ { currency: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::currency, enforcement: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement, interval: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::interval, ?object: :"project.spend_limit", threshold_amount: Integer, ?notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel }
65 66 67 68 69 70 71 72 |
# File 'sig/openai/models/admin/organization/projects/project_spend_limit.rbs', line 65
def to_hash: -> {
currency: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::currency,
enforcement: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement,
interval: OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit::interval,
?object: :"project.spend_limit",
threshold_amount: Integer,
?notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel
}
|