module Fulfillment module Resources module Vouchers extend self def find_all(params={}) response = Request.new("vouchers", { search: params }).get Models::Collection.new(Models::Voucher, response.body) end def update(params={}) response = Request.new("vouchers/#{params[:id]}", params).patch Models::Voucher.new(response.body) end def redeem(params={}) response = Request.new("vouchers/#{params[:show_id]}/#{params[:code]}/redeem", params).patch Models::Voucher.new(response.body) end end end end