rustici_software_cloud_v2 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +355 -356
  4. data/lib/rustici_software_cloud_v2/api/about_api.rb +4 -4
  5. data/lib/rustici_software_cloud_v2/api/application_management_api.rb +190 -62
  6. data/lib/rustici_software_cloud_v2/api/authentication_api.rb +9 -17
  7. data/lib/rustici_software_cloud_v2/api/course_api.rb +903 -196
  8. data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +458 -268
  9. data/lib/rustici_software_cloud_v2/api/invitations_api.rb +212 -170
  10. data/lib/rustici_software_cloud_v2/api/learner_api.rb +48 -48
  11. data/lib/rustici_software_cloud_v2/api/ping_api.rb +2 -0
  12. data/lib/rustici_software_cloud_v2/api/registration_api.rb +255 -269
  13. data/lib/rustici_software_cloud_v2/api/reporting_api.rb +19 -23
  14. data/lib/rustici_software_cloud_v2/api/xapi_api.rb +81 -66
  15. data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +124 -55
  16. data/lib/rustici_software_cloud_v2/api_client.rb +2 -2
  17. data/lib/rustici_software_cloud_v2/configuration.rb +3 -3
  18. data/lib/rustici_software_cloud_v2/models/about_schema.rb +3 -1
  19. data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +8 -36
  20. data/lib/rustici_software_cloud_v2/models/application_info_schema.rb +234 -0
  21. data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +3 -1
  22. data/lib/rustici_software_cloud_v2/models/application_request_schema.rb +186 -0
  23. data/lib/rustici_software_cloud_v2/models/application_schema.rb +3 -1
  24. data/lib/rustici_software_cloud_v2/models/application_token.rb +3 -1
  25. data/lib/rustici_software_cloud_v2/models/asset_file_schema.rb +194 -0
  26. data/lib/rustici_software_cloud_v2/models/batch_tags_schema.rb +3 -1
  27. data/lib/rustici_software_cloud_v2/models/comment_schema.rb +3 -1
  28. data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +3 -1
  29. data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +5 -29
  30. data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +3 -1
  31. data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +4 -1
  32. data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +3 -1
  33. data/lib/rustici_software_cloud_v2/models/course_schema.rb +5 -29
  34. data/lib/rustici_software_cloud_v2/models/create_dispatch_id_schema.rb +2 -19
  35. data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +3 -1
  36. data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +4 -2
  37. data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +4 -2
  38. data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +4 -2
  39. data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +3 -1
  40. data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +3 -1
  41. data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +3 -1
  42. data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +3 -1
  43. data/lib/rustici_software_cloud_v2/models/credential_schema.rb +3 -1
  44. data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +3 -1
  45. data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +4 -2
  46. data/lib/rustici_software_cloud_v2/models/destination_schema.rb +3 -1
  47. data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +3 -1
  48. data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +4 -1
  49. data/lib/rustici_software_cloud_v2/models/dispatch_lti_info_schema.rb +221 -0
  50. data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +3 -1
  51. data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +43 -3
  52. data/lib/rustici_software_cloud_v2/models/enabled_schema.rb +3 -1
  53. data/lib/rustici_software_cloud_v2/models/file_list_item_schema.rb +205 -0
  54. data/lib/rustici_software_cloud_v2/models/file_list_schema.rb +187 -0
  55. data/lib/rustici_software_cloud_v2/models/import_asset_request_schema.rb +207 -0
  56. data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +29 -6
  57. data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +5 -29
  58. data/lib/rustici_software_cloud_v2/models/import_media_file_reference_request_schema.rb +216 -0
  59. data/lib/rustici_software_cloud_v2/models/import_request_schema.rb +195 -0
  60. data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +3 -1
  61. data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +3 -1
  62. data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +3 -1
  63. data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +5 -29
  64. data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +4 -1
  65. data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +3 -1
  66. data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +3 -1
  67. data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +3 -1
  68. data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +5 -29
  69. data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +3 -1
  70. data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +8 -36
  71. data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +5 -3
  72. data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +3 -1
  73. data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +3 -1
  74. data/lib/rustici_software_cloud_v2/models/learner_schema.rb +3 -1
  75. data/lib/rustici_software_cloud_v2/models/media_file_metadata_schema.rb +213 -0
  76. data/lib/rustici_software_cloud_v2/models/message_schema.rb +3 -1
  77. data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +10 -8
  78. data/lib/rustici_software_cloud_v2/models/objective_schema.rb +11 -43
  79. data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +3 -1
  80. data/lib/rustici_software_cloud_v2/models/ping_schema.rb +3 -1
  81. data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +8 -36
  82. data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +4 -1
  83. data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +5 -3
  84. data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +215 -0
  85. data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +4 -1
  86. data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +6 -4
  87. data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +228 -0
  88. data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +4 -1
  89. data/lib/rustici_software_cloud_v2/models/registration_schema.rb +3 -1
  90. data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +3 -1
  91. data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +3 -1
  92. data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +3 -1
  93. data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +3 -1
  94. data/lib/rustici_software_cloud_v2/models/response_error.rb +3 -1
  95. data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +5 -29
  96. data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +8 -36
  97. data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +5 -29
  98. data/lib/rustici_software_cloud_v2/models/score_schema.rb +3 -1
  99. data/lib/rustici_software_cloud_v2/models/setting_item.rb +5 -29
  100. data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +3 -1
  101. data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +5 -29
  102. data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +3 -1
  103. data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +3 -1
  104. data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +3 -1
  105. data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +3 -1
  106. data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +3 -1
  107. data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +3 -1
  108. data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +3 -1
  109. data/lib/rustici_software_cloud_v2/models/title_schema.rb +3 -1
  110. data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +3 -1
  111. data/lib/rustici_software_cloud_v2/models/update_application_schema.rb +196 -0
  112. data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +15 -3
  113. data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +4 -1
  114. data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +3 -1
  115. data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +3 -1
  116. data/lib/rustici_software_cloud_v2/models/xapi_account.rb +3 -1
  117. data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +3 -1
  118. data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +3 -1
  119. data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +5 -29
  120. data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +3 -1
  121. data/lib/rustici_software_cloud_v2/models/xapi_context.rb +3 -1
  122. data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +3 -1
  123. data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +5 -29
  124. data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +5 -29
  125. data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +3 -1
  126. data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +3 -1
  127. data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +3 -1
  128. data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +4 -1
  129. data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +3 -1
  130. data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +3 -1
  131. data/lib/rustici_software_cloud_v2/models/xapi_result.rb +3 -1
  132. data/lib/rustici_software_cloud_v2/models/xapi_score.rb +3 -1
  133. data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +3 -1
  134. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +3 -1
  135. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +3 -1
  136. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +3 -1
  137. data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +3 -1
  138. data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +3 -1
  139. data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +3 -1
  140. data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +3 -1
  141. data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +3 -1
  142. data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +13 -1
  143. data/lib/rustici_software_cloud_v2/version.rb +1 -1
  144. data/lib/rustici_software_cloud_v2.rb +13 -0
  145. data/rustici_software_cloud_v2.gemspec +2 -1
  146. data/spec/api_client_spec.rb +17 -0
  147. metadata +35 -2
@@ -16,6 +16,7 @@ module RusticiSoftwareCloudV2
16
16
  class DispatchListSchema
17
17
  attr_accessor :dispatches
18
18
 
19
+ # Token for getting the next set of results, from the prior set of results.
19
20
  attr_accessor :more
20
21
 
21
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -66,6 +67,7 @@ module RusticiSoftwareCloudV2
66
67
  true
67
68
  end
68
69
 
70
+
69
71
  # Checks equality by comparing each attribute.
70
72
  # @param [Object] Object to be compared
71
73
  def ==(o)
@@ -94,7 +96,7 @@ module RusticiSoftwareCloudV2
94
96
  return nil unless attributes.is_a?(Hash)
95
97
  self.class.swagger_types.each_pair do |key, type|
96
98
  if type =~ /\AArray<(.*)>/i
97
- # check to ensure the input is an array given that the the attribute
99
+ # check to ensure the input is an array given that the attribute
98
100
  # is documented as an array but the input is not
99
101
  if attributes[self.class.attribute_map[key]].is_a?(Array)
100
102
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -190,5 +192,6 @@ module RusticiSoftwareCloudV2
190
192
  value
191
193
  end
192
194
  end
195
+
193
196
  end
194
197
  end
@@ -0,0 +1,221 @@
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
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class DispatchLtiInfoSchema
17
+ # The LTI launch URL for this dispatch
18
+ attr_accessor :url
19
+
20
+ # The OAuth consumer key that identifies the tool consumer for this dispatch.
21
+ attr_accessor :consumer_key
22
+
23
+ # The OAuth secret to be used for LTI authentication for this dispatch.
24
+ attr_accessor :shared_secret
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'url' => :'url',
30
+ :'consumer_key' => :'consumerKey',
31
+ :'shared_secret' => :'sharedSecret'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'url' => :'String',
39
+ :'consumer_key' => :'String',
40
+ :'shared_secret' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ if attributes.has_key?(:'url')
53
+ self.url = attributes[:'url']
54
+ end
55
+
56
+ if attributes.has_key?(:'consumerKey')
57
+ self.consumer_key = attributes[:'consumerKey']
58
+ end
59
+
60
+ if attributes.has_key?(:'sharedSecret')
61
+ self.shared_secret = attributes[:'sharedSecret']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if @url.nil?
70
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
71
+ end
72
+
73
+ if @consumer_key.nil?
74
+ invalid_properties.push('invalid value for "consumer_key", consumer_key cannot be nil.')
75
+ end
76
+
77
+ if @shared_secret.nil?
78
+ invalid_properties.push('invalid value for "shared_secret", shared_secret cannot be nil.')
79
+ end
80
+
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return false if @url.nil?
88
+ return false if @consumer_key.nil?
89
+ return false if @shared_secret.nil?
90
+ true
91
+ end
92
+
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ url == o.url &&
100
+ consumer_key == o.consumer_key &&
101
+ shared_secret == o.shared_secret
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [url, consumer_key, shared_secret].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+ end
@@ -64,6 +64,7 @@ module RusticiSoftwareCloudV2
64
64
  true
65
65
  end
66
66
 
67
+
67
68
  # Checks equality by comparing each attribute.
68
69
  # @param [Object] Object to be compared
69
70
  def ==(o)
@@ -92,7 +93,7 @@ module RusticiSoftwareCloudV2
92
93
  return nil unless attributes.is_a?(Hash)
93
94
  self.class.swagger_types.each_pair do |key, type|
94
95
  if type =~ /\AArray<(.*)>/i
95
- # check to ensure the input is an array given that the the attribute
96
+ # check to ensure the input is an array given that the attribute
96
97
  # is documented as an array but the input is not
97
98
  if attributes[self.class.attribute_map[key]].is_a?(Array)
98
99
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -188,5 +189,6 @@ module RusticiSoftwareCloudV2
188
189
  value
189
190
  end
190
191
  end
192
+
191
193
  end
192
194
  end
@@ -17,9 +17,19 @@ module RusticiSoftwareCloudV2
17
17
  # Destination ID.
18
18
  attr_accessor :destination_id
19
19
 
20
+ # Name of the destination housing this dispatch
21
+ attr_accessor :destination_name
22
+
20
23
  # Serialized external package ID.
21
24
  attr_accessor :course_id
22
25
 
26
+ # Title of this dispatched course
27
+ attr_accessor :course_title
28
+
29
+ attr_accessor :updated
30
+
31
+ attr_accessor :created
32
+
23
33
  # If true, then new registrations can be created for this dispatch.
24
34
  attr_accessor :allow_new_registrations
25
35
 
@@ -35,7 +45,7 @@ module RusticiSoftwareCloudV2
35
45
  # The current number of registrations that have been created for this dispatch.
36
46
  attr_accessor :registration_count
37
47
 
38
- # The date after which this dispatch will be disabled as an ISO 8601 string, or 'none' for no expiration date.
48
+ # The ISO 8601 TimeStamp (defaults to UTC) after which this dispatch will be disabled. An empty value will represent no expiration date.
39
49
  attr_accessor :expiration_date
40
50
 
41
51
  # The tags to associate with this Dispatch.
@@ -51,7 +61,11 @@ module RusticiSoftwareCloudV2
51
61
  def self.attribute_map
52
62
  {
53
63
  :'destination_id' => :'destinationId',
64
+ :'destination_name' => :'destinationName',
54
65
  :'course_id' => :'courseId',
66
+ :'course_title' => :'courseTitle',
67
+ :'updated' => :'updated',
68
+ :'created' => :'created',
55
69
  :'allow_new_registrations' => :'allowNewRegistrations',
56
70
  :'enabled' => :'enabled',
57
71
  :'instanced' => :'instanced',
@@ -68,7 +82,11 @@ module RusticiSoftwareCloudV2
68
82
  def self.swagger_types
69
83
  {
70
84
  :'destination_id' => :'String',
85
+ :'destination_name' => :'String',
71
86
  :'course_id' => :'String',
87
+ :'course_title' => :'String',
88
+ :'updated' => :'DateTime',
89
+ :'created' => :'DateTime',
72
90
  :'allow_new_registrations' => :'BOOLEAN',
73
91
  :'enabled' => :'BOOLEAN',
74
92
  :'instanced' => :'BOOLEAN',
@@ -93,10 +111,26 @@ module RusticiSoftwareCloudV2
93
111
  self.destination_id = attributes[:'destinationId']
94
112
  end
95
113
 
114
+ if attributes.has_key?(:'destinationName')
115
+ self.destination_name = attributes[:'destinationName']
116
+ end
117
+
96
118
  if attributes.has_key?(:'courseId')
97
119
  self.course_id = attributes[:'courseId']
98
120
  end
99
121
 
122
+ if attributes.has_key?(:'courseTitle')
123
+ self.course_title = attributes[:'courseTitle']
124
+ end
125
+
126
+ if attributes.has_key?(:'updated')
127
+ self.updated = attributes[:'updated']
128
+ end
129
+
130
+ if attributes.has_key?(:'created')
131
+ self.created = attributes[:'created']
132
+ end
133
+
100
134
  if attributes.has_key?(:'allowNewRegistrations')
101
135
  self.allow_new_registrations = attributes[:'allowNewRegistrations']
102
136
  end
@@ -149,13 +183,18 @@ module RusticiSoftwareCloudV2
149
183
  true
150
184
  end
151
185
 
186
+
152
187
  # Checks equality by comparing each attribute.
153
188
  # @param [Object] Object to be compared
154
189
  def ==(o)
155
190
  return true if self.equal?(o)
156
191
  self.class == o.class &&
157
192
  destination_id == o.destination_id &&
193
+ destination_name == o.destination_name &&
158
194
  course_id == o.course_id &&
195
+ course_title == o.course_title &&
196
+ updated == o.updated &&
197
+ created == o.created &&
159
198
  allow_new_registrations == o.allow_new_registrations &&
160
199
  enabled == o.enabled &&
161
200
  instanced == o.instanced &&
@@ -176,7 +215,7 @@ module RusticiSoftwareCloudV2
176
215
  # Calculates hash code according to all attributes.
177
216
  # @return [Fixnum] Hash code
178
217
  def hash
179
- [destination_id, course_id, allow_new_registrations, enabled, instanced, registration_cap, registration_count, expiration_date, tags, email, notes].hash
218
+ [destination_id, destination_name, course_id, course_title, updated, created, allow_new_registrations, enabled, instanced, registration_cap, registration_count, expiration_date, tags, email, notes].hash
180
219
  end
181
220
 
182
221
  # Builds the object from hash
@@ -186,7 +225,7 @@ module RusticiSoftwareCloudV2
186
225
  return nil unless attributes.is_a?(Hash)
187
226
  self.class.swagger_types.each_pair do |key, type|
188
227
  if type =~ /\AArray<(.*)>/i
189
- # check to ensure the input is an array given that the the attribute
228
+ # check to ensure the input is an array given that the attribute
190
229
  # is documented as an array but the input is not
191
230
  if attributes[self.class.attribute_map[key]].is_a?(Array)
192
231
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -282,5 +321,6 @@ module RusticiSoftwareCloudV2
282
321
  value
283
322
  end
284
323
  end
324
+
285
325
  end
286
326
  end
@@ -56,6 +56,7 @@ module RusticiSoftwareCloudV2
56
56
  true
57
57
  end
58
58
 
59
+
59
60
  # Checks equality by comparing each attribute.
60
61
  # @param [Object] Object to be compared
61
62
  def ==(o)
@@ -83,7 +84,7 @@ module RusticiSoftwareCloudV2
83
84
  return nil unless attributes.is_a?(Hash)
84
85
  self.class.swagger_types.each_pair do |key, type|
85
86
  if type =~ /\AArray<(.*)>/i
86
- # check to ensure the input is an array given that the the attribute
87
+ # check to ensure the input is an array given that the attribute
87
88
  # is documented as an array but the input is not
88
89
  if attributes[self.class.attribute_map[key]].is_a?(Array)
89
90
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
@@ -179,5 +180,6 @@ module RusticiSoftwareCloudV2
179
180
  value
180
181
  end
181
182
  end
183
+
182
184
  end
183
185
  end
@@ -0,0 +1,205 @@
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
+ Swagger Codegen version: 2.4.12
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module RusticiSoftwareCloudV2
16
+ class FileListItemSchema
17
+ # Relative file path of the file. Used in asset manipulation calls
18
+ attr_accessor :path
19
+
20
+ # File size in bytes of the file
21
+ attr_accessor :size
22
+
23
+ attr_accessor :modified
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'path' => :'path',
29
+ :'size' => :'size',
30
+ :'modified' => :'modified'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'path' => :'String',
38
+ :'size' => :'Integer',
39
+ :'modified' => :'DateTime'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'path')
52
+ self.path = attributes[:'path']
53
+ end
54
+
55
+ if attributes.has_key?(:'size')
56
+ self.size = attributes[:'size']
57
+ end
58
+
59
+ if attributes.has_key?(:'modified')
60
+ self.modified = attributes[:'modified']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ path == o.path &&
84
+ size == o.size &&
85
+ modified == o.modified
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Fixnum] Hash code
96
+ def hash
97
+ [path, size, modified].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :BOOLEAN
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ temp_model = RusticiSoftwareCloudV2.const_get(type).new
158
+ temp_model.build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ next if value.nil?
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ # Outputs non-array value in the form of hash
187
+ # For object, use to_hash. Otherwise, just return the value
188
+ # @param [Object] value Any valid value
189
+ # @return [Hash] Returns the value in the form of hash
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map { |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+ end