Class: Paytureman::PaymentWithSession
- Defined in:
- lib/payments/payment_with_session.rb
Direct Known Subclasses
PaymentBlocked, PaymentCancelled, PaymentCharged, PaymentPrepared, PaymentRefunded, PaymentUnknown
Instance Attribute Summary
Attributes inherited from Payment
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(order_id, amount, session_id, gateway = nil) ⇒ PaymentWithSession
constructor
A new instance of PaymentWithSession.
- #save_to_memento(memento) ⇒ Object
Methods inherited from Payment
Constructor Details
#initialize(order_id, amount, session_id, gateway = nil) ⇒ PaymentWithSession
Returns a new instance of PaymentWithSession.
5 6 7 8 |
# File 'lib/payments/payment_with_session.rb', line 5 def initialize(order_id, amount, session_id, gateway = nil) super(order_id, amount, gateway) @session_id = session_id end |
Class Method Details
.new_from_memento(memento) ⇒ Object
15 16 17 |
# File 'lib/payments/payment_with_session.rb', line 15 def self.new_from_memento(memento) new(memento.order_id, memento.amount, memento.session_id, memento.gateway) end |
Instance Method Details
#save_to_memento(memento) ⇒ Object
10 11 12 13 |
# File 'lib/payments/payment_with_session.rb', line 10 def save_to_memento(memento) memento.session_id = session_id super(memento) end |