Sha256: 2285d3990df19fa827621e4cf12ec34157dd123d689c085c27890048dc672156
Contents?: true
Size: 694 Bytes
Versions: 6
Compression:
Stored size: 694 Bytes
Contents
module Workarea if Plugin.installed?(:api) module Api module Storefront class GiftCardsController < Api::Storefront::ApplicationController def balance email = params.fetch(:email, nil) token = params.fetch(:token, nil) if email.present? && token.present? @gift_card = Payment::GiftCard.find_by_token_and_email(token, email) end if @gift_card.blank? raise Mongoid::Errors::DocumentNotFound.new( Payment::GiftCard, email: email, token: token ) end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems