Class: PagSeguro::Notification::Transaction

Inherits:
PagSeguro::Notification show all
Defined in:
lib/pagseguro/notification/transaction.rb

Instance Attribute Summary

Attributes inherited from PagSeguro::Notification

#code, #type

Instance Method Summary collapse

Methods included from Extensions::MassAssignment

#initialize

Instance Method Details

#transactionObject

Fetch the transaction by its notificationCode.



10
11
12
# File 'lib/pagseguro/notification/transaction.rb', line 10

def transaction
  Transaction.find_by_notification_code(code)
end

#transaction?Boolean

Detect if the notification is from a transaction.

Returns:

  • (Boolean)


5
6
7
# File 'lib/pagseguro/notification/transaction.rb', line 5

def transaction?
  type == "transaction"
end