Class: Fizzy::Types::Notification

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



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def body
  @body
end

#cardObject (readonly)

Returns the value of attribute card

Returns:

  • (Object)

    the current value of card



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def card
  @card
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def created_at
  @created_at
end

#creatorObject (readonly)

Returns the value of attribute creator

Returns:

  • (Object)

    the current value of creator



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def creator
  @creator
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def id
  @id
end

#readObject (readonly)

Returns the value of attribute read

Returns:

  • (Object)

    the current value of read



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def read
  @read
end

#read_atObject (readonly)

Returns the value of attribute read_at

Returns:

  • (Object)

    the current value of read_at



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def read_at
  @read_at
end

#source_typeObject (readonly)

Returns the value of attribute source_type

Returns:

  • (Object)

    the current value of source_type



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def source_type
  @source_type
end

#titleObject (readonly)

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def title
  @title
end

#unread_countObject (readonly)

Returns the value of attribute unread_count

Returns:

  • (Object)

    the current value of unread_count



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def unread_count
  @unread_count
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



727
728
729
# File 'lib/fizzy/generated/types.rb', line 727

def url
  @url
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/fizzy/generated/types.rb', line 729

def self.from_json(data)
  new(
    id: data["id"],
    unread_count: data["unread_count"],
    read: data["read"],
    read_at: data["read_at"],
    created_at: data["created_at"],
    source_type: data["source_type"],
    title: data["title"],
    body: data["body"],
    creator: data["creator"] && User.from_json(data["creator"]),
    card: data["card"] && NotificationCard.from_json(data["card"]),
    url: data["url"]
  )
end