class AmoCRM::Resources::Stock

Public Class Methods

entity_class() click to toggle source
# File lib/amo_crm/resources/stock.rb, line 20
def self.entity_class
  AmoCRM::Entities::StockTO
end
resource_name() click to toggle source
# File lib/amo_crm/resources/stock.rb, line 24
def self.resource_name
  :stock
end

Public Instance Methods

all() click to toggle source
# File lib/amo_crm/resources/stock.rb, line 8
def all
  page.items
end
find() click to toggle source
# File lib/amo_crm/resources/stock.rb, line 12
def find
  raise 'no such method'
end
listWithConsignments(params={}) click to toggle source
# File lib/amo_crm/resources/stock.rb, line 4
def listWithConsignments params={}
  list params.merge(showConsignments: true)
end
list_path() click to toggle source
# File lib/amo_crm/resources/stock.rb, line 16
def list_path
  'exchange/rest/stock/xml'
end

Private Instance Methods

parse_page(content) click to toggle source
# File lib/amo_crm/resources/stock.rb, line 30
def parse_page content
  items = AmoCRM::Entities::StockTO.parse content
  AmoCRM::Entities::Page.new items, items.count, 0, items.count
end