Sha256: 0f84abb333ed95c21b5a40250c3ea1953096da17932980d0ac16d6fd44e4699a

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

module Workarea
  class LegacyOrder
    class Tender
      include ApplicationDocument

      field :tender_type, type: String
      field :number, type: String
      field :amount, type: Money
      field :issuer, type: String
      field :expiration_month, type: String
      field :expiration_year, type: String
      field :data, type: Hash, default: {}

      validates_presence_of :type, :amount
      alias_method :type, :tender_type
      alias_method :type=, :tender_type=

      def slug
        "legacy_tender"
      end

      def issuer
        super.presence || type
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-legacy_orders-2.0.3 app/models/workarea/legacy_order/tender.rb
workarea-legacy_orders-2.0.2 app/models/workarea/legacy_order/tender.rb