Class: Fizzy::Types::Comment

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def body
  @body
end

#cardObject (readonly)

Returns the value of attribute card

Returns:

  • (Object)

    the current value of card



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def card
  @card
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def created_at
  @created_at
end

#creatorObject (readonly)

Returns the value of attribute creator

Returns:

  • (Object)

    the current value of creator



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def creator
  @creator
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def id
  @id
end

#reactions_urlObject (readonly)

Returns the value of attribute reactions_url

Returns:

  • (Object)

    the current value of reactions_url



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def reactions_url
  @reactions_url
end

#updated_atObject (readonly)

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



285
286
287
# File 'lib/fizzy/generated/types.rb', line 285

def url
  @url
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/fizzy/generated/types.rb', line 287

def self.from_json(data)
  new(
    id: data["id"],
    created_at: data["created_at"],
    updated_at: data["updated_at"],
    body: data["body"] && RichTextBody.from_json(data["body"]),
    creator: data["creator"] && User.from_json(data["creator"]),
    card: data["card"] && CardRef.from_json(data["card"]),
    reactions_url: data["reactions_url"],
    url: data["url"]
  )
end