Module: ActiveNetsuite::SearchResponseMethods

Extended by:
Forwardable
Includes:
Enumerable
Included in:
SearchMoreWithIdResponse, SearchResponse
Defined in:
lib/activenetsuite/helpers/search_response_methods.rb

Instance Method Summary collapse

Instance Method Details

#activeObject



26
27
28
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 26

def active
  select(&:active?)
end

#eachObject



12
13
14
15
16
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 12

def each
  records.each do |record|
    yield record if block_given?
  end
end

#inactivateObject



22
23
24
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 22

def inactivate
  map(&:inactivate)
end

#inactiveObject



30
31
32
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 30

def inactive
  select(&:inactive?)
end

#nextObject



38
39
40
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 38

def next
  client.search_next(self, page_index + 1)
end

#success?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 34

def success?
  status.xmlattr_isSuccess
end

#updateObject



18
19
20
# File 'lib/activenetsuite/helpers/search_response_methods.rb', line 18

def update
  Record.update(to_a)
end