Module: Closeio::Client::Lead
- Included in:
- Closeio::Client
- Defined in:
- lib/closeio/resources/lead.rb
Instance Method Summary collapse
- #create_lead(options = {}) ⇒ Object
- #delete_lead(id) ⇒ Object
- #find_lead(id) ⇒ Object
- #list_leads(query = {}, paginate = false, fields = nil, options = {}) ⇒ Object
- #merge_leads(id_source, id_destination) ⇒ Object
- #update_lead(id, options = {}) ⇒ Object
Instance Method Details
#create_lead(options = {}) ⇒ Object
19 20 21 |
# File 'lib/closeio/resources/lead.rb', line 19 def create_lead( = {}) post(lead_path, ) end |
#delete_lead(id) ⇒ Object
27 28 29 |
# File 'lib/closeio/resources/lead.rb', line 27 def delete_lead(id) delete(lead_path(id)) end |
#find_lead(id) ⇒ Object
15 16 17 |
# File 'lib/closeio/resources/lead.rb', line 15 def find_lead(id) get(lead_path(id)) end |
#list_leads(query = {}, paginate = false, fields = nil, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/closeio/resources/lead.rb', line 4 def list_leads(query = {}, paginate = false, fields = nil, = {}) [:_fields] = fields if fields params = assemble_list_query query, if paginate paginate(lead_path, params) else get(lead_path, params) end end |
#merge_leads(id_source, id_destination) ⇒ Object
31 32 33 |
# File 'lib/closeio/resources/lead.rb', line 31 def merge_leads(id_source, id_destination) post('lead/merge/', source: id_source, destination: id_destination) end |
#update_lead(id, options = {}) ⇒ Object
23 24 25 |
# File 'lib/closeio/resources/lead.rb', line 23 def update_lead(id, = {}) put(lead_path(id), ) end |