Class: Tomba::LeadsLists
- Defined in:
- lib/tomba/services/leads-lists.rb
Overview
Leads Lists service for managing lead lists.
Provides methods to list, create, update, and delete lead lists.
Instance Method Summary collapse
-
#create_list ⇒ Hash
Create a new leads list.
-
#delete_list_id(id:) ⇒ Hash
Delete a leads list.
-
#get_lists ⇒ Hash
List all leads lists.
-
#update_list_id(id:) ⇒ Hash
Update a leads list.
Methods inherited from Service
Constructor Details
This class inherits a constructor from Tomba::Service
Instance Method Details
#create_list ⇒ Hash
Create a new leads list.
Creates a new leads list for organizing leads.
54 55 56 57 58 59 60 61 62 |
# File 'lib/tomba/services/leads-lists.rb', line 54 def create_list path = '/leads_lists' params = {} @client.call('post', path, { 'content-type' => 'application/json' }, params) end |
#delete_list_id(id:) ⇒ Hash
Delete a leads list.
Removes a specific leads list by its ID.
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/tomba/services/leads-lists.rb', line 35 def delete_list_id(id:) raise Tomba::Exception, 'Missing required parameter: "id"' if id.nil? path = "/leads_lists/#{id}" params = {} @client.call('delete', path, { 'content-type' => 'application/json' }, params) end |
#get_lists ⇒ Hash
List all leads lists.
Returns all leads lists associated with the account.
17 18 19 20 21 22 23 24 25 |
# File 'lib/tomba/services/leads-lists.rb', line 17 def get_lists path = '/leads_lists' params = {} @client.call('get', path, { 'content-type' => 'application/json' }, params) end |
#update_list_id(id:) ⇒ Hash
Update a leads list.
Updates a specific leads list by its ID.
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/tomba/services/leads-lists.rb', line 72 def update_list_id(id:) raise Tomba::Exception, 'Missing required parameter: "id"' if id.nil? path = "/leads_lists/#{id}" params = {} @client.call('put', path, { 'content-type' => 'application/json' }, params) end |