Module: NetSuite::Actions::Upsert::Support

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

Instance Method Summary collapse

Instance Method Details

#upsert(credentials = {}) ⇒ Object



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/netsuite/actions/upsert.rb', line 70

def upsert(credentials={})
  response = NetSuite::Actions::Upsert.call([self], credentials)

  @errors = response.errors

  if response.success?
    @internal_id = response.body[:@internal_id]
    true
  else
    false
  end
end