Class: Anthropic::Models::Organization::OrganizationUser

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/organization/organization_user.rb,
sig/anthropic/models/organization/organization_user.rbs

Overview

See Also:

  • Anthropic::Resources::Organization::Users#retrieve

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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 ⇒ OrganizationUser

Returns a new instance of OrganizationUser.

Parameters:

  • id: (String)
  • added_at: (Time)
  • email: (String)
  • name: (String)
  • role: (Anthropic::Models::organization_role)
  • type: (:user)


29
30
31
32
33
34
35
36
# File 'sig/anthropic/models/organization/organization_user.rbs', line 29

def initialize: (
  id: String,
  added_at: Time,
  email: String,
  name: String,
  role: Anthropic::Models::organization_role,
  ?type: :user
) -> void

Instance Attribute Details

#added_at ⇒ Time

RFC 3339 datetime string indicating when the User joined the Organization.

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/anthropic/models/organization/organization_user.rb', line 18

required :added_at, Time

#email ⇒ String

Email of the User.

Parameters:

  • value (String)

Returns:

  • (String)


24
# File 'lib/anthropic/models/organization/organization_user.rb', line 24

required :email, String

#id ⇒ String

ID of the User.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/organization/organization_user.rb', line 12

required :id, String

#name ⇒ String

Name of the User.

Parameters:

  • value (String)

Returns:

  • (String)


30
# File 'lib/anthropic/models/organization/organization_user.rb', line 30

required :name, String

#role ⇒ Symbol, Anthropic::Models::OrganizationRole

Organization role of the User.

Parameters:

  • value (Anthropic::Models::organization_role)

Returns:



36
# File 'lib/anthropic/models/organization/organization_user.rb', line 36

required :role, enum: -> { Anthropic::OrganizationRole }

#type ⇒ Symbol, :user

Object type.

For Users, this is always "user".

Parameters:

  • value (:user)

Returns:

  • (Symbol, :user)


44
# File 'lib/anthropic/models/organization/organization_user.rb', line 44

required :type, const: :user

Instance Method Details

#to_hash ⇒ { id: String, added_at: Time, email: String, name: String, role: Anthropic::Models::organization_role, type: :user }

Returns:

  • ({ id: String, added_at: Time, email: String, name: String, role: Anthropic::Models::organization_role, type: :user })


38
39
40
41
42
43
44
45
# File 'sig/anthropic/models/organization/organization_user.rbs', line 38

def to_hash: -> {
  id: String,
  added_at: Time,
  email: String,
  name: String,
  role: Anthropic::Models::organization_role,
  type: :user
}