class Io::Flow::V0::Clients::MerchantGiftCardRedemptions

Public Class Methods

new(client) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7542
def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Public Instance Methods

post(merchant_gift_card_redemption_form) click to toggle source

Redeems a gift card

# File lib/flow_commerce/flow_api_v0_client.rb, line 7547
def post(merchant_gift_card_redemption_form)
  (x = merchant_gift_card_redemption_form; x.is_a?(::Io::Flow::V0::Models::MerchantGiftCardRedemptionForm) ? x : ::Io::Flow::V0::Models::MerchantGiftCardRedemptionForm.new(x))
  r = @client.request("/redeem").with_json(merchant_gift_card_redemption_form.to_json).post
  ::Io::Flow::V0::Models::MerchantGiftCardBalance.new(r)
end