Class: Fizzy::Types::AccessToken

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



11
12
13
# File 'lib/fizzy/generated/types.rb', line 11

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



11
12
13
# File 'lib/fizzy/generated/types.rb', line 11

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



11
12
13
# File 'lib/fizzy/generated/types.rb', line 11

def id
  @id
end

#permissionObject (readonly)

Returns the value of attribute permission

Returns:

  • (Object)

    the current value of permission



11
12
13
# File 'lib/fizzy/generated/types.rb', line 11

def permission
  @permission
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



11
12
13
# File 'lib/fizzy/generated/types.rb', line 11

def token
  @token
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



13
14
15
16
17
18
19
20
21
# File 'lib/fizzy/generated/types.rb', line 13

def self.from_json(data)
  new(
    id: data["id"],
    description: data["description"],
    permission: data["permission"],
    created_at: data["created_at"],
    token: data["token"]
  )
end