# reperesents the gift card you buy from the site (but physical gift card is modeled by GiftCard)
module JamRuby
  class PosaCardPurchase < ActiveRecord::Base

    @@log = Logging.logger[PosaCardPurchase]

    attr_accessible :user, :posa_card_type

    def name
      posa_card_type.sale_display
    end

    # who purchased the card?
    belongs_to :user, class_name: "JamRuby::User"
    belongs_to :posa_card_type, class_name: "JamRuby::PosaCardType"
    belongs_to :posa_card, class_name: 'JamRuby::PosaCard'
  end
end
