Class: Xdelivery::API::Products
- Includes:
- Enumerable
- Defined in:
- lib/xdelivery/api/products.rb
Constant Summary collapse
- COLUMNS =
[ :days_produce, :qty_day_average, :qty_week_average, :qty_month_average, :qty_owe ]
Constants inherited from Base
Instance Attribute Summary collapse
-
#products ⇒ Object
Returns the value of attribute products.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Xdelivery::API::Base
Instance Attribute Details
#products ⇒ Object
Returns the value of attribute products.
6 7 8 |
# File 'lib/xdelivery/api/products.rb', line 6 def products @products end |
Instance Method Details
#set(code, params) ⇒ Object
12 13 14 15 16 |
# File 'lib/xdelivery/api/products.rb', line 12 def set(code, params) self.products ||= [] params.delete_if { |k, v| COLUMNS.include?(k) == false } products.push(params.merge(code: code)) end |