Sha256: 25bc9f0c08bf27462160c85fc980b5239e96d4d92fec966fb65c1e3e389c623f

Contents?: true

Size: 501 Bytes

Versions: 11

Compression:

Stored size: 501 Bytes

Contents

module Workarea
  class Payment
    class GiftCard
      class Redemption
        include ApplicationDocument

        field :redeemed_at, type: DateTime
        field :order_id, type: String

        field :amount, type: Money

        belongs_to :gift_card, class_name: 'Workarea::Payment::GiftCard'

        validates_presence_of :amount
        validates_presence_of :redeemed_at

        index(redeemed_at: 1)
        index(order_id: 1)
        index(gift_card_id: 1)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
workarea-gift_cards-3.4.11 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-4.0.3 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-4.0.2 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-3.4.10 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-4.0.1 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-3.4.9 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-3.4.8 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-4.0.0 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-4.0.0.beta.1 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-3.4.7 app/models/workarea/payment/gift_card/redemption.rb
workarea-gift_cards-3.4.6 app/models/workarea/payment/gift_card/redemption.rb