Class: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/admin/organization/projects/spend_alert_update_params.rb,
sig/openai/models/admin/organization/projects/spend_alert_update_params.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::Projects::SpendAlerts#update

Defined Under Namespace

Modules: Currency, Interval Classes: NotificationChannel

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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:, alert_id:, currency:, interval:, notification_channel:, threshold_amount:, request_options: {}) ⇒ SpendAlertUpdateParams

Returns a new instance of SpendAlertUpdateParams.

Parameters:

  • currency —

    The currency for the threshold amount.

  • interval —

    The time interval for evaluating spend against the threshold.

  • notification_channel —

    Email notification settings for a spend alert.

  • threshold_amount —

    The alert threshold amount, in cents.

  • project_id: (String)
  • alert_id: (String)
  • currency: (OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency)
  • interval: (OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval)
  • notification_channel: (OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel)
  • threshold_amount: (Integer)
  • request_options: (OpenAI::request_opts) (defaults to: {})


# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 50

Instance Attribute Details

#alert_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 21

required :alert_id, String

#currency ⇒ OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency

The currency for the threshold amount.

Returns:

  • (OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency)


27
# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 27

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

#interval ⇒ OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval

The time interval for evaluating spend against the threshold.

Returns:

  • (OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval)


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

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

#notification_channel ⇒ OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel

Email notification settings for a spend alert.

Returns:

  • (OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel)


39
40
41
42
# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 39

required(
  :notification_channel,
  -> { OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel }
)

#project_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 16

required :project_id, String

#threshold_amount ⇒ Integer

The alert threshold amount, in cents.

Returns:

  • (Integer)


48
# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 48

required :threshold_amount, Integer

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/projects/spend_alert_update_params.rb', line 75

Instance Method Details

#to_hash ⇒ { project_id: String, alert_id: String, currency: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency, interval: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval, notification_channel: OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel, threshold_amount: Integer, ?request_options: OpenAI::RequestOptions }

Returns:

  • ({ project_id: String, alert_id: String, currency: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency, interval: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval, notification_channel: OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel, threshold_amount: Integer, ?request_options: OpenAI::RequestOptions })


55
56
57
58
59
60
61
62
63
# File 'sig/openai/models/admin/organization/projects/spend_alert_update_params.rbs', line 55

def to_hash: -> {
  project_id: String,
  alert_id: String,
  currency: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::currency,
  interval: OpenAI::Models::Admin::Organization::Projects::SpendAlertUpdateParams::interval,
  notification_channel: OpenAI::Admin::Organization::Projects::SpendAlertUpdateParams::NotificationChannel,
  threshold_amount: Integer,
  ?request_options: OpenAI::RequestOptions
}