Class: PagSeguro::Notification
- Inherits:
-
Transaction
- Object
- Transaction
- PagSeguro::Notification
- 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_TRANSACTIONS_URL, Transaction::PAGSEGURO_TRANSFER
Instance Attribute Summary
Attributes inherited from Transaction
Instance Method Summary collapse
-
#initialize(email = nil, token = nil, notification_code = nil) ⇒ Notification
constructor
A new instance of Notification.
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, #transaction_id, #transfer?, #type
Constructor Details
#initialize(email = nil, token = nil, notification_code = nil) ⇒ Notification
Returns a new instance of Notification.
4 5 6 7 8 9 |
# File 'lib/pag_seguro/notification.rb', line 4 def initialize(email = nil, token = nil, notification_code=nil) 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 |