Class: Dropbox::Sign::FaxLineApi
- Inherits:
-
Object
- Object
- Dropbox::Sign::FaxLineApi
- Defined in:
- lib/dropbox-sign/api/fax_line_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#fax_line_add_user(fax_line_add_user_request, opts = {}) ⇒ FaxLineResponse
Add Fax Line User Grants a user access to the specified Fax Line.
-
#fax_line_add_user_with_http_info(fax_line_add_user_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Add Fax Line User Grants a user access to the specified Fax Line.
-
#fax_line_area_code_get(country, opts = {}) ⇒ FaxLineAreaCodeGetResponse
Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city.
-
#fax_line_area_code_get_with_http_info(country, opts = {}) ⇒ Array<(FaxLineAreaCodeGetResponse, Integer, Hash)>
Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city.
-
#fax_line_create(fax_line_create_request, opts = {}) ⇒ FaxLineResponse
Purchase Fax Line Purchases a new Fax Line.
-
#fax_line_create_with_http_info(fax_line_create_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Purchase Fax Line Purchases a new Fax Line.
-
#fax_line_delete(fax_line_delete_request, opts = {}) ⇒ nil
Delete Fax Line Deletes the specified Fax Line from the subscription.
-
#fax_line_delete_with_http_info(fax_line_delete_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Fax Line Deletes the specified Fax Line from the subscription.
-
#fax_line_get(number, opts = {}) ⇒ FaxLineResponse
Get Fax Line Returns the properties and settings of a Fax Line.
-
#fax_line_get_with_http_info(number, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Get Fax Line Returns the properties and settings of a Fax Line.
-
#fax_line_list(opts = {}) ⇒ FaxLineListResponse
List Fax Lines Returns the properties and settings of multiple Fax Lines.
-
#fax_line_list_with_http_info(opts = {}) ⇒ Array<(FaxLineListResponse, Integer, Hash)>
List Fax Lines Returns the properties and settings of multiple Fax Lines.
-
#fax_line_remove_user(fax_line_remove_user_request, opts = {}) ⇒ FaxLineResponse
Remove Fax Line Access Removes a user’s access to the specified Fax Line.
-
#fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Remove Fax Line Access Removes a user's access to the specified Fax Line.
-
#initialize(api_client = ApiClient.default) ⇒ FaxLineApi
constructor
A new instance of FaxLineApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FaxLineApi
Returns a new instance of FaxLineApi.
22 23 24 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 22 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#fax_line_add_user(fax_line_add_user_request, opts = {}) ⇒ FaxLineResponse
Add Fax Line User Grants a user access to the specified Fax Line.
30 31 32 33 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 30 def fax_line_add_user(fax_line_add_user_request, opts = {}) data, _status_code, _headers = fax_line_add_user_with_http_info(fax_line_add_user_request, opts) data end |
#fax_line_add_user_with_http_info(fax_line_add_user_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Add Fax Line User Grants a user access to the specified Fax Line.
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 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 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 40 def fax_line_add_user_with_http_info(fax_line_add_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_add_user ...' end # verify the required parameter 'fax_line_add_user_request' is set if @api_client.config.client_side_validation && fax_line_add_user_request.nil? fail ArgumentError, "Missing the required parameter 'fax_line_add_user_request' when calling FaxLineApi.fax_line_add_user" end # resource path local_var_path = '/fax_line/add_user' # 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( fax_line_add_user_request, Dropbox::Sign::FaxLineAddUserRequest.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] || 'FaxLineResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_add_user", :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::FaxLineResponse" ) 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: FaxLineApi#fax_line_add_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_area_code_get(country, opts = {}) ⇒ FaxLineAreaCodeGetResponse
Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city.
142 143 144 145 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 142 def fax_line_area_code_get(country, opts = {}) data, _status_code, _headers = fax_line_area_code_get_with_http_info(country, opts) data end |
#fax_line_area_code_get_with_http_info(country, opts = {}) ⇒ Array<(FaxLineAreaCodeGetResponse, Integer, Hash)>
Get Available Fax Line Area Codes Returns a response with the area codes available for a given state/provice and city.
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 245 246 247 248 249 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 155 def fax_line_area_code_get_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_area_code_get ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling FaxLineApi.fax_line_area_code_get" end # verify enum value allowable_values = ["CA", "US", "UK"] if @api_client.config.client_side_validation && !allowable_values.include?(country) fail ArgumentError, "invalid value for \"country\", must be one of #{allowable_values}" end allowable_values = ["AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY"] if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state']) fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}" end allowable_values = ["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"] if @api_client.config.client_side_validation && opts[:'province'] && !allowable_values.include?(opts[:'province']) fail ArgumentError, "invalid value for \"province\", must be one of #{allowable_values}" end # resource path local_var_path = '/fax_line/area_codes' # query parameters query_params = opts[:query_params] || {} query_params[:'country'] = country query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'province'] = opts[:'province'] if !opts[:'province'].nil? query_params[:'city'] = opts[:'city'] if !opts[:'city'].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] || 'FaxLineAreaCodeGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_area_code_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::FaxLineAreaCodeGetResponse" ) 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: FaxLineApi#fax_line_area_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_create(fax_line_create_request, opts = {}) ⇒ FaxLineResponse
Purchase Fax Line Purchases a new Fax Line.
256 257 258 259 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 256 def fax_line_create(fax_line_create_request, opts = {}) data, _status_code, _headers = fax_line_create_with_http_info(fax_line_create_request, opts) data end |
#fax_line_create_with_http_info(fax_line_create_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Purchase Fax Line Purchases a new Fax Line.
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 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 266 def fax_line_create_with_http_info(fax_line_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_create ...' end # verify the required parameter 'fax_line_create_request' is set if @api_client.config.client_side_validation && fax_line_create_request.nil? fail ArgumentError, "Missing the required parameter 'fax_line_create_request' when calling FaxLineApi.fax_line_create" end # resource path local_var_path = '/fax_line/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( fax_line_create_request, Dropbox::Sign::FaxLineCreateRequest.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] || 'FaxLineResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_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::FaxLineResponse" ) 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: FaxLineApi#fax_line_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_delete(fax_line_delete_request, opts = {}) ⇒ nil
Delete Fax Line Deletes the specified Fax Line from the subscription.
365 366 367 368 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 365 def fax_line_delete(fax_line_delete_request, opts = {}) fax_line_delete_with_http_info(fax_line_delete_request, opts) nil end |
#fax_line_delete_with_http_info(fax_line_delete_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Fax Line Deletes the specified Fax Line from the subscription.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 375 def fax_line_delete_with_http_info(fax_line_delete_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_delete ...' end # verify the required parameter 'fax_line_delete_request' is set if @api_client.config.client_side_validation && fax_line_delete_request.nil? fail ArgumentError, "Missing the required parameter 'fax_line_delete_request' when calling FaxLineApi.fax_line_delete" end # resource path local_var_path = '/fax_line' # 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( fax_line_delete_request, Dropbox::Sign::FaxLineDeleteRequest.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] # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_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: FaxLineApi#fax_line_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_get(number, opts = {}) ⇒ FaxLineResponse
Get Fax Line Returns the properties and settings of a Fax Line.
447 448 449 450 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 447 def fax_line_get(number, opts = {}) data, _status_code, _headers = fax_line_get_with_http_info(number, opts) data end |
#fax_line_get_with_http_info(number, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Get Fax Line Returns the properties and settings of a Fax Line.
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 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 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 457 def fax_line_get_with_http_info(number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_get ...' end # verify the required parameter 'number' is set if @api_client.config.client_side_validation && number.nil? fail ArgumentError, "Missing the required parameter 'number' when calling FaxLineApi.fax_line_get" end # resource path local_var_path = '/fax_line' # query parameters query_params = opts[:query_params] || {} query_params[:'number'] = number # 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] || 'FaxLineResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_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::FaxLineResponse" ) 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: FaxLineApi#fax_line_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_list(opts = {}) ⇒ FaxLineListResponse
List Fax Lines Returns the properties and settings of multiple Fax Lines.
545 546 547 548 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 545 def fax_line_list(opts = {}) data, _status_code, _headers = fax_line_list_with_http_info(opts) data end |
#fax_line_list_with_http_info(opts = {}) ⇒ Array<(FaxLineListResponse, Integer, Hash)>
List Fax Lines Returns the properties and settings of multiple Fax Lines.
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 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 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 558 def fax_line_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_list ...' end # resource path local_var_path = '/fax_line/list' # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'show_team_lines'] = opts[:'show_team_lines'] if !opts[:'show_team_lines'].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] || 'FaxLineListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_list", :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::FaxLineListResponse" ) 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: FaxLineApi#fax_line_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fax_line_remove_user(fax_line_remove_user_request, opts = {}) ⇒ FaxLineResponse
Remove Fax Line Access Removes a user’s access to the specified Fax Line.
642 643 644 645 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 642 def fax_line_remove_user(fax_line_remove_user_request, opts = {}) data, _status_code, _headers = fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts) data end |
#fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts = {}) ⇒ Array<(FaxLineResponse, Integer, Hash)>
Remove Fax Line Access Removes a user's access to the specified Fax Line.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 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 743 744 |
# File 'lib/dropbox-sign/api/fax_line_api.rb', line 652 def fax_line_remove_user_with_http_info(fax_line_remove_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FaxLineApi.fax_line_remove_user ...' end # verify the required parameter 'fax_line_remove_user_request' is set if @api_client.config.client_side_validation && fax_line_remove_user_request.nil? fail ArgumentError, "Missing the required parameter 'fax_line_remove_user_request' when calling FaxLineApi.fax_line_remove_user" end # resource path local_var_path = '/fax_line/remove_user' # 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( fax_line_remove_user_request, Dropbox::Sign::FaxLineRemoveUserRequest.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] || 'FaxLineResponse' # auth_names auth_names = opts[:debug_auth_names] || ['api_key'] = opts.merge( :operation => :"FaxLineApi.fax_line_remove_user", :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::FaxLineResponse" ) 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: FaxLineApi#fax_line_remove_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |