Sha256: 5aaedfe6f64e85f8133efa1fd86a1f1afb876537225e8dc1483a95274bea7d4b
Contents?: true
Size: 739 Bytes
Versions: 3
Compression:
Stored size: 739 Bytes
Contents
module Workarea module Orderbot class Order module Tender class StoreCredit attr_reader :tender, :options def initialize(tender, options = {}) @tender = tender @option = options end def to_h { payment_reference_id: tender.id.to_s, payment_type: "cheque", payment_method_type: "paid_from_web", amount_paid: tender.amount.to_f, payment_date: transaction.created_at.iso8601 } end private def transaction tender.transactions.successful.sort_by(&:created_at).last end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems