-
Notifications
You must be signed in to change notification settings - Fork 19
/
survey_template.py
25 lines (22 loc) · 1.04 KB
/
survey_template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class SurveyTemplate:
def __init__(self, survey_id, locale, groups):
self.id = survey_id
self.locale = locale
self.groups = groups
class SurveyTemplateLinkInfo:
def __init__(self, survey_template_id, survey_template_title,
survey_template_version, survey_template_type):
self.survey_template_id = survey_template_id
self.survey_template_title = survey_template_title
self.survey_template_version = survey_template_version
self.survey_template_type = survey_template_type
def to_api(self, survey_answers_id, survey_status, percentage_completed):
return {
"survey_id": survey_answers_id,
"survey_status": survey_status,
"survey_template_id": self.survey_template_id,
"survey_template_title": self.survey_template_title,
"survey_template_version": self.survey_template_version,
"survey_template_type": self.survey_template_type,
"percentage_completed": percentage_completed
}