Sha256: 5c3495ca0bf4bce85376c2b1ac26a0c0a9b6c7ef9d02833e2f2841ea8fe53414
Contents?: true
Size: 602 Bytes
Versions: 2
Compression:
Stored size: 602 Bytes
Contents
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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fulfillment-api-1.1.9 | lib/fulfillment/resources/vouchers.rb |
fulfillment-api-1.1.7 | lib/fulfillment/resources/vouchers.rb |