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 EulaAcceptRequest
@@ -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
- :'user_id' => :'Object',
42
- :'accepted_timestamp' => :'Object',
43
- :'language' => :'Object',
44
- :'version' => :'Object'
48
+ :'user_id' => :'String',
49
+ :'accepted_timestamp' => :'Time',
50
+ :'language' => :'String',
51
+ :'version' => :'String'
45
52
  }
46
53
  end
47
54
 
@@ -50,7 +57,7 @@ module TCAClient
50
57
  Set.new([
51
58
  ])
52
59
  end
53
-
60
+
54
61
  # Initializes the object
55
62
  # @param [Hash] attributes Model attributes in the form of hash
56
63
  def initialize(attributes = {})
@@ -131,8 +138,11 @@ module TCAClient
131
138
  # @return [Object] Returns the model itself
132
139
  def build_from_hash(attributes)
133
140
  return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
134
142
  self.class.openapi_types.each_pair do |key, type|
135
- if type =~ /\AArray<(.*)>/i
143
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
+ self.send("#{key}=", nil)
145
+ elsif type =~ /\AArray<(.*)>/i
136
146
  # check to ensure the input is an array given that the attribute
137
147
  # is documented as an array but the input is not
138
148
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -140,8 +150,6 @@ module TCAClient
140
150
  end
141
151
  elsif !attributes[self.class.attribute_map[key]].nil?
142
152
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
144
- self.send("#{key}=", nil)
145
153
  end
146
154
  end
147
155
 
@@ -154,8 +162,8 @@ module TCAClient
154
162
  # @return [Object] Deserialized data
155
163
  def _deserialize(type, value)
156
164
  case type.to_sym
157
- when :DateTime
158
- DateTime.parse(value)
165
+ when :Time
166
+ Time.parse(value)
159
167
  when :Date
160
168
  Date.parse(value)
161
169
  when :String
@@ -185,7 +193,9 @@ module TCAClient
185
193
  end
186
194
  end
187
195
  else # model
188
- TCAClient.const_get(type).build_from_hash(value)
196
+ # models (e.g. Pet) or oneOf
197
+ klass = TCAClient.const_get(type)
198
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
199
  end
190
200
  end
191
201
 
@@ -233,5 +243,8 @@ module TCAClient
233
243
  else
234
244
  value
235
245
  end
236
- end end
246
+ end
247
+
248
+ end
249
+
237
250
  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 EulaVersion
@@ -61,14 +63,19 @@ module TCAClient
61
63
  }
62
64
  end
63
65
 
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ attribute_map.values
69
+ end
70
+
64
71
  # Attribute type mapping.
65
72
  def self.openapi_types
66
73
  {
67
- :'version' => :'Object',
68
- :'valid_from' => :'Object',
69
- :'valid_until' => :'Object',
70
- :'url' => :'Object',
71
- :'available_languages' => :'Object'
74
+ :'version' => :'String',
75
+ :'valid_from' => :'Time',
76
+ :'valid_until' => :'Time',
77
+ :'url' => :'String',
78
+ :'available_languages' => :'Array<String>'
72
79
  }
73
80
  end
74
81
 
@@ -78,7 +85,7 @@ module TCAClient
78
85
  :'valid_until',
79
86
  ])
80
87
  end
81
-
88
+
82
89
  # Initializes the object
83
90
  # @param [Hash] attributes Model attributes in the form of hash
84
91
  def initialize(attributes = {})
@@ -166,8 +173,11 @@ module TCAClient
166
173
  # @return [Object] Returns the model itself
167
174
  def build_from_hash(attributes)
168
175
  return nil unless attributes.is_a?(Hash)
176
+ attributes = attributes.transform_keys(&:to_sym)
169
177
  self.class.openapi_types.each_pair do |key, type|
170
- if type =~ /\AArray<(.*)>/i
178
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
179
+ self.send("#{key}=", nil)
180
+ elsif type =~ /\AArray<(.*)>/i
171
181
  # check to ensure the input is an array given that the attribute
172
182
  # is documented as an array but the input is not
173
183
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -175,8 +185,6 @@ module TCAClient
175
185
  end
176
186
  elsif !attributes[self.class.attribute_map[key]].nil?
177
187
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
179
- self.send("#{key}=", nil)
180
188
  end
181
189
  end
182
190
 
@@ -189,8 +197,8 @@ module TCAClient
189
197
  # @return [Object] Deserialized data
190
198
  def _deserialize(type, value)
191
199
  case type.to_sym
192
- when :DateTime
193
- DateTime.parse(value)
200
+ when :Time
201
+ Time.parse(value)
194
202
  when :Date
195
203
  Date.parse(value)
196
204
  when :String
@@ -220,7 +228,9 @@ module TCAClient
220
228
  end
221
229
  end
222
230
  else # model
223
- TCAClient.const_get(type).build_from_hash(value)
231
+ # models (e.g. Pet) or oneOf
232
+ klass = TCAClient.const_get(type)
233
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
224
234
  end
225
235
  end
226
236
 
@@ -268,5 +278,8 @@ module TCAClient
268
278
  else
269
279
  value
270
280
  end
271
- end end
281
+ end
282
+
283
+ end
284
+
272
285
  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 FeaturesEnabled
@@ -53,13 +55,18 @@ module TCAClient
53
55
  }
54
56
  end
55
57
 
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ attribute_map.values
61
+ end
62
+
56
63
  # Attribute type mapping.
57
64
  def self.openapi_types
58
65
  {
59
- :'similarity' => :'Object',
60
- :'tenant' => :'Object',
61
- :'product_name' => :'Object',
62
- :'access_options' => :'Object'
66
+ :'similarity' => :'FeaturesSimilarity',
67
+ :'tenant' => :'FeaturesTenant',
68
+ :'product_name' => :'String',
69
+ :'access_options' => :'Array<String>'
63
70
  }
64
71
  end
65
72
 
@@ -68,7 +75,7 @@ module TCAClient
68
75
  Set.new([
69
76
  ])
70
77
  end
71
-
78
+
72
79
  # Initializes the object
73
80
  # @param [Hash] attributes Model attributes in the form of hash
74
81
  def initialize(attributes = {})
@@ -151,8 +158,11 @@ module TCAClient
151
158
  # @return [Object] Returns the model itself
152
159
  def build_from_hash(attributes)
153
160
  return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
154
162
  self.class.openapi_types.each_pair do |key, type|
155
- if type =~ /\AArray<(.*)>/i
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
156
166
  # check to ensure the input is an array given that the attribute
157
167
  # is documented as an array but the input is not
158
168
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -160,8 +170,6 @@ module TCAClient
160
170
  end
161
171
  elsif !attributes[self.class.attribute_map[key]].nil?
162
172
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
- self.send("#{key}=", nil)
165
173
  end
166
174
  end
167
175
 
@@ -174,8 +182,8 @@ module TCAClient
174
182
  # @return [Object] Deserialized data
175
183
  def _deserialize(type, value)
176
184
  case type.to_sym
177
- when :DateTime
178
- DateTime.parse(value)
185
+ when :Time
186
+ Time.parse(value)
179
187
  when :Date
180
188
  Date.parse(value)
181
189
  when :String
@@ -205,7 +213,9 @@ module TCAClient
205
213
  end
206
214
  end
207
215
  else # model
208
- TCAClient.const_get(type).build_from_hash(value)
216
+ # models (e.g. Pet) or oneOf
217
+ klass = TCAClient.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
219
  end
210
220
  end
211
221
 
@@ -253,5 +263,8 @@ module TCAClient
253
263
  else
254
264
  value
255
265
  end
256
- end end
266
+ end
267
+
268
+ end
269
+
257
270
  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 FeaturesGenerationSettings
@@ -48,11 +50,16 @@ module TCAClient
48
50
  }
49
51
  end
50
52
 
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
51
58
  # Attribute type mapping.
52
59
  def self.openapi_types
53
60
  {
54
- :'search_repositories' => :'Object',
55
- :'submission_auto_excludes' => :'Object'
61
+ :'search_repositories' => :'Array<String>',
62
+ :'submission_auto_excludes' => :'Boolean'
56
63
  }
57
64
  end
58
65
 
@@ -61,7 +68,7 @@ module TCAClient
61
68
  Set.new([
62
69
  ])
63
70
  end
64
-
71
+
65
72
  # Initializes the object
66
73
  # @param [Hash] attributes Model attributes in the form of hash
67
74
  def initialize(attributes = {})
@@ -134,8 +141,11 @@ module TCAClient
134
141
  # @return [Object] Returns the model itself
135
142
  def build_from_hash(attributes)
136
143
  return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
137
145
  self.class.openapi_types.each_pair do |key, type|
138
- if type =~ /\AArray<(.*)>/i
146
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
147
+ self.send("#{key}=", nil)
148
+ elsif type =~ /\AArray<(.*)>/i
139
149
  # check to ensure the input is an array given that the attribute
140
150
  # is documented as an array but the input is not
141
151
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -143,8 +153,6 @@ module TCAClient
143
153
  end
144
154
  elsif !attributes[self.class.attribute_map[key]].nil?
145
155
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
147
- self.send("#{key}=", nil)
148
156
  end
149
157
  end
150
158
 
@@ -157,8 +165,8 @@ module TCAClient
157
165
  # @return [Object] Deserialized data
158
166
  def _deserialize(type, value)
159
167
  case type.to_sym
160
- when :DateTime
161
- DateTime.parse(value)
168
+ when :Time
169
+ Time.parse(value)
162
170
  when :Date
163
171
  Date.parse(value)
164
172
  when :String
@@ -188,7 +196,9 @@ module TCAClient
188
196
  end
189
197
  end
190
198
  else # model
191
- TCAClient.const_get(type).build_from_hash(value)
199
+ # models (e.g. Pet) or oneOf
200
+ klass = TCAClient.const_get(type)
201
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
202
  end
193
203
  end
194
204
 
@@ -236,5 +246,8 @@ module TCAClient
236
246
  else
237
247
  value
238
248
  end
239
- end end
249
+ end
250
+
251
+ end
252
+
240
253
  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 FeaturesSimilarity
@@ -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
- :'viewer_modes' => :'Object',
35
- :'generation_settings' => :'Object',
36
- :'view_settings' => :'Object'
41
+ :'viewer_modes' => :'FeaturesViewerModes',
42
+ :'generation_settings' => :'FeaturesGenerationSettings',
43
+ :'view_settings' => :'FeaturesSimilarityViewSettings'
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 = {})
@@ -118,8 +125,11 @@ module TCAClient
118
125
  # @return [Object] Returns the model itself
119
126
  def build_from_hash(attributes)
120
127
  return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
121
129
  self.class.openapi_types.each_pair do |key, type|
122
- if type =~ /\AArray<(.*)>/i
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
123
133
  # check to ensure the input is an array given that the attribute
124
134
  # is documented as an array but the input is not
125
135
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -127,8 +137,6 @@ module TCAClient
127
137
  end
128
138
  elsif !attributes[self.class.attribute_map[key]].nil?
129
139
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
- self.send("#{key}=", nil)
132
140
  end
133
141
  end
134
142
 
@@ -141,8 +149,8 @@ module TCAClient
141
149
  # @return [Object] Deserialized data
142
150
  def _deserialize(type, value)
143
151
  case type.to_sym
144
- when :DateTime
145
- DateTime.parse(value)
152
+ when :Time
153
+ Time.parse(value)
146
154
  when :Date
147
155
  Date.parse(value)
148
156
  when :String
@@ -172,7 +180,9 @@ module TCAClient
172
180
  end
173
181
  end
174
182
  else # model
175
- TCAClient.const_get(type).build_from_hash(value)
183
+ # models (e.g. Pet) or oneOf
184
+ klass = TCAClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
186
  end
177
187
  end
178
188
 
@@ -220,5 +230,8 @@ module TCAClient
220
230
  else
221
231
  value
222
232
  end
223
- end end
233
+ end
234
+
235
+ end
236
+
224
237
  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 FeaturesSimilarityViewSettings
@@ -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' => :'Boolean',
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