Sha256: c08c5b7184e83b7126ab7e0e150b8e91f99f2ccf39ffd144f8b6bce1f030138a

Contents?: true

Size: 753 Bytes

Versions: 5

Compression:

Stored size: 753 Bytes

Contents

module OiApi

  class Client

    module Offers

      def offers(options = {})
        self.class.get("/offers/", options_with_basic_auth(options))
      end

      def offer(offer_id, options = {})
        self.class.get("/offers/#{offer_id}/", options_with_basic_auth(options))
      end

      def create_offer(options = {})
        self.class.post('/offers/', options_with_basic_auth(options))
      end

      def update_offer(offer_id, options = {})
        self.class.put("/offers/#{offer_id}/", options_with_basic_auth(options))
      end

      # DELETE not allowed for offers?
      #def delete_offer(offer_id, options = {})
      #  self.class.delete("/offers/#{offer_id}/", options_with_basic_auth(options))
      #end

    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oi-api-ruby-0.1.5 lib/oi_api/client/offers.rb
oi-api-ruby-0.1.4 lib/oi_api/client/offers.rb
oi-api-ruby-0.1.3 lib/oi_api/client/offers.rb
oi-api-ruby-0.1.2 lib/oi_api/client/offers.rb
oi-api-ruby-0.1.1 lib/oi_api/client/offers.rb