Class: Fizzy::Types::User

Inherits:
Data
  • Object
show all
Defined in:
lib/fizzy/generated/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def active
  @active
end

#avatar_urlObject (readonly)

Returns the value of attribute avatar_url

Returns:

  • (Object)

    the current value of avatar_url



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def avatar_url
  @avatar_url
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def created_at
  @created_at
end

#email_addressObject (readonly)

Returns the value of attribute email_address

Returns:

  • (Object)

    the current value of email_address



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def email_address
  @email_address
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def name
  @name
end

#roleObject (readonly)

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def role
  @role
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



1115
1116
1117
# File 'lib/fizzy/generated/types.rb', line 1115

def url
  @url
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'lib/fizzy/generated/types.rb', line 1117

def self.from_json(data)
  new(
    id: data["id"],
    name: data["name"],
    role: data["role"],
    active: data["active"],
    email_address: data["email_address"],
    created_at: data["created_at"],
    url: data["url"],
    avatar_url: data["avatar_url"]
  )
end