Sha256: 3e74a0af0f16b08638ba33fdb673df0dc1210a8ec8d2493f30752f05295ffa6e

Contents?: true

Size: 1.35 KB

Versions: 2

Compression:

Stored size: 1.35 KB

Contents

module Access
  class Api < Request

  ###offer
    def search_categories(options = {})
      get("/categories", "offer", options)
    end

    def find_category(category_id, options = {})
      get("/categories/#{category_id}", "offer", options)
    end

    def search_offers(options={})
      get("/offers", "offer", options)
    end

    def find_offer(offer_id, options = {})
      get("/offers/#{offer_id}", "offer", options)
    end

    def search_locations(options={})
      get("/locations", "offer", options)
    end

    def find_location(location_id, options = {})
      get("/locations/#{location_id}", "offer", options)
    end

    def search_stores(options={})
      get("/stores", "offer", options)
    end

    def find_store(store_id, options = {})
      get("/stores/#{store_id}", "offer", options)
    end

  ###token
    def verify(options = {})
      get("/verify", "token", options)
    end

    def verify_other(token, options = {})
      get("/verify/#{token}", "token", options)
    end

  ###redeem
    def redeem_offer(offer_key, redeem_type = nil, options = {})
      get("/redeem/#{offer_key}/#{redeem_type}", "redeem", options)
    end

  ###report
    def usage(options = {})
      get("/usage", "report", options)
    end

    def usage_other(token, options = {})
      get("/usage/#{token}", "report", options)
    end

  ###member

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
access-1.0.1 lib/access/api.rb
access-1.0.0 lib/access/api.rb