Class: Paymongo::Entities::Event

Inherits:
BaseEntity show all
Defined in:
lib/paymongo/entities/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Event

Returns a new instance of Event.



8
9
10
11
12
# File 'lib/paymongo/entities/event.rb', line 8

def initialize(api_resource)
  @id = api_resource.id
  @resource = api_resource.attributes['data']
  @type = api_resource.attributes['type']
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#resourceObject (readonly)

Returns the value of attribute resource.



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

def resource
  @resource
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end