Class: OpenAI::Models::Admin::Organization::Invite

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/admin/organization/invite.rb,
sig/openai/models/admin/organization/invite.rbs

Overview

See Also:

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

Defined Under Namespace

Modules: Role, Status Classes: Project

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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 ⇒ Invite

Returns a new instance of Invite.

Parameters:

  • id —

    The identifier, which can be referenced in API endpoints

  • created_at —

    The Unix timestamp (in seconds) of when the invite was sent.

  • email —

    The email address of the individual to whom the invite was sent

  • projects —

    The projects that were granted membership upon acceptance of the invite.

  • role —

    owner or reader

  • status —

    accepted,expired, or pending

  • accepted_at —

    The Unix timestamp (in seconds) of when the invite was accepted.

  • expires_at —

    The Unix timestamp (in seconds) of when the invite expires.

  • object —

    The object type, which is always organization.invite

  • id: (String)
  • created_at: (Integer)
  • email: (String)
  • projects: (::Array[OpenAI::Admin::Organization::Invite::Project])
  • role: (OpenAI::Models::Admin::Organization::Invite::role)
  • status: (OpenAI::Models::Admin::Organization::Invite::status)
  • accepted_at: (Integer, nil)
  • expires_at: (Integer, nil)
  • object: (:"organization.invite")


64
65
66
67
68
69
70
71
72
73
74
# File 'sig/openai/models/admin/organization/invite.rbs', line 64

def initialize: (
  id: String,
  created_at: Integer,
  email: String,
  projects: ::Array[OpenAI::Admin::Organization::Invite::Project],
  role: OpenAI::Models::Admin::Organization::Invite::role,
  status: OpenAI::Models::Admin::Organization::Invite::status,
  ?accepted_at: Integer?,
  ?expires_at: Integer?,
  ?object: :"organization.invite"
) -> void

Instance Attribute Details

#accepted_at ⇒ Integer?

The Unix timestamp (in seconds) of when the invite was accepted.

Returns:

  • (Integer, nil)


55
# File 'lib/openai/models/admin/organization/invite.rb', line 55

optional :accepted_at, Integer, nil?: true

#created_at ⇒ Integer

The Unix timestamp (in seconds) of when the invite was sent.

Returns:

  • (Integer)


19
# File 'lib/openai/models/admin/organization/invite.rb', line 19

required :created_at, Integer

#email ⇒ String

The email address of the individual to whom the invite was sent

Returns:

  • (String)


25
# File 'lib/openai/models/admin/organization/invite.rb', line 25

required :email, String

#expires_at ⇒ Integer?

The Unix timestamp (in seconds) of when the invite expires.

Returns:

  • (Integer, nil)


61
# File 'lib/openai/models/admin/organization/invite.rb', line 61

optional :expires_at, Integer, nil?: true

#id ⇒ String

The identifier, which can be referenced in API endpoints

Returns:

  • (String)


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

required :id, String

#object ⇒ :"organization.invite"

The object type, which is always organization.invite

Returns:

  • (:"organization.invite")


31
# File 'lib/openai/models/admin/organization/invite.rb', line 31

required :object, const: :"organization.invite"

#projects ⇒ ::Array[OpenAI::Admin::Organization::Invite::Project]

The projects that were granted membership upon acceptance of the invite.

Returns:

  • (::Array[OpenAI::Admin::Organization::Invite::Project])


37
# File 'lib/openai/models/admin/organization/invite.rb', line 37

required :projects, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Admin::Organization::Invite::Project] }

#role ⇒ OpenAI::Models::Admin::Organization::Invite::role

owner or reader

Returns:

  • (OpenAI::Models::Admin::Organization::Invite::role)


43
# File 'lib/openai/models/admin/organization/invite.rb', line 43

required :role, enum: -> { OpenAI::Admin::Organization::Invite::Role }

#status ⇒ OpenAI::Models::Admin::Organization::Invite::status

accepted,expired, or pending

Returns:

  • (OpenAI::Models::Admin::Organization::Invite::status)


49
# File 'lib/openai/models/admin/organization/invite.rb', line 49

required :status, enum: -> { OpenAI::Admin::Organization::Invite::Status }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/admin/organization/invite.rb', line 121

Instance Method Details

#to_hash ⇒ { id: String, created_at: Integer, email: String, ?object: :"organization.invite", projects: ::Array[OpenAI::Admin::Organization::Invite::Project], role: OpenAI::Models::Admin::Organization::Invite::role, status: OpenAI::Models::Admin::Organization::Invite::status, ?accepted_at: Integer?, ?expires_at: Integer? }

Returns:

  • ({ id: String, created_at: Integer, email: String, ?object: :"organization.invite", projects: ::Array[OpenAI::Admin::Organization::Invite::Project], role: OpenAI::Models::Admin::Organization::Invite::role, status: OpenAI::Models::Admin::Organization::Invite::status, ?accepted_at: Integer?, ?expires_at: Integer? })


76
77
78
79
80
81
82
83
84
85
86
# File 'sig/openai/models/admin/organization/invite.rbs', line 76

def to_hash: -> {
  id: String,
  created_at: Integer,
  email: String,
  ?object: :"organization.invite",
  projects: ::Array[OpenAI::Admin::Organization::Invite::Project],
  role: OpenAI::Models::Admin::Organization::Invite::role,
  status: OpenAI::Models::Admin::Organization::Invite::status,
  ?accepted_at: Integer?,
  ?expires_at: Integer?
}