Module: NetSuite::Actions::Get::Support::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#get(options = {}) ⇒ Object



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

def get(options = {})
  options = { :internal_id => options } unless options.is_a?(Hash)

  response = NetSuite::Actions::Get.call(self, options)
  if response.success?
   new(response.body)
  else
   raise RecordNotFound, "#{self} with OPTIONS=#{options.inspect} could not be found"
  end
end