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,48 +14,69 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class DistrictStatus
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
attr_accessor :sis_type
|
17
|
+
attr_accessor :error
|
20
18
|
|
21
|
-
attr_accessor :
|
19
|
+
attr_accessor :id
|
22
20
|
|
23
21
|
attr_accessor :last_sync
|
24
22
|
|
25
|
-
attr_accessor :
|
23
|
+
attr_accessor :launch_date
|
24
|
+
|
25
|
+
attr_accessor :pause_end
|
26
26
|
|
27
27
|
attr_accessor :pause_start
|
28
28
|
|
29
|
-
attr_accessor :
|
29
|
+
attr_accessor :sis_type
|
30
|
+
|
31
|
+
attr_accessor :state
|
30
32
|
|
31
|
-
|
33
|
+
class EnumAttributeValidator
|
34
|
+
attr_reader :datatype
|
35
|
+
attr_reader :allowable_values
|
36
|
+
|
37
|
+
def initialize(datatype, allowable_values)
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
39
|
+
case datatype.to_s
|
40
|
+
when /Integer/i
|
41
|
+
value.to_i
|
42
|
+
when /Float/i
|
43
|
+
value.to_f
|
44
|
+
else
|
45
|
+
value
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
32
49
|
|
50
|
+
def valid?(value)
|
51
|
+
!value || allowable_values.include?(value)
|
52
|
+
end
|
53
|
+
end
|
33
54
|
|
34
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
56
|
def self.attribute_map
|
36
57
|
{
|
58
|
+
:'error' => :'error',
|
37
59
|
:'id' => :'id',
|
38
|
-
:'sis_type' => :'sis_type',
|
39
|
-
:'state' => :'state',
|
40
60
|
:'last_sync' => :'last_sync',
|
41
|
-
:'
|
42
|
-
:'pause_start' => :'pause_start',
|
61
|
+
:'launch_date' => :'launch_date',
|
43
62
|
:'pause_end' => :'pause_end',
|
44
|
-
:'
|
63
|
+
:'pause_start' => :'pause_start',
|
64
|
+
:'sis_type' => :'sis_type',
|
65
|
+
:'state' => :'state'
|
45
66
|
}
|
46
67
|
end
|
47
68
|
|
48
69
|
# Attribute type mapping.
|
49
70
|
def self.swagger_types
|
50
71
|
{
|
72
|
+
:'error' => :'String',
|
51
73
|
:'id' => :'String',
|
52
|
-
:'sis_type' => :'String',
|
53
|
-
:'state' => :'String',
|
54
74
|
:'last_sync' => :'String',
|
55
|
-
:'
|
56
|
-
:'pause_start' => :'String',
|
75
|
+
:'launch_date' => :'String',
|
57
76
|
:'pause_end' => :'String',
|
58
|
-
:'
|
77
|
+
:'pause_start' => :'String',
|
78
|
+
:'sis_type' => :'String',
|
79
|
+
:'state' => :'String'
|
59
80
|
}
|
60
81
|
end
|
61
82
|
|
@@ -67,36 +88,36 @@ module Clever
|
|
67
88
|
# convert string to symbol for hash key
|
68
89
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
69
90
|
|
70
|
-
if attributes.has_key?(:'
|
71
|
-
self.
|
72
|
-
end
|
73
|
-
|
74
|
-
if attributes.has_key?(:'sis_type')
|
75
|
-
self.sis_type = attributes[:'sis_type']
|
91
|
+
if attributes.has_key?(:'error')
|
92
|
+
self.error = attributes[:'error']
|
76
93
|
end
|
77
94
|
|
78
|
-
if attributes.has_key?(:'
|
79
|
-
self.
|
95
|
+
if attributes.has_key?(:'id')
|
96
|
+
self.id = attributes[:'id']
|
80
97
|
end
|
81
98
|
|
82
99
|
if attributes.has_key?(:'last_sync')
|
83
100
|
self.last_sync = attributes[:'last_sync']
|
84
101
|
end
|
85
102
|
|
86
|
-
if attributes.has_key?(:'
|
87
|
-
self.
|
103
|
+
if attributes.has_key?(:'launch_date')
|
104
|
+
self.launch_date = attributes[:'launch_date']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'pause_end')
|
108
|
+
self.pause_end = attributes[:'pause_end']
|
88
109
|
end
|
89
110
|
|
90
111
|
if attributes.has_key?(:'pause_start')
|
91
112
|
self.pause_start = attributes[:'pause_start']
|
92
113
|
end
|
93
114
|
|
94
|
-
if attributes.has_key?(:'
|
95
|
-
self.
|
115
|
+
if attributes.has_key?(:'sis_type')
|
116
|
+
self.sis_type = attributes[:'sis_type']
|
96
117
|
end
|
97
118
|
|
98
|
-
if attributes.has_key?(:'
|
99
|
-
self.
|
119
|
+
if attributes.has_key?(:'state')
|
120
|
+
self.state = attributes[:'state']
|
100
121
|
end
|
101
122
|
|
102
123
|
end
|
@@ -111,22 +132,34 @@ module Clever
|
|
111
132
|
# Check to see if the all the properties in the model are valid
|
112
133
|
# @return true if the model is valid
|
113
134
|
def valid?
|
135
|
+
state_validator = EnumAttributeValidator.new('String', ["running", "pending", "error", "pause"])
|
136
|
+
return false unless state_validator.valid?(@state)
|
114
137
|
return true
|
115
138
|
end
|
116
139
|
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
141
|
+
# @param [Object] state Object to be assigned
|
142
|
+
def state=(state)
|
143
|
+
validator = EnumAttributeValidator.new('String', ["running", "pending", "error", "pause"])
|
144
|
+
unless validator.valid?(state)
|
145
|
+
fail ArgumentError, "invalid value for 'state', must be one of #{validator.allowable_values}."
|
146
|
+
end
|
147
|
+
@state = state
|
148
|
+
end
|
149
|
+
|
117
150
|
# Checks equality by comparing each attribute.
|
118
151
|
# @param [Object] Object to be compared
|
119
152
|
def ==(o)
|
120
153
|
return true if self.equal?(o)
|
121
154
|
self.class == o.class &&
|
155
|
+
error == o.error &&
|
122
156
|
id == o.id &&
|
123
|
-
sis_type == o.sis_type &&
|
124
|
-
state == o.state &&
|
125
157
|
last_sync == o.last_sync &&
|
126
|
-
|
127
|
-
pause_start == o.pause_start &&
|
158
|
+
launch_date == o.launch_date &&
|
128
159
|
pause_end == o.pause_end &&
|
129
|
-
|
160
|
+
pause_start == o.pause_start &&
|
161
|
+
sis_type == o.sis_type &&
|
162
|
+
state == o.state
|
130
163
|
end
|
131
164
|
|
132
165
|
# @see the `==` method
|
@@ -138,7 +171,7 @@ module Clever
|
|
138
171
|
# Calculates hash code according to all attributes.
|
139
172
|
# @return [Fixnum] Hash code
|
140
173
|
def hash
|
141
|
-
[
|
174
|
+
[error, id, last_sync, launch_date, pause_end, pause_start, sis_type, state].hash
|
142
175
|
end
|
143
176
|
|
144
177
|
# Builds the object from hash
|
@@ -14,24 +14,28 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class Event
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :created
|
18
18
|
|
19
19
|
attr_accessor :id
|
20
20
|
|
21
|
+
attr_accessor :type
|
22
|
+
|
21
23
|
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
25
|
def self.attribute_map
|
24
26
|
{
|
25
|
-
:'
|
26
|
-
:'id' => :'id'
|
27
|
+
:'created' => :'created',
|
28
|
+
:'id' => :'id',
|
29
|
+
:'type' => :'type'
|
27
30
|
}
|
28
31
|
end
|
29
32
|
|
30
33
|
# Attribute type mapping.
|
31
34
|
def self.swagger_types
|
32
35
|
{
|
33
|
-
:'
|
34
|
-
:'id' => :'String'
|
36
|
+
:'created' => :'String',
|
37
|
+
:'id' => :'String',
|
38
|
+
:'type' => :'String'
|
35
39
|
}
|
36
40
|
end
|
37
41
|
|
@@ -43,14 +47,18 @@ module Clever
|
|
43
47
|
# convert string to symbol for hash key
|
44
48
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
45
49
|
|
46
|
-
if attributes.has_key?(:'
|
47
|
-
self.
|
50
|
+
if attributes.has_key?(:'created')
|
51
|
+
self.created = attributes[:'created']
|
48
52
|
end
|
49
53
|
|
50
54
|
if attributes.has_key?(:'id')
|
51
55
|
self.id = attributes[:'id']
|
52
56
|
end
|
53
57
|
|
58
|
+
if attributes.has_key?(:'type')
|
59
|
+
self.type = attributes[:'type']
|
60
|
+
end
|
61
|
+
|
54
62
|
end
|
55
63
|
|
56
64
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -76,8 +84,9 @@ module Clever
|
|
76
84
|
def ==(o)
|
77
85
|
return true if self.equal?(o)
|
78
86
|
self.class == o.class &&
|
79
|
-
|
80
|
-
id == o.id
|
87
|
+
created == o.created &&
|
88
|
+
id == o.id &&
|
89
|
+
type == o.type
|
81
90
|
end
|
82
91
|
|
83
92
|
# @see the `==` method
|
@@ -89,7 +98,7 @@ module Clever
|
|
89
98
|
# Calculates hash code according to all attributes.
|
90
99
|
# @return [Fixnum] Hash code
|
91
100
|
def hash
|
92
|
-
[
|
101
|
+
[created, id, type].hash
|
93
102
|
end
|
94
103
|
|
95
104
|
# Builds the object from hash
|
@@ -18,24 +18,24 @@ module Clever
|
|
18
18
|
|
19
19
|
attr_accessor :city
|
20
20
|
|
21
|
-
attr_accessor :state
|
22
|
-
|
23
|
-
attr_accessor :zip
|
24
|
-
|
25
21
|
attr_accessor :lat
|
26
22
|
|
27
23
|
attr_accessor :lon
|
28
24
|
|
25
|
+
attr_accessor :state
|
26
|
+
|
27
|
+
attr_accessor :zip
|
28
|
+
|
29
29
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
31
|
def self.attribute_map
|
32
32
|
{
|
33
33
|
:'address' => :'address',
|
34
34
|
:'city' => :'city',
|
35
|
-
:'state' => :'state',
|
36
|
-
:'zip' => :'zip',
|
37
35
|
:'lat' => :'lat',
|
38
|
-
:'lon' => :'lon'
|
36
|
+
:'lon' => :'lon',
|
37
|
+
:'state' => :'state',
|
38
|
+
:'zip' => :'zip'
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -44,10 +44,10 @@ module Clever
|
|
44
44
|
{
|
45
45
|
:'address' => :'String',
|
46
46
|
:'city' => :'String',
|
47
|
-
:'state' => :'String',
|
48
|
-
:'zip' => :'String',
|
49
47
|
:'lat' => :'String',
|
50
|
-
:'lon' => :'String'
|
48
|
+
:'lon' => :'String',
|
49
|
+
:'state' => :'String',
|
50
|
+
:'zip' => :'String'
|
51
51
|
}
|
52
52
|
end
|
53
53
|
|
@@ -67,14 +67,6 @@ module Clever
|
|
67
67
|
self.city = attributes[:'city']
|
68
68
|
end
|
69
69
|
|
70
|
-
if attributes.has_key?(:'state')
|
71
|
-
self.state = attributes[:'state']
|
72
|
-
end
|
73
|
-
|
74
|
-
if attributes.has_key?(:'zip')
|
75
|
-
self.zip = attributes[:'zip']
|
76
|
-
end
|
77
|
-
|
78
70
|
if attributes.has_key?(:'lat')
|
79
71
|
self.lat = attributes[:'lat']
|
80
72
|
end
|
@@ -83,6 +75,14 @@ module Clever
|
|
83
75
|
self.lon = attributes[:'lon']
|
84
76
|
end
|
85
77
|
|
78
|
+
if attributes.has_key?(:'state')
|
79
|
+
self.state = attributes[:'state']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'zip')
|
83
|
+
self.zip = attributes[:'zip']
|
84
|
+
end
|
85
|
+
|
86
86
|
end
|
87
87
|
|
88
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -105,10 +105,10 @@ module Clever
|
|
105
105
|
self.class == o.class &&
|
106
106
|
address == o.address &&
|
107
107
|
city == o.city &&
|
108
|
-
state == o.state &&
|
109
|
-
zip == o.zip &&
|
110
108
|
lat == o.lat &&
|
111
|
-
lon == o.lon
|
109
|
+
lon == o.lon &&
|
110
|
+
state == o.state &&
|
111
|
+
zip == o.zip
|
112
112
|
end
|
113
113
|
|
114
114
|
# @see the `==` method
|
@@ -120,7 +120,7 @@ module Clever
|
|
120
120
|
# Calculates hash code according to all attributes.
|
121
121
|
# @return [Fixnum] Hash code
|
122
122
|
def hash
|
123
|
-
[address, city,
|
123
|
+
[address, city, lat, lon, state, zip].hash
|
124
124
|
end
|
125
125
|
|
126
126
|
# Builds the object from hash
|
@@ -16,17 +16,17 @@ module Clever
|
|
16
16
|
class Name
|
17
17
|
attr_accessor :first
|
18
18
|
|
19
|
-
attr_accessor :middle
|
20
|
-
|
21
19
|
attr_accessor :last
|
22
20
|
|
21
|
+
attr_accessor :middle
|
22
|
+
|
23
23
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
25
|
def self.attribute_map
|
26
26
|
{
|
27
27
|
:'first' => :'first',
|
28
|
-
:'
|
29
|
-
:'
|
28
|
+
:'last' => :'last',
|
29
|
+
:'middle' => :'middle'
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -34,8 +34,8 @@ module Clever
|
|
34
34
|
def self.swagger_types
|
35
35
|
{
|
36
36
|
:'first' => :'String',
|
37
|
-
:'
|
38
|
-
:'
|
37
|
+
:'last' => :'String',
|
38
|
+
:'middle' => :'String'
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -51,14 +51,14 @@ module Clever
|
|
51
51
|
self.first = attributes[:'first']
|
52
52
|
end
|
53
53
|
|
54
|
-
if attributes.has_key?(:'middle')
|
55
|
-
self.middle = attributes[:'middle']
|
56
|
-
end
|
57
|
-
|
58
54
|
if attributes.has_key?(:'last')
|
59
55
|
self.last = attributes[:'last']
|
60
56
|
end
|
61
57
|
|
58
|
+
if attributes.has_key?(:'middle')
|
59
|
+
self.middle = attributes[:'middle']
|
60
|
+
end
|
61
|
+
|
62
62
|
end
|
63
63
|
|
64
64
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -80,8 +80,8 @@ module Clever
|
|
80
80
|
return true if self.equal?(o)
|
81
81
|
self.class == o.class &&
|
82
82
|
first == o.first &&
|
83
|
-
|
84
|
-
|
83
|
+
last == o.last &&
|
84
|
+
middle == o.middle
|
85
85
|
end
|
86
86
|
|
87
87
|
# @see the `==` method
|
@@ -93,7 +93,7 @@ module Clever
|
|
93
93
|
# Calculates hash code according to all attributes.
|
94
94
|
# @return [Fixnum] Hash code
|
95
95
|
def hash
|
96
|
-
[first,
|
96
|
+
[first, last, middle].hash
|
97
97
|
end
|
98
98
|
|
99
99
|
# Builds the object from hash
|
@@ -14,24 +14,24 @@ require 'date'
|
|
14
14
|
module Clever
|
15
15
|
|
16
16
|
class Principal
|
17
|
-
attr_accessor :name
|
18
|
-
|
19
17
|
attr_accessor :email
|
20
18
|
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
21
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
23
|
def self.attribute_map
|
24
24
|
{
|
25
|
-
:'
|
26
|
-
:'
|
25
|
+
:'email' => :'email',
|
26
|
+
:'name' => :'name'
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
30
|
# Attribute type mapping.
|
31
31
|
def self.swagger_types
|
32
32
|
{
|
33
|
-
:'
|
34
|
-
:'
|
33
|
+
:'email' => :'String',
|
34
|
+
:'name' => :'String'
|
35
35
|
}
|
36
36
|
end
|
37
37
|
|
@@ -43,14 +43,14 @@ module Clever
|
|
43
43
|
# convert string to symbol for hash key
|
44
44
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
45
45
|
|
46
|
-
if attributes.has_key?(:'name')
|
47
|
-
self.name = attributes[:'name']
|
48
|
-
end
|
49
|
-
|
50
46
|
if attributes.has_key?(:'email')
|
51
47
|
self.email = attributes[:'email']
|
52
48
|
end
|
53
49
|
|
50
|
+
if attributes.has_key?(:'name')
|
51
|
+
self.name = attributes[:'name']
|
52
|
+
end
|
53
|
+
|
54
54
|
end
|
55
55
|
|
56
56
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -71,8 +71,8 @@ module Clever
|
|
71
71
|
def ==(o)
|
72
72
|
return true if self.equal?(o)
|
73
73
|
self.class == o.class &&
|
74
|
-
|
75
|
-
|
74
|
+
email == o.email &&
|
75
|
+
name == o.name
|
76
76
|
end
|
77
77
|
|
78
78
|
# @see the `==` method
|
@@ -84,7 +84,7 @@ module Clever
|
|
84
84
|
# Calculates hash code according to all attributes.
|
85
85
|
# @return [Fixnum] Hash code
|
86
86
|
def hash
|
87
|
-
[
|
87
|
+
[email, name].hash
|
88
88
|
end
|
89
89
|
|
90
90
|
# Builds the object from hash
|