Module: NetSuite::Actions::AttachFile::Support

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

Instance Method Summary collapse

Instance Method Details

#attach_file(file, credentials = {}) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/netsuite/actions/attach_file.rb', line 72

def attach_file(file, credentials = {})
  response = NetSuite::Actions::AttachFile.call([self, file], credentials)

  @errors = response.errors

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