Module: IFormat::Client::Products

Included in:
IFormat::Client
Defined in:
lib/iformat/client/products.rb

Instance Method Summary collapse

Instance Method Details

#get_items_history(since) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/iformat/client/products.rb', line 17

def get_items_history(since)
  since = since.xmlschema if since.respond_to?(:xmlschema)

  attrs = session_request(:get_items_history, {
      :date => since
  })

  attrs[:result]
end

#get_productsObject



9
10
11
12
13
14
15
# File 'lib/iformat/client/products.rb', line 9

def get_products
  products_attrs = session_request(:get_products)

  Array.wrap(products_attrs[:products_n][:i_fs_product]).map do |attrs|
    IFormat::Category.new(attrs)
  end
end