commonlit-clever-ruby 2.1.6.beta1 → 2.1.6.beta2
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/Gemfile +3 -1
- data/Gemfile.lock +37 -29
- data/README.md +994 -61
- data/clever-ruby.gemspec +6 -13
- data/commonlit-clever-ruby-2.1.6.beta1.gem +0 -0
- data/docs/AdminName.md +0 -1
- data/docs/BadRequest.md +0 -1
- data/docs/Contact.md +1 -2
- data/docs/ContactObject.md +0 -1
- data/docs/ContactResponse.md +0 -1
- data/docs/ContactsCreated.md +2 -3
- data/docs/ContactsDeleted.md +2 -3
- data/docs/ContactsResponse.md +0 -1
- data/docs/ContactsUpdated.md +2 -3
- data/docs/Course.md +1 -2
- data/docs/CourseObject.md +0 -1
- data/docs/CourseResponse.md +0 -1
- data/docs/CoursesCreated.md +2 -3
- data/docs/CoursesDeleted.md +2 -3
- data/docs/CoursesResponse.md +0 -1
- data/docs/CoursesUpdated.md +2 -3
- data/docs/Credentials.md +0 -1
- data/docs/DataApi.md +2784 -0
- data/docs/District.md +9 -10
- data/docs/DistrictAdmin.md +2 -3
- data/docs/DistrictAdminObject.md +0 -1
- data/docs/DistrictAdminResponse.md +0 -1
- data/docs/DistrictAdminsResponse.md +0 -1
- data/docs/DistrictObject.md +0 -1
- data/docs/DistrictResponse.md +0 -1
- data/docs/DistrictadminsCreated.md +2 -3
- data/docs/DistrictadminsDeleted.md +2 -3
- data/docs/DistrictadminsUpdated.md +2 -3
- data/docs/DistrictsCreated.md +2 -3
- data/docs/DistrictsDeleted.md +2 -3
- data/docs/DistrictsResponse.md +0 -1
- data/docs/DistrictsUpdated.md +2 -3
- data/docs/Event.md +2 -3
- data/docs/EventResponse.md +0 -1
- data/docs/EventsApi.md +1 -4
- data/docs/EventsResponse.md +0 -1
- data/docs/InternalError.md +0 -1
- data/docs/Link.md +0 -1
- data/docs/Location.md +2 -3
- data/docs/Name.md +1 -2
- data/docs/NotFound.md +0 -1
- data/docs/Principal.md +1 -2
- data/docs/School.md +3 -4
- data/docs/SchoolAdmin.md +3 -4
- data/docs/SchoolAdminObject.md +0 -1
- data/docs/SchoolAdminResponse.md +0 -1
- data/docs/SchoolAdminsResponse.md +0 -1
- data/docs/SchoolEnrollment.md +1 -2
- data/docs/SchoolObject.md +0 -1
- data/docs/SchoolResponse.md +0 -1
- data/docs/SchooladminsCreated.md +2 -3
- data/docs/SchooladminsDeleted.md +2 -3
- data/docs/SchooladminsUpdated.md +2 -3
- data/docs/SchoolsCreated.md +2 -3
- data/docs/SchoolsDeleted.md +2 -3
- data/docs/SchoolsResponse.md +0 -1
- data/docs/SchoolsUpdated.md +2 -3
- data/docs/Section.md +2 -3
- data/docs/SectionObject.md +0 -1
- data/docs/SectionResponse.md +0 -1
- data/docs/SectionsCreated.md +2 -3
- data/docs/SectionsDeleted.md +2 -3
- data/docs/SectionsResponse.md +0 -1
- data/docs/SectionsUpdated.md +2 -3
- data/docs/Student.md +3 -4
- data/docs/StudentObject.md +0 -1
- data/docs/StudentResponse.md +0 -1
- data/docs/StudentsCreated.md +2 -3
- data/docs/StudentsDeleted.md +2 -3
- data/docs/StudentsResponse.md +0 -1
- data/docs/StudentsUpdated.md +2 -3
- data/docs/Teacher.md +2 -3
- data/docs/TeacherObject.md +0 -1
- data/docs/TeacherResponse.md +0 -1
- data/docs/TeachersCreated.md +2 -3
- data/docs/TeachersDeleted.md +2 -3
- data/docs/TeachersResponse.md +0 -1
- data/docs/TeachersUpdated.md +2 -3
- data/docs/Term.md +2 -3
- data/docs/TermObject.md +0 -1
- data/docs/TermResponse.md +0 -1
- data/docs/TermsCreated.md +2 -3
- data/docs/TermsDeleted.md +2 -3
- data/docs/TermsResponse.md +0 -1
- data/docs/TermsUpdated.md +2 -3
- data/git_push.sh +55 -0
- data/lib/clever-ruby/api/data_api.rb +2999 -0
- data/lib/clever-ruby/api/events_api.rb +25 -20
- data/lib/clever-ruby/api_error.rb +23 -4
- data/lib/clever-ruby/configuration.rb +5 -9
- data/lib/clever-ruby/models/admin_name.rb +46 -22
- data/lib/clever-ruby/models/bad_request.rb +42 -20
- data/lib/clever-ruby/models/contact.rb +83 -55
- data/lib/clever-ruby/models/contact_object.rb +42 -20
- data/lib/clever-ruby/models/contact_response.rb +42 -20
- data/lib/clever-ruby/models/contacts_response.rb +44 -22
- data/lib/clever-ruby/models/course.rb +60 -36
- data/lib/clever-ruby/models/course_object.rb +42 -20
- data/lib/clever-ruby/models/course_response.rb +42 -20
- data/lib/clever-ruby/models/courses_response.rb +44 -22
- data/lib/clever-ruby/models/credentials.rb +42 -20
- data/lib/clever-ruby/models/district.rb +122 -94
- data/lib/clever-ruby/models/district_admin.rb +67 -44
- data/lib/clever-ruby/models/district_admin_object.rb +42 -20
- data/lib/clever-ruby/models/district_admin_response.rb +42 -20
- data/lib/clever-ruby/models/district_admins_response.rb +44 -22
- data/lib/clever-ruby/models/district_object.rb +42 -20
- data/lib/clever-ruby/models/district_response.rb +42 -20
- data/lib/clever-ruby/models/districts_response.rb +44 -22
- data/lib/clever-ruby/models/event.rb +60 -33
- data/lib/clever-ruby/models/event_response.rb +42 -20
- data/lib/clever-ruby/models/events_response.rb +44 -22
- data/lib/clever-ruby/models/internal_error.rb +42 -20
- data/lib/clever-ruby/models/link.rb +47 -25
- data/lib/clever-ruby/models/location.rb +73 -45
- data/lib/clever-ruby/models/name.rb +58 -33
- data/lib/clever-ruby/models/not_found.rb +42 -20
- data/lib/clever-ruby/models/principal.rb +55 -31
- data/lib/clever-ruby/models/school.rb +108 -80
- data/lib/clever-ruby/models/school_admin.rb +85 -61
- data/lib/clever-ruby/models/school_admin_object.rb +42 -20
- data/lib/clever-ruby/models/school_admin_response.rb +42 -20
- data/lib/clever-ruby/models/school_admins_response.rb +44 -22
- data/lib/clever-ruby/models/school_enrollment.rb +56 -34
- data/lib/clever-ruby/models/school_object.rb +42 -20
- data/lib/clever-ruby/models/school_response.rb +42 -20
- data/lib/clever-ruby/models/schools_response.rb +44 -22
- data/lib/clever-ruby/models/section.rb +104 -75
- data/lib/clever-ruby/models/section_object.rb +42 -20
- data/lib/clever-ruby/models/section_response.rb +42 -20
- data/lib/clever-ruby/models/sections_response.rb +44 -22
- data/lib/clever-ruby/models/student.rb +147 -126
- data/lib/clever-ruby/models/student_object.rb +42 -20
- data/lib/clever-ruby/models/student_response.rb +42 -20
- data/lib/clever-ruby/models/students_response.rb +44 -22
- data/lib/clever-ruby/models/teacher.rb +89 -63
- data/lib/clever-ruby/models/teacher_object.rb +42 -20
- data/lib/clever-ruby/models/teacher_response.rb +42 -20
- data/lib/clever-ruby/models/teachers_response.rb +44 -22
- data/lib/clever-ruby/models/term.rb +69 -44
- data/lib/clever-ruby/models/term_object.rb +42 -20
- data/lib/clever-ruby/models/term_response.rb +42 -20
- data/lib/clever-ruby/models/terms_response.rb +44 -22
- data/lib/clever-ruby/version.rb +4 -5
- data/lib/clever-ruby.rb +4 -14
- data/override/README-extension.md +1 -1
- data/override/override.sh +3 -0
- data/spec/api/data_api_spec.rb +671 -0
- data/spec/api/events_api_spec.rb +4 -3
- data/spec/api_client_spec.rb +21 -3
- data/spec/spec_helper.rb +4 -3
- metadata +25 -179
- data/docs/ContactsApi.md +0 -231
- data/docs/CoursesApi.md +0 -231
- data/docs/DistrictAdminsApi.md +0 -171
- data/docs/DistrictsApi.md +0 -113
- data/docs/SchoolAdminsApi.md +0 -231
- data/docs/SchoolsApi.md +0 -351
- data/docs/SectionsApi.md +0 -499
- data/docs/StudentsApi.md +0 -463
- data/docs/TeachersApi.md +0 -403
- data/docs/TermsApi.md +0 -231
- data/lib/clever-ruby/api/contacts_api.rb +0 -241
- data/lib/clever-ruby/api/courses_api.rb +0 -241
- data/lib/clever-ruby/api/district_admins_api.rb +0 -182
- data/lib/clever-ruby/api/districts_api.rb +0 -123
- data/lib/clever-ruby/api/school_admins_api.rb +0 -241
- data/lib/clever-ruby/api/schools_api.rb +0 -359
- data/lib/clever-ruby/api/sections_api.rb +0 -500
- data/lib/clever-ruby/api/students_api.rb +0 -468
- data/lib/clever-ruby/api/teachers_api.rb +0 -409
- data/lib/clever-ruby/api/terms_api.rb +0 -241
- data/spec/api/contacts_api_spec.rb +0 -84
- data/spec/api/courses_api_spec.rb +0 -84
- data/spec/api/district_admins_api_spec.rb +0 -70
- data/spec/api/districts_api_spec.rb +0 -56
- data/spec/api/school_admins_api_spec.rb +0 -84
- data/spec/api/schools_api_spec.rb +0 -112
- data/spec/api/sections_api_spec.rb +0 -142
- data/spec/api/students_api_spec.rb +0 -137
- data/spec/api/teachers_api_spec.rb +0 -123
- data/spec/api/terms_api_spec.rb +0 -84
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Clever API
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#The Clever API
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version:
|
|
10
|
-
|
|
9
|
+
Swagger Codegen version: 3.0.51
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module Clever
|
|
16
15
|
class Student
|
|
17
|
-
attr_accessor :id
|
|
18
|
-
|
|
19
16
|
attr_accessor :created
|
|
20
17
|
|
|
21
18
|
attr_accessor :credentials
|
|
@@ -30,16 +27,20 @@ module Clever
|
|
|
30
27
|
|
|
31
28
|
attr_accessor :enrollments
|
|
32
29
|
|
|
33
|
-
attr_accessor :
|
|
30
|
+
attr_accessor :ext
|
|
34
31
|
|
|
35
|
-
attr_accessor :
|
|
32
|
+
attr_accessor :gender
|
|
36
33
|
|
|
37
34
|
attr_accessor :grade
|
|
38
35
|
|
|
36
|
+
attr_accessor :graduation_year
|
|
37
|
+
|
|
39
38
|
attr_accessor :hispanic_ethnicity
|
|
40
39
|
|
|
41
40
|
attr_accessor :home_language
|
|
42
41
|
|
|
42
|
+
attr_accessor :id
|
|
43
|
+
|
|
43
44
|
attr_accessor :iep_status
|
|
44
45
|
|
|
45
46
|
attr_accessor :last_modified
|
|
@@ -64,8 +65,6 @@ module Clever
|
|
|
64
65
|
|
|
65
66
|
attr_accessor :weighted_gpa
|
|
66
67
|
|
|
67
|
-
attr_accessor :ext
|
|
68
|
-
|
|
69
68
|
class EnumAttributeValidator
|
|
70
69
|
attr_reader :datatype
|
|
71
70
|
attr_reader :allowable_values
|
|
@@ -91,7 +90,6 @@ module Clever
|
|
|
91
90
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
92
91
|
def self.attribute_map
|
|
93
92
|
{
|
|
94
|
-
:'id' => :'id',
|
|
95
93
|
:'created' => :'created',
|
|
96
94
|
:'credentials' => :'credentials',
|
|
97
95
|
:'district' => :'district',
|
|
@@ -99,11 +97,13 @@ module Clever
|
|
|
99
97
|
:'ell_status' => :'ell_status',
|
|
100
98
|
:'email' => :'email',
|
|
101
99
|
:'enrollments' => :'enrollments',
|
|
100
|
+
:'ext' => :'ext',
|
|
102
101
|
:'gender' => :'gender',
|
|
103
|
-
:'graduation_year' => :'graduation_year',
|
|
104
102
|
:'grade' => :'grade',
|
|
103
|
+
:'graduation_year' => :'graduation_year',
|
|
105
104
|
:'hispanic_ethnicity' => :'hispanic_ethnicity',
|
|
106
105
|
:'home_language' => :'home_language',
|
|
106
|
+
:'id' => :'id',
|
|
107
107
|
:'iep_status' => :'iep_status',
|
|
108
108
|
:'last_modified' => :'last_modified',
|
|
109
109
|
:'location' => :'location',
|
|
@@ -115,206 +115,217 @@ module Clever
|
|
|
115
115
|
:'state_id' => :'state_id',
|
|
116
116
|
:'student_number' => :'student_number',
|
|
117
117
|
:'unweighted_gpa' => :'unweighted_gpa',
|
|
118
|
-
:'weighted_gpa' => :'weighted_gpa'
|
|
119
|
-
:'ext' => :'ext'
|
|
118
|
+
:'weighted_gpa' => :'weighted_gpa'
|
|
120
119
|
}
|
|
121
120
|
end
|
|
122
121
|
|
|
123
122
|
# Attribute type mapping.
|
|
124
|
-
def self.
|
|
123
|
+
def self.openapi_types
|
|
125
124
|
{
|
|
126
|
-
:'
|
|
127
|
-
:'
|
|
128
|
-
:'
|
|
129
|
-
:'
|
|
130
|
-
:'
|
|
131
|
-
:'
|
|
132
|
-
:'
|
|
133
|
-
:'
|
|
134
|
-
:'gender' => :'
|
|
135
|
-
:'
|
|
136
|
-
:'
|
|
137
|
-
:'hispanic_ethnicity' => :'
|
|
138
|
-
:'home_language' => :'
|
|
139
|
-
:'
|
|
140
|
-
:'
|
|
141
|
-
:'
|
|
142
|
-
:'
|
|
143
|
-
:'
|
|
144
|
-
:'
|
|
145
|
-
:'
|
|
146
|
-
:'
|
|
147
|
-
:'
|
|
148
|
-
:'
|
|
149
|
-
:'
|
|
150
|
-
:'
|
|
151
|
-
:'
|
|
125
|
+
:'created' => :'Object',
|
|
126
|
+
:'credentials' => :'Object',
|
|
127
|
+
:'district' => :'Object',
|
|
128
|
+
:'dob' => :'Object',
|
|
129
|
+
:'ell_status' => :'Object',
|
|
130
|
+
:'email' => :'Object',
|
|
131
|
+
:'enrollments' => :'Object',
|
|
132
|
+
:'ext' => :'Object',
|
|
133
|
+
:'gender' => :'Object',
|
|
134
|
+
:'grade' => :'Object',
|
|
135
|
+
:'graduation_year' => :'Object',
|
|
136
|
+
:'hispanic_ethnicity' => :'Object',
|
|
137
|
+
:'home_language' => :'Object',
|
|
138
|
+
:'id' => :'Object',
|
|
139
|
+
:'iep_status' => :'Object',
|
|
140
|
+
:'last_modified' => :'Object',
|
|
141
|
+
:'location' => :'Object',
|
|
142
|
+
:'name' => :'Object',
|
|
143
|
+
:'race' => :'Object',
|
|
144
|
+
:'school' => :'Object',
|
|
145
|
+
:'schools' => :'Object',
|
|
146
|
+
:'sis_id' => :'Object',
|
|
147
|
+
:'state_id' => :'Object',
|
|
148
|
+
:'student_number' => :'Object',
|
|
149
|
+
:'unweighted_gpa' => :'Object',
|
|
150
|
+
:'weighted_gpa' => :'Object'
|
|
152
151
|
}
|
|
153
152
|
end
|
|
154
153
|
|
|
154
|
+
# List of attributes with nullable: true
|
|
155
|
+
def self.openapi_nullable
|
|
156
|
+
Set.new([
|
|
157
|
+
:'dob',
|
|
158
|
+
:'ell_status',
|
|
159
|
+
:'email',
|
|
160
|
+
:'gender',
|
|
161
|
+
:'grade',
|
|
162
|
+
:'graduation_year',
|
|
163
|
+
:'hispanic_ethnicity',
|
|
164
|
+
:'home_language',
|
|
165
|
+
:'iep_status',
|
|
166
|
+
:'race',
|
|
167
|
+
:'state_id',
|
|
168
|
+
:'student_number',
|
|
169
|
+
:'unweighted_gpa',
|
|
170
|
+
:'weighted_gpa'
|
|
171
|
+
])
|
|
172
|
+
end
|
|
173
|
+
|
|
155
174
|
# Initializes the object
|
|
156
175
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
176
|
def initialize(attributes = {})
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
# convert string to symbol for hash key
|
|
161
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
162
|
-
|
|
163
|
-
if attributes.has_key?(:'id')
|
|
164
|
-
self.id = attributes[:'id']
|
|
177
|
+
if (!attributes.is_a?(Hash))
|
|
178
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Clever::Student` initialize method"
|
|
165
179
|
end
|
|
166
180
|
|
|
167
|
-
if
|
|
181
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
182
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
183
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
184
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Clever::Student`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
185
|
+
end
|
|
186
|
+
h[k.to_sym] = v
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'created')
|
|
168
190
|
self.created = attributes[:'created']
|
|
169
191
|
end
|
|
170
192
|
|
|
171
|
-
if attributes.
|
|
193
|
+
if attributes.key?(:'credentials')
|
|
172
194
|
self.credentials = attributes[:'credentials']
|
|
173
195
|
end
|
|
174
196
|
|
|
175
|
-
if attributes.
|
|
197
|
+
if attributes.key?(:'district')
|
|
176
198
|
self.district = attributes[:'district']
|
|
177
199
|
end
|
|
178
200
|
|
|
179
|
-
if attributes.
|
|
201
|
+
if attributes.key?(:'dob')
|
|
180
202
|
self.dob = attributes[:'dob']
|
|
181
203
|
end
|
|
182
204
|
|
|
183
|
-
if attributes.
|
|
205
|
+
if attributes.key?(:'ell_status')
|
|
184
206
|
self.ell_status = attributes[:'ell_status']
|
|
185
207
|
end
|
|
186
208
|
|
|
187
|
-
if attributes.
|
|
209
|
+
if attributes.key?(:'email')
|
|
188
210
|
self.email = attributes[:'email']
|
|
189
211
|
end
|
|
190
212
|
|
|
191
|
-
if attributes.
|
|
213
|
+
if attributes.key?(:'enrollments')
|
|
192
214
|
if (value = attributes[:'enrollments']).is_a?(Array)
|
|
193
215
|
self.enrollments = value
|
|
194
216
|
end
|
|
195
217
|
end
|
|
196
218
|
|
|
197
|
-
if attributes.
|
|
198
|
-
self.
|
|
219
|
+
if attributes.key?(:'ext')
|
|
220
|
+
self.ext = attributes[:'ext']
|
|
199
221
|
end
|
|
200
222
|
|
|
201
|
-
if attributes.
|
|
202
|
-
self.
|
|
223
|
+
if attributes.key?(:'gender')
|
|
224
|
+
self.gender = attributes[:'gender']
|
|
203
225
|
end
|
|
204
226
|
|
|
205
|
-
if attributes.
|
|
227
|
+
if attributes.key?(:'grade')
|
|
206
228
|
self.grade = attributes[:'grade']
|
|
207
229
|
end
|
|
208
230
|
|
|
209
|
-
if attributes.
|
|
231
|
+
if attributes.key?(:'graduation_year')
|
|
232
|
+
self.graduation_year = attributes[:'graduation_year']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'hispanic_ethnicity')
|
|
210
236
|
self.hispanic_ethnicity = attributes[:'hispanic_ethnicity']
|
|
211
237
|
end
|
|
212
238
|
|
|
213
|
-
if attributes.
|
|
239
|
+
if attributes.key?(:'home_language')
|
|
214
240
|
self.home_language = attributes[:'home_language']
|
|
215
241
|
end
|
|
216
242
|
|
|
217
|
-
if attributes.
|
|
243
|
+
if attributes.key?(:'id')
|
|
244
|
+
self.id = attributes[:'id']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'iep_status')
|
|
218
248
|
self.iep_status = attributes[:'iep_status']
|
|
219
249
|
end
|
|
220
250
|
|
|
221
|
-
if attributes.
|
|
251
|
+
if attributes.key?(:'last_modified')
|
|
222
252
|
self.last_modified = attributes[:'last_modified']
|
|
223
253
|
end
|
|
224
254
|
|
|
225
|
-
if attributes.
|
|
255
|
+
if attributes.key?(:'location')
|
|
226
256
|
self.location = attributes[:'location']
|
|
227
257
|
end
|
|
228
258
|
|
|
229
|
-
if attributes.
|
|
259
|
+
if attributes.key?(:'name')
|
|
230
260
|
self.name = attributes[:'name']
|
|
231
261
|
end
|
|
232
262
|
|
|
233
|
-
if attributes.
|
|
263
|
+
if attributes.key?(:'race')
|
|
234
264
|
self.race = attributes[:'race']
|
|
235
265
|
end
|
|
236
266
|
|
|
237
|
-
if attributes.
|
|
267
|
+
if attributes.key?(:'school')
|
|
238
268
|
self.school = attributes[:'school']
|
|
239
269
|
end
|
|
240
270
|
|
|
241
|
-
if attributes.
|
|
271
|
+
if attributes.key?(:'schools')
|
|
242
272
|
if (value = attributes[:'schools']).is_a?(Array)
|
|
243
273
|
self.schools = value
|
|
244
274
|
end
|
|
245
275
|
end
|
|
246
276
|
|
|
247
|
-
if attributes.
|
|
277
|
+
if attributes.key?(:'sis_id')
|
|
248
278
|
self.sis_id = attributes[:'sis_id']
|
|
249
279
|
end
|
|
250
280
|
|
|
251
|
-
if attributes.
|
|
281
|
+
if attributes.key?(:'state_id')
|
|
252
282
|
self.state_id = attributes[:'state_id']
|
|
253
283
|
end
|
|
254
284
|
|
|
255
|
-
if attributes.
|
|
285
|
+
if attributes.key?(:'student_number')
|
|
256
286
|
self.student_number = attributes[:'student_number']
|
|
257
287
|
end
|
|
258
288
|
|
|
259
|
-
if attributes.
|
|
289
|
+
if attributes.key?(:'unweighted_gpa')
|
|
260
290
|
self.unweighted_gpa = attributes[:'unweighted_gpa']
|
|
261
291
|
end
|
|
262
292
|
|
|
263
|
-
if attributes.
|
|
293
|
+
if attributes.key?(:'weighted_gpa')
|
|
264
294
|
self.weighted_gpa = attributes[:'weighted_gpa']
|
|
265
295
|
end
|
|
266
|
-
|
|
267
|
-
if attributes.has_key?(:'ext')
|
|
268
|
-
self.ext = attributes[:'ext']
|
|
269
|
-
end
|
|
270
296
|
end
|
|
271
297
|
|
|
272
298
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
273
299
|
# @return Array for valid properties with the reasons
|
|
274
300
|
def list_invalid_properties
|
|
275
301
|
invalid_properties = Array.new
|
|
276
|
-
if !@dob.nil? && @dob !~ Regexp.new(/(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/)
|
|
277
|
-
invalid_properties.push('invalid value for "dob", must conform to the pattern /(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/.')
|
|
278
|
-
end
|
|
279
|
-
|
|
280
302
|
invalid_properties
|
|
281
303
|
end
|
|
282
304
|
|
|
283
305
|
# Check to see if the all the properties in the model are valid
|
|
284
306
|
# @return true if the model is valid
|
|
285
307
|
def valid?
|
|
286
|
-
|
|
287
|
-
ell_status_validator = EnumAttributeValidator.new('String', ['Y', 'N', ''])
|
|
308
|
+
ell_status_validator = EnumAttributeValidator.new('Object', ['Y', 'N', ''])
|
|
288
309
|
return false unless ell_status_validator.valid?(@ell_status)
|
|
289
|
-
gender_validator = EnumAttributeValidator.new('
|
|
310
|
+
gender_validator = EnumAttributeValidator.new('Object', ['M', 'F', 'X', ''])
|
|
290
311
|
return false unless gender_validator.valid?(@gender)
|
|
291
|
-
grade_validator = EnumAttributeValidator.new('
|
|
312
|
+
grade_validator = EnumAttributeValidator.new('Object', ['InfantToddler', 'Preschool', 'PreKindergarten', 'TransitionalKindergarten', 'Kindergarten', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', 'PostGraduate', 'Ungraded', 'Other', ''])
|
|
292
313
|
return false unless grade_validator.valid?(@grade)
|
|
293
|
-
hispanic_ethnicity_validator = EnumAttributeValidator.new('
|
|
314
|
+
hispanic_ethnicity_validator = EnumAttributeValidator.new('Object', ['Y', 'N', ''])
|
|
294
315
|
return false unless hispanic_ethnicity_validator.valid?(@hispanic_ethnicity)
|
|
295
|
-
home_language_validator = EnumAttributeValidator.new('
|
|
316
|
+
home_language_validator = EnumAttributeValidator.new('Object', ['English', 'Albanian', 'Amharic', 'Arabic', 'Bengali', 'Bosnian', 'Burmese', 'Cantonese', 'Chinese', 'Dutch', 'Farsi', 'French', 'German', 'Hebrew', 'Hindi', 'Hmong', 'Ilocano', 'Japanese', 'Javanese', 'Karen', 'Khmer', 'Korean', 'Laotian', 'Latvian', 'Malay', 'Mandarin', 'Nepali', 'Oromo', 'Polish', 'Portuguese', 'Punjabi', 'Romanian', 'Russian', 'Samoan', 'Serbian', 'Somali', 'Spanish', 'Swahili', 'Tagalog', 'Tamil', 'Telugu', 'Thai', 'Tigrinya', 'Turkish', 'Ukrainian', 'Urdu', 'Vietnamese', ''])
|
|
296
317
|
return false unless home_language_validator.valid?(@home_language)
|
|
297
|
-
race_validator = EnumAttributeValidator.new('
|
|
318
|
+
race_validator = EnumAttributeValidator.new('Object', ['Caucasian', 'Asian', 'Black or African American', 'American Indian', 'Hawaiian or Other Pacific Islander', 'Two or More Races', 'Unknown', ''])
|
|
298
319
|
return false unless race_validator.valid?(@race)
|
|
299
320
|
true
|
|
300
321
|
end
|
|
301
322
|
|
|
302
|
-
# Custom attribute writer method with validation
|
|
303
|
-
# @param [Object] dob Value to be assigned
|
|
304
|
-
def dob=(dob)
|
|
305
|
-
if !dob.nil? && dob !~ Regexp.new(/(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/)
|
|
306
|
-
fail ArgumentError, 'invalid value for "dob", must conform to the pattern /(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/.'
|
|
307
|
-
end
|
|
308
|
-
|
|
309
|
-
@dob = dob
|
|
310
|
-
end
|
|
311
|
-
|
|
312
323
|
# Custom attribute writer method checking allowed values (enum).
|
|
313
324
|
# @param [Object] ell_status Object to be assigned
|
|
314
325
|
def ell_status=(ell_status)
|
|
315
|
-
validator = EnumAttributeValidator.new('
|
|
326
|
+
validator = EnumAttributeValidator.new('Object', ['Y', 'N', ''])
|
|
316
327
|
unless validator.valid?(ell_status)
|
|
317
|
-
fail ArgumentError,
|
|
328
|
+
fail ArgumentError, "invalid value for \"ell_status\", must be one of #{validator.allowable_values}."
|
|
318
329
|
end
|
|
319
330
|
@ell_status = ell_status
|
|
320
331
|
end
|
|
@@ -322,9 +333,9 @@ module Clever
|
|
|
322
333
|
# Custom attribute writer method checking allowed values (enum).
|
|
323
334
|
# @param [Object] gender Object to be assigned
|
|
324
335
|
def gender=(gender)
|
|
325
|
-
validator = EnumAttributeValidator.new('
|
|
336
|
+
validator = EnumAttributeValidator.new('Object', ['M', 'F', 'X', ''])
|
|
326
337
|
unless validator.valid?(gender)
|
|
327
|
-
fail ArgumentError,
|
|
338
|
+
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
|
328
339
|
end
|
|
329
340
|
@gender = gender
|
|
330
341
|
end
|
|
@@ -332,9 +343,9 @@ module Clever
|
|
|
332
343
|
# Custom attribute writer method checking allowed values (enum).
|
|
333
344
|
# @param [Object] grade Object to be assigned
|
|
334
345
|
def grade=(grade)
|
|
335
|
-
validator = EnumAttributeValidator.new('
|
|
346
|
+
validator = EnumAttributeValidator.new('Object', ['InfantToddler', 'Preschool', 'PreKindergarten', 'TransitionalKindergarten', 'Kindergarten', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', 'PostGraduate', 'Ungraded', 'Other', ''])
|
|
336
347
|
unless validator.valid?(grade)
|
|
337
|
-
fail ArgumentError,
|
|
348
|
+
fail ArgumentError, "invalid value for \"grade\", must be one of #{validator.allowable_values}."
|
|
338
349
|
end
|
|
339
350
|
@grade = grade
|
|
340
351
|
end
|
|
@@ -342,9 +353,9 @@ module Clever
|
|
|
342
353
|
# Custom attribute writer method checking allowed values (enum).
|
|
343
354
|
# @param [Object] hispanic_ethnicity Object to be assigned
|
|
344
355
|
def hispanic_ethnicity=(hispanic_ethnicity)
|
|
345
|
-
validator = EnumAttributeValidator.new('
|
|
356
|
+
validator = EnumAttributeValidator.new('Object', ['Y', 'N', ''])
|
|
346
357
|
unless validator.valid?(hispanic_ethnicity)
|
|
347
|
-
fail ArgumentError,
|
|
358
|
+
fail ArgumentError, "invalid value for \"hispanic_ethnicity\", must be one of #{validator.allowable_values}."
|
|
348
359
|
end
|
|
349
360
|
@hispanic_ethnicity = hispanic_ethnicity
|
|
350
361
|
end
|
|
@@ -352,9 +363,9 @@ module Clever
|
|
|
352
363
|
# Custom attribute writer method checking allowed values (enum).
|
|
353
364
|
# @param [Object] home_language Object to be assigned
|
|
354
365
|
def home_language=(home_language)
|
|
355
|
-
validator = EnumAttributeValidator.new('
|
|
366
|
+
validator = EnumAttributeValidator.new('Object', ['English', 'Albanian', 'Amharic', 'Arabic', 'Bengali', 'Bosnian', 'Burmese', 'Cantonese', 'Chinese', 'Dutch', 'Farsi', 'French', 'German', 'Hebrew', 'Hindi', 'Hmong', 'Ilocano', 'Japanese', 'Javanese', 'Karen', 'Khmer', 'Korean', 'Laotian', 'Latvian', 'Malay', 'Mandarin', 'Nepali', 'Oromo', 'Polish', 'Portuguese', 'Punjabi', 'Romanian', 'Russian', 'Samoan', 'Serbian', 'Somali', 'Spanish', 'Swahili', 'Tagalog', 'Tamil', 'Telugu', 'Thai', 'Tigrinya', 'Turkish', 'Ukrainian', 'Urdu', 'Vietnamese', ''])
|
|
356
367
|
unless validator.valid?(home_language)
|
|
357
|
-
fail ArgumentError,
|
|
368
|
+
fail ArgumentError, "invalid value for \"home_language\", must be one of #{validator.allowable_values}."
|
|
358
369
|
end
|
|
359
370
|
@home_language = home_language
|
|
360
371
|
end
|
|
@@ -362,9 +373,9 @@ module Clever
|
|
|
362
373
|
# Custom attribute writer method checking allowed values (enum).
|
|
363
374
|
# @param [Object] race Object to be assigned
|
|
364
375
|
def race=(race)
|
|
365
|
-
validator = EnumAttributeValidator.new('
|
|
376
|
+
validator = EnumAttributeValidator.new('Object', ['Caucasian', 'Asian', 'Black or African American', 'American Indian', 'Hawaiian or Other Pacific Islander', 'Two or More Races', 'Unknown', ''])
|
|
366
377
|
unless validator.valid?(race)
|
|
367
|
-
fail ArgumentError,
|
|
378
|
+
fail ArgumentError, "invalid value for \"race\", must be one of #{validator.allowable_values}."
|
|
368
379
|
end
|
|
369
380
|
@race = race
|
|
370
381
|
end
|
|
@@ -374,7 +385,6 @@ module Clever
|
|
|
374
385
|
def ==(o)
|
|
375
386
|
return true if self.equal?(o)
|
|
376
387
|
self.class == o.class &&
|
|
377
|
-
id == o.id &&
|
|
378
388
|
created == o.created &&
|
|
379
389
|
credentials == o.credentials &&
|
|
380
390
|
district == o.district &&
|
|
@@ -382,11 +392,13 @@ module Clever
|
|
|
382
392
|
ell_status == o.ell_status &&
|
|
383
393
|
email == o.email &&
|
|
384
394
|
enrollments == o.enrollments &&
|
|
395
|
+
ext == o.ext &&
|
|
385
396
|
gender == o.gender &&
|
|
386
|
-
graduation_year == o.graduation_year &&
|
|
387
397
|
grade == o.grade &&
|
|
398
|
+
graduation_year == o.graduation_year &&
|
|
388
399
|
hispanic_ethnicity == o.hispanic_ethnicity &&
|
|
389
400
|
home_language == o.home_language &&
|
|
401
|
+
id == o.id &&
|
|
390
402
|
iep_status == o.iep_status &&
|
|
391
403
|
last_modified == o.last_modified &&
|
|
392
404
|
location == o.location &&
|
|
@@ -398,8 +410,7 @@ module Clever
|
|
|
398
410
|
state_id == o.state_id &&
|
|
399
411
|
student_number == o.student_number &&
|
|
400
412
|
unweighted_gpa == o.unweighted_gpa &&
|
|
401
|
-
weighted_gpa == o.weighted_gpa
|
|
402
|
-
ext == o.ext
|
|
413
|
+
weighted_gpa == o.weighted_gpa
|
|
403
414
|
end
|
|
404
415
|
|
|
405
416
|
# @see the `==` method
|
|
@@ -409,9 +420,16 @@ module Clever
|
|
|
409
420
|
end
|
|
410
421
|
|
|
411
422
|
# Calculates hash code according to all attributes.
|
|
412
|
-
# @return [
|
|
423
|
+
# @return [Integer] Hash code
|
|
413
424
|
def hash
|
|
414
|
-
[
|
|
425
|
+
[created, credentials, district, dob, ell_status, email, enrollments, ext, gender, grade, graduation_year, hispanic_ethnicity, home_language, id, iep_status, last_modified, location, name, race, school, schools, sis_id, state_id, student_number, unweighted_gpa, weighted_gpa].hash
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Builds the object from hash
|
|
429
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
430
|
+
# @return [Object] Returns the model itself
|
|
431
|
+
def self.build_from_hash(attributes)
|
|
432
|
+
new.build_from_hash(attributes)
|
|
415
433
|
end
|
|
416
434
|
|
|
417
435
|
# Builds the object from hash
|
|
@@ -419,7 +437,7 @@ module Clever
|
|
|
419
437
|
# @return [Object] Returns the model itself
|
|
420
438
|
def build_from_hash(attributes)
|
|
421
439
|
return nil unless attributes.is_a?(Hash)
|
|
422
|
-
self.class.
|
|
440
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
423
441
|
if type =~ /\AArray<(.*)>/i
|
|
424
442
|
# check to ensure the input is an array given that the attribute
|
|
425
443
|
# is documented as an array but the input is not
|
|
@@ -428,7 +446,9 @@ module Clever
|
|
|
428
446
|
end
|
|
429
447
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
430
448
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
431
|
-
|
|
449
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
450
|
+
self.send("#{key}=", nil)
|
|
451
|
+
end
|
|
432
452
|
end
|
|
433
453
|
|
|
434
454
|
self
|
|
@@ -450,7 +470,7 @@ module Clever
|
|
|
450
470
|
value.to_i
|
|
451
471
|
when :Float
|
|
452
472
|
value.to_f
|
|
453
|
-
when :
|
|
473
|
+
when :Boolean
|
|
454
474
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
455
475
|
true
|
|
456
476
|
else
|
|
@@ -471,8 +491,7 @@ module Clever
|
|
|
471
491
|
end
|
|
472
492
|
end
|
|
473
493
|
else # model
|
|
474
|
-
|
|
475
|
-
temp_model.build_from_hash(value)
|
|
494
|
+
Clever.const_get(type).build_from_hash(value)
|
|
476
495
|
end
|
|
477
496
|
end
|
|
478
497
|
|
|
@@ -494,7 +513,11 @@ module Clever
|
|
|
494
513
|
hash = {}
|
|
495
514
|
self.class.attribute_map.each_pair do |attr, param|
|
|
496
515
|
value = self.send(attr)
|
|
497
|
-
|
|
516
|
+
if value.nil?
|
|
517
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
518
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
519
|
+
end
|
|
520
|
+
|
|
498
521
|
hash[param] = _to_hash(value)
|
|
499
522
|
end
|
|
500
523
|
hash
|
|
@@ -516,7 +539,5 @@ module Clever
|
|
|
516
539
|
else
|
|
517
540
|
value
|
|
518
541
|
end
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
end
|
|
542
|
+
end end
|
|
522
543
|
end
|