Class: TCAClient::GroupsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/tca_client/api/groups_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GroupsApi

Returns a new instance of GroupsApi.



19
20
21
# File 'lib/tca_client/api/groups_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/tca_client/api/groups_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {}) ⇒ AddGroupAttachmentResponse

Add attachment to a group. will create a group if it does not exist.

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • data (AddGroupAttachmentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



29
30
31
32
# File 'lib/tca_client/api/groups_api.rb', line 29

def add_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
  data, _status_code, _headers = add_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts)
  data
end

#add_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {}) ⇒ Array<(AddGroupAttachmentResponse, Integer, Hash)>

Add attachment to a group. will create a group if it does not exist.

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • data (AddGroupAttachmentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AddGroupAttachmentResponse, Integer, Hash)>)

    AddGroupAttachmentResponse data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/tca_client/api/groups_api.rb', line 41

def add_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.add_group_attachment ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.add_group_attachment"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.add_group_attachment"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.add_group_attachment"
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling GroupsApi.add_group_attachment"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(data)

  # return_type
  return_type = opts[:debug_return_type] || 'AddGroupAttachmentResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.add_group_attachment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#add_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {}) ⇒ nil

Hard delete group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


115
116
117
118
# File 'lib/tca_client/api/groups_api.rb', line 115

def delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
  delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts)
  nil
end

#delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Hard delete group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/tca_client/api/groups_api.rb', line 127

def delete_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.delete_group_attachment ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.delete_group_attachment"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.delete_group_attachment"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group_attachment"
  end
  # verify the required parameter 'attach_id' is set
  if @api_client.config.client_side_validation && attach_id.nil?
    fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.delete_group_attachment"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.delete_group_attachment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#delete_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {}) ⇒ AggregateGroup

Get group, group context and group context owners info

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



195
196
197
198
# File 'lib/tca_client/api/groups_api.rb', line 195

def get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
  data, _status_code, _headers = get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
  data
end

#get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {}) ⇒ GroupAttachmentResponse

Get group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



271
272
273
274
# File 'lib/tca_client/api/groups_api.rb', line 271

def get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
  data, _status_code, _headers = get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts)
  data
end

#get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {}) ⇒ Array<(GroupAttachmentResponse, Integer, Hash)>

Get group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GroupAttachmentResponse, Integer, Hash)>)

    GroupAttachmentResponse data, response status code and response headers



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/tca_client/api/groups_api.rb', line 283

def get_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.get_group_attachment ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group_attachment"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group_attachment"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_attachment"
  end
  # verify the required parameter 'attach_id' is set
  if @api_client.config.client_side_validation && attach_id.nil?
    fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.get_group_attachment"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GroupAttachmentResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.get_group_attachment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#get_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {}) ⇒ GetGroupAttachments200Response

Get all attachments

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



351
352
353
354
# File 'lib/tca_client/api/groups_api.rb', line 351

def get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
  data, _status_code, _headers = get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts)
  data
end

#get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {}) ⇒ Array<(GetGroupAttachments200Response, Integer, Hash)>

Get all attachments

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/tca_client/api/groups_api.rb', line 362

def get_group_attachments_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.get_group_attachments ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group_attachments"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group_attachments"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group_attachments"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetGroupAttachments200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.get_group_attachments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#get_group_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {}) ⇒ Array<(AggregateGroup, Integer, Hash)>

Get group, group context and group context owners info

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AggregateGroup, Integer, Hash)>)

    AggregateGroup data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/tca_client/api/groups_api.rb', line 206

def get_group_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.get_group ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.get_group"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.get_group"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group"
  end
  # resource path
  local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AggregateGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.get_group",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#groups_group_id_put(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {}) ⇒ AggregateGroup

upsert group, group context and group context owners info

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • data (AggregateGroup)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



427
428
429
430
# File 'lib/tca_client/api/groups_api.rb', line 427

def groups_group_id_put(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
  data, _status_code, _headers = groups_group_id_put_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts)
  data
end

#groups_group_id_put_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {}) ⇒ Array<(AggregateGroup, Integer, Hash)>

upsert group, group context and group context owners info

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • data (AggregateGroup)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AggregateGroup, Integer, Hash)>)

    AggregateGroup data, response status code and response headers



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'lib/tca_client/api/groups_api.rb', line 439

def groups_group_id_put_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.groups_group_id_put ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.groups_group_id_put"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.groups_group_id_put"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.groups_group_id_put"
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling GroupsApi.groups_group_id_put"
  end
  # resource path
  local_var_path = '/groups/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(data)

  # return_type
  return_type = opts[:debug_return_type] || 'AggregateGroup'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.groups_group_id_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#groups_group_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {}) ⇒ GroupAttachmentResponse

Patch a group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • data (AddGroupAttachmentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



514
515
516
517
# File 'lib/tca_client/api/groups_api.rb', line 514

def update_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {})
  data, _status_code, _headers = update_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts)
  data
end

#update_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {}) ⇒ Array<(GroupAttachmentResponse, Integer, Hash)>

Patch a group attachment

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    group_id

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • data (AddGroupAttachmentRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GroupAttachmentResponse, Integer, Hash)>)

    GroupAttachmentResponse data, response status code and response headers



527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/tca_client/api/groups_api.rb', line 527

def update_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.update_group_attachment ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.update_group_attachment"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.update_group_attachment"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.update_group_attachment"
  end
  # verify the required parameter 'attach_id' is set
  if @api_client.config.client_side_validation && attach_id.nil?
    fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.update_group_attachment"
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling GroupsApi.update_group_attachment"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments/{attach_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(data)

  # return_type
  return_type = opts[:debug_return_type] || 'GroupAttachmentResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.update_group_attachment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#update_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {}) ⇒ SuccessMessage

Upload Submitted File

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    The Group ID (required to already exist)

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • content_disposition (String)

    *must include the &quot;filename&quot; parameter, e.g. &#x60;inline; filename&#x3D;&quot;MyFile.docx&quot;&#x60;

  • file (Object)

    the attachment file

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



607
608
609
610
# File 'lib/tca_client/api/groups_api.rb', line 607

def upload_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {})
  data, _status_code, _headers = upload_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts)
  data
end

#upload_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {}) ⇒ Array<(SuccessMessage, Integer, Hash)>

Upload Submitted File

Parameters:

  • x_turnitin_integration_name (String)

    a human readable string representing the type of integration being used

  • x_turnitin_integration_version (String)

    the version of the integration platform being used

  • group_id (String)

    The Group ID (required to already exist)

  • attach_id (String)

    The attachment ID (returned from a successful group attachment request)

  • content_disposition (String)

    *must include the &quot;filename&quot; parameter, e.g. &#x60;inline; filename&#x3D;&quot;MyFile.docx&quot;&#x60;

  • file (Object)

    the attachment file

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SuccessMessage, Integer, Hash)>)

    SuccessMessage data, response status code and response headers



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/tca_client/api/groups_api.rb', line 621

def upload_group_attachment_with_http_info(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GroupsApi.upload_group_attachment ...'
  end
  # verify the required parameter 'x_turnitin_integration_name' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_name.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_name' when calling GroupsApi.upload_group_attachment"
  end
  # verify the required parameter 'x_turnitin_integration_version' is set
  if @api_client.config.client_side_validation && x_turnitin_integration_version.nil?
    fail ArgumentError, "Missing the required parameter 'x_turnitin_integration_version' when calling GroupsApi.upload_group_attachment"
  end
  # verify the required parameter 'group_id' is set
  if @api_client.config.client_side_validation && group_id.nil?
    fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.upload_group_attachment"
  end
  # verify the required parameter 'attach_id' is set
  if @api_client.config.client_side_validation && attach_id.nil?
    fail ArgumentError, "Missing the required parameter 'attach_id' when calling GroupsApi.upload_group_attachment"
  end
  # verify the required parameter 'content_disposition' is set
  if @api_client.config.client_side_validation && content_disposition.nil?
    fail ArgumentError, "Missing the required parameter 'content_disposition' when calling GroupsApi.upload_group_attachment"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling GroupsApi.upload_group_attachment"
  end
  # resource path
  local_var_path = '/groups/{group_id}/attachments/{attach_id}/original'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s)).sub('{' + 'attach_id' + '}', CGI.escape(attach_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['binary/octet-stream'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Turnitin-Integration-Name'] = x_turnitin_integration_name
  header_params[:'X-Turnitin-Integration-Version'] = x_turnitin_integration_version
  header_params[:'Content-Disposition'] = content_disposition

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(file)

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['api_key']

  new_options = opts.merge(
    :operation => :"GroupsApi.upload_group_attachment",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GroupsApi#upload_group_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end