Sha256: 6dc5e66e3162665c68045b2db221ed967fb74474c53c9dc00070be4193a69a47
Contents?: true
Size: 641 Bytes
Versions: 17
Compression:
Stored size: 641 Bytes
Contents
module Xdelivery module API class Products < Base include Enumerable attr_accessor :products COLUMNS = [ :days_produce, :qty_day_average, :qty_week_average, :qty_month_average, :qty_owe ] def set(code, params) self.products ||= [] params.delete_if { |k, v| COLUMNS.include?(k) == false } products.push(params.merge(code: code)) end def update! response = patch('/products/update_all.json') Response::Products.new(response) end protected def patch_data { qtys: { products: products } } end end end end
Version data entries
17 entries across 17 versions & 1 rubygems