Class: PayPalSDK::Transaction
- Inherits:
-
Object
- Object
- PayPalSDK::Transaction
- Defined in:
- lib/ruby-paypal-extended/transaction.rb
Overview
Wrapper class to wrap response hash from PayPal as an object and to provide nice helper methods
Instance Method Summary collapse
-
#initialize(data) ⇒ Transaction
constructor
A new instance of Transaction.
- #response ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Transaction
Returns a new instance of Transaction.
4 5 6 7 |
# File 'lib/ruby-paypal-extended/transaction.rb', line 4 def initialize(data) @success = data["ACK"].to_s != "Failure" @response = data end |
Instance Method Details
#response ⇒ Object
13 14 15 |
# File 'lib/ruby-paypal-extended/transaction.rb', line 13 def response @response end |
#success? ⇒ Boolean
9 10 11 |
# File 'lib/ruby-paypal-extended/transaction.rb', line 9 def success? @success end |