module Mrkt::ImportCustomObjects

Public Instance Methods

import_custom_object(file, custom_object, format = 'csv') click to toggle source
# File lib/mrkt/concerns/import_custom_objects.rb, line 3
def import_custom_object(file, custom_object, format = 'csv')
  params = {
    format: format,
    file: ::Faraday::UploadIO.new(file, 'text/csv')
  }

  post("/bulk/v1/customobjects/#{custom_object}/import.json", params)
end
import_custom_object_failures(id, custom_object) click to toggle source
# File lib/mrkt/concerns/import_custom_objects.rb, line 16
def import_custom_object_failures(id, custom_object)
  get("/bulk/v1/customobjects/#{custom_object}/import/#{id}/failures.json")
end
import_custom_object_status(id, custom_object) click to toggle source
# File lib/mrkt/concerns/import_custom_objects.rb, line 12
def import_custom_object_status(id, custom_object)
  get("/bulk/v1/customobjects/#{custom_object}/import/#{id}/status.json")
end
import_custom_object_warnings(id, custom_object) click to toggle source
# File lib/mrkt/concerns/import_custom_objects.rb, line 20
def import_custom_object_warnings(id, custom_object)
  get("/bulk/v1/customobjects/#{custom_object}/import/#{id}/warnings.json")
end