Class: Payrex::Entities::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Event

Returns a new instance of Event.



12
13
14
15
16
17
18
19
20
# File 'lib/entities/event.rb', line 12

def initialize(api_resource)
  @id = api_resource.data["id"]
  @data = api_resource.data["data"]
  @type = api_resource.data["type"]
  @pending_webhooks = api_resource.data["pending_webhooks"]
  @previous_attributes = api_resource.data["previous_attributes"]
  @created_at = api_resource.data["created_at"]
  @updated_at = api_resource.data["updated_at"]
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/entities/event.rb', line 4

def created_at
  @created_at
end

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/entities/event.rb', line 4

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/entities/event.rb', line 4

def id
  @id
end

#pending_webhooksObject (readonly)

Returns the value of attribute pending_webhooks.



4
5
6
# File 'lib/entities/event.rb', line 4

def pending_webhooks
  @pending_webhooks
end

#previous_attributesObject (readonly)

Returns the value of attribute previous_attributes.



4
5
6
# File 'lib/entities/event.rb', line 4

def previous_attributes
  @previous_attributes
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/entities/event.rb', line 4

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/entities/event.rb', line 4

def updated_at
  @updated_at
end