rustici_software_cloud_v2 1.0.0beta → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,199 @@
|
|
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 UserInvitationList
|
17
|
+
# A list of user invitation objects.
|
18
|
+
attr_accessor :user_invitations
|
19
|
+
|
20
|
+
attr_accessor :more
|
21
|
+
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'user_invitations' => :'userInvitations',
|
27
|
+
:'more' => :'more'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'user_invitations' => :'Array<UserInvitationSchema>',
|
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?(:'userInvitations')
|
48
|
+
if (value = attributes[:'userInvitations']).is_a?(Array)
|
49
|
+
self.user_invitations = value
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'more')
|
54
|
+
self.more = attributes[:'more']
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properies with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
return invalid_properties
|
64
|
+
end
|
65
|
+
|
66
|
+
# Check to see if the all the properties in the model are valid
|
67
|
+
# @return true if the model is valid
|
68
|
+
def valid?
|
69
|
+
return true
|
70
|
+
end
|
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
|
+
user_invitations == o.user_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
|
+
[user_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 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
|
+
|
199
|
+
end
|
@@ -0,0 +1,236 @@
|
|
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 UserInvitationSchema
|
17
|
+
# The email of the user who took an invitation.
|
18
|
+
attr_accessor :email
|
19
|
+
|
20
|
+
# The URL which the user would follow to take the invitation.
|
21
|
+
attr_accessor :url
|
22
|
+
|
23
|
+
# A boolean flag stating if the user has started the invitation.
|
24
|
+
attr_accessor :is_started
|
25
|
+
|
26
|
+
attr_accessor :updated
|
27
|
+
|
28
|
+
# The id of the registration which was created from the user being invited.
|
29
|
+
attr_accessor :registration_id
|
30
|
+
|
31
|
+
attr_accessor :registration_report
|
32
|
+
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'email' => :'email',
|
38
|
+
:'url' => :'url',
|
39
|
+
:'is_started' => :'isStarted',
|
40
|
+
:'updated' => :'updated',
|
41
|
+
:'registration_id' => :'registrationId',
|
42
|
+
:'registration_report' => :'registrationReport'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'email' => :'String',
|
50
|
+
:'url' => :'String',
|
51
|
+
:'is_started' => :'BOOLEAN',
|
52
|
+
:'updated' => :'DateTime',
|
53
|
+
:'registration_id' => :'String',
|
54
|
+
:'registration_report' => :'UserInvitationSchemaRegistrationReport'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
return unless attributes.is_a?(Hash)
|
62
|
+
|
63
|
+
# convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
65
|
+
|
66
|
+
if attributes.has_key?(:'email')
|
67
|
+
self.email = attributes[:'email']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'url')
|
71
|
+
self.url = attributes[:'url']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'isStarted')
|
75
|
+
self.is_started = attributes[:'isStarted']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'updated')
|
79
|
+
self.updated = attributes[:'updated']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'registrationId')
|
83
|
+
self.registration_id = attributes[:'registrationId']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'registrationReport')
|
87
|
+
self.registration_report = attributes[:'registrationReport']
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properies with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
return invalid_properties
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
def valid?
|
102
|
+
return true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Checks equality by comparing each attribute.
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
email == o.email &&
|
111
|
+
url == o.url &&
|
112
|
+
is_started == o.is_started &&
|
113
|
+
updated == o.updated &&
|
114
|
+
registration_id == o.registration_id &&
|
115
|
+
registration_report == o.registration_report
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Fixnum] Hash code
|
126
|
+
def hash
|
127
|
+
[email, url, is_started, updated, registration_id, registration_report].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
self.class.swagger_types.each_pair do |key, type|
|
136
|
+
if type =~ /\AArray<(.*)>/i
|
137
|
+
# check to ensure the input is an array given that the the attribute
|
138
|
+
# is documented as an array but the input is not
|
139
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
140
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
141
|
+
end
|
142
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
143
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
144
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
145
|
+
end
|
146
|
+
|
147
|
+
self
|
148
|
+
end
|
149
|
+
|
150
|
+
# Deserializes the data based on type
|
151
|
+
# @param string type Data type
|
152
|
+
# @param string value Value to be deserialized
|
153
|
+
# @return [Object] Deserialized data
|
154
|
+
def _deserialize(type, value)
|
155
|
+
case type.to_sym
|
156
|
+
when :DateTime
|
157
|
+
DateTime.parse(value)
|
158
|
+
when :Date
|
159
|
+
Date.parse(value)
|
160
|
+
when :String
|
161
|
+
value.to_s
|
162
|
+
when :Integer
|
163
|
+
value.to_i
|
164
|
+
when :Float
|
165
|
+
value.to_f
|
166
|
+
when :BOOLEAN
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
|
+
true
|
169
|
+
else
|
170
|
+
false
|
171
|
+
end
|
172
|
+
when :Object
|
173
|
+
# generic object (usually a Hash), return directly
|
174
|
+
value
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each do |k, v|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
else # model
|
187
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
188
|
+
temp_model.build_from_hash(value)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the string representation of the object
|
193
|
+
# @return [String] String presentation of the object
|
194
|
+
def to_s
|
195
|
+
to_hash.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_body
|
201
|
+
to_hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the object in the form of hash
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_hash
|
207
|
+
hash = {}
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
209
|
+
value = self.send(attr)
|
210
|
+
next if value.nil?
|
211
|
+
hash[param] = _to_hash(value)
|
212
|
+
end
|
213
|
+
hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Outputs non-array value in the form of hash
|
217
|
+
# For object, use to_hash. Otherwise, just return the value
|
218
|
+
# @param [Object] value Any valid value
|
219
|
+
# @return [Hash] Returns the value in the form of hash
|
220
|
+
def _to_hash(value)
|
221
|
+
if value.is_a?(Array)
|
222
|
+
value.compact.map{ |v| _to_hash(v) }
|
223
|
+
elsif value.is_a?(Hash)
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
226
|
+
end
|
227
|
+
elsif value.respond_to? :to_hash
|
228
|
+
value.to_hash
|
229
|
+
else
|
230
|
+
value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
@@ -0,0 +1,214 @@
|
|
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
|
+
# An high level overview of information about the registration of the user to the invitation.
|
16
|
+
class UserInvitationSchemaRegistrationReport
|
17
|
+
attr_accessor :complete
|
18
|
+
|
19
|
+
attr_accessor :success
|
20
|
+
|
21
|
+
attr_accessor :total_seconds_tracked
|
22
|
+
|
23
|
+
attr_accessor :score
|
24
|
+
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'complete' => :'complete',
|
30
|
+
:'success' => :'success',
|
31
|
+
:'total_seconds_tracked' => :'totalSecondsTracked',
|
32
|
+
:'score' => :'score'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'complete' => :'RegistrationCompletion',
|
40
|
+
:'success' => :'RegistrationSuccess',
|
41
|
+
:'total_seconds_tracked' => :'Float',
|
42
|
+
:'score' => :'ScoreSchema'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
return unless attributes.is_a?(Hash)
|
50
|
+
|
51
|
+
# convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
53
|
+
|
54
|
+
if attributes.has_key?(:'complete')
|
55
|
+
self.complete = attributes[:'complete']
|
56
|
+
end
|
57
|
+
|
58
|
+
if attributes.has_key?(:'success')
|
59
|
+
self.success = attributes[:'success']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'totalSecondsTracked')
|
63
|
+
self.total_seconds_tracked = attributes[:'totalSecondsTracked']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'score')
|
67
|
+
self.score = attributes[:'score']
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
73
|
+
# @return Array for valid properies with the reasons
|
74
|
+
def list_invalid_properties
|
75
|
+
invalid_properties = Array.new
|
76
|
+
return invalid_properties
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
return true
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks equality by comparing each attribute.
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def ==(o)
|
88
|
+
return true if self.equal?(o)
|
89
|
+
self.class == o.class &&
|
90
|
+
complete == o.complete &&
|
91
|
+
success == o.success &&
|
92
|
+
total_seconds_tracked == o.total_seconds_tracked &&
|
93
|
+
score == o.score
|
94
|
+
end
|
95
|
+
|
96
|
+
# @see the `==` method
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def eql?(o)
|
99
|
+
self == o
|
100
|
+
end
|
101
|
+
|
102
|
+
# Calculates hash code according to all attributes.
|
103
|
+
# @return [Fixnum] Hash code
|
104
|
+
def hash
|
105
|
+
[complete, success, total_seconds_tracked, score].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
self.class.swagger_types.each_pair do |key, type|
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :BOOLEAN
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
temp_model = RusticiSoftwareCloudV2.const_get(type).new
|
166
|
+
temp_model.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
next if value.nil?
|
189
|
+
hash[param] = _to_hash(value)
|
190
|
+
end
|
191
|
+
hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Outputs non-array value in the form of hash
|
195
|
+
# For object, use to_hash. Otherwise, just return the value
|
196
|
+
# @param [Object] value Any valid value
|
197
|
+
# @return [Hash] Returns the value in the form of hash
|
198
|
+
def _to_hash(value)
|
199
|
+
if value.is_a?(Array)
|
200
|
+
value.compact.map{ |v| _to_hash(v) }
|
201
|
+
elsif value.is_a?(Hash)
|
202
|
+
{}.tap do |hash|
|
203
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
204
|
+
end
|
205
|
+
elsif value.respond_to? :to_hash
|
206
|
+
value.to_hash
|
207
|
+
else
|
208
|
+
value
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|