Sha256: 71038b97a1b19fe4f963630f45c312e5f769d8b25ad550d49a33324379383184

Contents?: true

Size: 592 Bytes

Versions: 16

Compression:

Stored size: 592 Bytes

Contents

module Moysklad::Resources
  class Stock < Base

    def listWithConsignments params={}
      list params.merge(showConsignments: true)
    end

    def all
      list
    end

    def find
      raise 'no such method'
    end

    def list_path
      'exchange/rest/stock/xml'
    end

    def self.entity_class
      Moysklad::Entities::StockTO
    end

    def self.pluralized_type
      :stock
    end

    private

    def parse_page content
      items = Moysklad::Entities::StockTO.parse content
      Moysklad::Entities::Page.new items, items.count, 0, items.count
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
moysklad-0.5 lib/moysklad/resources/stock.rb
moysklad-0.4.10 lib/moysklad/resources/stock.rb
moysklad-0.4.9 lib/moysklad/resources/stock.rb
moysklad-0.4.8 lib/moysklad/resources/stock.rb
moysklad-0.4.7 lib/moysklad/resources/stock.rb
moysklad-0.4.6 lib/moysklad/resources/stock.rb
moysklad-0.4.5 lib/moysklad/resources/stock.rb
moysklad-0.4.4 lib/moysklad/resources/stock.rb
moysklad-0.4.3 lib/moysklad/resources/stock.rb
moysklad-0.4.2 lib/moysklad/resources/stock.rb
moysklad-0.4.1 lib/moysklad/resources/stock.rb
moysklad-0.4.0 lib/moysklad/resources/stock.rb
moysklad-0.3.4 lib/moysklad/resources/stock.rb
moysklad-0.3.3 lib/moysklad/resources/stock.rb
moysklad-0.3.2 lib/moysklad/resources/stock.rb
moysklad-0.3.1 lib/moysklad/resources/stock.rb