Sha256: 63333412d153199c16b662fc9ce98cfbebd44bcafcf9971e5e7a03ced7483f56
Contents?: true
Size: 732 Bytes
Versions: 3
Compression:
Stored size: 732 Bytes
Contents
module Workarea module Orderbot class Order module Tender class GiftCard 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: "gift_card", 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