Module: CiviCrm::Actions::List::ClassMethods
- Defined in:
- lib/civicrm/actions/list.rb
Instance Method Summary collapse
- #all(params = {}) ⇒ Object
- #count ⇒ Object
- #find_by(params = {}) ⇒ Object
- #first ⇒ Object
- #last ⇒ Object
Instance Method Details
#all(params = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/civicrm/actions/list.rb', line 5 def all(params = {}) params.merge!('entity' => entity_class_name, 'action' => 'get') response = CiviCrm::Client.request(:get, params) Resource.build_from(response, params) end |
#count ⇒ Object
11 12 13 |
# File 'lib/civicrm/actions/list.rb', line 11 def count all.count end |
#find_by(params = {}) ⇒ Object
15 16 17 |
# File 'lib/civicrm/actions/list.rb', line 15 def find_by(params={}) all(params).first end |
#first ⇒ Object
19 20 21 |
# File 'lib/civicrm/actions/list.rb', line 19 def first all.first end |
#last ⇒ Object
23 24 25 |
# File 'lib/civicrm/actions/list.rb', line 23 def last all.last end |