clever-ruby 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +78 -46
- data/clever-ruby-1.0.0.gem +0 -0
- data/docs/Credentials.md +8 -0
- data/docs/DataApi.md +130 -127
- data/docs/District.md +1 -1
- data/docs/DistrictAdmin.md +2 -2
- data/docs/DistrictStatus.md +5 -5
- data/docs/DistrictsCreated.md +2 -1
- data/docs/DistrictsDeleted.md +2 -1
- data/docs/DistrictsUpdated.md +2 -1
- data/docs/Event.md +2 -1
- data/docs/EventsApi.md +14 -21
- data/docs/Location.md +2 -2
- data/docs/Name.md +1 -1
- data/docs/Principal.md +1 -1
- data/docs/School.md +2 -2
- data/docs/SchoolAdmin.md +2 -1
- data/docs/SchooladminsCreated.md +2 -1
- data/docs/SchooladminsDeleted.md +2 -1
- data/docs/SchooladminsUpdated.md +2 -1
- data/docs/SchoolsCreated.md +2 -1
- data/docs/SchoolsDeleted.md +2 -1
- data/docs/SchoolsUpdated.md +2 -1
- data/docs/Section.md +1 -1
- data/docs/SectionsCreated.md +2 -1
- data/docs/SectionsDeleted.md +2 -1
- data/docs/SectionsUpdated.md +2 -1
- data/docs/Student.md +2 -2
- data/docs/StudentContact.md +1 -1
- data/docs/StudentcontactsCreated.md +2 -1
- data/docs/StudentcontactsDeleted.md +2 -1
- data/docs/StudentcontactsUpdated.md +2 -1
- data/docs/StudentsCreated.md +2 -1
- data/docs/StudentsDeleted.md +2 -1
- data/docs/StudentsUpdated.md +2 -1
- data/docs/Teacher.md +2 -1
- data/docs/TeachersCreated.md +2 -1
- data/docs/TeachersDeleted.md +2 -1
- data/docs/TeachersUpdated.md +2 -1
- data/docs/Term.md +1 -1
- data/lib/clever-ruby.rb +1 -0
- data/lib/clever-ruby/api/data_api.rb +127 -85
- data/lib/clever-ruby/api/events_api.rb +14 -14
- data/lib/clever-ruby/models/credentials.rb +187 -0
- data/lib/clever-ruby/models/district.rb +13 -13
- data/lib/clever-ruby/models/district_admin.rb +22 -22
- data/lib/clever-ruby/models/district_status.rb +70 -37
- data/lib/clever-ruby/models/event.rb +19 -10
- data/lib/clever-ruby/models/location.rb +22 -22
- data/lib/clever-ruby/models/name.rb +13 -13
- data/lib/clever-ruby/models/principal.rb +13 -13
- data/lib/clever-ruby/models/school.rb +66 -21
- data/lib/clever-ruby/models/school_admin.rb +16 -7
- data/lib/clever-ruby/models/section.rb +55 -10
- data/lib/clever-ruby/models/student.rb +100 -19
- data/lib/clever-ruby/models/student_contact.rb +10 -10
- data/lib/clever-ruby/models/teacher.rb +19 -10
- data/lib/clever-ruby/models/term.rb +13 -13
- data/lib/clever-ruby/version.rb +1 -1
- data/override/README-extension.md +31 -0
- data/override/config.json +1 -1
- data/override/override.sh +5 -0
- data/sample/sample.rb +1 -1
- metadata +6 -3
- data/instructions.md +0 -12
@@ -14,20 +14,22 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class School
|
17
|
-
attr_accessor :id
|
18
|
-
|
19
17
|
attr_accessor :created
|
20
18
|
|
21
19
|
attr_accessor :district
|
22
20
|
|
23
21
|
attr_accessor :high_grade
|
24
22
|
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
25
|
attr_accessor :last_modified
|
26
26
|
|
27
27
|
attr_accessor :location
|
28
28
|
|
29
29
|
attr_accessor :low_grade
|
30
30
|
|
31
|
+
attr_accessor :mdr_number
|
32
|
+
|
31
33
|
attr_accessor :name
|
32
34
|
|
33
35
|
attr_accessor :nces_id
|
@@ -42,48 +44,67 @@ module Clever
|
|
42
44
|
|
43
45
|
attr_accessor :state_id
|
44
46
|
|
45
|
-
|
47
|
+
class EnumAttributeValidator
|
48
|
+
attr_reader :datatype
|
49
|
+
attr_reader :allowable_values
|
50
|
+
|
51
|
+
def initialize(datatype, allowable_values)
|
52
|
+
@allowable_values = allowable_values.map do |value|
|
53
|
+
case datatype.to_s
|
54
|
+
when /Integer/i
|
55
|
+
value.to_i
|
56
|
+
when /Float/i
|
57
|
+
value.to_f
|
58
|
+
else
|
59
|
+
value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
46
63
|
|
64
|
+
def valid?(value)
|
65
|
+
!value || allowable_values.include?(value)
|
66
|
+
end
|
67
|
+
end
|
47
68
|
|
48
69
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
70
|
def self.attribute_map
|
50
71
|
{
|
51
|
-
:'id' => :'id',
|
52
72
|
:'created' => :'created',
|
53
73
|
:'district' => :'district',
|
54
74
|
:'high_grade' => :'high_grade',
|
75
|
+
:'id' => :'id',
|
55
76
|
:'last_modified' => :'last_modified',
|
56
77
|
:'location' => :'location',
|
57
78
|
:'low_grade' => :'low_grade',
|
79
|
+
:'mdr_number' => :'mdr_number',
|
58
80
|
:'name' => :'name',
|
59
81
|
:'nces_id' => :'nces_id',
|
60
82
|
:'phone' => :'phone',
|
61
83
|
:'principal' => :'principal',
|
62
84
|
:'school_number' => :'school_number',
|
63
85
|
:'sis_id' => :'sis_id',
|
64
|
-
:'state_id' => :'state_id'
|
65
|
-
:'mdr_number' => :'mdr_number'
|
86
|
+
:'state_id' => :'state_id'
|
66
87
|
}
|
67
88
|
end
|
68
89
|
|
69
90
|
# Attribute type mapping.
|
70
91
|
def self.swagger_types
|
71
92
|
{
|
72
|
-
:'id' => :'String',
|
73
93
|
:'created' => :'String',
|
74
94
|
:'district' => :'String',
|
75
95
|
:'high_grade' => :'String',
|
96
|
+
:'id' => :'String',
|
76
97
|
:'last_modified' => :'String',
|
77
98
|
:'location' => :'Location',
|
78
99
|
:'low_grade' => :'String',
|
100
|
+
:'mdr_number' => :'String',
|
79
101
|
:'name' => :'String',
|
80
102
|
:'nces_id' => :'String',
|
81
103
|
:'phone' => :'String',
|
82
104
|
:'principal' => :'Principal',
|
83
105
|
:'school_number' => :'String',
|
84
106
|
:'sis_id' => :'String',
|
85
|
-
:'state_id' => :'String'
|
86
|
-
:'mdr_number' => :'String'
|
107
|
+
:'state_id' => :'String'
|
87
108
|
}
|
88
109
|
end
|
89
110
|
|
@@ -95,10 +116,6 @@ module Clever
|
|
95
116
|
# convert string to symbol for hash key
|
96
117
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
97
118
|
|
98
|
-
if attributes.has_key?(:'id')
|
99
|
-
self.id = attributes[:'id']
|
100
|
-
end
|
101
|
-
|
102
119
|
if attributes.has_key?(:'created')
|
103
120
|
self.created = attributes[:'created']
|
104
121
|
end
|
@@ -111,6 +128,10 @@ module Clever
|
|
111
128
|
self.high_grade = attributes[:'high_grade']
|
112
129
|
end
|
113
130
|
|
131
|
+
if attributes.has_key?(:'id')
|
132
|
+
self.id = attributes[:'id']
|
133
|
+
end
|
134
|
+
|
114
135
|
if attributes.has_key?(:'last_modified')
|
115
136
|
self.last_modified = attributes[:'last_modified']
|
116
137
|
end
|
@@ -123,6 +144,10 @@ module Clever
|
|
123
144
|
self.low_grade = attributes[:'low_grade']
|
124
145
|
end
|
125
146
|
|
147
|
+
if attributes.has_key?(:'mdr_number')
|
148
|
+
self.mdr_number = attributes[:'mdr_number']
|
149
|
+
end
|
150
|
+
|
126
151
|
if attributes.has_key?(:'name')
|
127
152
|
self.name = attributes[:'name']
|
128
153
|
end
|
@@ -151,10 +176,6 @@ module Clever
|
|
151
176
|
self.state_id = attributes[:'state_id']
|
152
177
|
end
|
153
178
|
|
154
|
-
if attributes.has_key?(:'mdr_number')
|
155
|
-
self.mdr_number = attributes[:'mdr_number']
|
156
|
-
end
|
157
|
-
|
158
179
|
end
|
159
180
|
|
160
181
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -167,29 +188,53 @@ module Clever
|
|
167
188
|
# Check to see if the all the properties in the model are valid
|
168
189
|
# @return true if the model is valid
|
169
190
|
def valid?
|
191
|
+
high_grade_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
192
|
+
return false unless high_grade_validator.valid?(@high_grade)
|
193
|
+
low_grade_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
194
|
+
return false unless low_grade_validator.valid?(@low_grade)
|
170
195
|
return true
|
171
196
|
end
|
172
197
|
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
199
|
+
# @param [Object] high_grade Object to be assigned
|
200
|
+
def high_grade=(high_grade)
|
201
|
+
validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
202
|
+
unless validator.valid?(high_grade)
|
203
|
+
fail ArgumentError, "invalid value for 'high_grade', must be one of #{validator.allowable_values}."
|
204
|
+
end
|
205
|
+
@high_grade = high_grade
|
206
|
+
end
|
207
|
+
|
208
|
+
# Custom attribute writer method checking allowed values (enum).
|
209
|
+
# @param [Object] low_grade Object to be assigned
|
210
|
+
def low_grade=(low_grade)
|
211
|
+
validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
212
|
+
unless validator.valid?(low_grade)
|
213
|
+
fail ArgumentError, "invalid value for 'low_grade', must be one of #{validator.allowable_values}."
|
214
|
+
end
|
215
|
+
@low_grade = low_grade
|
216
|
+
end
|
217
|
+
|
173
218
|
# Checks equality by comparing each attribute.
|
174
219
|
# @param [Object] Object to be compared
|
175
220
|
def ==(o)
|
176
221
|
return true if self.equal?(o)
|
177
222
|
self.class == o.class &&
|
178
|
-
id == o.id &&
|
179
223
|
created == o.created &&
|
180
224
|
district == o.district &&
|
181
225
|
high_grade == o.high_grade &&
|
226
|
+
id == o.id &&
|
182
227
|
last_modified == o.last_modified &&
|
183
228
|
location == o.location &&
|
184
229
|
low_grade == o.low_grade &&
|
230
|
+
mdr_number == o.mdr_number &&
|
185
231
|
name == o.name &&
|
186
232
|
nces_id == o.nces_id &&
|
187
233
|
phone == o.phone &&
|
188
234
|
principal == o.principal &&
|
189
235
|
school_number == o.school_number &&
|
190
236
|
sis_id == o.sis_id &&
|
191
|
-
state_id == o.state_id
|
192
|
-
mdr_number == o.mdr_number
|
237
|
+
state_id == o.state_id
|
193
238
|
end
|
194
239
|
|
195
240
|
# @see the `==` method
|
@@ -201,7 +246,7 @@ module Clever
|
|
201
246
|
# Calculates hash code according to all attributes.
|
202
247
|
# @return [Fixnum] Hash code
|
203
248
|
def hash
|
204
|
-
[
|
249
|
+
[created, district, high_grade, id, last_modified, location, low_grade, mdr_number, name, nces_id, phone, principal, school_number, sis_id, state_id].hash
|
205
250
|
end
|
206
251
|
|
207
252
|
# Builds the object from hash
|
@@ -14,12 +14,14 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class SchoolAdmin
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :credentials
|
18
18
|
|
19
19
|
attr_accessor :district
|
20
20
|
|
21
21
|
attr_accessor :email
|
22
22
|
|
23
|
+
attr_accessor :id
|
24
|
+
|
23
25
|
attr_accessor :name
|
24
26
|
|
25
27
|
attr_accessor :schools
|
@@ -32,9 +34,10 @@ module Clever
|
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
35
|
def self.attribute_map
|
34
36
|
{
|
35
|
-
:'
|
37
|
+
:'credentials' => :'credentials',
|
36
38
|
:'district' => :'district',
|
37
39
|
:'email' => :'email',
|
40
|
+
:'id' => :'id',
|
38
41
|
:'name' => :'name',
|
39
42
|
:'schools' => :'schools',
|
40
43
|
:'staff_id' => :'staff_id',
|
@@ -45,9 +48,10 @@ module Clever
|
|
45
48
|
# Attribute type mapping.
|
46
49
|
def self.swagger_types
|
47
50
|
{
|
48
|
-
:'
|
51
|
+
:'credentials' => :'Credentials',
|
49
52
|
:'district' => :'String',
|
50
53
|
:'email' => :'String',
|
54
|
+
:'id' => :'String',
|
51
55
|
:'name' => :'Name',
|
52
56
|
:'schools' => :'Array<String>',
|
53
57
|
:'staff_id' => :'String',
|
@@ -63,8 +67,8 @@ module Clever
|
|
63
67
|
# convert string to symbol for hash key
|
64
68
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
65
69
|
|
66
|
-
if attributes.has_key?(:'
|
67
|
-
self.
|
70
|
+
if attributes.has_key?(:'credentials')
|
71
|
+
self.credentials = attributes[:'credentials']
|
68
72
|
end
|
69
73
|
|
70
74
|
if attributes.has_key?(:'district')
|
@@ -75,6 +79,10 @@ module Clever
|
|
75
79
|
self.email = attributes[:'email']
|
76
80
|
end
|
77
81
|
|
82
|
+
if attributes.has_key?(:'id')
|
83
|
+
self.id = attributes[:'id']
|
84
|
+
end
|
85
|
+
|
78
86
|
if attributes.has_key?(:'name')
|
79
87
|
self.name = attributes[:'name']
|
80
88
|
end
|
@@ -113,9 +121,10 @@ module Clever
|
|
113
121
|
def ==(o)
|
114
122
|
return true if self.equal?(o)
|
115
123
|
self.class == o.class &&
|
116
|
-
|
124
|
+
credentials == o.credentials &&
|
117
125
|
district == o.district &&
|
118
126
|
email == o.email &&
|
127
|
+
id == o.id &&
|
119
128
|
name == o.name &&
|
120
129
|
schools == o.schools &&
|
121
130
|
staff_id == o.staff_id &&
|
@@ -131,7 +140,7 @@ module Clever
|
|
131
140
|
# Calculates hash code according to all attributes.
|
132
141
|
# @return [Fixnum] Hash code
|
133
142
|
def hash
|
134
|
-
[
|
143
|
+
[credentials, district, email, id, name, schools, staff_id, title].hash
|
135
144
|
end
|
136
145
|
|
137
146
|
# Builds the object from hash
|
@@ -14,8 +14,6 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class Section
|
17
|
-
attr_accessor :id
|
18
|
-
|
19
17
|
attr_accessor :course_description
|
20
18
|
|
21
19
|
attr_accessor :course_name
|
@@ -28,6 +26,8 @@ module Clever
|
|
28
26
|
|
29
27
|
attr_accessor :grade
|
30
28
|
|
29
|
+
attr_accessor :id
|
30
|
+
|
31
31
|
attr_accessor :last_modified
|
32
32
|
|
33
33
|
attr_accessor :name
|
@@ -50,17 +50,38 @@ module Clever
|
|
50
50
|
|
51
51
|
attr_accessor :term
|
52
52
|
|
53
|
+
class EnumAttributeValidator
|
54
|
+
attr_reader :datatype
|
55
|
+
attr_reader :allowable_values
|
56
|
+
|
57
|
+
def initialize(datatype, allowable_values)
|
58
|
+
@allowable_values = allowable_values.map do |value|
|
59
|
+
case datatype.to_s
|
60
|
+
when /Integer/i
|
61
|
+
value.to_i
|
62
|
+
when /Float/i
|
63
|
+
value.to_f
|
64
|
+
else
|
65
|
+
value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def valid?(value)
|
71
|
+
!value || allowable_values.include?(value)
|
72
|
+
end
|
73
|
+
end
|
53
74
|
|
54
75
|
# Attribute mapping from ruby-style variable name to JSON key.
|
55
76
|
def self.attribute_map
|
56
77
|
{
|
57
|
-
:'id' => :'id',
|
58
78
|
:'course_description' => :'course_description',
|
59
79
|
:'course_name' => :'course_name',
|
60
80
|
:'course_number' => :'course_number',
|
61
81
|
:'created' => :'created',
|
62
82
|
:'district' => :'district',
|
63
83
|
:'grade' => :'grade',
|
84
|
+
:'id' => :'id',
|
64
85
|
:'last_modified' => :'last_modified',
|
65
86
|
:'name' => :'name',
|
66
87
|
:'period' => :'period',
|
@@ -78,13 +99,13 @@ module Clever
|
|
78
99
|
# Attribute type mapping.
|
79
100
|
def self.swagger_types
|
80
101
|
{
|
81
|
-
:'id' => :'String',
|
82
102
|
:'course_description' => :'String',
|
83
103
|
:'course_name' => :'String',
|
84
104
|
:'course_number' => :'String',
|
85
105
|
:'created' => :'String',
|
86
106
|
:'district' => :'String',
|
87
107
|
:'grade' => :'String',
|
108
|
+
:'id' => :'String',
|
88
109
|
:'last_modified' => :'String',
|
89
110
|
:'name' => :'String',
|
90
111
|
:'period' => :'String',
|
@@ -107,10 +128,6 @@ module Clever
|
|
107
128
|
# convert string to symbol for hash key
|
108
129
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
109
130
|
|
110
|
-
if attributes.has_key?(:'id')
|
111
|
-
self.id = attributes[:'id']
|
112
|
-
end
|
113
|
-
|
114
131
|
if attributes.has_key?(:'course_description')
|
115
132
|
self.course_description = attributes[:'course_description']
|
116
133
|
end
|
@@ -135,6 +152,10 @@ module Clever
|
|
135
152
|
self.grade = attributes[:'grade']
|
136
153
|
end
|
137
154
|
|
155
|
+
if attributes.has_key?(:'id')
|
156
|
+
self.id = attributes[:'id']
|
157
|
+
end
|
158
|
+
|
138
159
|
if attributes.has_key?(:'last_modified')
|
139
160
|
self.last_modified = attributes[:'last_modified']
|
140
161
|
end
|
@@ -195,21 +216,45 @@ module Clever
|
|
195
216
|
# Check to see if the all the properties in the model are valid
|
196
217
|
# @return true if the model is valid
|
197
218
|
def valid?
|
219
|
+
grade_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
220
|
+
return false unless grade_validator.valid?(@grade)
|
221
|
+
subject_validator = EnumAttributeValidator.new('String', ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other"])
|
222
|
+
return false unless subject_validator.valid?(@subject)
|
198
223
|
return true
|
199
224
|
end
|
200
225
|
|
226
|
+
# Custom attribute writer method checking allowed values (enum).
|
227
|
+
# @param [Object] grade Object to be assigned
|
228
|
+
def grade=(grade)
|
229
|
+
validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
230
|
+
unless validator.valid?(grade)
|
231
|
+
fail ArgumentError, "invalid value for 'grade', must be one of #{validator.allowable_values}."
|
232
|
+
end
|
233
|
+
@grade = grade
|
234
|
+
end
|
235
|
+
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
237
|
+
# @param [Object] subject Object to be assigned
|
238
|
+
def subject=(subject)
|
239
|
+
validator = EnumAttributeValidator.new('String', ["english/language arts", "math", "science", "social studies", "language", "homeroom/advisory", "interventions/online learning", "technology and engineering", "PE and health", "arts and music", "other"])
|
240
|
+
unless validator.valid?(subject)
|
241
|
+
fail ArgumentError, "invalid value for 'subject', must be one of #{validator.allowable_values}."
|
242
|
+
end
|
243
|
+
@subject = subject
|
244
|
+
end
|
245
|
+
|
201
246
|
# Checks equality by comparing each attribute.
|
202
247
|
# @param [Object] Object to be compared
|
203
248
|
def ==(o)
|
204
249
|
return true if self.equal?(o)
|
205
250
|
self.class == o.class &&
|
206
|
-
id == o.id &&
|
207
251
|
course_description == o.course_description &&
|
208
252
|
course_name == o.course_name &&
|
209
253
|
course_number == o.course_number &&
|
210
254
|
created == o.created &&
|
211
255
|
district == o.district &&
|
212
256
|
grade == o.grade &&
|
257
|
+
id == o.id &&
|
213
258
|
last_modified == o.last_modified &&
|
214
259
|
name == o.name &&
|
215
260
|
period == o.period &&
|
@@ -232,7 +277,7 @@ module Clever
|
|
232
277
|
# Calculates hash code according to all attributes.
|
233
278
|
# @return [Fixnum] Hash code
|
234
279
|
def hash
|
235
|
-
[
|
280
|
+
[course_description, course_name, course_number, created, district, grade, id, last_modified, name, period, school, section_number, sis_id, students, subject, teacher, teachers, term].hash
|
236
281
|
end
|
237
282
|
|
238
283
|
# Builds the object from hash
|
@@ -14,10 +14,10 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class Student
|
17
|
-
attr_accessor :id
|
18
|
-
|
19
17
|
attr_accessor :created
|
20
18
|
|
19
|
+
attr_accessor :credentials
|
20
|
+
|
21
21
|
attr_accessor :district
|
22
22
|
|
23
23
|
attr_accessor :dob
|
@@ -26,14 +26,14 @@ module Clever
|
|
26
26
|
|
27
27
|
attr_accessor :email
|
28
28
|
|
29
|
-
attr_accessor :frl_status
|
30
|
-
|
31
29
|
attr_accessor :gender
|
32
30
|
|
33
31
|
attr_accessor :grade
|
34
32
|
|
35
33
|
attr_accessor :hispanic_ethnicity
|
36
34
|
|
35
|
+
attr_accessor :id
|
36
|
+
|
37
37
|
attr_accessor :iep_status
|
38
38
|
|
39
39
|
attr_accessor :last_modified
|
@@ -54,20 +54,41 @@ module Clever
|
|
54
54
|
|
55
55
|
attr_accessor :student_number
|
56
56
|
|
57
|
+
class EnumAttributeValidator
|
58
|
+
attr_reader :datatype
|
59
|
+
attr_reader :allowable_values
|
60
|
+
|
61
|
+
def initialize(datatype, allowable_values)
|
62
|
+
@allowable_values = allowable_values.map do |value|
|
63
|
+
case datatype.to_s
|
64
|
+
when /Integer/i
|
65
|
+
value.to_i
|
66
|
+
when /Float/i
|
67
|
+
value.to_f
|
68
|
+
else
|
69
|
+
value
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def valid?(value)
|
75
|
+
!value || allowable_values.include?(value)
|
76
|
+
end
|
77
|
+
end
|
57
78
|
|
58
79
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
80
|
def self.attribute_map
|
60
81
|
{
|
61
|
-
:'id' => :'id',
|
62
82
|
:'created' => :'created',
|
83
|
+
:'credentials' => :'credentials',
|
63
84
|
:'district' => :'district',
|
64
85
|
:'dob' => :'dob',
|
65
86
|
:'ell_status' => :'ell_status',
|
66
87
|
:'email' => :'email',
|
67
|
-
:'frl_status' => :'frl_status',
|
68
88
|
:'gender' => :'gender',
|
69
89
|
:'grade' => :'grade',
|
70
90
|
:'hispanic_ethnicity' => :'hispanic_ethnicity',
|
91
|
+
:'id' => :'id',
|
71
92
|
:'iep_status' => :'iep_status',
|
72
93
|
:'last_modified' => :'last_modified',
|
73
94
|
:'location' => :'location',
|
@@ -84,16 +105,16 @@ module Clever
|
|
84
105
|
# Attribute type mapping.
|
85
106
|
def self.swagger_types
|
86
107
|
{
|
87
|
-
:'id' => :'String',
|
88
108
|
:'created' => :'String',
|
109
|
+
:'credentials' => :'Credentials',
|
89
110
|
:'district' => :'String',
|
90
111
|
:'dob' => :'String',
|
91
112
|
:'ell_status' => :'String',
|
92
113
|
:'email' => :'String',
|
93
|
-
:'frl_status' => :'String',
|
94
114
|
:'gender' => :'String',
|
95
115
|
:'grade' => :'String',
|
96
116
|
:'hispanic_ethnicity' => :'String',
|
117
|
+
:'id' => :'String',
|
97
118
|
:'iep_status' => :'String',
|
98
119
|
:'last_modified' => :'String',
|
99
120
|
:'location' => :'Location',
|
@@ -115,14 +136,14 @@ module Clever
|
|
115
136
|
# convert string to symbol for hash key
|
116
137
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
117
138
|
|
118
|
-
if attributes.has_key?(:'id')
|
119
|
-
self.id = attributes[:'id']
|
120
|
-
end
|
121
|
-
|
122
139
|
if attributes.has_key?(:'created')
|
123
140
|
self.created = attributes[:'created']
|
124
141
|
end
|
125
142
|
|
143
|
+
if attributes.has_key?(:'credentials')
|
144
|
+
self.credentials = attributes[:'credentials']
|
145
|
+
end
|
146
|
+
|
126
147
|
if attributes.has_key?(:'district')
|
127
148
|
self.district = attributes[:'district']
|
128
149
|
end
|
@@ -139,10 +160,6 @@ module Clever
|
|
139
160
|
self.email = attributes[:'email']
|
140
161
|
end
|
141
162
|
|
142
|
-
if attributes.has_key?(:'frl_status')
|
143
|
-
self.frl_status = attributes[:'frl_status']
|
144
|
-
end
|
145
|
-
|
146
163
|
if attributes.has_key?(:'gender')
|
147
164
|
self.gender = attributes[:'gender']
|
148
165
|
end
|
@@ -155,6 +172,10 @@ module Clever
|
|
155
172
|
self.hispanic_ethnicity = attributes[:'hispanic_ethnicity']
|
156
173
|
end
|
157
174
|
|
175
|
+
if attributes.has_key?(:'id')
|
176
|
+
self.id = attributes[:'id']
|
177
|
+
end
|
178
|
+
|
158
179
|
if attributes.has_key?(:'iep_status')
|
159
180
|
self.iep_status = attributes[:'iep_status']
|
160
181
|
end
|
@@ -209,24 +230,84 @@ module Clever
|
|
209
230
|
# Check to see if the all the properties in the model are valid
|
210
231
|
# @return true if the model is valid
|
211
232
|
def valid?
|
233
|
+
ell_status_validator = EnumAttributeValidator.new('String', ["Y", "N", ""])
|
234
|
+
return false unless ell_status_validator.valid?(@ell_status)
|
235
|
+
gender_validator = EnumAttributeValidator.new('String', ["M", "F", ""])
|
236
|
+
return false unless gender_validator.valid?(@gender)
|
237
|
+
grade_validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
238
|
+
return false unless grade_validator.valid?(@grade)
|
239
|
+
hispanic_ethnicity_validator = EnumAttributeValidator.new('String', ["Y", "N", ""])
|
240
|
+
return false unless hispanic_ethnicity_validator.valid?(@hispanic_ethnicity)
|
241
|
+
race_validator = EnumAttributeValidator.new('String', ["Caucasian", "Asian", "Black or African American", "American Indian", "Hawaiian or Other Pacific Islander", "Two or More Races", "Unknown", ""])
|
242
|
+
return false unless race_validator.valid?(@race)
|
212
243
|
return true
|
213
244
|
end
|
214
245
|
|
246
|
+
# Custom attribute writer method checking allowed values (enum).
|
247
|
+
# @param [Object] ell_status Object to be assigned
|
248
|
+
def ell_status=(ell_status)
|
249
|
+
validator = EnumAttributeValidator.new('String', ["Y", "N", ""])
|
250
|
+
unless validator.valid?(ell_status)
|
251
|
+
fail ArgumentError, "invalid value for 'ell_status', must be one of #{validator.allowable_values}."
|
252
|
+
end
|
253
|
+
@ell_status = ell_status
|
254
|
+
end
|
255
|
+
|
256
|
+
# Custom attribute writer method checking allowed values (enum).
|
257
|
+
# @param [Object] gender Object to be assigned
|
258
|
+
def gender=(gender)
|
259
|
+
validator = EnumAttributeValidator.new('String', ["M", "F", ""])
|
260
|
+
unless validator.valid?(gender)
|
261
|
+
fail ArgumentError, "invalid value for 'gender', must be one of #{validator.allowable_values}."
|
262
|
+
end
|
263
|
+
@gender = gender
|
264
|
+
end
|
265
|
+
|
266
|
+
# Custom attribute writer method checking allowed values (enum).
|
267
|
+
# @param [Object] grade Object to be assigned
|
268
|
+
def grade=(grade)
|
269
|
+
validator = EnumAttributeValidator.new('String', ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "PreKindergarten", "Kindergarten", "PostGraduate", "Other"])
|
270
|
+
unless validator.valid?(grade)
|
271
|
+
fail ArgumentError, "invalid value for 'grade', must be one of #{validator.allowable_values}."
|
272
|
+
end
|
273
|
+
@grade = grade
|
274
|
+
end
|
275
|
+
|
276
|
+
# Custom attribute writer method checking allowed values (enum).
|
277
|
+
# @param [Object] hispanic_ethnicity Object to be assigned
|
278
|
+
def hispanic_ethnicity=(hispanic_ethnicity)
|
279
|
+
validator = EnumAttributeValidator.new('String', ["Y", "N", ""])
|
280
|
+
unless validator.valid?(hispanic_ethnicity)
|
281
|
+
fail ArgumentError, "invalid value for 'hispanic_ethnicity', must be one of #{validator.allowable_values}."
|
282
|
+
end
|
283
|
+
@hispanic_ethnicity = hispanic_ethnicity
|
284
|
+
end
|
285
|
+
|
286
|
+
# Custom attribute writer method checking allowed values (enum).
|
287
|
+
# @param [Object] race Object to be assigned
|
288
|
+
def race=(race)
|
289
|
+
validator = EnumAttributeValidator.new('String', ["Caucasian", "Asian", "Black or African American", "American Indian", "Hawaiian or Other Pacific Islander", "Two or More Races", "Unknown", ""])
|
290
|
+
unless validator.valid?(race)
|
291
|
+
fail ArgumentError, "invalid value for 'race', must be one of #{validator.allowable_values}."
|
292
|
+
end
|
293
|
+
@race = race
|
294
|
+
end
|
295
|
+
|
215
296
|
# Checks equality by comparing each attribute.
|
216
297
|
# @param [Object] Object to be compared
|
217
298
|
def ==(o)
|
218
299
|
return true if self.equal?(o)
|
219
300
|
self.class == o.class &&
|
220
|
-
id == o.id &&
|
221
301
|
created == o.created &&
|
302
|
+
credentials == o.credentials &&
|
222
303
|
district == o.district &&
|
223
304
|
dob == o.dob &&
|
224
305
|
ell_status == o.ell_status &&
|
225
306
|
email == o.email &&
|
226
|
-
frl_status == o.frl_status &&
|
227
307
|
gender == o.gender &&
|
228
308
|
grade == o.grade &&
|
229
309
|
hispanic_ethnicity == o.hispanic_ethnicity &&
|
310
|
+
id == o.id &&
|
230
311
|
iep_status == o.iep_status &&
|
231
312
|
last_modified == o.last_modified &&
|
232
313
|
location == o.location &&
|
@@ -248,7 +329,7 @@ module Clever
|
|
248
329
|
# Calculates hash code according to all attributes.
|
249
330
|
# @return [Fixnum] Hash code
|
250
331
|
def hash
|
251
|
-
[
|
332
|
+
[created, credentials, district, dob, ell_status, email, gender, grade, hispanic_ethnicity, id, iep_status, last_modified, location, name, race, school, schools, sis_id, state_id, student_number].hash
|
252
333
|
end
|
253
334
|
|
254
335
|
# Builds the object from hash
|