Sha256: 5541fc856e04bb69b80648415be58518eca6ed7c9419079594e94a1319de26e0
Contents?: true
Size: 735 Bytes
Versions: 6
Compression:
Stored size: 735 Bytes
Contents
module Mrkt module ImportLeads 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') } params[:lookupField] = lookup_field if lookup_field params[:listId] = list_id if list_id params[:partitionName] = partition_name if partition_name post('/bulk/v1/leads.json', params) end def import_lead_status(id) get("/bulk/v1/leads/batch/#{id}.json") end def import_lead_failures(id) get("/bulk/v1/leads/batch/#{id}/failures.json") end def import_lead_warnings(id) get("/bulk/v1/leads/batch/#{id}/warnings.json") end end end
Version data entries
6 entries across 6 versions & 1 rubygems