Class: Workarea::Api::Storefront::GiftCardsController

Inherits:
Api::Storefront::ApplicationController
  • Object
show all
Defined in:
app/controllers/workarea/api/storefront/gift_cards_controller.rb

Instance Method Summary collapse

Instance Method Details

#balanceObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/workarea/api/storefront/gift_cards_controller.rb', line 6

def balance
  @gift_card = Workarea::GiftCards.gateway.lookup(params)

  if @gift_card.blank?
    raise Mongoid::Errors::DocumentNotFound.new(
      Payment::GiftCard,
      params.to_unsafe_h.except('controller', 'action')
    )
  end
end