Class: Dropbox::Sign::TeamApi
- Inherits:
-
Object
- Object
- Dropbox::Sign::TeamApi
- Defined in:
- lib/dropbox-sign/api/team_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TeamApi
constructor
A new instance of TeamApi.
-
#team_add_member(team_add_member_request, opts = {}) ⇒ TeamGetResponse
Add User to Team Invites a user (specified using the ‘email_address` parameter) to your Team.
-
#team_add_member_with_http_info(team_add_member_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Add User to Team Invites a user (specified using the `email_address` parameter) to your Team.
-
#team_create(team_create_request, opts = {}) ⇒ TeamGetResponse
Create Team Creates a new Team and makes you a member.
-
#team_create_with_http_info(team_create_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Create Team Creates a new Team and makes you a member.
-
#team_delete(opts = {}) ⇒ nil
Delete Team Deletes your Team.
-
#team_delete_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Team Deletes your Team.
-
#team_get(opts = {}) ⇒ TeamGetResponse
Get Team Returns information about your Team as well as a list of its members.
-
#team_get_with_http_info(opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Get Team Returns information about your Team as well as a list of its members.
-
#team_info(opts = {}) ⇒ TeamGetInfoResponse
Get Team Info Provides information about a team.
-
#team_info_with_http_info(opts = {}) ⇒ Array<(TeamGetInfoResponse, Integer, Hash)>
Get Team Info Provides information about a team.
-
#team_invites(opts = {}) ⇒ TeamInvitesResponse
List Team Invites Provides a list of team invites (and their roles).
-
#team_invites_with_http_info(opts = {}) ⇒ Array<(TeamInvitesResponse, Integer, Hash)>
List Team Invites Provides a list of team invites (and their roles).
-
#team_members(team_id, opts = {}) ⇒ TeamMembersResponse
List Team Members Provides a paginated list of members (and their roles) that belong to a given team.
-
#team_members_with_http_info(team_id, opts = {}) ⇒ Array<(TeamMembersResponse, Integer, Hash)>
List Team Members Provides a paginated list of members (and their roles) that belong to a given team.
-
#team_remove_member(team_remove_member_request, opts = {}) ⇒ TeamGetResponse
Remove User from Team Removes the provided user Account from your Team.
-
#team_remove_member_with_http_info(team_remove_member_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Remove User from Team Removes the provided user Account from your Team.
-
#team_sub_teams(team_id, opts = {}) ⇒ TeamSubTeamsResponse
List Sub Teams Provides a paginated list of sub teams that belong to a given team.
-
#team_sub_teams_with_http_info(team_id, opts = {}) ⇒ Array<(TeamSubTeamsResponse, Integer, Hash)>
List Sub Teams Provides a paginated list of sub teams that belong to a given team.
-
#team_update(team_update_request, opts = {}) ⇒ TeamGetResponse
Update Team Updates the name of your Team.
-
#team_update_with_http_info(team_update_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Update Team Updates the name of your Team.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/dropbox-sign/api/team_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#team_add_member(team_add_member_request, opts = {}) ⇒ TeamGetResponse
Add User to Team Invites a user (specified using the ‘email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.
31 32 33 34 |
# File 'lib/dropbox-sign/api/team_api.rb', line 31 def team_add_member(team_add_member_request, opts = {}) data, _status_code, _headers = team_add_member_with_http_info(team_add_member_request, opts) data end |
#team_add_member_with_http_info(team_add_member_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Add User to Team Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned.
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 107 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 |
# File 'lib/dropbox-sign/api/team_api.rb', line 42 def team_add_member_with_http_info(team_add_member_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_add_member ...' end # verify the required parameter 'team_add_member_request' is set if @api_client.config.client_side_validation && team_add_member_request.nil? fail ArgumentError, "Missing the required parameter 'team_add_member_request' when calling TeamApi.team_add_member" end # resource path local_var_path = '/team/add_member' # query parameters query_params = opts[:query_params] || {} query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # 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 post_body = {} form_params = opts[:form_params] || {} result = @api_client.generate_form_data( team_add_member_request, Dropbox::Sign::TeamAddMemberRequest.openapi_types ) # form parameters if result[:has_file] form_params = opts[:form_params] || result[:params] header_params['Content-Type'] = 'multipart/form-data' else # http body (model) post_body = opts[:debug_body] || result[:params] end # return_type return_type = opts[:debug_return_type] || 'TeamGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_add_member", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_add_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_create(team_create_request, opts = {}) ⇒ TeamGetResponse
Create Team Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.
142 143 144 145 |
# File 'lib/dropbox-sign/api/team_api.rb', line 142 def team_create(team_create_request, opts = {}) data, _status_code, _headers = team_create_with_http_info(team_create_request, opts) data end |
#team_create_with_http_info(team_create_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Create Team Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.
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 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 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/dropbox-sign/api/team_api.rb', line 152 def team_create_with_http_info(team_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_create ...' end # verify the required parameter 'team_create_request' is set if @api_client.config.client_side_validation && team_create_request.nil? fail ArgumentError, "Missing the required parameter 'team_create_request' when calling TeamApi.team_create" end # resource path local_var_path = '/team/create' # 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']) unless header_params['Accept'] # 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 post_body = {} form_params = opts[:form_params] || {} result = @api_client.generate_form_data( team_create_request, Dropbox::Sign::TeamCreateRequest.openapi_types ) # form parameters if result[:has_file] form_params = opts[:form_params] || result[:params] header_params['Content-Type'] = 'multipart/form-data' else # http body (model) post_body = opts[:debug_body] || result[:params] end # return_type return_type = opts[:debug_return_type] || 'TeamGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_delete(opts = {}) ⇒ nil
Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).
250 251 252 253 |
# File 'lib/dropbox-sign/api/team_api.rb', line 250 def team_delete(opts = {}) team_delete_with_http_info(opts) nil end |
#team_delete_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).
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 300 301 302 303 304 305 |
# File 'lib/dropbox-sign/api/team_api.rb', line 259 def team_delete_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_delete ...' end # resource path local_var_path = '/team/destroy' # 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']) unless header_params['Accept'] post_body = {} 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', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) rescue Dropbox::Sign::ApiError => e end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_get(opts = {}) ⇒ TeamGetResponse
Get Team Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.
311 312 313 314 |
# File 'lib/dropbox-sign/api/team_api.rb', line 311 def team_get(opts = {}) data, _status_code, _headers = team_get_with_http_info(opts) data end |
#team_get_with_http_info(opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Get Team Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned.
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 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 |
# File 'lib/dropbox-sign/api/team_api.rb', line 320 def team_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_get ...' end # resource path local_var_path = '/team' # 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']) unless header_params['Accept'] post_body = {} form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_info(opts = {}) ⇒ TeamGetInfoResponse
Get Team Info Provides information about a team.
400 401 402 403 |
# File 'lib/dropbox-sign/api/team_api.rb', line 400 def team_info(opts = {}) data, _status_code, _headers = team_info_with_http_info(opts) data end |
#team_info_with_http_info(opts = {}) ⇒ Array<(TeamGetInfoResponse, Integer, Hash)>
Get Team Info Provides information about a team.
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 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 |
# File 'lib/dropbox-sign/api/team_api.rb', line 410 def team_info_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_info ...' end # resource path local_var_path = '/team/info' # query parameters query_params = opts[:query_params] || {} query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] post_body = {} form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamGetInfoResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetInfoResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_invites(opts = {}) ⇒ TeamInvitesResponse
List Team Invites Provides a list of team invites (and their roles).
491 492 493 494 |
# File 'lib/dropbox-sign/api/team_api.rb', line 491 def team_invites(opts = {}) data, _status_code, _headers = team_invites_with_http_info(opts) data end |
#team_invites_with_http_info(opts = {}) ⇒ Array<(TeamInvitesResponse, Integer, Hash)>
List Team Invites Provides a list of team invites (and their roles).
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 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 |
# File 'lib/dropbox-sign/api/team_api.rb', line 501 def team_invites_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_invites ...' end # resource path local_var_path = '/team/invites' # query parameters query_params = opts[:query_params] || {} query_params[:'email_address'] = opts[:'email_address'] if !opts[:'email_address'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] post_body = {} form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamInvitesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_invites", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamInvitesResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_invites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_members(team_id, opts = {}) ⇒ TeamMembersResponse
List Team Members Provides a paginated list of members (and their roles) that belong to a given team.
584 585 586 587 |
# File 'lib/dropbox-sign/api/team_api.rb', line 584 def team_members(team_id, opts = {}) data, _status_code, _headers = team_members_with_http_info(team_id, opts) data end |
#team_members_with_http_info(team_id, opts = {}) ⇒ Array<(TeamMembersResponse, Integer, Hash)>
List Team Members Provides a paginated list of members (and their roles) that belong to a given team.
596 597 598 599 600 601 602 603 604 605 606 607 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 682 683 |
# File 'lib/dropbox-sign/api/team_api.rb', line 596 def team_members_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_members ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamApi.team_members" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TeamApi.team_members, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TeamApi.team_members, must be greater than or equal to 1.' end # resource path local_var_path = '/team/members/{team_id}'.sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] post_body = {} form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamMembersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_members", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamMembersResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_remove_member(team_remove_member_request, opts = {}) ⇒ TeamGetResponse
Remove User from Team Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the ‘new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.
690 691 692 693 |
# File 'lib/dropbox-sign/api/team_api.rb', line 690 def team_remove_member(team_remove_member_request, opts = {}) data, _status_code, _headers = team_remove_member_with_http_info(team_remove_member_request, opts) data end |
#team_remove_member_with_http_info(team_remove_member_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Remove User from Team Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed.
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 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 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 |
# File 'lib/dropbox-sign/api/team_api.rb', line 700 def team_remove_member_with_http_info(team_remove_member_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_remove_member ...' end # verify the required parameter 'team_remove_member_request' is set if @api_client.config.client_side_validation && team_remove_member_request.nil? fail ArgumentError, "Missing the required parameter 'team_remove_member_request' when calling TeamApi.team_remove_member" end # resource path local_var_path = '/team/remove_member' # 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']) unless header_params['Accept'] # 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 post_body = {} form_params = opts[:form_params] || {} result = @api_client.generate_form_data( team_remove_member_request, Dropbox::Sign::TeamRemoveMemberRequest.openapi_types ) # form parameters if result[:has_file] form_params = opts[:form_params] || result[:params] header_params['Content-Type'] = 'multipart/form-data' else # http body (model) post_body = opts[:debug_body] || result[:params] end # return_type return_type = opts[:debug_return_type] || 'TeamGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_remove_member", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 201 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_remove_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_sub_teams(team_id, opts = {}) ⇒ TeamSubTeamsResponse
List Sub Teams Provides a paginated list of sub teams that belong to a given team.
801 802 803 804 |
# File 'lib/dropbox-sign/api/team_api.rb', line 801 def team_sub_teams(team_id, opts = {}) data, _status_code, _headers = team_sub_teams_with_http_info(team_id, opts) data end |
#team_sub_teams_with_http_info(team_id, opts = {}) ⇒ Array<(TeamSubTeamsResponse, Integer, Hash)>
List Sub Teams Provides a paginated list of sub teams that belong to a given team.
813 814 815 816 817 818 819 820 821 822 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 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/dropbox-sign/api/team_api.rb', line 813 def team_sub_teams_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_sub_teams ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamApi.team_sub_teams" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TeamApi.team_sub_teams, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TeamApi.team_sub_teams, must be greater than or equal to 1.' end # resource path local_var_path = '/team/sub_teams/{team_id}'.sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] post_body = {} form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TeamSubTeamsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_sub_teams", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamSubTeamsResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_sub_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_update(team_update_request, opts = {}) ⇒ TeamGetResponse
Update Team Updates the name of your Team.
907 908 909 910 |
# File 'lib/dropbox-sign/api/team_api.rb', line 907 def team_update(team_update_request, opts = {}) data, _status_code, _headers = team_update_with_http_info(team_update_request, opts) data end |
#team_update_with_http_info(team_update_request, opts = {}) ⇒ Array<(TeamGetResponse, Integer, Hash)>
Update Team Updates the name of your Team.
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 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'lib/dropbox-sign/api/team_api.rb', line 917 def team_update_with_http_info(team_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamApi.team_update ...' end # verify the required parameter 'team_update_request' is set if @api_client.config.client_side_validation && team_update_request.nil? fail ArgumentError, "Missing the required parameter 'team_update_request' when calling TeamApi.team_update" end # resource path local_var_path = '/team' # 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']) unless header_params['Accept'] # 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 post_body = {} form_params = opts[:form_params] || {} result = @api_client.generate_form_data( team_update_request, Dropbox::Sign::TeamUpdateRequest.openapi_types ) # form parameters if result[:has_file] form_params = opts[:form_params] || result[:params] header_params['Content-Type'] = 'multipart/form-data' else # http body (model) post_body = opts[:debug_body] || result[:params] end # return_type return_type = opts[:debug_return_type] || 'TeamGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key', 'oauth2'] = opts.merge( :operation => :"TeamApi.team_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) begin data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) rescue Dropbox::Sign::ApiError => e if e.code === 200 body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::TeamGetResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end range_code = "4XX".split('').first range_code_left = "#{range_code}00".to_i range_code_right = "#{range_code}99".to_i if e.code >= range_code_left && e.code <= range_code_right body = @api_client.convert_to_type( JSON.parse("[#{e.response_body}]", :symbolize_names => true)[0], "Dropbox::Sign::ErrorResponse" ) fail ApiError.new(:code => e.code, :response_headers => e.response_headers, :response_body => body), e. end end if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamApi#team_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |