Class: PagSeguro::Notification
- Defined in:
- lib/pagseguro/notification.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#email ⇒ Object
Returns the value of attribute email.
-
#token ⇒ Object
Returns the value of attribute token.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(code, type = nil, email = nil, token = nil) ⇒ Notification
constructor
A new instance of Notification.
- #transaction ⇒ Object
Methods inherited from Request
Constructor Details
#initialize(code, type = nil, email = nil, token = nil) ⇒ Notification
Returns a new instance of Notification.
5 6 7 8 9 10 |
# File 'lib/pagseguro/notification.rb', line 5 def initialize(code, type = nil, email = nil, token = nil) @code = code @type = type @email = email @token = token end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/pagseguro/notification.rb', line 3 def code @code end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/pagseguro/notification.rb', line 3 def email @email end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/pagseguro/notification.rb', line 3 def token @token end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/pagseguro/notification.rb', line 3 def type @type end |
Instance Method Details
#transaction ⇒ Object
12 13 14 |
# File 'lib/pagseguro/notification.rb', line 12 def transaction PagSeguro::Transaction.new get("/transactions/notifications/#{code}") end |