Sha256: 69435501ceee7fe3bc9b22d0512bc3de441a62ae8f70eb29bb638b69cd787bb6

Contents?: true

Size: 936 Bytes

Versions: 27

Compression:

Stored size: 936 Bytes

Contents

module Magento
  # http://www.magentocommerce.com/wiki/doc/webservices-api/api/cataloginventory_stock_item
  # 101  Product not exists.
  # 102  Product inventory not updated. Details in error message.
  class ProductStock < Base
    class << self
      # cataloginventory_stock_item.list
      # Retrieve stock data by product ids
      # 
      # Return: array
      # 
      # Arguments:
      # 
      # array products - list of products IDs or Skus
      def list(*args)
        results = commit("list", *args)
        results.collect do |result|
          new(result)
        end
      end
            
      # cataloginventory_stock_item.update
      # Update product stock data
      # 
      # Return: boolean
      # 
      # Arguments:
      # 
      # mixed product - product ID or Sku
      # array data - data to change (qty, is_in_stock)
      def update(*args)
        commit('update', *args)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
magentor-0.3.1 lib/magento/product_stock.rb
magentor-0.3.0 lib/magento/product_stock.rb
magentor-0.2.18 lib/magento/product_stock.rb
magentor-0.2.17 lib/magento/product_stock.rb
magentor-0.2.16 lib/magento/product_stock.rb
magentor-0.2.15 lib/magento/product_stock.rb
magentor-0.2.14 lib/magento/product_stock.rb
magentor-0.2.13 lib/magento/product_stock.rb
magentor-0.2.12 lib/magento/product_stock.rb
magentor-0.2.11 lib/magento/product_stock.rb
magentor-0.2.10 lib/magento/product_stock.rb
magentor-0.2.9 lib/magento/product_stock.rb
magentor-0.2.8 lib/magento/product_stock.rb
magentor-0.2.7 lib/magento/product_stock.rb
magentor-0.2.6 lib/magento/product_stock.rb
magentor-0.2.5 lib/magento/product_stock.rb
magentor-0.2.4 lib/magento/product_stock.rb
magentor-0.2.3 lib/magento/product_stock.rb
magentor-0.2.2 lib/magento/product_stock.rb
magentor-0.2.1 lib/magento/product_stock.rb