Sha256: cc390bce00be816cce933a52861a2ea6283f0e60a7b128b9afca75cbc1579191

Contents?: true

Size: 843 Bytes

Versions: 1

Compression:

Stored size: 843 Bytes

Contents

module Spree
  module API
    class Client
      module Products
        def products(options={})
          get('products', options)['products']
        end

        def product(permalink_or_id, options={})
          get("products/#{permalink_or_id}", options)
        end

        def product_by_sku(options={})
          get("products/find_by_sku", options)
        end

        def new_product(options={})
          get("products/#{permalink_or_id}/new", options)
        end

        def create_product(options={})
          post("products", options)
        end

        def update_product(permalink_or_id, options={})
          put("products/#{permalink_or_id}", options)
        end

        def delete_product(permalink_or_id, options={})
          delete("products/#{permalink_or_id}", options)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cq-spree-api-client-0.0.10 lib/spree-api-client/products.rb