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
@@ -3,12 +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
 
13
+ require 'cgi'
14
+
12
15
  module TCAClient
13
16
  class SubmissionApi
14
17
  attr_accessor :api_client
@@ -17,30 +20,26 @@ module TCAClient
17
20
  @api_client = api_client
18
21
  end
19
22
  # Create a new Submission
20
- # @param body
21
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
22
- # @param x_turnitin_integration_version the version of the integration platform being used
23
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
24
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
25
+ # @param data [SubmissionBase]
23
26
  # @param [Hash] opts the optional parameters
24
27
  # @return [SimpleSubmissionResponse]
25
- def create_submission(body, x_turnitin_integration_name, x_turnitin_integration_version, opts = {})
26
- data, _status_code, _headers = create_submission_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, opts)
28
+ def create_submission(x_turnitin_integration_name, x_turnitin_integration_version, data, opts = {})
29
+ data, _status_code, _headers = create_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, data, opts)
27
30
  data
28
31
  end
29
32
 
30
33
  # Create a new Submission
31
- # @param body
32
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
33
- # @param x_turnitin_integration_version the version of the integration platform being used
34
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
35
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
36
+ # @param data [SubmissionBase]
34
37
  # @param [Hash] opts the optional parameters
35
38
  # @return [Array<(SimpleSubmissionResponse, Integer, Hash)>] SimpleSubmissionResponse data, response status code and response headers
36
- def create_submission_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, opts = {})
39
+ def create_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, data, opts = {})
37
40
  if @api_client.config.debugging
38
41
  @api_client.config.logger.debug 'Calling API: SubmissionApi.create_submission ...'
39
42
  end
40
- # verify the required parameter 'body' is set
41
- if @api_client.config.client_side_validation && body.nil?
42
- fail ArgumentError, "Missing the required parameter 'body' when calling SubmissionApi.create_submission"
43
- end
44
43
  # verify the required parameter 'x_turnitin_integration_name' is set
45
44
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
46
45
  fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SubmissionApi.create_submission"
@@ -49,6 +48,10 @@ module TCAClient
49
48
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
50
49
  fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SubmissionApi.create_submission"
51
50
  end
51
+ # verify the required parameter 'data' is set
52
+ if @api_client.config.client_side_validation && data.nil?
53
+ fail ArgumentError, "Missing the required parameter 'data' when calling SubmissionApi.create_submission"
54
+ end
52
55
  # resource path
53
56
  local_var_path = '/submissions'
54
57
 
@@ -60,7 +63,10 @@ module TCAClient
60
63
  # HTTP header 'Accept' (if needed)
61
64
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
65
  # HTTP header 'Content-Type'
63
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
66
+ content_type = @api_client.select_header_content_type(['application/json'])
67
+ if !content_type.nil?
68
+ header_params['Content-Type'] = content_type
69
+ end
64
70
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
65
71
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
66
72
 
@@ -68,30 +74,37 @@ module TCAClient
68
74
  form_params = opts[:form_params] || {}
69
75
 
70
76
  # http body (model)
71
- post_body = opts[:body] || @api_client.object_to_http_body(body)
77
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'SimpleSubmissionResponse'
72
81
 
73
- return_type = opts[:return_type] || 'SimpleSubmissionResponse'
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['api_key']
74
84
 
75
- auth_names = opts[:auth_names] || ['api_key']
76
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
85
+ new_options = opts.merge(
86
+ :operation => :"SubmissionApi.create_submission",
77
87
  :header_params => header_params,
78
88
  :query_params => query_params,
79
89
  :form_params => form_params,
80
90
  :body => post_body,
81
91
  :auth_names => auth_names,
82
- :return_type => return_type)
92
+ :return_type => return_type
93
+ )
83
94
 
95
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
96
  if @api_client.config.debugging
85
97
  @api_client.config.logger.debug "API called: SubmissionApi#create_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
98
  end
87
99
  return data, status_code, headers
88
100
  end
101
+
89
102
  # Deletes a submission and associated similarity report.
90
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
91
- # @param x_turnitin_integration_version the version of the integration platform being used
92
- # @param id The Submission ID (returned upon a successful POST to /submissions)
103
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
104
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
105
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
93
106
  # @param [Hash] opts the optional parameters
94
- # @option opts [String] :hard Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered. (default to false)
107
+ # @option opts [String] :hard Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered. (default to 'false')
95
108
  # @return [SuccessMessage]
96
109
  def delete_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
97
110
  data, _status_code, _headers = delete_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
@@ -99,11 +112,11 @@ module TCAClient
99
112
  end
100
113
 
101
114
  # Deletes a submission and associated similarity report.
102
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
103
- # @param x_turnitin_integration_version the version of the integration platform being used
104
- # @param id The Submission ID (returned upon a successful POST to /submissions)
115
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
116
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
117
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
105
118
  # @param [Hash] opts the optional parameters
106
- # @option opts [String] :hard Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered.
119
+ # @option opts [String] :hard Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered. (default to 'false')
107
120
  # @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
108
121
  def delete_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
109
122
  if @api_client.config.debugging
@@ -122,7 +135,7 @@ module TCAClient
122
135
  fail ArgumentError, "Missing the required parameter 'id' when calling SubmissionApi.delete_submission"
123
136
  end
124
137
  # resource path
125
- local_var_path = '/submissions/{id}'.sub('{' + 'id' + '}', id.to_s)
138
+ local_var_path = '/submissions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
126
139
 
127
140
  # query parameters
128
141
  query_params = opts[:query_params] || {}
@@ -139,28 +152,35 @@ module TCAClient
139
152
  form_params = opts[:form_params] || {}
140
153
 
141
154
  # http body (model)
142
- post_body = opts[:body]
155
+ post_body = opts[:debug_body]
156
+
157
+ # return_type
158
+ return_type = opts[:debug_return_type] || 'SuccessMessage'
143
159
 
144
- return_type = opts[:return_type] || 'SuccessMessage'
160
+ # auth_names
161
+ auth_names = opts[:debug_auth_names] || ['api_key']
145
162
 
146
- auth_names = opts[:auth_names] || ['api_key']
147
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
163
+ new_options = opts.merge(
164
+ :operation => :"SubmissionApi.delete_submission",
148
165
  :header_params => header_params,
149
166
  :query_params => query_params,
150
167
  :form_params => form_params,
151
168
  :body => post_body,
152
169
  :auth_names => auth_names,
153
- :return_type => return_type)
170
+ :return_type => return_type
171
+ )
154
172
 
173
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
155
174
  if @api_client.config.debugging
156
175
  @api_client.config.logger.debug "API called: SubmissionApi#delete_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
176
  end
158
177
  return data, status_code, headers
159
178
  end
179
+
160
180
  # Get Submission Details
161
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
162
- # @param x_turnitin_integration_version the version of the integration platform being used
163
- # @param id The Submission ID (returned upon a successful POST to /submissions)
181
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
182
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
183
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
164
184
  # @param [Hash] opts the optional parameters
165
185
  # @return [Submission]
166
186
  def get_submiddion_details(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -169,9 +189,9 @@ module TCAClient
169
189
  end
170
190
 
171
191
  # Get Submission Details
172
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
173
- # @param x_turnitin_integration_version the version of the integration platform being used
174
- # @param id The Submission ID (returned upon a successful POST to /submissions)
192
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
193
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
194
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
175
195
  # @param [Hash] opts the optional parameters
176
196
  # @return [Array<(Submission, Integer, Hash)>] Submission data, response status code and response headers
177
197
  def get_submiddion_details_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -191,7 +211,7 @@ module TCAClient
191
211
  fail ArgumentError, "Missing the required parameter 'id' when calling SubmissionApi.get_submiddion_details"
192
212
  end
193
213
  # resource path
194
- local_var_path = '/submissions/{id}'.sub('{' + 'id' + '}', id.to_s)
214
+ local_var_path = '/submissions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
195
215
 
196
216
  # query parameters
197
217
  query_params = opts[:query_params] || {}
@@ -207,28 +227,35 @@ module TCAClient
207
227
  form_params = opts[:form_params] || {}
208
228
 
209
229
  # http body (model)
210
- post_body = opts[:body]
230
+ post_body = opts[:debug_body]
211
231
 
212
- return_type = opts[:return_type] || 'Submission'
232
+ # return_type
233
+ return_type = opts[:debug_return_type] || 'Submission'
213
234
 
214
- auth_names = opts[:auth_names] || ['api_key']
215
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
235
+ # auth_names
236
+ auth_names = opts[:debug_auth_names] || ['api_key']
237
+
238
+ new_options = opts.merge(
239
+ :operation => :"SubmissionApi.get_submiddion_details",
216
240
  :header_params => header_params,
217
241
  :query_params => query_params,
218
242
  :form_params => form_params,
219
243
  :body => post_body,
220
244
  :auth_names => auth_names,
221
- :return_type => return_type)
245
+ :return_type => return_type
246
+ )
222
247
 
248
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
223
249
  if @api_client.config.debugging
224
250
  @api_client.config.logger.debug "API called: SubmissionApi#get_submiddion_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
251
  end
226
252
  return data, status_code, headers
227
253
  end
254
+
228
255
  # Recover a soft deleted submission
229
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
230
- # @param x_turnitin_integration_version the version of the integration platform being used
231
- # @param id The Submission ID (returned upon a successful POST to /submissions)
256
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
257
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
258
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
232
259
  # @param [Hash] opts the optional parameters
233
260
  # @return [SimpleSubmissionResponse]
234
261
  def recover_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -237,9 +264,9 @@ module TCAClient
237
264
  end
238
265
 
239
266
  # Recover a soft deleted submission
240
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
241
- # @param x_turnitin_integration_version the version of the integration platform being used
242
- # @param id The Submission ID (returned upon a successful POST to /submissions)
267
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
268
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
269
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
243
270
  # @param [Hash] opts the optional parameters
244
271
  # @return [Array<(SimpleSubmissionResponse, Integer, Hash)>] SimpleSubmissionResponse data, response status code and response headers
245
272
  def recover_submission_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, opts = {})
@@ -259,7 +286,7 @@ module TCAClient
259
286
  fail ArgumentError, "Missing the required parameter 'id' when calling SubmissionApi.recover_submission"
260
287
  end
261
288
  # resource path
262
- local_var_path = '/submissions/{id}/recover'.sub('{' + 'id' + '}', id.to_s)
289
+ local_var_path = '/submissions/{id}/recover'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
263
290
 
264
291
  # query parameters
265
292
  query_params = opts[:query_params] || {}
@@ -275,55 +302,58 @@ module TCAClient
275
302
  form_params = opts[:form_params] || {}
276
303
 
277
304
  # http body (model)
278
- post_body = opts[:body]
305
+ post_body = opts[:debug_body]
306
+
307
+ # return_type
308
+ return_type = opts[:debug_return_type] || 'SimpleSubmissionResponse'
279
309
 
280
- return_type = opts[:return_type] || 'SimpleSubmissionResponse'
310
+ # auth_names
311
+ auth_names = opts[:debug_auth_names] || ['api_key']
281
312
 
282
- auth_names = opts[:auth_names] || ['api_key']
283
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
313
+ new_options = opts.merge(
314
+ :operation => :"SubmissionApi.recover_submission",
284
315
  :header_params => header_params,
285
316
  :query_params => query_params,
286
317
  :form_params => form_params,
287
318
  :body => post_body,
288
319
  :auth_names => auth_names,
289
- :return_type => return_type)
320
+ :return_type => return_type
321
+ )
290
322
 
323
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
291
324
  if @api_client.config.debugging
292
325
  @api_client.config.logger.debug "API called: SubmissionApi#recover_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
326
  end
294
327
  return data, status_code, headers
295
328
  end
329
+
296
330
  # Upload Submitted File
297
- # @param body the user&#x27;s submitted file
298
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
299
- # @param x_turnitin_integration_version the version of the integration platform being used
300
- # @param content_type *Must be &#x27;binary/octet-stream&#x27;
301
- # @param content_disposition *must include the \&quot;filename\&quot; parameter, e.g. &#x60;inline; filename&#x3D;\&quot;MyFile.docx\&quot;&#x60;. To support UTF-8 filenames, you must URL encode the header
302
- # @param id The Submission ID (returned upon a successful POST to /submissions)
331
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
332
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
333
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
334
+ # @param content_type [String] *Must be &#39;binary/octet-stream&#39;
335
+ # @param content_disposition [String] *must include the \&quot;filename\&quot; parameter, e.g. &#x60;inline; filename&#x3D;\&quot;MyFile.docx\&quot;&#x60;. To support UTF-8 filenames, you must URL encode the header
336
+ # @param file [Object] the user&#39;s submitted file
303
337
  # @param [Hash] opts the optional parameters
304
338
  # @return [SuccessMessage]
305
- def upload_submitted_file(body, x_turnitin_integration_name, x_turnitin_integration_version, content_type, content_disposition, id, opts = {})
306
- data, _status_code, _headers = upload_submitted_file_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, content_type, content_disposition, id, opts)
339
+ def upload_submitted_file(x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition, file, opts = {})
340
+ data, _status_code, _headers = upload_submitted_file_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition, file, opts)
307
341
  data
308
342
  end
309
343
 
310
344
  # Upload Submitted File
311
- # @param body the user&#x27;s submitted file
312
- # @param x_turnitin_integration_name a human readable string representing the type of integration being used
313
- # @param x_turnitin_integration_version the version of the integration platform being used
314
- # @param content_type *Must be &#x27;binary/octet-stream&#x27;
315
- # @param content_disposition *must include the \&quot;filename\&quot; parameter, e.g. &#x60;inline; filename&#x3D;\&quot;MyFile.docx\&quot;&#x60;. To support UTF-8 filenames, you must URL encode the header
316
- # @param id The Submission ID (returned upon a successful POST to /submissions)
345
+ # @param x_turnitin_integration_name [String] a human readable string representing the type of integration being used
346
+ # @param x_turnitin_integration_version [String] the version of the integration platform being used
347
+ # @param id [String] The Submission ID (returned upon a successful POST to /submissions)
348
+ # @param content_type [String] *Must be &#39;binary/octet-stream&#39;
349
+ # @param content_disposition [String] *must include the \&quot;filename\&quot; parameter, e.g. &#x60;inline; filename&#x3D;\&quot;MyFile.docx\&quot;&#x60;. To support UTF-8 filenames, you must URL encode the header
350
+ # @param file [Object] the user&#39;s submitted file
317
351
  # @param [Hash] opts the optional parameters
318
352
  # @return [Array<(SuccessMessage, Integer, Hash)>] SuccessMessage data, response status code and response headers
319
- def upload_submitted_file_with_http_info(body, x_turnitin_integration_name, x_turnitin_integration_version, content_type, content_disposition, id, opts = {})
353
+ def upload_submitted_file_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition, file, opts = {})
320
354
  if @api_client.config.debugging
321
355
  @api_client.config.logger.debug 'Calling API: SubmissionApi.upload_submitted_file ...'
322
356
  end
323
- # verify the required parameter 'body' is set
324
- if @api_client.config.client_side_validation && body.nil?
325
- fail ArgumentError, "Missing the required parameter 'body' when calling SubmissionApi.upload_submitted_file"
326
- end
327
357
  # verify the required parameter 'x_turnitin_integration_name' is set
328
358
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
329
359
  fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling SubmissionApi.upload_submitted_file"
@@ -332,6 +362,10 @@ module TCAClient
332
362
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
333
363
  fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling SubmissionApi.upload_submitted_file"
334
364
  end
365
+ # verify the required parameter 'id' is set
366
+ if @api_client.config.client_side_validation && id.nil?
367
+ fail ArgumentError, "Missing the required parameter 'id' when calling SubmissionApi.upload_submitted_file"
368
+ end
335
369
  # verify the required parameter 'content_type' is set
336
370
  if @api_client.config.client_side_validation && content_type.nil?
337
371
  fail ArgumentError, "Missing the required parameter 'content_type' when calling SubmissionApi.upload_submitted_file"
@@ -340,12 +374,12 @@ module TCAClient
340
374
  if @api_client.config.client_side_validation && content_disposition.nil?
341
375
  fail ArgumentError, "Missing the required parameter 'content_disposition' when calling SubmissionApi.upload_submitted_file"
342
376
  end
343
- # verify the required parameter 'id' is set
344
- if @api_client.config.client_side_validation && id.nil?
345
- fail ArgumentError, "Missing the required parameter 'id' when calling SubmissionApi.upload_submitted_file"
377
+ # verify the required parameter 'file' is set
378
+ if @api_client.config.client_side_validation && file.nil?
379
+ fail ArgumentError, "Missing the required parameter 'file' when calling SubmissionApi.upload_submitted_file"
346
380
  end
347
381
  # resource path
348
- local_var_path = '/submissions/{id}/original'.sub('{' + 'id' + '}', id.to_s)
382
+ local_var_path = '/submissions/{id}/original'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
349
383
 
350
384
  # query parameters
351
385
  query_params = opts[:query_params] || {}
@@ -355,7 +389,10 @@ module TCAClient
355
389
  # HTTP header 'Accept' (if needed)
356
390
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
357
391
  # HTTP header 'Content-Type'
358
- header_params['Content-Type'] = @api_client.select_header_content_type(['binary/octet-stream'])
392
+ content_type = @api_client.select_header_content_type(['binary/octet-stream'])
393
+ if !content_type.nil?
394
+ header_params['Content-Type'] = content_type
395
+ end
359
396
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
360
397
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
361
398
  header_params[:'Content-Type'] = content_type
@@ -365,19 +402,25 @@ module TCAClient
365
402
  form_params = opts[:form_params] || {}
366
403
 
367
404
  # http body (model)
368
- post_body = opts[:body] || @api_client.object_to_http_body(body)
405
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(file)
406
+
407
+ # return_type
408
+ return_type = opts[:debug_return_type] || 'SuccessMessage'
369
409
 
370
- return_type = opts[:return_type] || 'SuccessMessage'
410
+ # auth_names
411
+ auth_names = opts[:debug_auth_names] || ['api_key']
371
412
 
372
- auth_names = opts[:auth_names] || ['api_key']
373
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
413
+ new_options = opts.merge(
414
+ :operation => :"SubmissionApi.upload_submitted_file",
374
415
  :header_params => header_params,
375
416
  :query_params => query_params,
376
417
  :form_params => form_params,
377
418
  :body => post_body,
378
419
  :auth_names => auth_names,
379
- :return_type => return_type)
420
+ :return_type => return_type
421
+ )
380
422
 
423
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
381
424
  if @api_client.config.debugging
382
425
  @api_client.config.logger.debug "API called: SubmissionApi#upload_submitted_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
383
426
  end