tca_client 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AddGroupAttachmentRequest.md +16 -4
  3. data/docs/AddGroupAttachmentResponse.md +14 -3
  4. data/docs/AggregateGroup.md +24 -8
  5. data/docs/AnnotationsSettings.md +18 -0
  6. data/docs/AuthorMetadataOverride.md +16 -4
  7. data/docs/EULAApi.md +166 -92
  8. data/docs/Error.md +16 -4
  9. data/docs/Eula.md +18 -5
  10. data/docs/EulaAcceptListItem.md +20 -6
  11. data/docs/EulaAcceptRequest.md +20 -6
  12. data/docs/EulaVersion.md +22 -7
  13. data/docs/FeaturesApi.md +41 -23
  14. data/docs/FeaturesEnabled.md +20 -6
  15. data/docs/FeaturesGenerationSettings.md +16 -4
  16. data/docs/FeaturesSimilarity.md +18 -5
  17. data/docs/FeaturesSimilarityViewSettings.md +38 -15
  18. data/docs/FeaturesTenant.md +14 -3
  19. data/docs/FeaturesViewerModes.md +16 -4
  20. data/docs/GenerateSimilarityPDF.md +18 -0
  21. data/docs/GetGroupAttachments200Response.md +18 -0
  22. data/docs/Group.md +18 -5
  23. data/docs/GroupAttachmentResponse.md +20 -6
  24. data/docs/GroupContext.md +18 -5
  25. data/docs/GroupsApi.md +321 -177
  26. data/docs/IndexApi.md +84 -44
  27. data/docs/IndexStateSettings.md +14 -3
  28. data/docs/IndexingSettings.md +14 -3
  29. data/docs/PDFStatusWebhookRequest.md +24 -0
  30. data/docs/PdfStatusResponse.md +14 -3
  31. data/docs/RateLimitError.md +16 -4
  32. data/docs/RequestPdfResponse.md +14 -3
  33. data/docs/Sidebar.md +14 -3
  34. data/docs/SimilarityApi.md +239 -129
  35. data/docs/SimilarityCompleteWebhookRequest.md +38 -0
  36. data/docs/SimilarityGenerationSettings.md +20 -6
  37. data/docs/SimilarityMetadata.md +32 -12
  38. data/docs/SimilarityMetadataAllOf.md +28 -0
  39. data/docs/SimilarityMetadataAllOfTopMatches.md +30 -0
  40. data/docs/SimilarityPutRequest.md +18 -5
  41. data/docs/SimilarityScoreData.md +20 -6
  42. data/docs/SimilaritySettings.md +18 -5
  43. data/docs/SimilaritySettingsModes.md +16 -4
  44. data/docs/SimilaritySettingsViewSettings.md +14 -3
  45. data/docs/SimilarityViewSettings.md +38 -15
  46. data/docs/SimilarityViewerUrlResponse.md +14 -3
  47. data/docs/SimilarityViewerUrlSettings.md +30 -10
  48. data/docs/SimpleSubmissionResponse.md +22 -2
  49. data/docs/SimpleSubmissionResponseAllOf.md +26 -0
  50. data/docs/Submission.md +34 -2
  51. data/docs/SubmissionAllOf.md +38 -0
  52. data/docs/SubmissionApi.md +202 -111
  53. data/docs/SubmissionBase.md +30 -11
  54. data/docs/SubmissionBaseMetadata.md +24 -8
  55. data/docs/SubmissionCompleteWebhookRequest.md +40 -0
  56. data/docs/SubmissionCompleteWebhookRequestAllOf.md +18 -0
  57. data/docs/SubmissionCompleteWebhookRequestAllOfMetadata.md +18 -0
  58. data/docs/SubmissionSizeError.md +16 -4
  59. data/docs/SuccessMessage.md +14 -3
  60. data/docs/Users.md +20 -6
  61. data/docs/ViewerPermissions.md +22 -7
  62. data/docs/Webhook.md +24 -6
  63. data/docs/WebhookAllOf.md +20 -0
  64. data/docs/WebhookApi.md +193 -103
  65. data/docs/WebhookBase.md +20 -6
  66. data/docs/WebhookPathRequest.md +16 -4
  67. data/docs/WebhookWithSecret.md +22 -6
  68. data/docs/WebhookWithSecretAllOf.md +18 -0
  69. data/lib/tca_client/api/eula_api.rb +96 -63
  70. data/lib/tca_client/api/features_api.rb +21 -12
  71. data/lib/tca_client/api/groups_api.rb +225 -155
  72. data/lib/tca_client/api/index_api.rb +46 -27
  73. data/lib/tca_client/api/similarity_api.rb +165 -104
  74. data/lib/tca_client/api/submission_api.rb +132 -89
  75. data/lib/tca_client/api/webhook_api.rb +120 -77
  76. data/lib/tca_client/api_client.rb +61 -57
  77. data/lib/tca_client/api_error.rb +4 -4
  78. data/lib/tca_client/configuration.rb +93 -13
  79. data/lib/tca_client/models/add_group_attachment_request.rb +50 -13
  80. data/lib/tca_client/models/add_group_attachment_response.rb +25 -12
  81. data/lib/tca_client/models/aggregate_group.rb +34 -21
  82. data/lib/tca_client/models/annotations_settings.rb +220 -0
  83. data/lib/tca_client/models/author_metadata_override.rb +26 -13
  84. data/lib/tca_client/models/error.rb +26 -13
  85. data/lib/tca_client/models/eula.rb +27 -14
  86. data/lib/tca_client/models/eula_accept_list_item.rb +28 -15
  87. data/lib/tca_client/models/eula_accept_request.rb +28 -15
  88. data/lib/tca_client/models/eula_version.rb +29 -16
  89. data/lib/tca_client/models/features_enabled.rb +28 -15
  90. data/lib/tca_client/models/features_generation_settings.rb +26 -13
  91. data/lib/tca_client/models/features_similarity.rb +27 -14
  92. data/lib/tca_client/models/features_similarity_view_settings.rb +37 -24
  93. data/lib/tca_client/models/features_tenant.rb +25 -12
  94. data/lib/tca_client/models/features_viewer_modes.rb +26 -13
  95. data/lib/tca_client/models/generate_similarity_pdf.rb +254 -0
  96. data/lib/tca_client/models/{inline_response_200.rb → get_group_attachments200_response.rb} +28 -15
  97. data/lib/tca_client/models/group.rb +29 -16
  98. data/lib/tca_client/models/group_attachment_response.rb +30 -17
  99. data/lib/tca_client/models/group_context.rb +27 -14
  100. data/lib/tca_client/models/index_state_settings.rb +25 -12
  101. data/lib/tca_client/models/indexing_settings.rb +25 -12
  102. data/lib/tca_client/models/pdf_status_response.rb +27 -14
  103. data/lib/tca_client/models/pdf_status_webhook_request.rb +283 -0
  104. data/lib/tca_client/models/rate_limit_error.rb +36 -20
  105. data/lib/tca_client/models/request_pdf_response.rb +25 -12
  106. data/lib/tca_client/models/sidebar.rb +27 -14
  107. data/lib/tca_client/models/similarity_complete_webhook_request.rb +366 -0
  108. data/lib/tca_client/models/similarity_generation_settings.rb +30 -17
  109. data/lib/tca_client/models/similarity_metadata.rb +45 -28
  110. data/lib/tca_client/models/similarity_metadata_all_of.rb +301 -0
  111. data/lib/tca_client/models/{similarity_metadata_top_matches.rb → similarity_metadata_all_of_top_matches.rb} +34 -21
  112. data/lib/tca_client/models/similarity_put_request.rb +27 -14
  113. data/lib/tca_client/models/similarity_score_data.rb +28 -15
  114. data/lib/tca_client/models/similarity_settings.rb +29 -16
  115. data/lib/tca_client/models/similarity_settings_modes.rb +26 -13
  116. data/lib/tca_client/models/similarity_settings_view_settings.rb +25 -12
  117. data/lib/tca_client/models/similarity_view_settings.rb +37 -24
  118. data/lib/tca_client/models/similarity_viewer_url_response.rb +25 -12
  119. data/lib/tca_client/models/similarity_viewer_url_settings.rb +46 -24
  120. data/lib/tca_client/models/simple_submission_response.rb +117 -13
  121. data/lib/tca_client/models/simple_submission_response_all_of.rb +294 -0
  122. data/lib/tca_client/models/submission.rb +191 -13
  123. data/lib/tca_client/models/submission_all_of.rb +368 -0
  124. data/lib/tca_client/models/submission_base.rb +82 -23
  125. data/lib/tca_client/models/submission_base_metadata.rb +30 -17
  126. data/lib/tca_client/models/submission_complete_webhook_request.rb +385 -0
  127. data/lib/tca_client/models/submission_complete_webhook_request_all_of.rb +219 -0
  128. data/lib/tca_client/models/submission_complete_webhook_request_all_of_metadata.rb +219 -0
  129. data/lib/tca_client/models/submission_size_error.rb +36 -20
  130. data/lib/tca_client/models/success_message.rb +25 -12
  131. data/lib/tca_client/models/users.rb +28 -15
  132. data/lib/tca_client/models/viewer_permissions.rb +29 -16
  133. data/lib/tca_client/models/webhook.rb +62 -16
  134. data/lib/tca_client/models/webhook_all_of.rb +235 -0
  135. data/lib/tca_client/models/webhook_base.rb +28 -15
  136. data/lib/tca_client/models/webhook_path_request.rb +26 -13
  137. data/lib/tca_client/models/webhook_with_secret.rb +52 -16
  138. data/lib/tca_client/models/webhook_with_secret_all_of.rb +225 -0
  139. data/lib/tca_client/version.rb +5 -4
  140. data/lib/tca_client.rb +18 -5
  141. data/tca_client-1.0.0.gem +0 -0
  142. data/tca_client.gemspec +7 -7
  143. metadata +34 -29
  144. data/docs/InlineResponse200.md +0 -7
  145. data/docs/SimilarityMetadataTopMatches.md +0 -13
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Turnitin Core API
3
+
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
+
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
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TCAClient
17
+ class SubmissionCompleteWebhookRequestAllOfMetadata
18
+ attr_accessor :custom
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'custom' => :'custom'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'custom' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TCAClient::SubmissionCompleteWebhookRequestAllOfMetadata` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TCAClient::SubmissionCompleteWebhookRequestAllOfMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'custom')
61
+ self.custom = attributes[:'custom']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ custom == o.custom
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [custom].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that 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
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 :Time
135
+ Time.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
+ # models (e.g. Pet) or oneOf
166
+ klass = TCAClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ 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 SubmissionSizeError
@@ -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
- :'status' => :'',
34
- :'message' => :''
40
+ :'status' => :'String',
41
+ :'message' => :'String'
35
42
  }
36
43
  end
37
44
 
@@ -40,7 +47,14 @@ module TCAClient
40
47
  Set.new([
41
48
  ])
42
49
  end
43
-
50
+
51
+ # List of class defined in allOf (OpenAPI v3)
52
+ def self.openapi_all_of
53
+ [
54
+ :'Error'
55
+ ]
56
+ end
57
+
44
58
  # Initializes the object
45
59
  # @param [Hash] attributes Model attributes in the form of hash
46
60
  def initialize(attributes = {})
@@ -56,9 +70,6 @@ module TCAClient
56
70
  h[k.to_sym] = v
57
71
  }
58
72
 
59
- # call parent's initialize
60
- super(attributes)
61
-
62
73
  if attributes.key?(:'status')
63
74
  self.status = attributes[:'status']
64
75
  end
@@ -71,7 +82,7 @@ module TCAClient
71
82
  # Show invalid properties with the reasons. Usually used together with valid?
72
83
  # @return Array for valid properties with the reasons
73
84
  def list_invalid_properties
74
- invalid_properties = super
85
+ invalid_properties = Array.new
75
86
  invalid_properties
76
87
  end
77
88
 
@@ -87,7 +98,7 @@ module TCAClient
87
98
  return true if self.equal?(o)
88
99
  self.class == o.class &&
89
100
  status == o.status &&
90
- message == o.message && super(o)
101
+ message == o.message
91
102
  end
92
103
 
93
104
  # @see the `==` method
@@ -114,9 +125,11 @@ module TCAClient
114
125
  # @return [Object] Returns the model itself
115
126
  def build_from_hash(attributes)
116
127
  return nil unless attributes.is_a?(Hash)
117
- super(attributes)
128
+ attributes = attributes.transform_keys(&:to_sym)
118
129
  self.class.openapi_types.each_pair do |key, type|
119
- 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
120
133
  # check to ensure the input is an array given that the attribute
121
134
  # is documented as an array but the input is not
122
135
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -124,8 +137,6 @@ module TCAClient
124
137
  end
125
138
  elsif !attributes[self.class.attribute_map[key]].nil?
126
139
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
128
- self.send("#{key}=", nil)
129
140
  end
130
141
  end
131
142
 
@@ -138,8 +149,8 @@ module TCAClient
138
149
  # @return [Object] Deserialized data
139
150
  def _deserialize(type, value)
140
151
  case type.to_sym
141
- when :DateTime
142
- DateTime.parse(value)
152
+ when :Time
153
+ Time.parse(value)
143
154
  when :Date
144
155
  Date.parse(value)
145
156
  when :String
@@ -169,7 +180,9 @@ module TCAClient
169
180
  end
170
181
  end
171
182
  else # model
172
- 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)
173
186
  end
174
187
  end
175
188
 
@@ -188,7 +201,7 @@ module TCAClient
188
201
  # Returns the object in the form of hash
189
202
  # @return [Hash] Returns the object in the form of hash
190
203
  def to_hash
191
- hash = super
204
+ hash = {}
192
205
  self.class.attribute_map.each_pair do |attr, param|
193
206
  value = self.send(attr)
194
207
  if value.nil?
@@ -217,5 +230,8 @@ module TCAClient
217
230
  else
218
231
  value
219
232
  end
220
- end end
233
+ end
234
+
235
+ end
236
+
221
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
  # Object returned for success messages.
@@ -24,10 +26,15 @@ module TCAClient
24
26
  }
25
27
  end
26
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
27
34
  # Attribute type mapping.
28
35
  def self.openapi_types
29
36
  {
30
- :'message' => :'Object'
37
+ :'message' => :'String'
31
38
  }
32
39
  end
33
40
 
@@ -36,7 +43,7 @@ module TCAClient
36
43
  Set.new([
37
44
  ])
38
45
  end
39
-
46
+
40
47
  # Initializes the object
41
48
  # @param [Hash] attributes Model attributes in the form of hash
42
49
  def initialize(attributes = {})
@@ -102,8 +109,11 @@ module TCAClient
102
109
  # @return [Object] Returns the model itself
103
110
  def build_from_hash(attributes)
104
111
  return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
105
113
  self.class.openapi_types.each_pair do |key, type|
106
- if type =~ /\AArray<(.*)>/i
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ elsif type =~ /\AArray<(.*)>/i
107
117
  # check to ensure the input is an array given that the attribute
108
118
  # is documented as an array but the input is not
109
119
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -111,8 +121,6 @@ module TCAClient
111
121
  end
112
122
  elsif !attributes[self.class.attribute_map[key]].nil?
113
123
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
- self.send("#{key}=", nil)
116
124
  end
117
125
  end
118
126
 
@@ -125,8 +133,8 @@ module TCAClient
125
133
  # @return [Object] Deserialized data
126
134
  def _deserialize(type, value)
127
135
  case type.to_sym
128
- when :DateTime
129
- DateTime.parse(value)
136
+ when :Time
137
+ Time.parse(value)
130
138
  when :Date
131
139
  Date.parse(value)
132
140
  when :String
@@ -156,7 +164,9 @@ module TCAClient
156
164
  end
157
165
  end
158
166
  else # model
159
- TCAClient.const_get(type).build_from_hash(value)
167
+ # models (e.g. Pet) or oneOf
168
+ klass = TCAClient.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
160
170
  end
161
171
  end
162
172
 
@@ -204,5 +214,8 @@ module TCAClient
204
214
  else
205
215
  value
206
216
  end
207
- end end
217
+ end
218
+
219
+ end
220
+
208
221
  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 Users
@@ -32,13 +34,18 @@ module TCAClient
32
34
  }
33
35
  end
34
36
 
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
35
42
  # Attribute type mapping.
36
43
  def self.openapi_types
37
44
  {
38
- :'id' => :'Object',
39
- :'family_name' => :'Object',
40
- :'given_name' => :'Object',
41
- :'email' => :'Object'
45
+ :'id' => :'String',
46
+ :'family_name' => :'String',
47
+ :'given_name' => :'String',
48
+ :'email' => :'String'
42
49
  }
43
50
  end
44
51
 
@@ -47,7 +54,7 @@ module TCAClient
47
54
  Set.new([
48
55
  ])
49
56
  end
50
-
57
+
51
58
  # Initializes the object
52
59
  # @param [Hash] attributes Model attributes in the form of hash
53
60
  def initialize(attributes = {})
@@ -128,8 +135,11 @@ module TCAClient
128
135
  # @return [Object] Returns the model itself
129
136
  def build_from_hash(attributes)
130
137
  return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
131
139
  self.class.openapi_types.each_pair do |key, type|
132
- if type =~ /\AArray<(.*)>/i
140
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
+ self.send("#{key}=", nil)
142
+ elsif type =~ /\AArray<(.*)>/i
133
143
  # check to ensure the input is an array given that the attribute
134
144
  # is documented as an array but the input is not
135
145
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -137,8 +147,6 @@ module TCAClient
137
147
  end
138
148
  elsif !attributes[self.class.attribute_map[key]].nil?
139
149
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
- self.send("#{key}=", nil)
142
150
  end
143
151
  end
144
152
 
@@ -151,8 +159,8 @@ module TCAClient
151
159
  # @return [Object] Deserialized data
152
160
  def _deserialize(type, value)
153
161
  case type.to_sym
154
- when :DateTime
155
- DateTime.parse(value)
162
+ when :Time
163
+ Time.parse(value)
156
164
  when :Date
157
165
  Date.parse(value)
158
166
  when :String
@@ -182,7 +190,9 @@ module TCAClient
182
190
  end
183
191
  end
184
192
  else # model
185
- TCAClient.const_get(type).build_from_hash(value)
193
+ # models (e.g. Pet) or oneOf
194
+ klass = TCAClient.const_get(type)
195
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
196
  end
187
197
  end
188
198
 
@@ -230,5 +240,8 @@ module TCAClient
230
240
  else
231
241
  value
232
242
  end
233
- end end
243
+ end
244
+
245
+ end
246
+
234
247
  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 ViewerPermissions
@@ -39,14 +41,19 @@ module TCAClient
39
41
  }
40
42
  end
41
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
42
49
  # Attribute type mapping.
43
50
  def self.openapi_types
44
51
  {
45
- :'may_view_submission_full_source' => :'Object',
46
- :'may_view_match_submission_info' => :'Object',
47
- :'may_view_flags_panel' => :'Object',
48
- :'may_view_document_details_panel' => :'Object',
49
- :'may_view_sections_exclusion_panel' => :'Object'
52
+ :'may_view_submission_full_source' => :'Boolean',
53
+ :'may_view_match_submission_info' => :'Boolean',
54
+ :'may_view_flags_panel' => :'Boolean',
55
+ :'may_view_document_details_panel' => :'Boolean',
56
+ :'may_view_sections_exclusion_panel' => :'Boolean'
50
57
  }
51
58
  end
52
59
 
@@ -55,7 +62,7 @@ module TCAClient
55
62
  Set.new([
56
63
  ])
57
64
  end
58
-
65
+
59
66
  # Initializes the object
60
67
  # @param [Hash] attributes Model attributes in the form of hash
61
68
  def initialize(attributes = {})
@@ -141,8 +148,11 @@ module TCAClient
141
148
  # @return [Object] Returns the model itself
142
149
  def build_from_hash(attributes)
143
150
  return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
144
152
  self.class.openapi_types.each_pair do |key, type|
145
- if type =~ /\AArray<(.*)>/i
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
146
156
  # check to ensure the input is an array given that the attribute
147
157
  # is documented as an array but the input is not
148
158
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -150,8 +160,6 @@ module TCAClient
150
160
  end
151
161
  elsif !attributes[self.class.attribute_map[key]].nil?
152
162
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
- self.send("#{key}=", nil)
155
163
  end
156
164
  end
157
165
 
@@ -164,8 +172,8 @@ module TCAClient
164
172
  # @return [Object] Deserialized data
165
173
  def _deserialize(type, value)
166
174
  case type.to_sym
167
- when :DateTime
168
- DateTime.parse(value)
175
+ when :Time
176
+ Time.parse(value)
169
177
  when :Date
170
178
  Date.parse(value)
171
179
  when :String
@@ -195,7 +203,9 @@ module TCAClient
195
203
  end
196
204
  end
197
205
  else # model
198
- TCAClient.const_get(type).build_from_hash(value)
206
+ # models (e.g. Pet) or oneOf
207
+ klass = TCAClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
209
  end
200
210
  end
201
211
 
@@ -243,5 +253,8 @@ module TCAClient
243
253
  else
244
254
  value
245
255
  end
246
- end end
256
+ end
257
+
258
+ end
259
+
247
260
  end