Module: NetSuite::Actions::UpdateList::Support::ClassMethods

Defined in:
lib/netsuite/actions/update_list.rb

Instance Method Summary collapse

Instance Method Details

#update_list(records, credentials = {}) ⇒ Object



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/netsuite/actions/update_list.rb', line 93

def update_list(records, credentials = {})
  netsuite_records = records.map do |r|
    if r.kind_of?(self)
      r
    else
      self.new(r)
    end
  end
  response = NetSuite::Actions::UpdateList.call(netsuite_records, credentials)

  if response.success?
    netsuite_records
  else
    false
  end
end