Module: NetSuite::Actions::GetSelectValue::Support::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#get_select_value(options = {}, credentials = {}) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/netsuite/actions/get_select_value.rb', line 43

def get_select_value(options = {}, credentials={})
  message = {
    pageIndex: (options.delete(:pageIndex) || 1),
    fieldDescription: field_description(options)
  }

  response = NetSuite::Actions::GetSelectValue.call([self, message], credentials)

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