module Mrkt::ImportLeads
Public Instance Methods
import_lead(file, format = 'csv', lookup_field: nil, list_id: nil, partition_name: nil)
click to toggle source
# File lib/mrkt/concerns/import_leads.rb, line 3 def import_lead(file, format = 'csv', lookup_field: nil, list_id: nil, partition_name: nil) params = { format: format, file: ::Faraday::UploadIO.new(file, 'text/csv') } optional = { lookupField: lookup_field, listId: list_id, partitionName: partition_name } post('/bulk/v1/leads.json', params, optional) end
import_lead_failures(id)
click to toggle source
# File lib/mrkt/concerns/import_leads.rb, line 22 def import_lead_failures(id) get("/bulk/v1/leads/batch/#{id}/failures.json") end
import_lead_status(id)
click to toggle source
# File lib/mrkt/concerns/import_leads.rb, line 18 def import_lead_status(id) get("/bulk/v1/leads/batch/#{id}.json") end
import_lead_warnings(id)
click to toggle source
# File lib/mrkt/concerns/import_leads.rb, line 26 def import_lead_warnings(id) get("/bulk/v1/leads/batch/#{id}/warnings.json") end