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

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

Instance Method Summary collapse

Instance Method Details

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



72
73
74
75
76
77
78
79
# File 'lib/netsuite/actions/initialize.rb', line 72

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