Sha256: d1ea822a7c1f2e4fed0fdb9420b8dde19a729086a27e97db424dd5e97ffdb31f

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 Bytes

Contents

module Paytureman

  class PaymentWithSession < Payment

    def initialize(order_id, amount, session_id, gateway = nil)
      super(order_id, amount, gateway)
      @session_id = session_id
    end

    def save_to_memento(memento)
      memento.session_id = session_id
      super(memento)
    end

    def self.new_from_memento(memento)
      new(memento.order_id, memento.amount, memento.session_id, memento.gateway)
    end

  protected

    attr_accessor :session_id

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
paytureman-1.0.0 lib/payments/payment_with_session.rb
paytureman-0.7.0 lib/payments/payment_with_session.rb