Class: Rafflesia::EpisodeEvent

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/episode_events/episode_event.rb

Constant Summary collapse

HASH_ATTRS =
{
  attempt_id: :attempt_id,
  created_at: :created_at,
  data: :data,
  episode_id: :episode_id,
  id: :id,
  object: :object,
  organization_id: :organization_id,
  type: :type
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ EpisodeEvent

Returns a new instance of EpisodeEvent.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/episode_events/episode_event.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @attempt_id = hash[:attempt_id]
  @created_at = hash[:created_at]
  @data = hash[:data] || {}
  @episode_id = hash[:episode_id]
  @id = hash[:id]
  @object = hash[:object]
  @organization_id = hash[:organization_id]
  @type = hash[:type]
end

Instance Attribute Details

#attempt_idObject

Returns the value of attribute attempt_id.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def attempt_id
  @attempt_id
end

#created_atObject

Returns the value of attribute created_at.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def created_at
  @created_at
end

#dataObject

Returns the value of attribute data.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def data
  @data
end

#episode_idObject

Returns the value of attribute episode_id.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def episode_id
  @episode_id
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def id
  @id
end

#objectObject

Returns the value of attribute object.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def organization_id
  @organization_id
end

#typeObject

Returns the value of attribute type.



19
20
21
# File 'lib/rafflesia/episode_events/episode_event.rb', line 19

def type
  @type
end