Class: FlatApi::OrganizationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/flat_api/api/organization_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OrganizationApi

Returns a new instance of OrganizationApi.



19
20
21
# File 'lib/flat_api/api/organization_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/flat_api/api/organization_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_lti_credentials(body, opts = {}) ⇒ LtiCredentials

Create a new couple of LTI 1.x credentials Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](flat.io/developers/docs/lti/).

Parameters:

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/flat_api/api/organization_api.rb', line 28

def create_lti_credentials(body, opts = {})
  data, _status_code, _headers = create_lti_credentials_with_http_info(body, opts)
  return data
end

#create_lti_credentials_with_http_info(body, opts = {}) ⇒ Array<(LtiCredentials, Fixnum, Hash)>

Create a new couple of LTI 1.x credentials Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](flat.io/developers/docs/lti/).

Parameters:

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

    the optional parameters

Returns:

  • (Array<(LtiCredentials, Fixnum, Hash)>)

    LtiCredentials data, response status code and response headers



38
39
40
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
# File 'lib/flat_api/api/organization_api.rb', line 38

def create_lti_credentials_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.create_lti_credentials ..."
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.create_lti_credentials"
  end
  # resource path
  local_var_path = "/organizations/lti/credentials"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LtiCredentials')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#create_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_organization_invitation(opts = {}) ⇒ OrganizationInvitation

Create a new invitation to join the organization This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won’t send an invitation. In this case, the property ‘usedBy` will be directly filled with the uniquer identifier of the corresponding user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



83
84
85
86
# File 'lib/flat_api/api/organization_api.rb', line 83

def create_organization_invitation(opts = {})
  data, _status_code, _headers = create_organization_invitation_with_http_info(opts)
  return data
end

#create_organization_invitation_with_http_info(opts = {}) ⇒ Array<(OrganizationInvitation, Fixnum, Hash)>

Create a new invitation to join the organization This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won&#39;t send an invitation. In this case, the property &#x60;usedBy&#x60; will be directly filled with the uniquer identifier of the corresponding user.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OrganizationInvitation, Fixnum, Hash)>)

    OrganizationInvitation data, response status code and response headers



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/flat_api/api/organization_api.rb', line 93

def create_organization_invitation_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_invitation ..."
  end
  # resource path
  local_var_path = "/organizations/invitations"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OrganizationInvitation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_organization_user(opts = {}) ⇒ UserDetailsAdmin

Create a new user account

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



134
135
136
137
# File 'lib/flat_api/api/organization_api.rb', line 134

def create_organization_user(opts = {})
  data, _status_code, _headers = create_organization_user_with_http_info(opts)
  return data
end

#create_organization_user_with_http_info(opts = {}) ⇒ Array<(UserDetailsAdmin, Fixnum, Hash)>

Create a new user account

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(UserDetailsAdmin, Fixnum, Hash)>)

    UserDetailsAdmin data, response status code and response headers



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
# File 'lib/flat_api/api/organization_api.rb', line 144

def create_organization_user_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_user ..."
  end
  # resource path
  local_var_path = "/organizations/users"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserDetailsAdmin')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_lti_credentials(opts = {}) ⇒ Array<LtiCredentials>

List LTI 1.x credentials

Parameters:

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

    the optional parameters

Returns:



184
185
186
187
# File 'lib/flat_api/api/organization_api.rb', line 184

def list_lti_credentials(opts = {})
  data, _status_code, _headers = list_lti_credentials_with_http_info(opts)
  return data
end

#list_lti_credentials_with_http_info(opts = {}) ⇒ Array<(Array<LtiCredentials>, Fixnum, Hash)>

List LTI 1.x credentials

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<LtiCredentials>, Fixnum, Hash)>)

    Array<LtiCredentials> data, response status code and response headers



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/flat_api/api/organization_api.rb', line 193

def list_lti_credentials_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.list_lti_credentials ..."
  end
  # resource path
  local_var_path = "/organizations/lti/credentials"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<LtiCredentials>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#list_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_organization_invitations(opts = {}) ⇒ Array<OrganizationInvitation>

List the organization invitations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :role (String)

    Filter users by role

  • :limit (Integer)

    This is the maximum number of objects that may be returned (default to 50)

  • :_next (String)

    An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

  • :previous (String)

    An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

Returns:



237
238
239
240
# File 'lib/flat_api/api/organization_api.rb', line 237

def list_organization_invitations(opts = {})
  data, _status_code, _headers = list_organization_invitations_with_http_info(opts)
  return data
end

#list_organization_invitations_with_http_info(opts = {}) ⇒ Array<(Array<OrganizationInvitation>, Fixnum, Hash)>

List the organization invitations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :role (String)

    Filter users by role

  • :limit (Integer)

    This is the maximum number of objects that may be returned

  • :_next (String)

    An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

  • :previous (String)

    An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

Returns:

  • (Array<(Array<OrganizationInvitation>, Fixnum, Hash)>)

    Array<OrganizationInvitation> data, response status code and response headers



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/flat_api/api/organization_api.rb', line 250

def list_organization_invitations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_invitations ..."
  end
  if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
    fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_invitations, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_invitations, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/organizations/invitations"

  # query parameters
  query_params = {}
  query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
  query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<OrganizationInvitation>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_organization_users(opts = {}) ⇒ Array<UserDetailsAdmin>

List the organization users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :role (String)

    Filter users by role

  • :limit (Integer)

    This is the maximum number of objects that may be returned (default to 50)

  • :_next (String)

    An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

  • :previous (String)

    An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

Returns:



309
310
311
312
# File 'lib/flat_api/api/organization_api.rb', line 309

def list_organization_users(opts = {})
  data, _status_code, _headers = list_organization_users_with_http_info(opts)
  return data
end

#list_organization_users_with_http_info(opts = {}) ⇒ Array<(Array<UserDetailsAdmin>, Fixnum, Hash)>

List the organization users

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :role (String)

    Filter users by role

  • :limit (Integer)

    This is the maximum number of objects that may be returned

  • :_next (String)

    An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

  • :previous (String)

    An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.

Returns:

  • (Array<(Array<UserDetailsAdmin>, Fixnum, Hash)>)

    Array<UserDetailsAdmin> data, response status code and response headers



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/flat_api/api/organization_api.rb', line 322

def list_organization_users_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_users ..."
  end
  if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
    fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_users, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_users, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/organizations/users"

  # query parameters
  query_params = {}
  query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
  query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<UserDetailsAdmin>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#list_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_organization_invitation(invitation, opts = {}) ⇒ nil

Remove an organization invitation

Parameters:

  • invitation

    Unique identifier of the invitation

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

    the optional parameters

Returns:

  • (nil)


378
379
380
381
# File 'lib/flat_api/api/organization_api.rb', line 378

def remove_organization_invitation(invitation, opts = {})
  remove_organization_invitation_with_http_info(invitation, opts)
  return nil
end

#remove_organization_invitation_with_http_info(invitation, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove an organization invitation

Parameters:

  • invitation

    Unique identifier of the invitation

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
419
420
421
422
423
424
425
# File 'lib/flat_api/api/organization_api.rb', line 388

def remove_organization_invitation_with_http_info(invitation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_invitation ..."
  end
  # verify the required parameter 'invitation' is set
  if @api_client.config.client_side_validation && invitation.nil?
    fail ArgumentError, "Missing the required parameter 'invitation' when calling OrganizationApi.remove_organization_invitation"
  end
  # resource path
  local_var_path = "/organizations/invitations/{invitation}".sub('{' + 'invitation' + '}', invitation.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#remove_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_organization_user(user, opts = {}) ⇒ nil

Remove an account from Flat This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information)

Parameters:

  • user

    Unique identifier of the Flat account

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

    the optional parameters

Options Hash (opts):

  • :convert_to_individual (BOOLEAN)

    If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on flat.io/legal.

Returns:

  • (nil)


433
434
435
436
# File 'lib/flat_api/api/organization_api.rb', line 433

def remove_organization_user(user, opts = {})
  remove_organization_user_with_http_info(user, opts)
  return nil
end

#remove_organization_user_with_http_info(user, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove an account from Flat This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information)

Parameters:

  • user

    Unique identifier of the Flat account

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

    the optional parameters

Options Hash (opts):

  • :convert_to_individual (BOOLEAN)

    If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on flat.io/legal.

Returns:

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

    nil, response status code and response headers



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
# File 'lib/flat_api/api/organization_api.rb', line 444

def remove_organization_user_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_user ..."
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.remove_organization_user"
  end
  # resource path
  local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)

  # query parameters
  query_params = {}
  query_params[:'convertToIndividual'] = opts[:'convert_to_individual'] if !opts[:'convert_to_individual'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#remove_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_lti_credentials(credentials, opts = {}) ⇒ nil

Revoke LTI 1.x credentials

Parameters:

  • credentials

    Credentials unique identifier

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

    the optional parameters

Returns:

  • (nil)


489
490
491
492
# File 'lib/flat_api/api/organization_api.rb', line 489

def revoke_lti_credentials(credentials, opts = {})
  revoke_lti_credentials_with_http_info(credentials, opts)
  return nil
end

#revoke_lti_credentials_with_http_info(credentials, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Revoke LTI 1.x credentials

Parameters:

  • credentials

    Credentials unique identifier

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/flat_api/api/organization_api.rb', line 499

def revoke_lti_credentials_with_http_info(credentials, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.revoke_lti_credentials ..."
  end
  # verify the required parameter 'credentials' is set
  if @api_client.config.client_side_validation && credentials.nil?
    fail ArgumentError, "Missing the required parameter 'credentials' when calling OrganizationApi.revoke_lti_credentials"
  end
  # resource path
  local_var_path = "/organizations/lti/credentials/{credentials}".sub('{' + 'credentials' + '}', credentials.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#revoke_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_organization_user(user, body, opts = {}) ⇒ UserDetailsAdmin

Update account information

Parameters:

  • user

    Unique identifier of the Flat account

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

    the optional parameters

Returns:



544
545
546
547
# File 'lib/flat_api/api/organization_api.rb', line 544

def update_organization_user(user, body, opts = {})
  data, _status_code, _headers = update_organization_user_with_http_info(user, body, opts)
  return data
end

#update_organization_user_with_http_info(user, body, opts = {}) ⇒ Array<(UserDetailsAdmin, Fixnum, Hash)>

Update account information

Parameters:

  • user

    Unique identifier of the Flat account

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

    the optional parameters

Returns:

  • (Array<(UserDetailsAdmin, Fixnum, Hash)>)

    UserDetailsAdmin data, response status code and response headers



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
597
# File 'lib/flat_api/api/organization_api.rb', line 555

def update_organization_user_with_http_info(user, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi.update_organization_user ..."
  end
  # verify the required parameter 'user' is set
  if @api_client.config.client_side_validation && user.nil?
    fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.update_organization_user"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.update_organization_user"
  end
  # resource path
  local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['OAuth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserDetailsAdmin')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#update_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end