Method: NextErpBridge::Core::Entry::ClassMethods#find

Defined in:
lib/next_erp_bridge/core/entry.rb

#find(id, do_login = true) ⇒ Object



42
43
44
45
46
47
# File 'lib/next_erp_bridge/core/entry.rb', line 42

def find(id, =true)
  before_action(login: )
  res = client.fetch_single_record({doctype: encoded_doctype, id: id})
  d = res['data']
  self.new(d) if d.present?
end