Module: NetSuite::Actions::Initialize::Support::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#initialize(object, credentials = {}) ⇒ Object



68
69
70
71
72
73
74
75
# File 'lib/netsuite/actions/initialize.rb', line 68

def initialize(object, credentials={})
  response = NetSuite::Actions::Initialize.call([self, object], credentials)
  if response.success?
    new(response.body)
  else
    raise InitializationError, "#{self}.initialize with #{object} failed."
  end
end