Sha256: b09580e9ef6f7c41bfdbf6425c9b3802311a56bc977e2879b1f5660e05f7c4bc
Contents?: true
Size: 663 Bytes
Versions: 12
Compression:
Stored size: 663 Bytes
Contents
module Qualtrics class SurveyImport < Entity attr_accessor :survey_name, :survey, :survey_data_location def initialize(options={}) @survey_name = options[:survey_name] @survey_data_location = options[:survey_data_location] @survey = Qualtrics::Survey.new(survey_name: survey_name) end def save payload = {} payload['Name'] = survey.survey_name payload['Data'] = Faraday::UploadIO.new(survey_data_location, 'text/xml') response = post 'importSurvey', payload if response.success? survey.id = response.result['SurveyID'] true else false end end end end
Version data entries
12 entries across 12 versions & 1 rubygems