class Crm::Collection

A JustRelate WebCRM collection is a saved search. To execute such a saved search, call {#compute}. The results are persisted and can be accessed by means of {#output_items}. Output items can be {Account accounts}, {Contact contacts}, {Activity activities}, and {Event events}. @api public

Public Instance Methods

compute() click to toggle source

Computes this collection. @return [self] @api public

# File lib/crm/collection.rb, line 22
def compute
  load_attributes(Core::RestApi.instance.put("#{path}/compute", {}))
end
output_ids() click to toggle source

Returns the IDs resulting from the computation. @return [Array<String>] @api public

# File lib/crm/collection.rb, line 29
def output_ids
  Core::RestApi.instance.get("#{path}/output_ids")
end
output_items() click to toggle source

Returns an {Core::ItemEnumerator ItemEnumerator} that provides access to the items of {#output_ids}. @return [Core::ItemEnumerator] @api public

# File lib/crm/collection.rb, line 37
def output_items
  Core::ItemEnumerator.new(output_ids)
end