rustici_software_cloud_v2 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/rustici_software_cloud_v2/api/application_management_api.rb +5 -5
  4. data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +14 -8
  5. data/lib/rustici_software_cloud_v2/api/invitations_api.rb +2 -2
  6. data/lib/rustici_software_cloud_v2/api_client.rb +1 -1
  7. data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +24 -4
  8. data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +1 -1
  9. data/lib/rustici_software_cloud_v2/models/credential_schema.rb +24 -4
  10. data/lib/rustici_software_cloud_v2/models/{credential_created_schema.rb → destination_info_id_schema.rb} +9 -39
  11. data/lib/rustici_software_cloud_v2/models/destination_info_list_schema.rb +198 -0
  12. data/lib/rustici_software_cloud_v2/models/destination_info_schema.rb +263 -0
  13. data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +4 -14
  14. data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +15 -4
  15. data/lib/rustici_software_cloud_v2/models/preview_launch_link_request_schema.rb +239 -0
  16. data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +1 -1
  17. data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +1 -1
  18. data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +3 -3
  19. data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +3 -3
  20. data/lib/rustici_software_cloud_v2/version.rb +1 -1
  21. data/lib/rustici_software_cloud_v2.rb +4 -1
  22. metadata +6 -3
@@ -0,0 +1,198 @@
1
+ =begin
2
+ #SCORM Cloud Rest API
3
+
4
+ #REST API used for SCORM Cloud integrations.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require 'date'
13
+
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class DestinationInfoListSchema
17
+ #
18
+ attr_accessor :destinations
19
+
20
+ # Token for getting the next set of results, from the prior set of results.
21
+ attr_accessor :more
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'destinations' => :'destinations',
27
+ :'more' => :'more'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'destinations' => :'Array<DestinationInfoIdSchema>',
35
+ :'more' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'destinations')
48
+ if (value = attributes[:'destinations']).is_a?(Array)
49
+ self.destinations = value
50
+ end
51
+ end
52
+
53
+ if attributes.has_key?(:'more')
54
+ self.more = attributes[:'more']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ destinations == o.destinations &&
78
+ more == o.more
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [destinations, more].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.swagger_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :String
124
+ value.to_s
125
+ when :Integer
126
+ value.to_i
127
+ when :Float
128
+ value.to_f
129
+ when :BOOLEAN
130
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
131
+ true
132
+ else
133
+ false
134
+ end
135
+ when :Object
136
+ # generic object (usually a Hash), return directly
137
+ value
138
+ when /\AArray<(?<inner_type>.+)>\z/
139
+ inner_type = Regexp.last_match[:inner_type]
140
+ value.map { |v| _deserialize(inner_type, v) }
141
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
142
+ k_type = Regexp.last_match[:k_type]
143
+ v_type = Regexp.last_match[:v_type]
144
+ {}.tap do |hash|
145
+ value.each do |k, v|
146
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ end
148
+ end
149
+ else # model
150
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
151
+ temp_model.build_from_hash(value)
152
+ end
153
+ end
154
+
155
+ # Returns the string representation of the object
156
+ # @return [String] String presentation of the object
157
+ def to_s
158
+ to_hash.to_s
159
+ end
160
+
161
+ # to_body is an alias to to_hash (backward compatibility)
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_body
164
+ to_hash
165
+ end
166
+
167
+ # Returns the object in the form of hash
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_hash
170
+ hash = {}
171
+ self.class.attribute_map.each_pair do |attr, param|
172
+ value = self.send(attr)
173
+ next if value.nil?
174
+ hash[param] = _to_hash(value)
175
+ end
176
+ hash
177
+ end
178
+
179
+ # Outputs non-array value in the form of hash
180
+ # For object, use to_hash. Otherwise, just return the value
181
+ # @param [Object] value Any valid value
182
+ # @return [Hash] Returns the value in the form of hash
183
+ def _to_hash(value)
184
+ if value.is_a?(Array)
185
+ value.compact.map { |v| _to_hash(v) }
186
+ elsif value.is_a?(Hash)
187
+ {}.tap do |hash|
188
+ value.each { |k, v| hash[k] = _to_hash(v) }
189
+ end
190
+ elsif value.respond_to? :to_hash
191
+ value.to_hash
192
+ else
193
+ value
194
+ end
195
+ end
196
+
197
+ end
198
+ end
@@ -0,0 +1,263 @@
1
+ =begin
2
+ #SCORM Cloud Rest API
3
+
4
+ #REST API used for SCORM Cloud integrations.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require 'date'
13
+
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class DestinationInfoSchema
17
+ # The destination's name.
18
+ attr_accessor :name
19
+
20
+ attr_accessor :dispatch_count
21
+
22
+ attr_accessor :updated
23
+
24
+ attr_accessor :created
25
+
26
+ # Optional array of tags.
27
+ attr_accessor :tags
28
+
29
+ # SCORM Cloud user e-mail associated with this destination. If this is not provided, it will default to the owner of the Realm.
30
+ attr_accessor :email
31
+
32
+ # Any provided notes about this Destination
33
+ attr_accessor :notes
34
+
35
+ attr_accessor :launch_auth
36
+
37
+ attr_accessor :lti13_data
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'name' => :'name',
43
+ :'dispatch_count' => :'dispatchCount',
44
+ :'updated' => :'updated',
45
+ :'created' => :'created',
46
+ :'tags' => :'tags',
47
+ :'email' => :'email',
48
+ :'notes' => :'notes',
49
+ :'launch_auth' => :'launchAuth',
50
+ :'lti13_data' => :'lti13Data'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'name' => :'String',
58
+ :'dispatch_count' => :'Integer',
59
+ :'updated' => :'DateTime',
60
+ :'created' => :'DateTime',
61
+ :'tags' => :'Array<String>',
62
+ :'email' => :'String',
63
+ :'notes' => :'String',
64
+ :'launch_auth' => :'LaunchAuthSchema',
65
+ :'lti13_data' => :'Lti13PlatformConfigurationSchema'
66
+ }
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ return unless attributes.is_a?(Hash)
73
+
74
+ # convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
+
77
+ if attributes.has_key?(:'name')
78
+ self.name = attributes[:'name']
79
+ end
80
+
81
+ if attributes.has_key?(:'dispatchCount')
82
+ self.dispatch_count = attributes[:'dispatchCount']
83
+ end
84
+
85
+ if attributes.has_key?(:'updated')
86
+ self.updated = attributes[:'updated']
87
+ end
88
+
89
+ if attributes.has_key?(:'created')
90
+ self.created = attributes[:'created']
91
+ end
92
+
93
+ if attributes.has_key?(:'tags')
94
+ if (value = attributes[:'tags']).is_a?(Array)
95
+ self.tags = value
96
+ end
97
+ end
98
+
99
+ if attributes.has_key?(:'email')
100
+ self.email = attributes[:'email']
101
+ end
102
+
103
+ if attributes.has_key?(:'notes')
104
+ self.notes = attributes[:'notes']
105
+ end
106
+
107
+ if attributes.has_key?(:'launchAuth')
108
+ self.launch_auth = attributes[:'launchAuth']
109
+ end
110
+
111
+ if attributes.has_key?(:'lti13Data')
112
+ self.lti13_data = attributes[:'lti13Data']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ true
127
+ end
128
+
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ name == o.name &&
136
+ dispatch_count == o.dispatch_count &&
137
+ updated == o.updated &&
138
+ created == o.created &&
139
+ tags == o.tags &&
140
+ email == o.email &&
141
+ notes == o.notes &&
142
+ launch_auth == o.launch_auth &&
143
+ lti13_data == o.lti13_data
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Fixnum] Hash code
154
+ def hash
155
+ [name, dispatch_count, updated, created, tags, email, notes, launch_auth, lti13_data].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ self.class.swagger_types.each_pair do |key, type|
164
+ if type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
168
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !attributes[self.class.attribute_map[key]].nil?
171
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :DateTime
185
+ DateTime.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :BOOLEAN
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
216
+ temp_model.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ next if value.nil?
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+
262
+ end
263
+ end
@@ -17,22 +17,17 @@ module RusticiSoftwareCloudV2
17
17
  #
18
18
  attr_accessor :destinations
19
19
 
20
- # Token for getting the next set of results, from the prior set of results.
21
- attr_accessor :more
22
-
23
20
  # Attribute mapping from ruby-style variable name to JSON key.
24
21
  def self.attribute_map
25
22
  {
26
- :'destinations' => :'destinations',
27
- :'more' => :'more'
23
+ :'destinations' => :'destinations'
28
24
  }
29
25
  end
30
26
 
31
27
  # Attribute type mapping.
32
28
  def self.swagger_types
33
29
  {
34
- :'destinations' => :'Array<DestinationIdSchema>',
35
- :'more' => :'String'
30
+ :'destinations' => :'Array<DestinationIdSchema>'
36
31
  }
37
32
  end
38
33
 
@@ -49,10 +44,6 @@ module RusticiSoftwareCloudV2
49
44
  self.destinations = value
50
45
  end
51
46
  end
52
-
53
- if attributes.has_key?(:'more')
54
- self.more = attributes[:'more']
55
- end
56
47
  end
57
48
 
58
49
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -74,8 +65,7 @@ module RusticiSoftwareCloudV2
74
65
  def ==(o)
75
66
  return true if self.equal?(o)
76
67
  self.class == o.class &&
77
- destinations == o.destinations &&
78
- more == o.more
68
+ destinations == o.destinations
79
69
  end
80
70
 
81
71
  # @see the `==` method
@@ -87,7 +77,7 @@ module RusticiSoftwareCloudV2
87
77
  # Calculates hash code according to all attributes.
88
78
  # @return [Fixnum] Hash code
89
79
  def hash
90
- [destinations, more].hash
80
+ [destinations].hash
91
81
  end
92
82
 
93
83
  # Builds the object from hash
@@ -14,6 +14,7 @@ require 'date'
14
14
 
15
15
  module RusticiSoftwareCloudV2
16
16
  class LaunchHistorySchema
17
+ # Identifier for the registration associated with this record
17
18
  attr_accessor :id
18
19
 
19
20
  attr_accessor :instance
@@ -37,6 +38,9 @@ module RusticiSoftwareCloudV2
37
38
  # The time of the last runtime update in UTC
38
39
  attr_accessor :last_runtime_update
39
40
 
41
+ # A unique identifier for this launch history record
42
+ attr_accessor :launch_history_id
43
+
40
44
  # Attribute mapping from ruby-style variable name to JSON key.
41
45
  def self.attribute_map
42
46
  {
@@ -49,7 +53,8 @@ module RusticiSoftwareCloudV2
49
53
  :'total_seconds_tracked' => :'totalSecondsTracked',
50
54
  :'launch_time' => :'launchTime',
51
55
  :'exit_time' => :'exitTime',
52
- :'last_runtime_update' => :'lastRuntimeUpdate'
56
+ :'last_runtime_update' => :'lastRuntimeUpdate',
57
+ :'launch_history_id' => :'launchHistoryId'
53
58
  }
54
59
  end
55
60
 
@@ -65,7 +70,8 @@ module RusticiSoftwareCloudV2
65
70
  :'total_seconds_tracked' => :'Float',
66
71
  :'launch_time' => :'DateTime',
67
72
  :'exit_time' => :'DateTime',
68
- :'last_runtime_update' => :'DateTime'
73
+ :'last_runtime_update' => :'DateTime',
74
+ :'launch_history_id' => :'String'
69
75
  }
70
76
  end
71
77
 
@@ -120,6 +126,10 @@ module RusticiSoftwareCloudV2
120
126
  if attributes.has_key?(:'lastRuntimeUpdate')
121
127
  self.last_runtime_update = attributes[:'lastRuntimeUpdate']
122
128
  end
129
+
130
+ if attributes.has_key?(:'launchHistoryId')
131
+ self.launch_history_id = attributes[:'launchHistoryId']
132
+ end
123
133
  end
124
134
 
125
135
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +176,8 @@ module RusticiSoftwareCloudV2
166
176
  total_seconds_tracked == o.total_seconds_tracked &&
167
177
  launch_time == o.launch_time &&
168
178
  exit_time == o.exit_time &&
169
- last_runtime_update == o.last_runtime_update
179
+ last_runtime_update == o.last_runtime_update &&
180
+ launch_history_id == o.launch_history_id
170
181
  end
171
182
 
172
183
  # @see the `==` method
@@ -178,7 +189,7 @@ module RusticiSoftwareCloudV2
178
189
  # Calculates hash code according to all attributes.
179
190
  # @return [Fixnum] Hash code
180
191
  def hash
181
- [id, instance, score, completion_status, success_status, history_log, total_seconds_tracked, launch_time, exit_time, last_runtime_update].hash
192
+ [id, instance, score, completion_status, success_status, history_log, total_seconds_tracked, launch_time, exit_time, last_runtime_update, launch_history_id].hash
182
193
  end
183
194
 
184
195
  # Builds the object from hash