Module: Mrkt::CrudLists
- Included in:
- Client
- Defined in:
- lib/mrkt/concerns/crud_lists.rb
Instance Method Summary collapse
- #add_leads_to_list(list_id, lead_ids) ⇒ Object
- #get_leads_by_list(list_id, fields: nil, batch_size: nil, next_page_token: nil) ⇒ Object
Instance Method Details
#add_leads_to_list(list_id, lead_ids) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/mrkt/concerns/crud_lists.rb', line 12 def add_leads_to_list(list_id, lead_ids) post("/rest/v1/lists/#{list_id}/leads.json") do |req| params = { input: map_lead_ids(lead_ids) } json_payload(req, params) end end |
#get_leads_by_list(list_id, fields: nil, batch_size: nil, next_page_token: nil) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/mrkt/concerns/crud_lists.rb', line 3 def get_leads_by_list(list_id, fields: nil, batch_size: nil, next_page_token: nil) params = {} params[:fields] = fields if fields params[:batchSize] = batch_size if batch_size params[:nextPageToken] = next_page_token if next_page_token get("/rest/v1/list/#{list_id}/leads.json", params) end |