Sha256: a74d9119ec1f0aa76dd33fddd7675e49ab577fc812c51186512a33eac1aba736
Contents?: true
Size: 702 Bytes
Versions: 10
Compression:
Stored size: 702 Bytes
Contents
require "qualtrics/panel_import_file" module Qualtrics class PanelImport < Entity attr_accessor :panel, :recipients def initialize(options={}) @panel = options[:panel] @recipients = options[:recipients] end def save payload = headers payload['LibraryID'] = library_id payload['ColumnHeaders'] = 1 file = Qualtrics::PanelImportFile.new(@recipients) post 'importPanel', payload, File.read(file.temp_file) true end def headers {}.tap do |import_headers| Qualtrics::RecipientImportRow.fields.each_with_index.map do |field, index| import_headers[field] = index + 1 end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems