Class: Phrase::TeamsApi
- Inherits:
-
Object
- Object
- Phrase::TeamsApi
- Defined in:
- lib/phrase/api/teams_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) ⇒ TeamsApi
constructor
A new instance of TeamsApi.
-
#team_create(account_id, team_create_parameters, opts = {}) ⇒ TeamDetail
Create a Team Create a new Team.
-
#team_create_with_http_info(account_id, team_create_parameters, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Create a Team Create a new Team.
-
#team_delete(account_id, id, opts = {}) ⇒ nil
Delete Team Delete the specified Team.
-
#team_delete_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Delete Team Delete the specified Team.
-
#team_show(account_id, id, opts = {}) ⇒ TeamDetail
Get Team Show the specified Team.
-
#team_show_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Get Team Show the specified Team.
-
#team_update(account_id, id, team_update_parameters, opts = {}) ⇒ TeamDetail
Update Team Update the specified Team.
-
#team_update_with_http_info(account_id, id, team_update_parameters, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Update Team Update the specified Team.
-
#teams_list(account_id, opts = {}) ⇒ Array<Team>
List Teams List all Teams for the given account.
-
#teams_list_with_http_info(account_id, opts = {}) ⇒ Array<(Response<(Array<Team>)>, Integer, Hash)>
List Teams List all Teams for the given account.
-
#teams_projects_create(account_id, team_id, teams_projects_create_parameters, opts = {}) ⇒ nil
Add Project to Team Adds an existing project to the team.
-
#teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add Project to Team Adds an existing project to the team.
-
#teams_projects_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove Project from Team Removes a specified project from the specified team.
-
#teams_projects_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove Project from Team Removes a specified project from the specified team.
-
#teams_spaces_create(account_id, team_id, teams_spaces_create_parameters, opts = {}) ⇒ nil
Add Space Adds an existing space to the team.
-
#teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add Space Adds an existing space to the team.
-
#teams_spaces_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove Space Removes a specified space from the specified team.
-
#teams_spaces_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove Space Removes a specified space from the specified team.
-
#teams_users_create(account_id, team_id, teams_users_create_parameters, opts = {}) ⇒ nil
Add User Adds an existing user to the team.
-
#teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add User Adds an existing user to the team.
-
#teams_users_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove User Removes a specified user from the specified team.
-
#teams_users_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove User Removes a specified user from the specified team.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/phrase/api/teams_api.rb', line 5 def api_client @api_client end |
Instance Method Details
#team_create(account_id, team_create_parameters, opts = {}) ⇒ TeamDetail
Create a Team Create a new Team.
17 18 19 20 |
# File 'lib/phrase/api/teams_api.rb', line 17 def team_create(account_id, team_create_parameters, opts = {}) data, _status_code, _headers = team_create_with_http_info(account_id, team_create_parameters, opts) data end |
#team_create_with_http_info(account_id, team_create_parameters, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Create a Team Create a new Team.
29 30 31 32 33 34 35 36 37 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 77 78 79 80 81 82 |
# File 'lib/phrase/api/teams_api.rb', line 29 def team_create_with_http_info(account_id, team_create_parameters, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_create ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_create" end # verify the required parameter 'team_create_parameters' is set if @api_client.config.client_side_validation && team_create_parameters.nil? fail ArgumentError, "Missing the required parameter 'team_create_parameters' when calling TeamsApi.team_create" end # resource path local_var_path = '/accounts/{account_id}/teams'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(team_create_parameters) # return_type return_type = opts[:return_type] || 'TeamDetail' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#team_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#team_delete(account_id, id, opts = {}) ⇒ nil
Delete Team Delete the specified Team.
91 92 93 94 |
# File 'lib/phrase/api/teams_api.rb', line 91 def team_delete(account_id, id, opts = {}) data, _status_code, _headers = team_delete_with_http_info(account_id, id, opts) data end |
#team_delete_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Delete Team Delete the specified Team.
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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/phrase/api/teams_api.rb', line 103 def team_delete_with_http_info(account_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_delete ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_delete" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_delete" end # resource path local_var_path = '/accounts/{account_id}/teams/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#team_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#team_show(account_id, id, opts = {}) ⇒ TeamDetail
Get Team Show the specified Team.
161 162 163 164 |
# File 'lib/phrase/api/teams_api.rb', line 161 def team_show(account_id, id, opts = {}) data, _status_code, _headers = team_show_with_http_info(account_id, id, opts) data end |
#team_show_with_http_info(account_id, id, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Get Team Show the specified Team.
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 |
# File 'lib/phrase/api/teams_api.rb', line 173 def team_show_with_http_info(account_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_show ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_show" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_show" end # resource path local_var_path = '/accounts/{account_id}/teams/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'TeamDetail' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#team_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#team_update(account_id, id, team_update_parameters, opts = {}) ⇒ TeamDetail
Update Team Update the specified Team.
234 235 236 237 |
# File 'lib/phrase/api/teams_api.rb', line 234 def team_update(account_id, id, team_update_parameters, opts = {}) data, _status_code, _headers = team_update_with_http_info(account_id, id, team_update_parameters, opts) data end |
#team_update_with_http_info(account_id, id, team_update_parameters, opts = {}) ⇒ Array<(Response<(TeamDetail)>, Integer, Hash)>
Update Team Update the specified Team.
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 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/phrase/api/teams_api.rb', line 247 def team_update_with_http_info(account_id, id, team_update_parameters, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_update ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_update" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_update" end # verify the required parameter 'team_update_parameters' is set if @api_client.config.client_side_validation && team_update_parameters.nil? fail ArgumentError, "Missing the required parameter 'team_update_parameters' when calling TeamsApi.team_update" end # resource path local_var_path = '/accounts/{account_id}/teams/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(team_update_parameters) # return_type return_type = opts[:return_type] || 'TeamDetail' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#team_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_list(account_id, opts = {}) ⇒ Array<Team>
List Teams List all Teams for the given account.
314 315 316 317 |
# File 'lib/phrase/api/teams_api.rb', line 314 def teams_list(account_id, opts = {}) data, _status_code, _headers = teams_list_with_http_info(account_id, opts) data end |
#teams_list_with_http_info(account_id, opts = {}) ⇒ Array<(Response<(Array<Team>)>, Integer, Hash)>
List Teams List all Teams for the given account.
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 |
# File 'lib/phrase/api/teams_api.rb', line 327 def teams_list_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_list ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_list" end # resource path local_var_path = '/accounts/{account_id}/teams'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<Team>' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_projects_create(account_id, team_id, teams_projects_create_parameters, opts = {}) ⇒ nil
Add Project to Team Adds an existing project to the team.
386 387 388 389 |
# File 'lib/phrase/api/teams_api.rb', line 386 def teams_projects_create(account_id, team_id, teams_projects_create_parameters, opts = {}) data, _status_code, _headers = teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts) data end |
#teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add Project to Team Adds an existing project to the team.
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 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/phrase/api/teams_api.rb', line 399 def teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_projects_create ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_projects_create" 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 TeamsApi.teams_projects_create" end # verify the required parameter 'teams_projects_create_parameters' is set if @api_client.config.client_side_validation && teams_projects_create_parameters.nil? fail ArgumentError, "Missing the required parameter 'teams_projects_create_parameters' when calling TeamsApi.teams_projects_create" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/projects'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(teams_projects_create_parameters) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_projects_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_projects_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove Project from Team Removes a specified project from the specified team.
464 465 466 467 |
# File 'lib/phrase/api/teams_api.rb', line 464 def teams_projects_delete(account_id, team_id, id, opts = {}) data, _status_code, _headers = teams_projects_delete_with_http_info(account_id, team_id, id, opts) data end |
#teams_projects_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove Project from Team Removes a specified project from the specified team.
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 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 |
# File 'lib/phrase/api/teams_api.rb', line 477 def teams_projects_delete_with_http_info(account_id, team_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_projects_delete ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_projects_delete" 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 TeamsApi.teams_projects_delete" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_projects_delete" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/projects/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_projects_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_spaces_create(account_id, team_id, teams_spaces_create_parameters, opts = {}) ⇒ nil
Add Space Adds an existing space to the team.
540 541 542 543 |
# File 'lib/phrase/api/teams_api.rb', line 540 def teams_spaces_create(account_id, team_id, teams_spaces_create_parameters, opts = {}) data, _status_code, _headers = teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts) data end |
#teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add Space Adds an existing space to the team.
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'lib/phrase/api/teams_api.rb', line 553 def teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_spaces_create ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_spaces_create" 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 TeamsApi.teams_spaces_create" end # verify the required parameter 'teams_spaces_create_parameters' is set if @api_client.config.client_side_validation && teams_spaces_create_parameters.nil? fail ArgumentError, "Missing the required parameter 'teams_spaces_create_parameters' when calling TeamsApi.teams_spaces_create" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/spaces'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(teams_spaces_create_parameters) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_spaces_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_spaces_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove Space Removes a specified space from the specified team.
618 619 620 621 |
# File 'lib/phrase/api/teams_api.rb', line 618 def teams_spaces_delete(account_id, team_id, id, opts = {}) data, _status_code, _headers = teams_spaces_delete_with_http_info(account_id, team_id, id, opts) data end |
#teams_spaces_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove Space Removes a specified space from the specified team.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/phrase/api/teams_api.rb', line 631 def teams_spaces_delete_with_http_info(account_id, team_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_spaces_delete ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_spaces_delete" 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 TeamsApi.teams_spaces_delete" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_spaces_delete" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/spaces/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_spaces_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_users_create(account_id, team_id, teams_users_create_parameters, opts = {}) ⇒ nil
Add User Adds an existing user to the team.
694 695 696 697 |
# File 'lib/phrase/api/teams_api.rb', line 694 def teams_users_create(account_id, team_id, teams_users_create_parameters, opts = {}) data, _status_code, _headers = teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts) data end |
#teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Add User Adds an existing user to the team.
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 |
# File 'lib/phrase/api/teams_api.rb', line 707 def teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_users_create ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_users_create" 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 TeamsApi.teams_users_create" end # verify the required parameter 'teams_users_create_parameters' is set if @api_client.config.client_side_validation && teams_users_create_parameters.nil? fail ArgumentError, "Missing the required parameter 'teams_users_create_parameters' when calling TeamsApi.teams_users_create" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/users'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(teams_users_create_parameters) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_users_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |
#teams_users_delete(account_id, team_id, id, opts = {}) ⇒ nil
Remove User Removes a specified user from the specified team.
772 773 774 775 |
# File 'lib/phrase/api/teams_api.rb', line 772 def teams_users_delete(account_id, team_id, id, opts = {}) data, _status_code, _headers = teams_users_delete_with_http_info(account_id, team_id, id, opts) data end |
#teams_users_delete_with_http_info(account_id, team_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>
Remove User Removes a specified user from the specified team.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 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 |
# File 'lib/phrase/api/teams_api.rb', line 785 def teams_users_delete_with_http_info(account_id, team_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.teams_users_delete ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_users_delete" 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 TeamsApi.teams_users_delete" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_users_delete" end # resource path local_var_path = '/accounts/{account_id}/teams/{team_id}/users/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] = opts.merge( :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: TeamsApi#teams_users_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end response = ::Phrase::Response.new(data, headers) return response, status_code, headers end |