Class: PagSeguro::Notification
- Inherits:
-
Object
- Object
- PagSeguro::Notification
- Includes:
- Extensions::MassAssignment
- Defined in:
- lib/pagseguro/notification.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
The notification code sent by PagSeguro.
-
#type ⇒ Object
The notification type sent by PagSeguro.
Instance Method Summary collapse
-
#transaction ⇒ Object
Fetch the transaction by its notificationCode.
-
#transaction? ⇒ Boolean
Detect if the notification is from a transaction.
Methods included from Extensions::MassAssignment
Instance Attribute Details
#code ⇒ Object
The notification code sent by PagSeguro.
6 7 8 |
# File 'lib/pagseguro/notification.rb', line 6 def code @code end |
#type ⇒ Object
The notification type sent by PagSeguro.
9 10 11 |
# File 'lib/pagseguro/notification.rb', line 9 def type @type end |
Instance Method Details
#transaction ⇒ Object
Fetch the transaction by its notificationCode.
17 18 19 |
# File 'lib/pagseguro/notification.rb', line 17 def transaction Transaction.find_by_notification_code(code) end |
#transaction? ⇒ Boolean
Detect if the notification is from a transaction.
12 13 14 |
# File 'lib/pagseguro/notification.rb', line 12 def transaction? type == "transaction" end |