Class: Paymongo::Entities::Event
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::Event
- Defined in:
- lib/paymongo/entities/event.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(api_resource) ⇒ Event
constructor
A new instance of Event.
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/event.rb', line 4 def id @id end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/paymongo/entities/event.rb', line 4 def resource @resource end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/paymongo/entities/event.rb', line 4 def type @type end |