Class: Fizzy::Types::Account

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def name
  @name
end

#slugObject (readonly)

Returns the value of attribute slug

Returns:

  • (Object)

    the current value of slug



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def slug
  @slug
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def url
  @url
end

#userObject (readonly)

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



25
26
27
# File 'lib/fizzy/generated/types.rb', line 25

def user
  @user
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



27
28
29
30
31
32
33
34
35
36
# File 'lib/fizzy/generated/types.rb', line 27

def self.from_json(data)
  new(
    id: data["id"],
    name: data["name"],
    slug: data["slug"],
    created_at: data["created_at"],
    url: data["url"],
    user: data["user"]
  )
end