Class: PagSeguro::Notification

Inherits:
Transaction show all
Defined in:
lib/pag_seguro/notification.rb

Constant Summary

Constants inherited from Transaction

Transaction::PAGSEGURO_ADDITION_OF_FUNDS, Transaction::PAGSEGURO_APPROVED, Transaction::PAGSEGURO_AVAILABLE, Transaction::PAGSEGURO_BONUS, Transaction::PAGSEGURO_CANCELLED, Transaction::PAGSEGURO_CHARGE, Transaction::PAGSEGURO_DISPUTED, Transaction::PAGSEGURO_IN_ANALYSIS, Transaction::PAGSEGURO_PAYMENT, Transaction::PAGSEGURO_PROCESSING, Transaction::PAGSEGURO_RETURNED, Transaction::PAGSEGURO_TRANSFER

Instance Attribute Summary

Attributes inherited from Transaction

#data

Instance Method Summary collapse

Methods inherited from Transaction

#addition_of_funds?, #approved?, #available?, #bonus?, #cancelled?, #charge?, #date, #discount_amount, #disputed?, #extra_amount, #fee_amount, #gross_amount, #id, #in_analysis?, #installment_count, #item_count, #items, #net_amount, #payment?, #payment_method, #processing?, #returned?, #sender, #shipping, #status, status_for, #transaction_id, transactions_url, #transfer?, #type

Constructor Details

#initialize(email, token, notification_code) ⇒ Notification

Returns a new instance of Notification.



4
5
6
7
8
9
# File 'lib/pag_seguro/notification.rb', line 4

def initialize(email, token, notification_code)
  raise "Needs a notification code" if notification_code.blank?
  raise "Needs an email" if email.blank?
  raise "Needs a token" if token.blank?
  @data = transaction_data(email, token, notification_code)
end