Sha256: b320cb995275006187090d930080f1b856cfe48c2d9b794f44610da346f35735

Contents?: true

Size: 1.43 KB

Versions: 1

Compression:

Stored size: 1.43 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

    def verify_filter(options = {})
      get("verify/filter", "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

1 entries across 1 versions & 1 rubygems

Version Path
access-1.0.3 lib/access/api.rb