rustici_software_cloud_v2 1.0.0beta → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/README.md +354 -243
- data/lib/rustici_software_cloud_v2/api/about_api.rb +71 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +253 -63
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +11 -17
- data/lib/rustici_software_cloud_v2/api/course_api.rb +910 -160
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +2236 -0
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +1025 -0
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +367 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +6 -4
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +448 -295
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +191 -0
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +581 -0
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +528 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +5 -5
- data/lib/rustici_software_cloud_v2/api_error.rb +2 -2
- data/lib/rustici_software_cloud_v2/configuration.rb +11 -20
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/application_info_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/{link_schema.rb → application_request_schema.rb} +14 -16
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/application_token.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/asset_file_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/{course_tags_batch_schema.rb → batch_tags_schema.rb} +21 -17
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/{registration_tags_batch_schema.rb → create_dispatch_id_schema.rb} +25 -25
- data/lib/rustici_software_cloud_v2/models/create_dispatch_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +306 -0
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +250 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/destination_schema.rb +227 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +197 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_lti_info_schema.rb +221 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +326 -0
- data/lib/rustici_software_cloud_v2/models/{tag_post_schema.rb → enabled_schema.rb} +17 -6
- data/lib/rustici_software_cloud_v2/models/file_list_item_schema.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/file_list_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/import_asset_request_schema.rb +207 -0
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +31 -8
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/import_media_file_reference_request_schema.rb +216 -0
- data/lib/rustici_software_cloud_v2/models/import_request_schema.rb +195 -0
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +226 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +225 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_auth_options_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/launch_auth_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +25 -9
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/media_file_metadata_schema.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +12 -10
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +13 -45
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +21 -15
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +24 -42
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_update_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +287 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_update_schema.rb +228 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +6 -3
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +17 -4
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +2 -2
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +257 -0
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +212 -0
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +10 -38
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/update_application_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +234 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +213 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +7 -31
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +193 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +255 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_put_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +264 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credentials_list_schema.rb +202 -0
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +203 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +192 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_put_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +239 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +5 -3
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +185 -0
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +204 -0
- data/lib/rustici_software_cloud_v2/version.rb +3 -3
- data/lib/rustici_software_cloud_v2.rb +68 -6
- data/rustici_software_cloud_v2.gemspec +8 -7
- data/spec/api_client_spec.rb +53 -47
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -13
- metadata +142 -270
- data/docs/ActivityResultSchema.md +0 -20
- data/docs/ApplicationListSchema.md +0 -8
- data/docs/ApplicationManagementApi.md +0 -570
- data/docs/ApplicationSchema.md +0 -9
- data/docs/ApplicationToken.md +0 -10
- data/docs/AuthenticationApi.md +0 -64
- data/docs/CommentSchema.md +0 -10
- data/docs/CompletionAmountSchema.md +0 -8
- data/docs/CourseActivitySchema.md +0 -15
- data/docs/CourseApi.md +0 -1459
- data/docs/CourseListNonPagedSchema.md +0 -8
- data/docs/CourseListSchema.md +0 -9
- data/docs/CourseReferenceSchema.md +0 -10
- data/docs/CourseSchema.md +0 -20
- data/docs/CourseTagsBatchSchema.md +0 -9
- data/docs/CreateRegistrationSchema.md +0 -17
- data/docs/CredentialCreatedSchema.md +0 -12
- data/docs/CredentialListSchema.md +0 -8
- data/docs/CredentialRequestSchema.md +0 -9
- data/docs/CredentialSchema.md +0 -12
- data/docs/ImportFetchRequestSchema.md +0 -8
- data/docs/ImportJobResultSchema.md +0 -11
- data/docs/ImportResultSchema.md +0 -11
- data/docs/IntegerResultSchema.md +0 -8
- data/docs/ItemValuePairSchema.md +0 -9
- data/docs/LaunchHistoryListSchema.md +0 -8
- data/docs/LaunchHistorySchema.md +0 -17
- data/docs/LaunchLinkRequestSchema.md +0 -17
- data/docs/LaunchLinkSchema.md +0 -8
- data/docs/LearnerPreferenceSchema.md +0 -11
- data/docs/LearnerSchema.md +0 -11
- data/docs/LinkSchema.md +0 -8
- data/docs/MessageSchema.md +0 -8
- data/docs/MetadataSchema.md +0 -14
- data/docs/ObjectiveSchema.md +0 -20
- data/docs/PermissionsSchema.md +0 -9
- data/docs/PingApi.md +0 -57
- data/docs/PingSchema.md +0 -8
- data/docs/PostBackSchema.md +0 -12
- data/docs/RegistrationApi.md +0 -1490
- data/docs/RegistrationCompletion.md +0 -7
- data/docs/RegistrationListSchema.md +0 -9
- data/docs/RegistrationSchema.md +0 -27
- data/docs/RegistrationSuccess.md +0 -7
- data/docs/RegistrationTagsBatchSchema.md +0 -9
- data/docs/ResponseError.md +0 -8
- data/docs/RuntimeInteractionSchema.md +0 -18
- data/docs/RuntimeObjectiveSchema.md +0 -16
- data/docs/RuntimeSchema.md +0 -27
- data/docs/ScoreSchema.md +0 -8
- data/docs/SettingItem.md +0 -12
- data/docs/SettingListSchema.md +0 -8
- data/docs/SettingMetadata.md +0 -15
- data/docs/SettingMetadataValidValues.md +0 -9
- data/docs/SettingValidValue.md +0 -9
- data/docs/SettingsIndividualSchema.md +0 -10
- data/docs/SettingsPostSchema.md +0 -8
- data/docs/SharedDataEntrySchema.md +0 -9
- data/docs/StaticPropertiesSchema.md +0 -13
- data/docs/StringResultSchema.md +0 -8
- data/docs/TagListSchema.md +0 -8
- data/docs/TagPostSchema.md +0 -7
- data/docs/TitleSchema.md +0 -8
- data/docs/TokenRequestSchema.md +0 -9
- data/docs/XapiAccount.md +0 -9
- data/docs/XapiActivity.md +0 -10
- data/docs/XapiActivityDefinition.md +0 -19
- data/docs/XapiAgentGroup.md +0 -14
- data/docs/XapiAttachment.md +0 -14
- data/docs/XapiContext.md +0 -16
- data/docs/XapiContextActivity.md +0 -11
- data/docs/XapiInteractionComponent.md +0 -9
- data/docs/XapiResult.md +0 -13
- data/docs/XapiScore.md +0 -11
- data/docs/XapiStatement.md +0 -20
- data/docs/XapiStatementReference.md +0 -9
- data/docs/XapiStatementResult.md +0 -9
- data/docs/XapiVerb.md +0 -9
- data/git_push.sh +0 -55
- data/lib/rustici_software_cloud_v2/models/setting_metadata_valid_values.rb +0 -209
- data/spec/models/activity_result_schema_spec.rb +0 -133
- data/spec/models/application_list_schema_spec.rb +0 -53
- data/spec/models/application_schema_spec.rb +0 -59
- data/spec/models/application_token_spec.rb +0 -65
- data/spec/models/comment_schema_spec.rb +0 -65
- data/spec/models/completion_amount_schema_spec.rb +0 -53
- data/spec/models/course_activity_schema_spec.rb +0 -99
- data/spec/models/course_list_non_paged_schema_spec.rb +0 -53
- data/spec/models/course_list_schema_spec.rb +0 -59
- data/spec/models/course_reference_schema_spec.rb +0 -65
- data/spec/models/course_schema_spec.rb +0 -129
- data/spec/models/create_registration_schema_spec.rb +0 -107
- data/spec/models/credential_created_schema_spec.rb +0 -77
- data/spec/models/credential_list_schema_spec.rb +0 -53
- data/spec/models/credential_request_schema_spec.rb +0 -59
- data/spec/models/credential_schema_spec.rb +0 -77
- data/spec/models/import_fetch_request_schema_spec.rb +0 -53
- data/spec/models/import_job_result_schema_spec.rb +0 -75
- data/spec/models/import_result_schema_spec.rb +0 -71
- data/spec/models/integer_result_schema_spec.rb +0 -53
- data/spec/models/item_value_pair_schema_spec.rb +0 -59
- data/spec/models/launch_history_list_schema_spec.rb +0 -53
- data/spec/models/launch_history_schema_spec.rb +0 -115
- data/spec/models/launch_link_request_schema_spec.rb +0 -107
- data/spec/models/launch_link_schema_spec.rb +0 -53
- data/spec/models/learner_preference_schema_spec.rb +0 -71
- data/spec/models/learner_schema_spec.rb +0 -71
- data/spec/models/link_schema_spec.rb +0 -53
- data/spec/models/message_schema_spec.rb +0 -53
- data/spec/models/metadata_schema_spec.rb +0 -89
- data/spec/models/objective_schema_spec.rb +0 -137
- data/spec/models/permissions_schema_spec.rb +0 -59
- data/spec/models/ping_schema_spec.rb +0 -53
- data/spec/models/post_back_schema_spec.rb +0 -85
- data/spec/models/registration_completion_spec.rb +0 -47
- data/spec/models/registration_list_schema_spec.rb +0 -59
- data/spec/models/registration_schema_spec.rb +0 -167
- data/spec/models/registration_success_spec.rb +0 -47
- data/spec/models/response_error_spec.rb +0 -53
- data/spec/models/runtime_interaction_schema_spec.rb +0 -117
- data/spec/models/runtime_objective_schema_spec.rb +0 -109
- data/spec/models/runtime_schema_spec.rb +0 -171
- data/spec/models/score_schema_spec.rb +0 -53
- data/spec/models/setting_item_spec.rb +0 -81
- data/spec/models/setting_list_schema_spec.rb +0 -53
- data/spec/models/setting_metadata_spec.rb +0 -99
- data/spec/models/setting_metadata_valid_values_spec.rb +0 -59
- data/spec/models/settings_individual_schema_spec.rb +0 -65
- data/spec/models/settings_post_schema_spec.rb +0 -53
- data/spec/models/shared_data_entry_schema_spec.rb +0 -59
- data/spec/models/static_properties_schema_spec.rb +0 -83
- data/spec/models/string_result_schema_spec.rb +0 -53
- data/spec/models/title_schema_spec.rb +0 -53
- data/spec/models/token_request_schema_spec.rb +0 -59
- data/swagger-codegen.config +0 -11
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0
|
6
|
+
OpenAPI spec version: 2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -40,28 +40,6 @@ module RusticiSoftwareCloudV2
|
|
40
40
|
|
41
41
|
attr_accessor :previous_objective_success
|
42
42
|
|
43
|
-
class EnumAttributeValidator
|
44
|
-
attr_reader :datatype
|
45
|
-
attr_reader :allowable_values
|
46
|
-
|
47
|
-
def initialize(datatype, allowable_values)
|
48
|
-
@allowable_values = allowable_values.map do |value|
|
49
|
-
case datatype.to_s
|
50
|
-
when /Integer/i
|
51
|
-
value.to_i
|
52
|
-
when /Float/i
|
53
|
-
value.to_f
|
54
|
-
else
|
55
|
-
value
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def valid?(value)
|
61
|
-
!value || allowable_values.include?(value)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
66
44
|
def self.attribute_map
|
67
45
|
{
|
@@ -177,42 +155,31 @@ module RusticiSoftwareCloudV2
|
|
177
155
|
# Check to see if the all the properties in the model are valid
|
178
156
|
# @return true if the model is valid
|
179
157
|
def valid?
|
180
|
-
objective_completion_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
|
181
|
-
return false unless objective_completion_validator.valid?(@objective_completion)
|
182
|
-
objective_success_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
|
183
|
-
return false unless objective_success_validator.valid?(@objective_success)
|
184
|
-
previous_objective_success_validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
|
185
|
-
return false unless previous_objective_success_validator.valid?(@previous_objective_success)
|
186
158
|
true
|
187
159
|
end
|
188
160
|
|
189
161
|
# Custom attribute writer method checking allowed values (enum).
|
162
|
+
#
|
163
|
+
# allowable_values = ['UNKNOWN', 'COMPLETED', 'INCOMPLETE']
|
164
|
+
#
|
190
165
|
# @param [Object] objective_completion Object to be assigned
|
191
166
|
def objective_completion=(objective_completion)
|
192
|
-
validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'COMPLETED', 'INCOMPLETE'])
|
193
|
-
unless validator.valid?(objective_completion)
|
194
|
-
fail ArgumentError, 'invalid value for "objective_completion", must be one of #{validator.allowable_values}.'
|
195
|
-
end
|
196
167
|
@objective_completion = objective_completion
|
197
168
|
end
|
198
|
-
|
199
169
|
# Custom attribute writer method checking allowed values (enum).
|
170
|
+
#
|
171
|
+
# allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
|
172
|
+
#
|
200
173
|
# @param [Object] objective_success Object to be assigned
|
201
174
|
def objective_success=(objective_success)
|
202
|
-
validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
|
203
|
-
unless validator.valid?(objective_success)
|
204
|
-
fail ArgumentError, 'invalid value for "objective_success", must be one of #{validator.allowable_values}.'
|
205
|
-
end
|
206
175
|
@objective_success = objective_success
|
207
176
|
end
|
208
|
-
|
209
177
|
# Custom attribute writer method checking allowed values (enum).
|
178
|
+
#
|
179
|
+
# allowable_values = ['UNKNOWN', 'PASSED', 'FAILED']
|
180
|
+
#
|
210
181
|
# @param [Object] previous_objective_success Object to be assigned
|
211
182
|
def previous_objective_success=(previous_objective_success)
|
212
|
-
validator = EnumAttributeValidator.new('String', ['UNKNOWN', 'PASSED', 'FAILED'])
|
213
|
-
unless validator.valid?(previous_objective_success)
|
214
|
-
fail ArgumentError, 'invalid value for "previous_objective_success", must be one of #{validator.allowable_values}.'
|
215
|
-
end
|
216
183
|
@previous_objective_success = previous_objective_success
|
217
184
|
end
|
218
185
|
|
@@ -255,7 +222,7 @@ module RusticiSoftwareCloudV2
|
|
255
222
|
return nil unless attributes.is_a?(Hash)
|
256
223
|
self.class.swagger_types.each_pair do |key, type|
|
257
224
|
if type =~ /\AArray<(.*)>/i
|
258
|
-
# check to ensure the input is an array given that the
|
225
|
+
# check to ensure the input is an array given that the attribute
|
259
226
|
# is documented as an array but the input is not
|
260
227
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
261
228
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -351,5 +318,6 @@ module RusticiSoftwareCloudV2
|
|
351
318
|
value
|
352
319
|
end
|
353
320
|
end
|
321
|
+
|
354
322
|
end
|
355
323
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0
|
6
|
+
OpenAPI spec version: 2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -67,6 +67,7 @@ module RusticiSoftwareCloudV2
|
|
67
67
|
true
|
68
68
|
end
|
69
69
|
|
70
|
+
|
70
71
|
# Checks equality by comparing each attribute.
|
71
72
|
# @param [Object] Object to be compared
|
72
73
|
def ==(o)
|
@@ -95,7 +96,7 @@ module RusticiSoftwareCloudV2
|
|
95
96
|
return nil unless attributes.is_a?(Hash)
|
96
97
|
self.class.swagger_types.each_pair do |key, type|
|
97
98
|
if type =~ /\AArray<(.*)>/i
|
98
|
-
# check to ensure the input is an array given that the
|
99
|
+
# check to ensure the input is an array given that the attribute
|
99
100
|
# is documented as an array but the input is not
|
100
101
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
102
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -191,5 +192,6 @@ module RusticiSoftwareCloudV2
|
|
191
192
|
value
|
192
193
|
end
|
193
194
|
end
|
195
|
+
|
194
196
|
end
|
195
197
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0
|
6
|
+
OpenAPI spec version: 2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,19 +14,23 @@ require 'date'
|
|
14
14
|
|
15
15
|
module RusticiSoftwareCloudV2
|
16
16
|
class PingSchema
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :api_message
|
18
|
+
|
19
|
+
attr_accessor :current_time
|
18
20
|
|
19
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
22
|
def self.attribute_map
|
21
23
|
{
|
22
|
-
:'
|
24
|
+
:'api_message' => :'apiMessage',
|
25
|
+
:'current_time' => :'currentTime'
|
23
26
|
}
|
24
27
|
end
|
25
28
|
|
26
29
|
# Attribute type mapping.
|
27
30
|
def self.swagger_types
|
28
31
|
{
|
29
|
-
:'
|
32
|
+
:'api_message' => :'String',
|
33
|
+
:'current_time' => :'String'
|
30
34
|
}
|
31
35
|
end
|
32
36
|
|
@@ -38,8 +42,12 @@ module RusticiSoftwareCloudV2
|
|
38
42
|
# convert string to symbol for hash key
|
39
43
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
44
|
|
41
|
-
if attributes.has_key?(:'
|
42
|
-
self.
|
45
|
+
if attributes.has_key?(:'apiMessage')
|
46
|
+
self.api_message = attributes[:'apiMessage']
|
47
|
+
end
|
48
|
+
|
49
|
+
if attributes.has_key?(:'currentTime')
|
50
|
+
self.current_time = attributes[:'currentTime']
|
43
51
|
end
|
44
52
|
end
|
45
53
|
|
@@ -47,26 +55,23 @@ module RusticiSoftwareCloudV2
|
|
47
55
|
# @return Array for valid properties with the reasons
|
48
56
|
def list_invalid_properties
|
49
57
|
invalid_properties = Array.new
|
50
|
-
if @message.nil?
|
51
|
-
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
52
|
-
end
|
53
|
-
|
54
58
|
invalid_properties
|
55
59
|
end
|
56
60
|
|
57
61
|
# Check to see if the all the properties in the model are valid
|
58
62
|
# @return true if the model is valid
|
59
63
|
def valid?
|
60
|
-
return false if @message.nil?
|
61
64
|
true
|
62
65
|
end
|
63
66
|
|
67
|
+
|
64
68
|
# Checks equality by comparing each attribute.
|
65
69
|
# @param [Object] Object to be compared
|
66
70
|
def ==(o)
|
67
71
|
return true if self.equal?(o)
|
68
72
|
self.class == o.class &&
|
69
|
-
|
73
|
+
api_message == o.api_message &&
|
74
|
+
current_time == o.current_time
|
70
75
|
end
|
71
76
|
|
72
77
|
# @see the `==` method
|
@@ -78,7 +83,7 @@ module RusticiSoftwareCloudV2
|
|
78
83
|
# Calculates hash code according to all attributes.
|
79
84
|
# @return [Fixnum] Hash code
|
80
85
|
def hash
|
81
|
-
[
|
86
|
+
[api_message, current_time].hash
|
82
87
|
end
|
83
88
|
|
84
89
|
# Builds the object from hash
|
@@ -88,7 +93,7 @@ module RusticiSoftwareCloudV2
|
|
88
93
|
return nil unless attributes.is_a?(Hash)
|
89
94
|
self.class.swagger_types.each_pair do |key, type|
|
90
95
|
if type =~ /\AArray<(.*)>/i
|
91
|
-
# check to ensure the input is an array given that the
|
96
|
+
# check to ensure the input is an array given that the attribute
|
92
97
|
# is documented as an array but the input is not
|
93
98
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
99
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -184,5 +189,6 @@ module RusticiSoftwareCloudV2
|
|
184
189
|
value
|
185
190
|
end
|
186
191
|
end
|
192
|
+
|
187
193
|
end
|
188
194
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#REST API used for SCORM Cloud integrations.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.0
|
6
|
+
OpenAPI spec version: 2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -28,27 +28,8 @@ module RusticiSoftwareCloudV2
|
|
28
28
|
# This parameter allows you to specify a level of detail in the information that is posted back while the course is being taken. It may be one of three values: 'course' (course summary), 'activity' (activity summary, or 'full' (full detail), and is set to 'course' by default. The information will be posted as xml, and the format of that xml is specified below under the method 'getRegistrationResult'
|
29
29
|
attr_accessor :results_format
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
attr_reader :allowable_values
|
34
|
-
|
35
|
-
def initialize(datatype, allowable_values)
|
36
|
-
@allowable_values = allowable_values.map do |value|
|
37
|
-
case datatype.to_s
|
38
|
-
when /Integer/i
|
39
|
-
value.to_i
|
40
|
-
when /Float/i
|
41
|
-
value.to_f
|
42
|
-
else
|
43
|
-
value
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def valid?(value)
|
49
|
-
!value || allowable_values.include?(value)
|
50
|
-
end
|
51
|
-
end
|
31
|
+
# This paramenter is ONLY used for backwards compatibility with XML postback implementations. You probably shouldn't need to use this unless you're currently transitioning from the V1 api to the V2 api and already have existing XML postback logic in your application, but have not yet built out JSON postback logic. If a registration is created with the V2 api we will assume that you're expecting JSON results unless otherwise specified.
|
32
|
+
attr_accessor :legacy
|
52
33
|
|
53
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
35
|
def self.attribute_map
|
@@ -57,7 +38,8 @@ module RusticiSoftwareCloudV2
|
|
57
38
|
:'auth_type' => :'authType',
|
58
39
|
:'user_name' => :'userName',
|
59
40
|
:'password' => :'password',
|
60
|
-
:'results_format' => :'resultsFormat'
|
41
|
+
:'results_format' => :'resultsFormat',
|
42
|
+
:'legacy' => :'legacy'
|
61
43
|
}
|
62
44
|
end
|
63
45
|
|
@@ -68,7 +50,8 @@ module RusticiSoftwareCloudV2
|
|
68
50
|
:'auth_type' => :'String',
|
69
51
|
:'user_name' => :'String',
|
70
52
|
:'password' => :'String',
|
71
|
-
:'results_format' => :'String'
|
53
|
+
:'results_format' => :'String',
|
54
|
+
:'legacy' => :'BOOLEAN'
|
72
55
|
}
|
73
56
|
end
|
74
57
|
|
@@ -101,7 +84,11 @@ module RusticiSoftwareCloudV2
|
|
101
84
|
if attributes.has_key?(:'resultsFormat')
|
102
85
|
self.results_format = attributes[:'resultsFormat']
|
103
86
|
else
|
104
|
-
self.results_format = '
|
87
|
+
self.results_format = 'UNDEFINED'
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'legacy')
|
91
|
+
self.legacy = attributes[:'legacy']
|
105
92
|
end
|
106
93
|
end
|
107
94
|
|
@@ -115,30 +102,23 @@ module RusticiSoftwareCloudV2
|
|
115
102
|
# Check to see if the all the properties in the model are valid
|
116
103
|
# @return true if the model is valid
|
117
104
|
def valid?
|
118
|
-
auth_type_validator = EnumAttributeValidator.new('String', ['UNDEFINED', 'FORM', 'HTTPBASIC'])
|
119
|
-
return false unless auth_type_validator.valid?(@auth_type)
|
120
|
-
results_format_validator = EnumAttributeValidator.new('String', ['COURSE', 'ACTIVITY', 'FULL'])
|
121
|
-
return false unless results_format_validator.valid?(@results_format)
|
122
105
|
true
|
123
106
|
end
|
124
107
|
|
125
108
|
# Custom attribute writer method checking allowed values (enum).
|
109
|
+
#
|
110
|
+
# allowable_values = ['UNDEFINED', 'FORM', 'HTTPBASIC']
|
111
|
+
#
|
126
112
|
# @param [Object] auth_type Object to be assigned
|
127
113
|
def auth_type=(auth_type)
|
128
|
-
validator = EnumAttributeValidator.new('String', ['UNDEFINED', 'FORM', 'HTTPBASIC'])
|
129
|
-
unless validator.valid?(auth_type)
|
130
|
-
fail ArgumentError, 'invalid value for "auth_type", must be one of #{validator.allowable_values}.'
|
131
|
-
end
|
132
114
|
@auth_type = auth_type
|
133
115
|
end
|
134
|
-
|
135
116
|
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
#
|
118
|
+
# allowable_values = ['UNDEFINED', 'COURSE', 'ACTIVITY', 'FULL']
|
119
|
+
#
|
136
120
|
# @param [Object] results_format Object to be assigned
|
137
121
|
def results_format=(results_format)
|
138
|
-
validator = EnumAttributeValidator.new('String', ['COURSE', 'ACTIVITY', 'FULL'])
|
139
|
-
unless validator.valid?(results_format)
|
140
|
-
fail ArgumentError, 'invalid value for "results_format", must be one of #{validator.allowable_values}.'
|
141
|
-
end
|
142
122
|
@results_format = results_format
|
143
123
|
end
|
144
124
|
|
@@ -151,7 +131,8 @@ module RusticiSoftwareCloudV2
|
|
151
131
|
auth_type == o.auth_type &&
|
152
132
|
user_name == o.user_name &&
|
153
133
|
password == o.password &&
|
154
|
-
results_format == o.results_format
|
134
|
+
results_format == o.results_format &&
|
135
|
+
legacy == o.legacy
|
155
136
|
end
|
156
137
|
|
157
138
|
# @see the `==` method
|
@@ -163,7 +144,7 @@ module RusticiSoftwareCloudV2
|
|
163
144
|
# Calculates hash code according to all attributes.
|
164
145
|
# @return [Fixnum] Hash code
|
165
146
|
def hash
|
166
|
-
[url, auth_type, user_name, password, results_format].hash
|
147
|
+
[url, auth_type, user_name, password, results_format, legacy].hash
|
167
148
|
end
|
168
149
|
|
169
150
|
# Builds the object from hash
|
@@ -173,7 +154,7 @@ module RusticiSoftwareCloudV2
|
|
173
154
|
return nil unless attributes.is_a?(Hash)
|
174
155
|
self.class.swagger_types.each_pair do |key, type|
|
175
156
|
if type =~ /\AArray<(.*)>/i
|
176
|
-
# check to ensure the input is an array given that the
|
157
|
+
# check to ensure the input is an array given that the attribute
|
177
158
|
# is documented as an array but the input is not
|
178
159
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
179
160
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -269,5 +250,6 @@ module RusticiSoftwareCloudV2
|
|
269
250
|
value
|
270
251
|
end
|
271
252
|
end
|
253
|
+
|
272
254
|
end
|
273
255
|
end
|
@@ -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
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module RusticiSoftwareCloudV2
|
16
|
+
class PrivateInvitationList
|
17
|
+
# A list of private invitation objects.
|
18
|
+
attr_accessor :invitations
|
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
|
+
:'invitations' => :'invitations',
|
27
|
+
:'more' => :'more'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'invitations' => :'Array<PrivateInvitationSchema>',
|
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?(:'invitations')
|
48
|
+
if (value = attributes[:'invitations']).is_a?(Array)
|
49
|
+
self.invitations = 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
|
+
invitations == o.invitations &&
|
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
|
+
[invitations, 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
|