Class: OpenAI::Models::Admin::Organization::AdminAPIKeyCreateResponse

Inherits:
AdminAPIKey show all
Defined in:
lib/openai/models/admin/organization/admin_api_key_create_response.rb,
sig/openai/models/admin/organization/admin_api_key_create_response.rbs

Overview

See Also:

  • OpenAI::Resources::Admin::Organization::AdminAPIKeys#create

Instance Attribute Summary collapse

Attributes inherited from AdminAPIKey

#created_at, #expires_at, #id, #last_used_at, #name, #object, #owner, #redacted_value

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_with_error, #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:, created_at:, expires_at:, owner:, redacted_value:, value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key") ⇒ Object

Represents an individual Admin API key in an org.

Parameters:

  • id (String)

    The identifier, which can be referenced in API endpoints

  • created_at (Integer)

    The Unix timestamp (in seconds) of when the API key was created

  • expires_at (Integer, nil)

    The Unix timestamp (in seconds) of when the API key expires

  • owner (OpenAI::Models::Admin::Organization::AdminAPIKey::Owner)
  • redacted_value (String)

    The redacted value of the API key

  • value (String)

    The value of the API key. Only shown on create.

  • last_used_at (Integer, nil) (defaults to: nil)

    The Unix timestamp (in seconds) of when the API key was last used

  • name (String, nil) (defaults to: nil)

    The name of the API key

  • object (Symbol, :"organization.admin_api_key") (defaults to: :"organization.admin_api_key")

    The object type, which is always organization.admin_api_key



# File 'lib/openai/models/admin/organization/admin_api_key_create_response.rb', line 15

Instance Attribute Details

#valueString

The value of the API key. Only shown on create.

Parameters:

  • _ (String)

Returns:

  • (String)


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

required :value, String

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/openai/models/admin/organization/admin_api_key_create_response.rbs', line 35

def to_hash: -> {