Class: CapsuleCRM::Person
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations, Contactable, CapsuleCRM::Persistence::Deletable, CapsuleCRM::Persistence::Persistable, Querying::Configuration, Serializable
- Defined in:
- lib/capsule_crm/person.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Object
Public: Get all people from Capsule.
Methods included from Serializable
included, #serializer, #to_capsule_json
Methods included from Querying::Configuration
Methods included from CapsuleCRM::Persistence::Deletable
Methods included from CapsuleCRM::Persistence::Persistable
#build_create_path, #build_update_path, #create_record, included, #new_record?, #persisted?, #save, #save!, #update_attributes, #update_attributes!, #update_record
Methods included from Contactable
Methods included from Taggable
#add_tag, #api_singular_name, #remove_tag, #tags
Methods included from Querying::Findable
Class Method Details
.all(options = {}) ⇒ Object
Public: Get all people from Capsule. The list can be restricted and/or paginated with various query parameters sent through the options hash.
options - The Hash of allowed query parameters for Capsule (default: {}):
:q - The String search term that will be matched against
name,
:tag - The String tag to search for
:start - The Integer first record to be returned in
pagination.
The results start with an index of 1
:limit - The Integer maximum number of matching records to be
returned
Examples
CapsuleCRM::Organization.all
CapsuleCRM::Organization.all(q: “a search query”, start: 10, limit: 20)
Returns a ResultsProxy of organisations
64 65 66 67 |
# File 'lib/capsule_crm/person.rb', line 64 def self.all( = {}) CapsuleCRM::Party.all(). delete_if { |item| !item.is_a?(CapsuleCRM::Person) } end |