Module: Cashstar::Client::GiftCardMethods

Included in:
Cashstar::Client
Defined in:
lib/cashstar/client/gift_card.rb

Instance Method Summary collapse

Instance Method Details

#balance_inquiry(merchant, egc_code) ⇒ Object



6
7
8
9
# File 'lib/cashstar/client/gift_card.rb', line 6

def balance_inquiry(merchant, egc_code)
  response = get("/v2/merchant/#{merchant}/egc/#{egc_code}/balance/")
  format.to_s.downcase == 'xml' ? response['egc'] : response['egc']
end

#cancel(merchant, egc_code) ⇒ Object



11
12
13
14
# File 'lib/cashstar/client/gift_card.rb', line 11

def cancel(merchant, egc_code)
  response = delete("/v2/merchant/#{merchant}/egc/#{egc_code}/")
  format.to_s.downcase == 'xml' ? response['egc'] : response['egc']
end