Class: SpreedlyCore::PurchaseTransaction
- Inherits:
-
Transaction
- Object
- Base
- Transaction
- SpreedlyCore::PurchaseTransaction
- Includes:
- HasIpAddress, NullifiableTransaction
- Defined in:
- lib/spreedly-core-ruby/transactions.rb
Instance Attribute Summary collapse
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
Attributes included from HasIpAddress
Attributes inherited from Transaction
#amount, #checkout_url, #created_at, #currency_code, #gateway_token, #message, #on_test_gateway, #response, #signed, #state, #succeeded, #token, #transaction_type, #updated_at
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ PurchaseTransaction
constructor
A new instance of PurchaseTransaction.
Methods included from NullifiableTransaction
Methods inherited from Transaction
find, handles, #pending?, #valid_signature?, #verified!, #verified?
Methods inherited from Base
configure, environment_key, gateway_token, gateway_token=, verify_get, verify_options, verify_post, verify_put, verify_request
Constructor Details
#initialize(attrs = {}) ⇒ PurchaseTransaction
Returns a new instance of PurchaseTransaction.
143 144 145 146 147 |
# File 'lib/spreedly-core-ruby/transactions.rb', line 143 def initialize(attrs={}) @payment_method = PaymentMethod.new(attrs.delete("payment_method") || {}) @response = Response.new(attrs.delete("response") || {}) super(attrs) end |
Instance Attribute Details
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
141 142 143 |
# File 'lib/spreedly-core-ruby/transactions.rb', line 141 def payment_method @payment_method end |