tca_client 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/docs/AddGroupAttachmentRequest.md +16 -4
  4. data/docs/AddGroupAttachmentResponse.md +14 -3
  5. data/docs/AggregateGroup.md +24 -8
  6. data/docs/AnnotationsSettings.md +18 -0
  7. data/docs/AuthorMetadataOverride.md +16 -4
  8. data/docs/EULAApi.md +166 -92
  9. data/docs/Error.md +16 -4
  10. data/docs/Eula.md +18 -5
  11. data/docs/EulaAcceptListItem.md +20 -6
  12. data/docs/EulaAcceptRequest.md +20 -6
  13. data/docs/EulaVersion.md +22 -7
  14. data/docs/FeaturesApi.md +41 -23
  15. data/docs/FeaturesEnabled.md +20 -6
  16. data/docs/FeaturesGenerationSettings.md +16 -4
  17. data/docs/FeaturesSimilarity.md +18 -5
  18. data/docs/FeaturesSimilarityViewSettings.md +38 -15
  19. data/docs/FeaturesTenant.md +14 -3
  20. data/docs/FeaturesViewerModes.md +16 -4
  21. data/docs/GenerateSimilarityPDF.md +18 -0
  22. data/docs/GetGroupAttachments200Response.md +18 -0
  23. data/docs/Group.md +18 -5
  24. data/docs/GroupAttachmentResponse.md +20 -6
  25. data/docs/GroupContext.md +18 -5
  26. data/docs/GroupsApi.md +321 -177
  27. data/docs/IndexApi.md +84 -44
  28. data/docs/IndexStateSettings.md +14 -3
  29. data/docs/IndexingSettings.md +14 -3
  30. data/docs/PDFStatusWebhookRequest.md +24 -0
  31. data/docs/PdfStatusResponse.md +14 -3
  32. data/docs/RateLimitError.md +16 -4
  33. data/docs/RequestPdfResponse.md +14 -3
  34. data/docs/Sidebar.md +14 -3
  35. data/docs/SimilarityApi.md +239 -129
  36. data/docs/SimilarityCompleteWebhookRequest.md +38 -0
  37. data/docs/SimilarityGenerationSettings.md +20 -6
  38. data/docs/SimilarityMetadata.md +32 -12
  39. data/docs/SimilarityMetadataAllOf.md +28 -0
  40. data/docs/SimilarityMetadataAllOfTopMatches.md +30 -0
  41. data/docs/SimilarityPutRequest.md +18 -5
  42. data/docs/SimilarityScoreData.md +20 -6
  43. data/docs/SimilaritySettings.md +18 -5
  44. data/docs/SimilaritySettingsModes.md +16 -4
  45. data/docs/SimilaritySettingsViewSettings.md +14 -3
  46. data/docs/SimilarityViewSettings.md +38 -15
  47. data/docs/SimilarityViewerUrlResponse.md +14 -3
  48. data/docs/SimilarityViewerUrlSettings.md +30 -10
  49. data/docs/SimpleSubmissionResponse.md +22 -2
  50. data/docs/SimpleSubmissionResponseAllOf.md +26 -0
  51. data/docs/Submission.md +34 -2
  52. data/docs/SubmissionAllOf.md +38 -0
  53. data/docs/SubmissionApi.md +203 -112
  54. data/docs/SubmissionBase.md +30 -11
  55. data/docs/SubmissionBaseMetadata.md +24 -8
  56. data/docs/SubmissionCompleteWebhookRequest.md +40 -0
  57. data/docs/SubmissionCompleteWebhookRequestAllOf.md +18 -0
  58. data/docs/SubmissionCompleteWebhookRequestAllOfMetadata.md +18 -0
  59. data/docs/SubmissionSizeError.md +16 -4
  60. data/docs/SuccessMessage.md +14 -3
  61. data/docs/Users.md +20 -6
  62. data/docs/ViewerPermissions.md +22 -7
  63. data/docs/Webhook.md +24 -6
  64. data/docs/WebhookAllOf.md +20 -0
  65. data/docs/WebhookApi.md +193 -103
  66. data/docs/WebhookBase.md +20 -6
  67. data/docs/WebhookPathRequest.md +16 -4
  68. data/docs/WebhookWithSecret.md +22 -6
  69. data/docs/WebhookWithSecretAllOf.md +18 -0
  70. data/lib/tca_client/api/eula_api.rb +96 -63
  71. data/lib/tca_client/api/features_api.rb +21 -12
  72. data/lib/tca_client/api/groups_api.rb +225 -155
  73. data/lib/tca_client/api/index_api.rb +46 -27
  74. data/lib/tca_client/api/similarity_api.rb +165 -104
  75. data/lib/tca_client/api/submission_api.rb +140 -97
  76. data/lib/tca_client/api/webhook_api.rb +120 -77
  77. data/lib/tca_client/api_client.rb +61 -57
  78. data/lib/tca_client/api_error.rb +4 -4
  79. data/lib/tca_client/configuration.rb +93 -13
  80. data/lib/tca_client/models/add_group_attachment_request.rb +50 -13
  81. data/lib/tca_client/models/add_group_attachment_response.rb +25 -12
  82. data/lib/tca_client/models/aggregate_group.rb +34 -21
  83. data/lib/tca_client/models/annotations_settings.rb +220 -0
  84. data/lib/tca_client/models/author_metadata_override.rb +26 -13
  85. data/lib/tca_client/models/error.rb +26 -13
  86. data/lib/tca_client/models/eula.rb +27 -14
  87. data/lib/tca_client/models/eula_accept_list_item.rb +28 -15
  88. data/lib/tca_client/models/eula_accept_request.rb +28 -15
  89. data/lib/tca_client/models/eula_version.rb +29 -16
  90. data/lib/tca_client/models/features_enabled.rb +28 -15
  91. data/lib/tca_client/models/features_generation_settings.rb +26 -13
  92. data/lib/tca_client/models/features_similarity.rb +27 -14
  93. data/lib/tca_client/models/features_similarity_view_settings.rb +37 -24
  94. data/lib/tca_client/models/features_tenant.rb +25 -12
  95. data/lib/tca_client/models/features_viewer_modes.rb +26 -13
  96. data/lib/tca_client/models/generate_similarity_pdf.rb +254 -0
  97. data/lib/tca_client/models/{inline_response_200.rb → get_group_attachments200_response.rb} +28 -15
  98. data/lib/tca_client/models/group.rb +29 -16
  99. data/lib/tca_client/models/group_attachment_response.rb +38 -17
  100. data/lib/tca_client/models/group_context.rb +27 -14
  101. data/lib/tca_client/models/index_state_settings.rb +25 -12
  102. data/lib/tca_client/models/indexing_settings.rb +25 -12
  103. data/lib/tca_client/models/pdf_status_response.rb +27 -14
  104. data/lib/tca_client/models/pdf_status_webhook_request.rb +283 -0
  105. data/lib/tca_client/models/rate_limit_error.rb +36 -20
  106. data/lib/tca_client/models/request_pdf_response.rb +25 -12
  107. data/lib/tca_client/models/sidebar.rb +27 -14
  108. data/lib/tca_client/models/similarity_complete_webhook_request.rb +366 -0
  109. data/lib/tca_client/models/similarity_generation_settings.rb +30 -17
  110. data/lib/tca_client/models/similarity_metadata.rb +45 -28
  111. data/lib/tca_client/models/similarity_metadata_all_of.rb +301 -0
  112. data/lib/tca_client/models/{similarity_metadata_top_matches.rb → similarity_metadata_all_of_top_matches.rb} +34 -21
  113. data/lib/tca_client/models/similarity_put_request.rb +27 -14
  114. data/lib/tca_client/models/similarity_score_data.rb +28 -15
  115. data/lib/tca_client/models/similarity_settings.rb +29 -16
  116. data/lib/tca_client/models/similarity_settings_modes.rb +26 -13
  117. data/lib/tca_client/models/similarity_settings_view_settings.rb +25 -12
  118. data/lib/tca_client/models/similarity_view_settings.rb +37 -24
  119. data/lib/tca_client/models/similarity_viewer_url_response.rb +25 -12
  120. data/lib/tca_client/models/similarity_viewer_url_settings.rb +46 -24
  121. data/lib/tca_client/models/simple_submission_response.rb +117 -13
  122. data/lib/tca_client/models/simple_submission_response_all_of.rb +294 -0
  123. data/lib/tca_client/models/submission.rb +191 -13
  124. data/lib/tca_client/models/submission_all_of.rb +368 -0
  125. data/lib/tca_client/models/submission_base.rb +82 -23
  126. data/lib/tca_client/models/submission_base_metadata.rb +30 -17
  127. data/lib/tca_client/models/submission_complete_webhook_request.rb +385 -0
  128. data/lib/tca_client/models/submission_complete_webhook_request_all_of.rb +219 -0
  129. data/lib/tca_client/models/submission_complete_webhook_request_all_of_metadata.rb +219 -0
  130. data/lib/tca_client/models/submission_size_error.rb +36 -20
  131. data/lib/tca_client/models/success_message.rb +25 -12
  132. data/lib/tca_client/models/users.rb +28 -15
  133. data/lib/tca_client/models/viewer_permissions.rb +29 -16
  134. data/lib/tca_client/models/webhook.rb +62 -16
  135. data/lib/tca_client/models/webhook_all_of.rb +235 -0
  136. data/lib/tca_client/models/webhook_base.rb +28 -15
  137. data/lib/tca_client/models/webhook_path_request.rb +26 -13
  138. data/lib/tca_client/models/webhook_with_secret.rb +52 -16
  139. data/lib/tca_client/models/webhook_with_secret_all_of.rb +225 -0
  140. data/lib/tca_client/version.rb +5 -4
  141. data/lib/tca_client.rb +18 -5
  142. data/spec/api/submission_api_spec.rb +2 -2
  143. data/tca_client-1.0.0.gem +0 -0
  144. data/tca_client-1.0.1.gem +0 -0
  145. data/tca_client.gemspec +7 -7
  146. metadata +44 -38
  147. data/docs/InlineResponse200.md +0 -7
  148. data/docs/SimilarityMetadataTopMatches.md +0 -13
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilarityPutRequest
@@ -28,12 +30,17 @@ module TCAClient
28
30
  }
29
31
  end
30
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
31
38
  # Attribute type mapping.
32
39
  def self.openapi_types
33
40
  {
34
- :'indexing_settings' => :'Object',
35
- :'generation_settings' => :'Object',
36
- :'view_settings' => :'Object'
41
+ :'indexing_settings' => :'IndexingSettings',
42
+ :'generation_settings' => :'SimilarityGenerationSettings',
43
+ :'view_settings' => :'SimilarityViewSettings'
37
44
  }
38
45
  end
39
46
 
@@ -42,7 +49,7 @@ module TCAClient
42
49
  Set.new([
43
50
  ])
44
51
  end
45
-
52
+
46
53
  # Initializes the object
47
54
  # @param [Hash] attributes Model attributes in the form of hash
48
55
  def initialize(attributes = {})
@@ -123,8 +130,11 @@ module TCAClient
123
130
  # @return [Object] Returns the model itself
124
131
  def build_from_hash(attributes)
125
132
  return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
126
134
  self.class.openapi_types.each_pair do |key, type|
127
- if type =~ /\AArray<(.*)>/i
135
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
+ self.send("#{key}=", nil)
137
+ elsif type =~ /\AArray<(.*)>/i
128
138
  # check to ensure the input is an array given that the attribute
129
139
  # is documented as an array but the input is not
130
140
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -132,8 +142,6 @@ module TCAClient
132
142
  end
133
143
  elsif !attributes[self.class.attribute_map[key]].nil?
134
144
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
- self.send("#{key}=", nil)
137
145
  end
138
146
  end
139
147
 
@@ -146,8 +154,8 @@ module TCAClient
146
154
  # @return [Object] Deserialized data
147
155
  def _deserialize(type, value)
148
156
  case type.to_sym
149
- when :DateTime
150
- DateTime.parse(value)
157
+ when :Time
158
+ Time.parse(value)
151
159
  when :Date
152
160
  Date.parse(value)
153
161
  when :String
@@ -177,7 +185,9 @@ module TCAClient
177
185
  end
178
186
  end
179
187
  else # model
180
- TCAClient.const_get(type).build_from_hash(value)
188
+ # models (e.g. Pet) or oneOf
189
+ klass = TCAClient.const_get(type)
190
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
191
  end
182
192
  end
183
193
 
@@ -225,5 +235,8 @@ module TCAClient
225
235
  else
226
236
  value
227
237
  end
228
- end end
238
+ end
239
+
240
+ end
241
+
229
242
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilarityScoreData
@@ -35,13 +37,18 @@ module TCAClient
35
37
  }
36
38
  end
37
39
 
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
38
45
  # Attribute type mapping.
39
46
  def self.openapi_types
40
47
  {
41
- :'overall_match_percentage' => :'Object',
42
- :'internet_match_percentage' => :'Object',
43
- :'publication_match_percentage' => :'Object',
44
- :'submitted_works_match_percentage' => :'Object'
48
+ :'overall_match_percentage' => :'Integer',
49
+ :'internet_match_percentage' => :'Integer',
50
+ :'publication_match_percentage' => :'Integer',
51
+ :'submitted_works_match_percentage' => :'Integer'
45
52
  }
46
53
  end
47
54
 
@@ -53,7 +60,7 @@ module TCAClient
53
60
  :'submitted_works_match_percentage'
54
61
  ])
55
62
  end
56
-
63
+
57
64
  # Initializes the object
58
65
  # @param [Hash] attributes Model attributes in the form of hash
59
66
  def initialize(attributes = {})
@@ -139,8 +146,11 @@ module TCAClient
139
146
  # @return [Object] Returns the model itself
140
147
  def build_from_hash(attributes)
141
148
  return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
142
150
  self.class.openapi_types.each_pair do |key, type|
143
- if type =~ /\AArray<(.*)>/i
151
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
152
+ self.send("#{key}=", nil)
153
+ elsif type =~ /\AArray<(.*)>/i
144
154
  # check to ensure the input is an array given that the attribute
145
155
  # is documented as an array but the input is not
146
156
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -148,8 +158,6 @@ module TCAClient
148
158
  end
149
159
  elsif !attributes[self.class.attribute_map[key]].nil?
150
160
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
152
- self.send("#{key}=", nil)
153
161
  end
154
162
  end
155
163
 
@@ -162,8 +170,8 @@ module TCAClient
162
170
  # @return [Object] Deserialized data
163
171
  def _deserialize(type, value)
164
172
  case type.to_sym
165
- when :DateTime
166
- DateTime.parse(value)
173
+ when :Time
174
+ Time.parse(value)
167
175
  when :Date
168
176
  Date.parse(value)
169
177
  when :String
@@ -193,7 +201,9 @@ module TCAClient
193
201
  end
194
202
  end
195
203
  else # model
196
- TCAClient.const_get(type).build_from_hash(value)
204
+ # models (e.g. Pet) or oneOf
205
+ klass = TCAClient.const_get(type)
206
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
197
207
  end
198
208
  end
199
209
 
@@ -241,5 +251,8 @@ module TCAClient
241
251
  else
242
252
  value
243
253
  end
244
- end end
254
+ end
255
+
256
+ end
257
+
245
258
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilaritySettings
@@ -51,12 +53,17 @@ module TCAClient
51
53
  }
52
54
  end
53
55
 
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
54
61
  # Attribute type mapping.
55
62
  def self.openapi_types
56
63
  {
57
- :'default_mode' => :'Object',
58
- :'modes' => :'Object',
59
- :'view_settings' => :'Object'
64
+ :'default_mode' => :'String',
65
+ :'modes' => :'SimilaritySettingsModes',
66
+ :'view_settings' => :'SimilaritySettingsViewSettings'
60
67
  }
61
68
  end
62
69
 
@@ -65,7 +72,7 @@ module TCAClient
65
72
  Set.new([
66
73
  ])
67
74
  end
68
-
75
+
69
76
  # Initializes the object
70
77
  # @param [Hash] attributes Model attributes in the form of hash
71
78
  def initialize(attributes = {})
@@ -104,7 +111,7 @@ module TCAClient
104
111
  # Check to see if the all the properties in the model are valid
105
112
  # @return true if the model is valid
106
113
  def valid?
107
- default_mode_validator = EnumAttributeValidator.new('Object', ['match_overview', 'all_sources'])
114
+ default_mode_validator = EnumAttributeValidator.new('String', ["match_overview", "all_sources"])
108
115
  return false unless default_mode_validator.valid?(@default_mode)
109
116
  true
110
117
  end
@@ -112,7 +119,7 @@ module TCAClient
112
119
  # Custom attribute writer method checking allowed values (enum).
113
120
  # @param [Object] default_mode Object to be assigned
114
121
  def default_mode=(default_mode)
115
- validator = EnumAttributeValidator.new('Object', ['match_overview', 'all_sources'])
122
+ validator = EnumAttributeValidator.new('String', ["match_overview", "all_sources"])
116
123
  unless validator.valid?(default_mode)
117
124
  fail ArgumentError, "invalid value for \"default_mode\", must be one of #{validator.allowable_values}."
118
125
  end
@@ -153,8 +160,11 @@ module TCAClient
153
160
  # @return [Object] Returns the model itself
154
161
  def build_from_hash(attributes)
155
162
  return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
156
164
  self.class.openapi_types.each_pair do |key, type|
157
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
158
168
  # check to ensure the input is an array given that the attribute
159
169
  # is documented as an array but the input is not
160
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -162,8 +172,6 @@ module TCAClient
162
172
  end
163
173
  elsif !attributes[self.class.attribute_map[key]].nil?
164
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
- self.send("#{key}=", nil)
167
175
  end
168
176
  end
169
177
 
@@ -176,8 +184,8 @@ module TCAClient
176
184
  # @return [Object] Deserialized data
177
185
  def _deserialize(type, value)
178
186
  case type.to_sym
179
- when :DateTime
180
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
181
189
  when :Date
182
190
  Date.parse(value)
183
191
  when :String
@@ -207,7 +215,9 @@ module TCAClient
207
215
  end
208
216
  end
209
217
  else # model
210
- TCAClient.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = TCAClient.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
221
  end
212
222
  end
213
223
 
@@ -255,5 +265,8 @@ module TCAClient
255
265
  else
256
266
  value
257
267
  end
258
- end end
268
+ end
269
+
270
+ end
271
+
259
272
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilaritySettingsModes
@@ -27,11 +29,16 @@ module TCAClient
27
29
  }
28
30
  end
29
31
 
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
30
37
  # Attribute type mapping.
31
38
  def self.openapi_types
32
39
  {
33
- :'match_overview' => :'Object',
34
- :'all_sources' => :'Object'
40
+ :'match_overview' => :'Boolean',
41
+ :'all_sources' => :'Boolean'
35
42
  }
36
43
  end
37
44
 
@@ -40,7 +47,7 @@ module TCAClient
40
47
  Set.new([
41
48
  ])
42
49
  end
43
-
50
+
44
51
  # Initializes the object
45
52
  # @param [Hash] attributes Model attributes in the form of hash
46
53
  def initialize(attributes = {})
@@ -111,8 +118,11 @@ module TCAClient
111
118
  # @return [Object] Returns the model itself
112
119
  def build_from_hash(attributes)
113
120
  return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
114
122
  self.class.openapi_types.each_pair do |key, type|
115
- if type =~ /\AArray<(.*)>/i
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
116
126
  # check to ensure the input is an array given that the attribute
117
127
  # is documented as an array but the input is not
118
128
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -120,8 +130,6 @@ module TCAClient
120
130
  end
121
131
  elsif !attributes[self.class.attribute_map[key]].nil?
122
132
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
125
133
  end
126
134
  end
127
135
 
@@ -134,8 +142,8 @@ module TCAClient
134
142
  # @return [Object] Deserialized data
135
143
  def _deserialize(type, value)
136
144
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
145
+ when :Time
146
+ Time.parse(value)
139
147
  when :Date
140
148
  Date.parse(value)
141
149
  when :String
@@ -165,7 +173,9 @@ module TCAClient
165
173
  end
166
174
  end
167
175
  else # model
168
- TCAClient.const_get(type).build_from_hash(value)
176
+ # models (e.g. Pet) or oneOf
177
+ klass = TCAClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
179
  end
170
180
  end
171
181
 
@@ -213,5 +223,8 @@ module TCAClient
213
223
  else
214
224
  value
215
225
  end
216
- end end
226
+ end
227
+
228
+ end
229
+
217
230
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilaritySettingsViewSettings
@@ -23,10 +25,15 @@ module TCAClient
23
25
  }
24
26
  end
25
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
26
33
  # Attribute type mapping.
27
34
  def self.openapi_types
28
35
  {
29
- :'save_changes' => :'Object'
36
+ :'save_changes' => :'Boolean'
30
37
  }
31
38
  end
32
39
 
@@ -35,7 +42,7 @@ module TCAClient
35
42
  Set.new([
36
43
  ])
37
44
  end
38
-
45
+
39
46
  # Initializes the object
40
47
  # @param [Hash] attributes Model attributes in the form of hash
41
48
  def initialize(attributes = {})
@@ -101,8 +108,11 @@ module TCAClient
101
108
  # @return [Object] Returns the model itself
102
109
  def build_from_hash(attributes)
103
110
  return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
104
112
  self.class.openapi_types.each_pair do |key, type|
105
- if type =~ /\AArray<(.*)>/i
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
106
116
  # check to ensure the input is an array given that the attribute
107
117
  # is documented as an array but the input is not
108
118
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -110,8 +120,6 @@ module TCAClient
110
120
  end
111
121
  elsif !attributes[self.class.attribute_map[key]].nil?
112
122
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
- self.send("#{key}=", nil)
115
123
  end
116
124
  end
117
125
 
@@ -124,8 +132,8 @@ module TCAClient
124
132
  # @return [Object] Deserialized data
125
133
  def _deserialize(type, value)
126
134
  case type.to_sym
127
- when :DateTime
128
- DateTime.parse(value)
135
+ when :Time
136
+ Time.parse(value)
129
137
  when :Date
130
138
  Date.parse(value)
131
139
  when :String
@@ -155,7 +163,9 @@ module TCAClient
155
163
  end
156
164
  end
157
165
  else # model
158
- TCAClient.const_get(type).build_from_hash(value)
166
+ # models (e.g. Pet) or oneOf
167
+ klass = TCAClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
159
169
  end
160
170
  end
161
171
 
@@ -203,5 +213,8 @@ module TCAClient
203
213
  else
204
214
  value
205
215
  end
206
- end end
216
+ end
217
+
218
+ end
219
+
207
220
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our [developer portal documentation page](https://developers.turnitin.com/docs). ## Integration Scope and API Key Management TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an *Admin* user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing) * Click `Integrations` in the side bar --> `+ Add Integration` at top the top of the page --> Enter a name --> `Add` Button API Keys * Click `Integrations` in the side bar --> `Create API Key` Button next to a given Integration Scope --> Enter a name --> click `Create and View button` * Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show) ## TCA Flow * Register a webhook * Create a submission * Upload a file for the submission * Wait for the submission upload to process * If you registered a webhook, a callback will be sent to it when upload is complete * The status of the *submission* will also update to `COMPLETE` * Request a Similarity Report * Wait for similarity report to process * If you registered a webhook, a callback will be sent to it when report is complete * The status of the *report* will also be updated to `COMPLETE` * Request a URL with parameters to view the Similarity Report
5
5
 
6
- OpenAPI spec version: 1.0.249
6
+ The version of the OpenAPI document: 1.0.258
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0-SNAPSHOT
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module TCAClient
15
17
  class SimilarityViewSettings
@@ -71,22 +73,27 @@ module TCAClient
71
73
  }
72
74
  end
73
75
 
76
+ # Returns all the JSON keys this model knows about
77
+ def self.acceptable_attributes
78
+ attribute_map.values
79
+ end
80
+
74
81
  # Attribute type mapping.
75
82
  def self.openapi_types
76
83
  {
77
- :'exclude_quotes' => :'Object',
78
- :'exclude_bibliography' => :'Object',
79
- :'exclude_citations' => :'Object',
80
- :'exclude_abstract' => :'Object',
81
- :'exclude_methods' => :'Object',
82
- :'exclude_small_matches' => :'Object',
83
- :'exclude_internet' => :'Object',
84
- :'exclude_publications' => :'Object',
85
- :'exclude_crossref' => :'Object',
86
- :'exclude_crossref_posted_content' => :'Object',
87
- :'exclude_submitted_works' => :'Object',
88
- :'exclude_custom_sections' => :'Object',
89
- :'exclude_preprints' => :'Object'
84
+ :'exclude_quotes' => :'Boolean',
85
+ :'exclude_bibliography' => :'Boolean',
86
+ :'exclude_citations' => :'Boolean',
87
+ :'exclude_abstract' => :'Boolean',
88
+ :'exclude_methods' => :'Boolean',
89
+ :'exclude_small_matches' => :'Integer',
90
+ :'exclude_internet' => :'Boolean',
91
+ :'exclude_publications' => :'Boolean',
92
+ :'exclude_crossref' => :'Boolean',
93
+ :'exclude_crossref_posted_content' => :'Boolean',
94
+ :'exclude_submitted_works' => :'Boolean',
95
+ :'exclude_custom_sections' => :'Boolean',
96
+ :'exclude_preprints' => :'Boolean'
90
97
  }
91
98
  end
92
99
 
@@ -95,7 +102,7 @@ module TCAClient
95
102
  Set.new([
96
103
  ])
97
104
  end
98
-
105
+
99
106
  # Initializes the object
100
107
  # @param [Hash] attributes Model attributes in the form of hash
101
108
  def initialize(attributes = {})
@@ -221,8 +228,11 @@ module TCAClient
221
228
  # @return [Object] Returns the model itself
222
229
  def build_from_hash(attributes)
223
230
  return nil unless attributes.is_a?(Hash)
231
+ attributes = attributes.transform_keys(&:to_sym)
224
232
  self.class.openapi_types.each_pair do |key, type|
225
- if type =~ /\AArray<(.*)>/i
233
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
234
+ self.send("#{key}=", nil)
235
+ elsif type =~ /\AArray<(.*)>/i
226
236
  # check to ensure the input is an array given that the attribute
227
237
  # is documented as an array but the input is not
228
238
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -230,8 +240,6 @@ module TCAClient
230
240
  end
231
241
  elsif !attributes[self.class.attribute_map[key]].nil?
232
242
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
233
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
234
- self.send("#{key}=", nil)
235
243
  end
236
244
  end
237
245
 
@@ -244,8 +252,8 @@ module TCAClient
244
252
  # @return [Object] Deserialized data
245
253
  def _deserialize(type, value)
246
254
  case type.to_sym
247
- when :DateTime
248
- DateTime.parse(value)
255
+ when :Time
256
+ Time.parse(value)
249
257
  when :Date
250
258
  Date.parse(value)
251
259
  when :String
@@ -275,7 +283,9 @@ module TCAClient
275
283
  end
276
284
  end
277
285
  else # model
278
- TCAClient.const_get(type).build_from_hash(value)
286
+ # models (e.g. Pet) or oneOf
287
+ klass = TCAClient.const_get(type)
288
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
279
289
  end
280
290
  end
281
291
 
@@ -323,5 +333,8 @@ module TCAClient
323
333
  else
324
334
  value
325
335
  end
326
- end end
336
+ end
337
+
338
+ end
339
+
327
340
  end