rustici_software_cloud_v2 1.0.0beta → 1.0.1
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 +7 -0
- data/README.md +194 -88
- data/lib/rustici_software_cloud_v2/api/about_api.rb +71 -0
- data/lib/rustici_software_cloud_v2/api/application_management_api.rb +161 -97
- data/lib/rustici_software_cloud_v2/api/authentication_api.rb +13 -13
- data/lib/rustici_software_cloud_v2/api/course_api.rb +246 -260
- data/lib/rustici_software_cloud_v2/api/dispatch_api.rb +1994 -0
- data/lib/rustici_software_cloud_v2/api/invitations_api.rb +964 -0
- data/lib/rustici_software_cloud_v2/api/learner_api.rb +296 -0
- data/lib/rustici_software_cloud_v2/api/ping_api.rb +10 -8
- data/lib/rustici_software_cloud_v2/api/registration_api.rb +379 -324
- data/lib/rustici_software_cloud_v2/api/reporting_api.rb +191 -0
- data/lib/rustici_software_cloud_v2/api/xapi_api.rb +555 -0
- data/lib/rustici_software_cloud_v2/api/zoomi_api.rb +448 -0
- data/lib/rustici_software_cloud_v2/api_client.rb +2 -3
- data/lib/rustici_software_cloud_v2/api_error.rb +1 -2
- data/lib/rustici_software_cloud_v2/configuration.rb +9 -19
- data/lib/rustici_software_cloud_v2/models/about_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/activity_result_schema.rb +17 -14
- data/lib/rustici_software_cloud_v2/models/application_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/application_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/application_token.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/{course_tags_batch_schema.rb → batch_tags_schema.rb} +29 -23
- data/lib/rustici_software_cloud_v2/models/comment_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/completion_amount_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_activity_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/course_list_non_paged_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/course_reference_schema.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/course_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/create_dispatch_id_schema.rb +225 -0
- data/lib/rustici_software_cloud_v2/models/{link_schema.rb → create_dispatch_list_schema.rb} +22 -21
- data/lib/rustici_software_cloud_v2/models/create_dispatch_schema.rb +308 -0
- data/lib/rustici_software_cloud_v2/models/create_private_invitation_schema.rb +254 -0
- data/lib/rustici_software_cloud_v2/models/create_public_invitation_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/create_registration_schema.rb +15 -11
- data/lib/rustici_software_cloud_v2/models/credential_created_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_request_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/credential_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/destination_id_schema.rb +197 -0
- data/lib/rustici_software_cloud_v2/models/destination_list_schema.rb +200 -0
- data/lib/rustici_software_cloud_v2/models/{setting_metadata_valid_values.rb → destination_schema.rb} +42 -31
- data/lib/rustici_software_cloud_v2/models/dispatch_id_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_list_schema.rb +198 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_registration_count_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/dispatch_schema.rb +290 -0
- data/lib/rustici_software_cloud_v2/models/{tag_post_schema.rb → enabled_schema.rb} +24 -11
- data/lib/rustici_software_cloud_v2/models/import_fetch_request_schema.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/import_job_result_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/import_result_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/integer_result_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/invitation_email_schema.rb +215 -0
- data/lib/rustici_software_cloud_v2/models/invitation_job_status_schema.rb +253 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/invitation_summary_schema.rb +227 -0
- data/lib/rustici_software_cloud_v2/models/item_value_pair_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/launch_history_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/launch_history_schema.rb +19 -16
- data/lib/rustici_software_cloud_v2/models/launch_link_request_schema.rb +17 -8
- data/lib/rustici_software_cloud_v2/models/launch_link_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/learner_preference_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/learner_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/message_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/metadata_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/objective_schema.rb +23 -20
- data/lib/rustici_software_cloud_v2/models/permissions_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/ping_schema.rb +28 -20
- data/lib/rustici_software_cloud_v2/models/post_back_schema.rb +33 -20
- data/lib/rustici_software_cloud_v2/models/private_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/private_invitation_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/public_invitation_schema.rb +289 -0
- data/lib/rustici_software_cloud_v2/models/registration_completion.rb +5 -14
- data/lib/rustici_software_cloud_v2/models/registration_list_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/registration_schema.rb +24 -9
- data/lib/rustici_software_cloud_v2/models/registration_success.rb +5 -14
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_schema.rb +259 -0
- data/lib/rustici_software_cloud_v2/models/reportage_account_info_usage_schema.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/reportage_auth_token_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/reportage_link_schema.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/response_error.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/runtime_interaction_schema.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/runtime_objective_schema.rb +19 -16
- data/lib/rustici_software_cloud_v2/models/runtime_schema.rb +15 -12
- data/lib/rustici_software_cloud_v2/models/score_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/setting_item.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/setting_list_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/setting_metadata.rb +15 -12
- data/lib/rustici_software_cloud_v2/models/setting_valid_value.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/settings_individual_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/settings_post_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/shared_data_entry_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/static_properties_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/string_result_schema.rb +13 -9
- data/lib/rustici_software_cloud_v2/models/tag_list_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/title_schema.rb +12 -8
- data/lib/rustici_software_cloud_v2/models/token_request_schema.rb +14 -10
- data/lib/rustici_software_cloud_v2/models/update_dispatch_schema.rb +258 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_list.rb +199 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema.rb +236 -0
- data/lib/rustici_software_cloud_v2/models/user_invitation_schema_registration_report.rb +214 -0
- data/lib/rustici_software_cloud_v2/models/xapi_account.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_activity.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_activity_definition.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/xapi_agent_group.rb +14 -12
- data/lib/rustici_software_cloud_v2/models/xapi_attachment.rb +18 -15
- data/lib/rustici_software_cloud_v2/models/xapi_context.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_context_activity.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_credential_auth_type_schema.rb +220 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_permissions_level_schema.rb +220 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_post_schema.rb +252 -0
- data/lib/rustici_software_cloud_v2/models/xapi_credential_schema.rb +266 -0
- data/lib/rustici_software_cloud_v2/models/{registration_tags_batch_schema.rb → xapi_credentials_list_schema.rb} +30 -31
- data/lib/rustici_software_cloud_v2/models/xapi_endpoint_schema.rb +205 -0
- data/lib/rustici_software_cloud_v2/models/xapi_interaction_component.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/xapi_result.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_score.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_statement.rb +11 -8
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_list_schema.rb +194 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_post_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_pipe_schema.rb +241 -0
- data/lib/rustici_software_cloud_v2/models/xapi_statement_reference.rb +14 -11
- data/lib/rustici_software_cloud_v2/models/xapi_statement_result.rb +12 -9
- data/lib/rustici_software_cloud_v2/models/xapi_verb.rb +13 -10
- data/lib/rustici_software_cloud_v2/models/zoomi_company_id.rb +187 -0
- data/lib/rustici_software_cloud_v2/models/zoomi_course_options_schema.rb +196 -0
- data/lib/rustici_software_cloud_v2/version.rb +2 -3
- data/lib/rustici_software_cloud_v2.rb +50 -6
- data/rustici_software_cloud_v2.gemspec +10 -11
- data/spec/api_client_spec.rb +1 -13
- data/spec/configuration_spec.rb +9 -10
- data/spec/spec_helper.rb +1 -13
- metadata +107 -271
- 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/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,16 +3,16 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
16
|
class StaticPropertiesSchema
|
|
17
17
|
attr_accessor :completion_threshold
|
|
18
18
|
|
|
@@ -26,6 +26,7 @@ module RusticiSoftwareCloudV2
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :time_limit_action
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
31
|
def self.attribute_map
|
|
31
32
|
{
|
|
@@ -56,7 +57,7 @@ module RusticiSoftwareCloudV2
|
|
|
56
57
|
return unless attributes.is_a?(Hash)
|
|
57
58
|
|
|
58
59
|
# convert string to symbol for hash key
|
|
59
|
-
attributes = attributes.each_with_object({})
|
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
60
61
|
|
|
61
62
|
if attributes.has_key?(:'completionThreshold')
|
|
62
63
|
self.completion_threshold = attributes[:'completionThreshold']
|
|
@@ -81,19 +82,20 @@ module RusticiSoftwareCloudV2
|
|
|
81
82
|
if attributes.has_key?(:'timeLimitAction')
|
|
82
83
|
self.time_limit_action = attributes[:'timeLimitAction']
|
|
83
84
|
end
|
|
85
|
+
|
|
84
86
|
end
|
|
85
87
|
|
|
86
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
-
# @return Array for valid
|
|
89
|
+
# @return Array for valid properies with the reasons
|
|
88
90
|
def list_invalid_properties
|
|
89
91
|
invalid_properties = Array.new
|
|
90
|
-
invalid_properties
|
|
92
|
+
return invalid_properties
|
|
91
93
|
end
|
|
92
94
|
|
|
93
95
|
# Check to see if the all the properties in the model are valid
|
|
94
96
|
# @return true if the model is valid
|
|
95
97
|
def valid?
|
|
96
|
-
true
|
|
98
|
+
return true
|
|
97
99
|
end
|
|
98
100
|
|
|
99
101
|
# Checks equality by comparing each attribute.
|
|
@@ -131,7 +133,7 @@ module RusticiSoftwareCloudV2
|
|
|
131
133
|
# check to ensure the input is an array given that the the attribute
|
|
132
134
|
# is documented as an array but the input is not
|
|
133
135
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
135
137
|
end
|
|
136
138
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
139
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -213,7 +215,7 @@ module RusticiSoftwareCloudV2
|
|
|
213
215
|
# @return [Hash] Returns the value in the form of hash
|
|
214
216
|
def _to_hash(value)
|
|
215
217
|
if value.is_a?(Array)
|
|
216
|
-
value.compact.map
|
|
218
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
217
219
|
elsif value.is_a?(Hash)
|
|
218
220
|
{}.tap do |hash|
|
|
219
221
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -224,5 +226,7 @@ module RusticiSoftwareCloudV2
|
|
|
224
226
|
value
|
|
225
227
|
end
|
|
226
228
|
end
|
|
229
|
+
|
|
227
230
|
end
|
|
231
|
+
|
|
228
232
|
end
|
|
@@ -3,19 +3,20 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
16
|
class StringResultSchema
|
|
17
17
|
attr_accessor :result
|
|
18
18
|
|
|
19
|
+
|
|
19
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
21
|
def self.attribute_map
|
|
21
22
|
{
|
|
@@ -36,29 +37,30 @@ module RusticiSoftwareCloudV2
|
|
|
36
37
|
return unless attributes.is_a?(Hash)
|
|
37
38
|
|
|
38
39
|
# convert string to symbol for hash key
|
|
39
|
-
attributes = attributes.each_with_object({})
|
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
40
41
|
|
|
41
42
|
if attributes.has_key?(:'result')
|
|
42
43
|
self.result = attributes[:'result']
|
|
43
44
|
end
|
|
45
|
+
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
47
|
-
# @return Array for valid
|
|
49
|
+
# @return Array for valid properies with the reasons
|
|
48
50
|
def list_invalid_properties
|
|
49
51
|
invalid_properties = Array.new
|
|
50
52
|
if @result.nil?
|
|
51
|
-
invalid_properties.push(
|
|
53
|
+
invalid_properties.push("invalid value for 'result', result cannot be nil.")
|
|
52
54
|
end
|
|
53
55
|
|
|
54
|
-
invalid_properties
|
|
56
|
+
return invalid_properties
|
|
55
57
|
end
|
|
56
58
|
|
|
57
59
|
# Check to see if the all the properties in the model are valid
|
|
58
60
|
# @return true if the model is valid
|
|
59
61
|
def valid?
|
|
60
62
|
return false if @result.nil?
|
|
61
|
-
true
|
|
63
|
+
return true
|
|
62
64
|
end
|
|
63
65
|
|
|
64
66
|
# Checks equality by comparing each attribute.
|
|
@@ -91,7 +93,7 @@ module RusticiSoftwareCloudV2
|
|
|
91
93
|
# check to ensure the input is an array given that the the attribute
|
|
92
94
|
# is documented as an array but the input is not
|
|
93
95
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
94
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
96
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
95
97
|
end
|
|
96
98
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
97
99
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -173,7 +175,7 @@ module RusticiSoftwareCloudV2
|
|
|
173
175
|
# @return [Hash] Returns the value in the form of hash
|
|
174
176
|
def _to_hash(value)
|
|
175
177
|
if value.is_a?(Array)
|
|
176
|
-
value.compact.map
|
|
178
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
177
179
|
elsif value.is_a?(Hash)
|
|
178
180
|
{}.tap do |hash|
|
|
179
181
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -184,5 +186,7 @@ module RusticiSoftwareCloudV2
|
|
|
184
186
|
value
|
|
185
187
|
end
|
|
186
188
|
end
|
|
189
|
+
|
|
187
190
|
end
|
|
191
|
+
|
|
188
192
|
end
|
|
@@ -3,19 +3,20 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
16
|
class TagListSchema
|
|
17
17
|
attr_accessor :tags
|
|
18
18
|
|
|
19
|
+
|
|
19
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
21
|
def self.attribute_map
|
|
21
22
|
{
|
|
@@ -36,26 +37,27 @@ module RusticiSoftwareCloudV2
|
|
|
36
37
|
return unless attributes.is_a?(Hash)
|
|
37
38
|
|
|
38
39
|
# convert string to symbol for hash key
|
|
39
|
-
attributes = attributes.each_with_object({})
|
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
40
41
|
|
|
41
42
|
if attributes.has_key?(:'tags')
|
|
42
43
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
43
44
|
self.tags = value
|
|
44
45
|
end
|
|
45
46
|
end
|
|
47
|
+
|
|
46
48
|
end
|
|
47
49
|
|
|
48
50
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
-
# @return Array for valid
|
|
51
|
+
# @return Array for valid properies with the reasons
|
|
50
52
|
def list_invalid_properties
|
|
51
53
|
invalid_properties = Array.new
|
|
52
|
-
invalid_properties
|
|
54
|
+
return invalid_properties
|
|
53
55
|
end
|
|
54
56
|
|
|
55
57
|
# Check to see if the all the properties in the model are valid
|
|
56
58
|
# @return true if the model is valid
|
|
57
59
|
def valid?
|
|
58
|
-
true
|
|
60
|
+
return true
|
|
59
61
|
end
|
|
60
62
|
|
|
61
63
|
# Checks equality by comparing each attribute.
|
|
@@ -88,7 +90,7 @@ module RusticiSoftwareCloudV2
|
|
|
88
90
|
# check to ensure the input is an array given that the the attribute
|
|
89
91
|
# is documented as an array but the input is not
|
|
90
92
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
93
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
92
94
|
end
|
|
93
95
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
96
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -170,7 +172,7 @@ module RusticiSoftwareCloudV2
|
|
|
170
172
|
# @return [Hash] Returns the value in the form of hash
|
|
171
173
|
def _to_hash(value)
|
|
172
174
|
if value.is_a?(Array)
|
|
173
|
-
value.compact.map
|
|
175
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
174
176
|
elsif value.is_a?(Hash)
|
|
175
177
|
{}.tap do |hash|
|
|
176
178
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -181,5 +183,7 @@ module RusticiSoftwareCloudV2
|
|
|
181
183
|
value
|
|
182
184
|
end
|
|
183
185
|
end
|
|
186
|
+
|
|
184
187
|
end
|
|
188
|
+
|
|
185
189
|
end
|
|
@@ -3,19 +3,20 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
16
|
class TitleSchema
|
|
17
17
|
attr_accessor :title
|
|
18
18
|
|
|
19
|
+
|
|
19
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
21
|
def self.attribute_map
|
|
21
22
|
{
|
|
@@ -36,24 +37,25 @@ module RusticiSoftwareCloudV2
|
|
|
36
37
|
return unless attributes.is_a?(Hash)
|
|
37
38
|
|
|
38
39
|
# convert string to symbol for hash key
|
|
39
|
-
attributes = attributes.each_with_object({})
|
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
40
41
|
|
|
41
42
|
if attributes.has_key?(:'title')
|
|
42
43
|
self.title = attributes[:'title']
|
|
43
44
|
end
|
|
45
|
+
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
47
|
-
# @return Array for valid
|
|
49
|
+
# @return Array for valid properies with the reasons
|
|
48
50
|
def list_invalid_properties
|
|
49
51
|
invalid_properties = Array.new
|
|
50
|
-
invalid_properties
|
|
52
|
+
return invalid_properties
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
# Check to see if the all the properties in the model are valid
|
|
54
56
|
# @return true if the model is valid
|
|
55
57
|
def valid?
|
|
56
|
-
true
|
|
58
|
+
return true
|
|
57
59
|
end
|
|
58
60
|
|
|
59
61
|
# Checks equality by comparing each attribute.
|
|
@@ -86,7 +88,7 @@ module RusticiSoftwareCloudV2
|
|
|
86
88
|
# check to ensure the input is an array given that the the attribute
|
|
87
89
|
# is documented as an array but the input is not
|
|
88
90
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
89
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
90
92
|
end
|
|
91
93
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
92
94
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -168,7 +170,7 @@ module RusticiSoftwareCloudV2
|
|
|
168
170
|
# @return [Hash] Returns the value in the form of hash
|
|
169
171
|
def _to_hash(value)
|
|
170
172
|
if value.is_a?(Array)
|
|
171
|
-
value.compact.map
|
|
173
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
172
174
|
elsif value.is_a?(Hash)
|
|
173
175
|
{}.tap do |hash|
|
|
174
176
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -179,5 +181,7 @@ module RusticiSoftwareCloudV2
|
|
|
179
181
|
value
|
|
180
182
|
end
|
|
181
183
|
end
|
|
184
|
+
|
|
182
185
|
end
|
|
186
|
+
|
|
183
187
|
end
|
|
@@ -3,22 +3,23 @@
|
|
|
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.3
|
|
10
9
|
|
|
11
10
|
=end
|
|
12
11
|
|
|
13
12
|
require 'date'
|
|
14
13
|
|
|
15
14
|
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
16
|
class TokenRequestSchema
|
|
17
17
|
attr_accessor :permissions
|
|
18
18
|
|
|
19
19
|
# Expiration of the token. This should not be set far in the future, as there is no way to invalidate an individual token.
|
|
20
20
|
attr_accessor :expiry
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
24
|
def self.attribute_map
|
|
24
25
|
{
|
|
@@ -41,7 +42,7 @@ module RusticiSoftwareCloudV2
|
|
|
41
42
|
return unless attributes.is_a?(Hash)
|
|
42
43
|
|
|
43
44
|
# convert string to symbol for hash key
|
|
44
|
-
attributes = attributes.each_with_object({})
|
|
45
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
45
46
|
|
|
46
47
|
if attributes.has_key?(:'permissions')
|
|
47
48
|
self.permissions = attributes[:'permissions']
|
|
@@ -50,21 +51,22 @@ module RusticiSoftwareCloudV2
|
|
|
50
51
|
if attributes.has_key?(:'expiry')
|
|
51
52
|
self.expiry = attributes[:'expiry']
|
|
52
53
|
end
|
|
54
|
+
|
|
53
55
|
end
|
|
54
56
|
|
|
55
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
56
|
-
# @return Array for valid
|
|
58
|
+
# @return Array for valid properies with the reasons
|
|
57
59
|
def list_invalid_properties
|
|
58
60
|
invalid_properties = Array.new
|
|
59
61
|
if @permissions.nil?
|
|
60
|
-
invalid_properties.push(
|
|
62
|
+
invalid_properties.push("invalid value for 'permissions', permissions cannot be nil.")
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
if @expiry.nil?
|
|
64
|
-
invalid_properties.push(
|
|
66
|
+
invalid_properties.push("invalid value for 'expiry', expiry cannot be nil.")
|
|
65
67
|
end
|
|
66
68
|
|
|
67
|
-
invalid_properties
|
|
69
|
+
return invalid_properties
|
|
68
70
|
end
|
|
69
71
|
|
|
70
72
|
# Check to see if the all the properties in the model are valid
|
|
@@ -72,7 +74,7 @@ module RusticiSoftwareCloudV2
|
|
|
72
74
|
def valid?
|
|
73
75
|
return false if @permissions.nil?
|
|
74
76
|
return false if @expiry.nil?
|
|
75
|
-
true
|
|
77
|
+
return true
|
|
76
78
|
end
|
|
77
79
|
|
|
78
80
|
# Checks equality by comparing each attribute.
|
|
@@ -106,7 +108,7 @@ module RusticiSoftwareCloudV2
|
|
|
106
108
|
# check to ensure the input is an array given that the the attribute
|
|
107
109
|
# is documented as an array but the input is not
|
|
108
110
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
109
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map
|
|
111
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
110
112
|
end
|
|
111
113
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
112
114
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
@@ -188,7 +190,7 @@ module RusticiSoftwareCloudV2
|
|
|
188
190
|
# @return [Hash] Returns the value in the form of hash
|
|
189
191
|
def _to_hash(value)
|
|
190
192
|
if value.is_a?(Array)
|
|
191
|
-
value.compact.map
|
|
193
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
192
194
|
elsif value.is_a?(Hash)
|
|
193
195
|
{}.tap do |hash|
|
|
194
196
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
@@ -199,5 +201,7 @@ module RusticiSoftwareCloudV2
|
|
|
199
201
|
value
|
|
200
202
|
end
|
|
201
203
|
end
|
|
204
|
+
|
|
202
205
|
end
|
|
206
|
+
|
|
203
207
|
end
|
|
@@ -0,0 +1,258 @@
|
|
|
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
|
+
module RusticiSoftwareCloudV2
|
|
15
|
+
|
|
16
|
+
class UpdateDispatchSchema
|
|
17
|
+
# If true, then new registrations can be created for this dispatch.
|
|
18
|
+
attr_accessor :allow_new_registrations
|
|
19
|
+
|
|
20
|
+
# If true, then a new registration instance will be created if the client LMS doesn't provide launch data for an existing one. Otherwise, the same instance will always be used for the given cmi.learner_id.
|
|
21
|
+
attr_accessor :instanced
|
|
22
|
+
|
|
23
|
+
# The maximum number of registrations that can be created for this dispatch, where '0' means 'unlimited registrations'.
|
|
24
|
+
attr_accessor :registration_cap
|
|
25
|
+
|
|
26
|
+
# The date after which this dispatch will be disabled as an ISO 8601 string, or not present for no expiration date.
|
|
27
|
+
attr_accessor :expiration_date
|
|
28
|
+
|
|
29
|
+
# If true, then this dispatch can be launched.
|
|
30
|
+
attr_accessor :enabled
|
|
31
|
+
|
|
32
|
+
# SCORM Cloud user e-mail associated with this dispatch. If this is not provided, it will default to the owner of the Realm.
|
|
33
|
+
attr_accessor :email
|
|
34
|
+
|
|
35
|
+
# Any provided notes about this dispatch.
|
|
36
|
+
attr_accessor :notes
|
|
37
|
+
|
|
38
|
+
# The postback information for this Dispatch.
|
|
39
|
+
attr_accessor :post_back
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'allow_new_registrations' => :'allowNewRegistrations',
|
|
46
|
+
:'instanced' => :'instanced',
|
|
47
|
+
:'registration_cap' => :'registrationCap',
|
|
48
|
+
:'expiration_date' => :'expirationDate',
|
|
49
|
+
:'enabled' => :'enabled',
|
|
50
|
+
:'email' => :'email',
|
|
51
|
+
:'notes' => :'notes',
|
|
52
|
+
:'post_back' => :'postBack'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.swagger_types
|
|
58
|
+
{
|
|
59
|
+
:'allow_new_registrations' => :'BOOLEAN',
|
|
60
|
+
:'instanced' => :'BOOLEAN',
|
|
61
|
+
:'registration_cap' => :'Integer',
|
|
62
|
+
:'expiration_date' => :'DateTime',
|
|
63
|
+
:'enabled' => :'BOOLEAN',
|
|
64
|
+
:'email' => :'String',
|
|
65
|
+
:'notes' => :'String',
|
|
66
|
+
:'post_back' => :'PostBackSchema'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
return unless attributes.is_a?(Hash)
|
|
74
|
+
|
|
75
|
+
# convert string to symbol for hash key
|
|
76
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'allowNewRegistrations')
|
|
79
|
+
self.allow_new_registrations = attributes[:'allowNewRegistrations']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.has_key?(:'instanced')
|
|
83
|
+
self.instanced = attributes[:'instanced']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'registrationCap')
|
|
87
|
+
self.registration_cap = attributes[:'registrationCap']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.has_key?(:'expirationDate')
|
|
91
|
+
self.expiration_date = attributes[:'expirationDate']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.has_key?(:'enabled')
|
|
95
|
+
self.enabled = attributes[:'enabled']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'email')
|
|
99
|
+
self.email = attributes[:'email']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'notes')
|
|
103
|
+
self.notes = attributes[:'notes']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'postBack')
|
|
107
|
+
self.post_back = attributes[:'postBack']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properies with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
return invalid_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
def valid?
|
|
122
|
+
return true
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Checks equality by comparing each attribute.
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def ==(o)
|
|
128
|
+
return true if self.equal?(o)
|
|
129
|
+
self.class == o.class &&
|
|
130
|
+
allow_new_registrations == o.allow_new_registrations &&
|
|
131
|
+
instanced == o.instanced &&
|
|
132
|
+
registration_cap == o.registration_cap &&
|
|
133
|
+
expiration_date == o.expiration_date &&
|
|
134
|
+
enabled == o.enabled &&
|
|
135
|
+
email == o.email &&
|
|
136
|
+
notes == o.notes &&
|
|
137
|
+
post_back == o.post_back
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Fixnum] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[allow_new_registrations, instanced, registration_cap, expiration_date, enabled, email, notes, post_back].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
158
|
+
if type =~ /\AArray<(.*)>/i
|
|
159
|
+
# check to ensure the input is an array given that the the attribute
|
|
160
|
+
# is documented as an array but the input is not
|
|
161
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
162
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
163
|
+
end
|
|
164
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
165
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
166
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
self
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Deserializes the data based on type
|
|
173
|
+
# @param string type Data type
|
|
174
|
+
# @param string value Value to be deserialized
|
|
175
|
+
# @return [Object] Deserialized data
|
|
176
|
+
def _deserialize(type, value)
|
|
177
|
+
case type.to_sym
|
|
178
|
+
when :DateTime
|
|
179
|
+
DateTime.parse(value)
|
|
180
|
+
when :Date
|
|
181
|
+
Date.parse(value)
|
|
182
|
+
when :String
|
|
183
|
+
value.to_s
|
|
184
|
+
when :Integer
|
|
185
|
+
value.to_i
|
|
186
|
+
when :Float
|
|
187
|
+
value.to_f
|
|
188
|
+
when :BOOLEAN
|
|
189
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
190
|
+
true
|
|
191
|
+
else
|
|
192
|
+
false
|
|
193
|
+
end
|
|
194
|
+
when :Object
|
|
195
|
+
# generic object (usually a Hash), return directly
|
|
196
|
+
value
|
|
197
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
198
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
199
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
200
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
201
|
+
k_type = Regexp.last_match[:k_type]
|
|
202
|
+
v_type = Regexp.last_match[:v_type]
|
|
203
|
+
{}.tap do |hash|
|
|
204
|
+
value.each do |k, v|
|
|
205
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
else # model
|
|
209
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
|
210
|
+
temp_model.build_from_hash(value)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the string representation of the object
|
|
215
|
+
# @return [String] String presentation of the object
|
|
216
|
+
def to_s
|
|
217
|
+
to_hash.to_s
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns the object in the form of hash
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_hash
|
|
229
|
+
hash = {}
|
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
231
|
+
value = self.send(attr)
|
|
232
|
+
next if value.nil?
|
|
233
|
+
hash[param] = _to_hash(value)
|
|
234
|
+
end
|
|
235
|
+
hash
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Outputs non-array value in the form of hash
|
|
239
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
240
|
+
# @param [Object] value Any valid value
|
|
241
|
+
# @return [Hash] Returns the value in the form of hash
|
|
242
|
+
def _to_hash(value)
|
|
243
|
+
if value.is_a?(Array)
|
|
244
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
245
|
+
elsif value.is_a?(Hash)
|
|
246
|
+
{}.tap do |hash|
|
|
247
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
248
|
+
end
|
|
249
|
+
elsif value.respond_to? :to_hash
|
|
250
|
+
value.to_hash
|
|
251
|
+
else
|
|
252
|
+
value
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|