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_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(id:, created_at:, expires_at:, owner:, redacted_value:, value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key") ⇒ AdminAPIKeyCreateResponse

Returns a new instance of AdminAPIKeyCreateResponse.

Parameters:

  • id —

    The identifier, which can be referenced in API endpoints

  • created_at —

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

  • expires_at —

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

  • redacted_value —

    The redacted value of the API key

  • value —

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

  • last_used_at (defaults to: nil) —

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

  • name (defaults to: nil) —

    The name of the API key

  • object (defaults to: :"organization.admin_api_key") —

    The object type, which is always organization.admin_api_key

  • id: (String)
  • created_at: (Integer)
  • expires_at: (Integer, nil)
  • owner: (OpenAI::Admin::Organization::AdminAPIKey::Owner)
  • redacted_value: (String)
  • value: (String)
  • last_used_at: (Integer, nil) (defaults to: nil)
  • name: (String, nil) (defaults to: nil)
  • object: (:"organization.admin_api_key") (defaults to: :"organization.admin_api_key")


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

Instance Attribute Details

#value ⇒ String

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

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 ⇒ { id: String, created_at: Integer, expires_at: Integer?, owner: OpenAI::Admin::Organization::AdminAPIKey::Owner, redacted_value: String, value: String, ?object: :"organization.admin_api_key", ?last_used_at: Integer?, ?name: String? }

Returns:

  • ({ id: String, created_at: Integer, expires_at: Integer?, owner: OpenAI::Admin::Organization::AdminAPIKey::Owner, redacted_value: String, value: String, ?object: :"organization.admin_api_key", ?last_used_at: Integer?, ?name: String? })


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

def to_hash: -> {
  id: String,
  created_at: Integer,
  expires_at: Integer?,
  owner: OpenAI::Admin::Organization::AdminAPIKey::Owner,
  redacted_value: String,
  value: String,
  ?object: :"organization.admin_api_key",
  ?last_used_at: Integer?,
  ?name: String?
}