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