Class: QualtricsAPI::Services::ResponseExportService

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/qualtrics_api/services/response_export_service.rb

Instance Attribute Summary collapse

Attributes included from Connectable

#connection

Instance Method Summary collapse

Methods inherited from BaseModel

#initialize

Methods included from Connectable

#propagate_connection

Methods included from Extensions::SerializableModel

#as_json, #to_json

Constructor Details

This class inherits a constructor from QualtricsAPI::BaseModel

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



20
21
22
# File 'lib/qualtrics_api/services/response_export_service.rb', line 20

def result
  @result
end

Instance Method Details

#export_configurationsObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/qualtrics_api/services/response_export_service.rb', line 28

def export_configurations
  {
    format: format,
    survey_id: survey_id,
    last_response_id: last_response_id,
    start_date: start_date,
    end_date: end_date,
    limit: limit,
    included_question_ids: included_question_ids,
    use_labels: use_labels,
    decimal_separator: decimal_separator,
    seen_unanswered_recode: seen_unanswered_recode,
    use_local_time: use_local_time
  }
end

#startObject



22
23
24
25
26
# File 'lib/qualtrics_api/services/response_export_service.rb', line 22

def start
  response = QualtricsAPI.connection(self).post("responseexports", export_params)
  export_id = response.body["result"]["id"]
  @result = ResponseExport.new(id: export_id)
end