Class: QRAPI::Survey

Inherits:
BaseModel show all
Defined in:
lib/qrapi/models/survey.rb

Defined Under Namespace

Classes: Expiration

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#inspect

Class Method Details

.model_nameOpenStruct

Make the model serializeable by ActiveModelSerializer

Returns:

  • (OpenStruct)


23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/qrapi/models/survey.rb', line 23

def self.model_name
  OpenStruct.new(name: "QRAPI::Survey",
                 klass: self,
                 singular: "qualtrics_survey",
                 plural: "qualtrics_surveys",
                 element: "survey",
                 human: "Survey",
                 collection: "qrapi/surveys",
                 param_key: "qualtrics_surveys",
                 i18n_key: "qrapi/surveys",
                 route_key: "qualtrics_surveys",
                 singular_route_key: "qualtrics_survey")
end

Instance Method Details

#created_atObject



37
38
39
# File 'lib/qrapi/models/survey.rb', line 37

def created_at
  creation_date
end

#updated_atObject



41
42
43
# File 'lib/qrapi/models/survey.rb', line 41

def updated_at
  last_modified
end