Class: SparkApi::Models::SavedSearch
- Extended by:
- Finders
- Includes:
- Concerns::Destroyable, Concerns::Savable
- Defined in:
- lib/spark_api/models/saved_search.rb
Constant Summary
Constants included from Paginate
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#contacts ⇒ Object
list contacts (private role).
Methods included from Finders
Methods included from Concerns::Savable
#create!, #params_for_save, #post_data, #save, #save!, #update!
Methods included from Concerns::Destroyable
#destroy, #destroy!, #destroyed?
Methods inherited from Base
connection, #connection, count, element_name, element_name=, first, get, #initialize, #load, #method_missing, #parse_id, #path, path, #persisted?, prefix, prefix=, #resource_uri, #respond_to?
Methods included from Paginate
#collect, #paginate, #per_page
Methods included from Dirty
#changed, #changed?, #changed_attributes, #changes, #dirty_attributes, #previous_changes
Constructor Details
This class inherits a constructor from SparkApi::Models::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SparkApi::Models::Base
Class Method Details
Instance Method Details
#contacts ⇒ Object
list contacts (private role)
20 21 22 23 24 |
# File 'lib/spark_api/models/saved_search.rb', line 20 def contacts return [] unless persisted? results = connection.get("#{self.class.path}/#{@attributes["Id"]}") @attributes['ContactIds'] = results.first['ContactIds'] end |