Class: FlatApi::OrganizationApi
- Inherits:
-
Object
- Object
- FlatApi::OrganizationApi
- Defined in:
- lib/flat_api/api/organization_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#count_orga_users(opts = {}) ⇒ Array<UserDetailsAdmin>
Count the organization users using the provided filters.
-
#count_orga_users_with_http_info(opts = {}) ⇒ Array<(Array<UserDetailsAdmin>, Integer, Hash)>
Count the organization users using the provided filters.
-
#create_lti_credentials(body, opts = {}) ⇒ LtiCredentials
Create a new couple of LTI 1.x credentials Flat for Education is a Certified LTI Provider.
-
#create_lti_credentials_with_http_info(body, opts = {}) ⇒ Array<(LtiCredentials, Integer, Hash)>
Create a new couple of LTI 1.x credentials Flat for Education is a Certified LTI Provider.
-
#create_organization_invitation(body, opts = {}) ⇒ OrganizationInvitation
Create a new invitation to join the organization This method creates and sends invitation for teachers and admins.
-
#create_organization_invitation_with_http_info(body, opts = {}) ⇒ Array<(OrganizationInvitation, Integer, Hash)>
Create a new invitation to join the organization This method creates and sends invitation for teachers and admins.
-
#create_organization_user(body, opts = {}) ⇒ UserDetailsAdmin
Create a new user account.
-
#create_organization_user_access_token(user, organization_user_access_token_creation, opts = {}) ⇒ ApiAccessToken
Create a delegated API access token for an organization user This operation will create an API access token for a chosen organization user.
-
#create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts = {}) ⇒ Array<(ApiAccessToken, Integer, Hash)>
Create a delegated API access token for an organization user This operation will create an API access token for a chosen organization user.
-
#create_organization_user_signin_link(user, user_signin_link_creation, opts = {}) ⇒ UserSigninLink
Create a sign in link for an organization user.
-
#create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts = {}) ⇒ Array<(UserSigninLink, Integer, Hash)>
Create a sign in link for an organization user.
-
#create_organization_user_with_http_info(body, opts = {}) ⇒ Array<(UserDetailsAdmin, Integer, Hash)>
Create a new user account.
-
#initialize(api_client = ApiClient.default) ⇒ OrganizationApi
constructor
A new instance of OrganizationApi.
-
#list_lti_credentials(opts = {}) ⇒ Array<LtiCredentials>
List LTI 1.x credentials.
-
#list_lti_credentials_with_http_info(opts = {}) ⇒ Array<(Array<LtiCredentials>, Integer, Hash)>
List LTI 1.x credentials.
-
#list_organization_invitations(opts = {}) ⇒ Array<OrganizationInvitation>
List the organization invitations.
-
#list_organization_invitations_with_http_info(opts = {}) ⇒ Array<(Array<OrganizationInvitation>, Integer, Hash)>
List the organization invitations.
-
#list_organization_users(opts = {}) ⇒ Array<UserDetailsAdmin>
List the organization users.
-
#list_organization_users_with_http_info(opts = {}) ⇒ Array<(Array<UserDetailsAdmin>, Integer, Hash)>
List the organization users.
-
#remove_organization_invitation(invitation, opts = {}) ⇒ nil
Remove an organization invitation.
-
#remove_organization_invitation_with_http_info(invitation, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an organization invitation.
-
#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).
-
#remove_organization_user_with_http_info(user, opts = {}) ⇒ Array<(nil, Integer, 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).
-
#revoke_lti_credentials(credentials, opts = {}) ⇒ nil
Revoke LTI 1.x credentials.
-
#revoke_lti_credentials_with_http_info(credentials, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Revoke LTI 1.x credentials.
-
#update_organization_user(user, body, opts = {}) ⇒ UserDetailsAdmin
Update account information.
-
#update_organization_user_with_http_info(user, body, opts = {}) ⇒ Array<(UserDetailsAdmin, Integer, Hash)>
Update account information.
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_client ⇒ Object
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
#count_orga_users(opts = {}) ⇒ Array<UserDetailsAdmin>
Count the organization users using the provided filters
29 30 31 32 |
# File 'lib/flat_api/api/organization_api.rb', line 29 def count_orga_users(opts = {}) data, _status_code, _headers = count_orga_users_with_http_info(opts) data end |
#count_orga_users_with_http_info(opts = {}) ⇒ Array<(Array<UserDetailsAdmin>, Integer, Hash)>
Count the organization users using the provided filters
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 |
# File 'lib/flat_api/api/organization_api.rb', line 41 def count_orga_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.count_orga_users ...' end allowable_values = ["user", "teacher", "admin"] if @api_client.config.client_side_validation && opts[:'role'] && !opts[:'role'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"role\", must include one of #{allowable_values}" end # resource path local_var_path = '/organizations/users/count' # query parameters query_params = opts[:query_params] || {} query_params[:'role'] = @api_client.build_collection_param(opts[:'role'], :multi) if !opts[:'role'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'group'] = @api_client.build_collection_param(opts[:'group'], :multi) if !opts[:'group'].nil? query_params[:'noActiveLicense'] = opts[:'no_active_license'] if !opts[:'no_active_license'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<UserDetailsAdmin>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.count_orga_users", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationApi#count_orga_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#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/).
98 99 100 101 |
# File 'lib/flat_api/api/organization_api.rb', line 98 def create_lti_credentials(body, opts = {}) data, _status_code, _headers = create_lti_credentials_with_http_info(body, opts) data end |
#create_lti_credentials_with_http_info(body, opts = {}) ⇒ Array<(LtiCredentials, Integer, 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/).
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 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 |
# File 'lib/flat_api/api/organization_api.rb', line 108 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 = 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'LtiCredentials' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.create_lti_credentials", :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, ) 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(body, 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.
166 167 168 169 |
# File 'lib/flat_api/api/organization_api.rb', line 166 def create_organization_invitation(body, opts = {}) data, _status_code, _headers = create_organization_invitation_with_http_info(body, opts) data end |
#create_organization_invitation_with_http_info(body, opts = {}) ⇒ Array<(OrganizationInvitation, Integer, 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't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 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 176 def create_organization_invitation_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_invitation ...' 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_organization_invitation" end # resource path local_var_path = '/organizations/invitations' # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'OrganizationInvitation' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.create_organization_invitation", :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, ) 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(body, opts = {}) ⇒ UserDetailsAdmin
Create a new user account
233 234 235 236 |
# File 'lib/flat_api/api/organization_api.rb', line 233 def create_organization_user(body, opts = {}) data, _status_code, _headers = create_organization_user_with_http_info(body, opts) data end |
#create_organization_user_access_token(user, organization_user_access_token_creation, opts = {}) ⇒ ApiAccessToken
Create a delegated API access token for an organization user This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user.
301 302 303 304 |
# File 'lib/flat_api/api/organization_api.rb', line 301 def create_organization_user_access_token(user, organization_user_access_token_creation, opts = {}) data, _status_code, _headers = create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts) data end |
#create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts = {}) ⇒ Array<(ApiAccessToken, Integer, Hash)>
Create a delegated API access token for an organization user This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user.
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 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/flat_api/api/organization_api.rb', line 312 def create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_user_access_token ...' 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.create_organization_user_access_token" end # verify the required parameter 'organization_user_access_token_creation' is set if @api_client.config.client_side_validation && organization_user_access_token_creation.nil? fail ArgumentError, "Missing the required parameter 'organization_user_access_token_creation' when calling OrganizationApi.create_organization_user_access_token" end # resource path local_var_path = '/organizations/users/{user}/accessToken'.sub('{' + 'user' + '}', CGI.escape(user.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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_user_access_token_creation) # return_type return_type = opts[:debug_return_type] || 'ApiAccessToken' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.create_organization_user_access_token", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_organization_user_signin_link(user, user_signin_link_creation, opts = {}) ⇒ UserSigninLink
Create a sign in link for an organization user
374 375 376 377 |
# File 'lib/flat_api/api/organization_api.rb', line 374 def create_organization_user_signin_link(user, user_signin_link_creation, opts = {}) data, _status_code, _headers = create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts) data end |
#create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts = {}) ⇒ Array<(UserSigninLink, Integer, Hash)>
Create a sign in link for an organization user
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 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/flat_api/api/organization_api.rb', line 384 def create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_user_signin_link ...' 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.create_organization_user_signin_link" end # verify the required parameter 'user_signin_link_creation' is set if @api_client.config.client_side_validation && user_signin_link_creation.nil? fail ArgumentError, "Missing the required parameter 'user_signin_link_creation' when calling OrganizationApi.create_organization_user_signin_link" end # resource path local_var_path = '/organizations/users/{user}/signinLink'.sub('{' + 'user' + '}', CGI.escape(user.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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(user_signin_link_creation) # return_type return_type = opts[:debug_return_type] || 'UserSigninLink' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.create_organization_user_signin_link", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user_signin_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_organization_user_with_http_info(body, opts = {}) ⇒ Array<(UserDetailsAdmin, Integer, Hash)>
Create a new user account
242 243 244 245 246 247 248 249 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 |
# File 'lib/flat_api/api/organization_api.rb', line 242 def create_organization_user_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationApi.create_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.create_organization_user" end # resource path local_var_path = '/organizations/users' # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UserDetailsAdmin' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.create_organization_user", :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, ) 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
444 445 446 447 |
# File 'lib/flat_api/api/organization_api.rb', line 444 def list_lti_credentials(opts = {}) data, _status_code, _headers = list_lti_credentials_with_http_info(opts) data end |
#list_lti_credentials_with_http_info(opts = {}) ⇒ Array<(Array<LtiCredentials>, Integer, Hash)>
List LTI 1.x credentials
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 |
# File 'lib/flat_api/api/organization_api.rb', line 452 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 = 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LtiCredentials>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.list_lti_credentials", :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, ) 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
503 504 505 506 |
# File 'lib/flat_api/api/organization_api.rb', line 503 def list_organization_invitations(opts = {}) data, _status_code, _headers = list_organization_invitations_with_http_info(opts) data end |
#list_organization_invitations_with_http_info(opts = {}) ⇒ Array<(Array<OrganizationInvitation>, Integer, Hash)>
List the organization invitations
515 516 517 518 519 520 521 522 523 524 525 526 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 |
# File 'lib/flat_api/api/organization_api.rb', line 515 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 allowable_values = ["user", "teacher", "admin"] if @api_client.config.client_side_validation && opts[:'role'] && !allowable_values.include?(opts[:'role']) fail ArgumentError, "invalid value for \"role\", must be one of #{allowable_values}" 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 = opts[: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 = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.list_organization_invitations", :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, ) 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
589 590 591 592 |
# File 'lib/flat_api/api/organization_api.rb', line 589 def list_organization_users(opts = {}) data, _status_code, _headers = list_organization_users_with_http_info(opts) data end |
#list_organization_users_with_http_info(opts = {}) ⇒ Array<(Array<UserDetailsAdmin>, Integer, Hash)>
List the organization users
608 609 610 611 612 613 614 615 616 617 618 619 620 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 |
# File 'lib/flat_api/api/organization_api.rb', line 608 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 allowable_values = ["firstname", "lastname", "lastActivityDate", "licenseExpirationDate"] if @api_client.config.client_side_validation && opts[:'sort'] && !opts[:'sort'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"sort\", must include one of #{allowable_values}" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" end allowable_values = ["user", "teacher", "admin"] if @api_client.config.client_side_validation && opts[:'role'] && !opts[:'role'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"role\", must include one of #{allowable_values}" 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 = opts[:query_params] || {} query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil? query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil? query_params[:'role'] = @api_client.build_collection_param(opts[:'role'], :multi) if !opts[:'role'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'group'] = @api_client.build_collection_param(opts[:'group'], :multi) if !opts[:'group'].nil? query_params[:'noActiveLicense'] = opts[:'no_active_license'] if !opts[:'no_active_license'].nil? query_params[:'licenseExpirationDate'] = @api_client.build_collection_param(opts[:'license_expiration_date'], :multi) if !opts[:'license_expiration_date'].nil? query_params[:'onlyIds'] = opts[:'only_ids'] if !opts[:'only_ids'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<UserDetailsAdmin>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.list_organization_users", :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, ) 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
687 688 689 690 |
# File 'lib/flat_api/api/organization_api.rb', line 687 def remove_organization_invitation(invitation, opts = {}) remove_organization_invitation_with_http_info(invitation, opts) nil end |
#remove_organization_invitation_with_http_info(invitation, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove an organization invitation
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/flat_api/api/organization_api.rb', line 696 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' + '}', CGI.escape(invitation.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']) # 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] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.remove_organization_invitation", :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, ) 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)
750 751 752 753 |
# File 'lib/flat_api/api/organization_api.rb', line 750 def remove_organization_user(user, opts = {}) remove_organization_user_with_http_info(user, opts) nil end |
#remove_organization_user_with_http_info(user, opts = {}) ⇒ Array<(nil, Integer, 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)
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/flat_api/api/organization_api.rb', line 761 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' + '}', CGI.escape(user.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'convertToIndividual'] = opts[:'convert_to_individual'] if !opts[:'convert_to_individual'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.remove_organization_user", :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, ) 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
814 815 816 817 |
# File 'lib/flat_api/api/organization_api.rb', line 814 def revoke_lti_credentials(credentials, opts = {}) revoke_lti_credentials_with_http_info(credentials, opts) nil end |
#revoke_lti_credentials_with_http_info(credentials, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Revoke LTI 1.x credentials
823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 |
# File 'lib/flat_api/api/organization_api.rb', line 823 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' + '}', CGI.escape(credentials.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']) # 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] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.revoke_lti_credentials", :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, ) 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
876 877 878 879 |
# File 'lib/flat_api/api/organization_api.rb', line 876 def update_organization_user(user, body, opts = {}) data, _status_code, _headers = update_organization_user_with_http_info(user, body, opts) data end |
#update_organization_user_with_http_info(user, body, opts = {}) ⇒ Array<(UserDetailsAdmin, Integer, Hash)>
Update account information
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 |
# File 'lib/flat_api/api/organization_api.rb', line 886 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' + '}', CGI.escape(user.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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'UserDetailsAdmin' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"OrganizationApi.update_organization_user", :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, ) 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 |