Class: Lob::UploadsApi
- Inherits:
-
Object
- Object
- Lob::UploadsApi
- Defined in:
- lib/lob/api/uploads_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(upload_writable, opts = {}) ⇒ Upload
create Creates a new upload with the provided properties.
-
#create_export(upl_id, export_model, opts = {}) ⇒ UploadCreateExport
create_export Campaign Exports can help you understand exactly which records in a campaign could not be created.
-
#delete(upl_id, opts = {}) ⇒ nil
delete Delete an existing upload.
-
#export_retrieve_with_http_info(upl_id, ex_id, opts = {}) ⇒ Array<(Export, Integer, Hash)>
get_export Retrieves the details of an existing export.
-
#get(upl_id, opts = {}) ⇒ Upload
get Retrieves the details of an existing upload.
-
#get_export(upl_id, ex_id, opts = {}) ⇒ Export
get_export Retrieves the details of an existing export.
-
#get_with_http_info(upl_id, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
get Retrieves the details of an existing upload.
-
#initialize(api_client = ApiClient.default) ⇒ UploadsApi
constructor
A new instance of UploadsApi.
-
#list(opts = {}) ⇒ Array<Upload>
list Returns a list of your uploads.
-
#update(upl_id, upload_updatable, opts = {}) ⇒ Upload
update Update the details of an existing upload.
-
#upload_create_with_http_info(upload_writable, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
create Creates a new upload with the provided properties.
-
#upload_delete_with_http_info(upl_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
delete Delete an existing upload.
-
#upload_export_create_with_http_info(upl_id, export_model, opts = {}) ⇒ Array<(UploadCreateExport, Integer, Hash)>
create_export Campaign Exports can help you understand exactly which records in a campaign could not be created.
-
#upload_file(upl_id, file, opts = {}) ⇒ UploadFile
upload_file Upload an [audience file](help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
-
#upload_file_create_with_http_info(upl_id, file, opts = {}) ⇒ Array<(UploadFile, Integer, Hash)>
upload_file Upload an [audience file](help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
-
#upload_update_with_http_info(upl_id, upload_updatable, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
update Update the details of an existing upload.
-
#uploads_list_with_http_info(opts = {}) ⇒ Array<(Array<Upload>, Integer, Hash)>
list Returns a list of your uploads.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ UploadsApi
Returns a new instance of UploadsApi.
19 20 21 |
# File 'lib/lob/api/uploads_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/lob/api/uploads_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(upload_writable, opts = {}) ⇒ Upload
create Creates a new upload with the provided properties.
174 175 176 177 |
# File 'lib/lob/api/uploads_api.rb', line 174 def create(upload_writable, opts = {}) data, _status_code, _headers = upload_create_with_http_info(upload_writable, opts) data end |
#create_export(upl_id, export_model, opts = {}) ⇒ UploadCreateExport
create_export Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload.
311 312 313 314 |
# File 'lib/lob/api/uploads_api.rb', line 311 def create_export(upl_id, export_model, opts = {}) data, _status_code, _headers = upload_export_create_with_http_info(upl_id, export_model, opts) data end |
#delete(upl_id, opts = {}) ⇒ nil
delete Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
242 243 244 245 |
# File 'lib/lob/api/uploads_api.rb', line 242 def delete(upl_id, opts = {}) upload_delete_with_http_info(upl_id, opts) nil end |
#export_retrieve_with_http_info(upl_id, ex_id, opts = {}) ⇒ Array<(Export, Integer, Hash)>
get_export Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we're done processing the export), you will get back an export object with `state = in_progress`.
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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/lob/api/uploads_api.rb', line 39 def export_retrieve_with_http_info(upl_id, ex_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.export_retrieve ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.export_retrieve" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.export_retrieve, must conform to the pattern #{pattern}." end # verify the required parameter 'ex_id' is set if @api_client.config.client_side_validation && ex_id.nil? fail ArgumentError, "Missing the required parameter 'ex_id' when calling UploadsApi.export_retrieve" end pattern = Regexp.new(/^ex_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && ex_id !~ pattern fail ArgumentError, "invalid value for 'ex_id' when calling UploadsApi.export_retrieve, must conform to the pattern #{pattern}." end # resource path local_var_path = '/uploads/{upl_id}/exports/{ex_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_id.to_s)).sub('{' + 'ex_id' + '}', CGI.escape(ex_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Export' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.export_retrieve", :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: UploadsApi#export_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(upl_id, opts = {}) ⇒ Upload
get Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
106 107 108 109 |
# File 'lib/lob/api/uploads_api.rb', line 106 def get(upl_id, opts = {}) data, _status_code, _headers = get_with_http_info(upl_id, opts) data end |
#get_export(upl_id, ex_id, opts = {}) ⇒ Export
get_export Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we’re done processing the export), you will get back an export object with ‘state = in_progress`.
28 29 30 31 |
# File 'lib/lob/api/uploads_api.rb', line 28 def get_export(upl_id, ex_id, opts = {}) data, _status_code, _headers = export_retrieve_with_http_info(upl_id, ex_id, opts) data end |
#get_with_http_info(upl_id, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
get Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/lob/api/uploads_api.rb', line 116 def get_with_http_info(upl_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.get ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.get" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.get, must conform to the pattern #{pattern}." end # resource path local_var_path = '/uploads/{upl_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Upload' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.get", :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: UploadsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list(opts = {}) ⇒ Array<Upload>
list Returns a list of your uploads. Optionally, filter uploads by campaign.
544 545 546 547 |
# File 'lib/lob/api/uploads_api.rb', line 544 def list(opts = {}) data, _status_code, _headers = uploads_list_with_http_info(opts) data end |
#update(upl_id, upload_updatable, opts = {}) ⇒ Upload
update Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
466 467 468 469 |
# File 'lib/lob/api/uploads_api.rb', line 466 def update(upl_id, upload_updatable, opts = {}) data, _status_code, _headers = upload_update_with_http_info(upl_id, upload_updatable, opts) data end |
#upload_create_with_http_info(upload_writable, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
create Creates a new upload with the provided properties.
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 |
# File 'lib/lob/api/uploads_api.rb', line 184 def upload_create_with_http_info(upload_writable, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.upload_create ...' end # verify the required parameter 'upload_writable' is set if @api_client.config.client_side_validation && upload_writable.nil? fail ArgumentError, "Missing the required parameter 'upload_writable' when calling UploadsApi.upload_create" end # resource path local_var_path = '/uploads' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(upload_writable) # return_type return_type = opts[:debug_return_type] || 'Upload' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.upload_create", :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: UploadsApi#upload_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_delete_with_http_info(upl_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
delete Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
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 |
# File 'lib/lob/api/uploads_api.rb', line 252 def upload_delete_with_http_info(upl_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.upload_delete ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.upload_delete" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.upload_delete, must conform to the pattern #{pattern}." end # resource path local_var_path = '/uploads/{upl_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.upload_delete", :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: UploadsApi#upload_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_export_create_with_http_info(upl_id, export_model, opts = {}) ⇒ Array<(UploadCreateExport, Integer, Hash)>
create_export Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload.
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 |
# File 'lib/lob/api/uploads_api.rb', line 322 def upload_export_create_with_http_info(upl_id, export_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.upload_export_create ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.upload_export_create" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.upload_export_create, must conform to the pattern #{pattern}." end # verify the required parameter 'export_model' is set if @api_client.config.client_side_validation && export_model.nil? fail ArgumentError, "Missing the required parameter 'export_model' when calling UploadsApi.upload_export_create" end # resource path local_var_path = '/uploads/{upl_id}/exports'.sub('{' + 'upl_id' + '}', CGI.escape(upl_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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(export_model) # return_type return_type = opts[:debug_return_type] || 'UploadCreateExport' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.upload_export_create", :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: UploadsApi#upload_export_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_file(upl_id, file, opts = {}) ⇒ UploadFile
upload_file Upload an [audience file](help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
390 391 392 393 |
# File 'lib/lob/api/uploads_api.rb', line 390 def upload_file(upl_id, file, opts = {}) data, _status_code, _headers = upload_file_create_with_http_info(upl_id, file, opts) data end |
#upload_file_create_with_http_info(upl_id, file, opts = {}) ⇒ Array<(UploadFile, Integer, Hash)>
upload_file Upload an [audience file](help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
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 455 456 457 458 |
# File 'lib/lob/api/uploads_api.rb', line 401 def upload_file_create_with_http_info(upl_id, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.upload_file_create ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.upload_file_create" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.upload_file_create, must conform to the pattern #{pattern}." end # resource path local_var_path = '/uploads/{upl_id}/file'.sub('{' + 'upl_id' + '}', CGI.escape(upl_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' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = file # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UploadFile' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.upload_file_create", :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: UploadsApi#upload_file_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_update_with_http_info(upl_id, upload_updatable, opts = {}) ⇒ Array<(Upload, Integer, Hash)>
update Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
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 536 537 |
# File 'lib/lob/api/uploads_api.rb', line 477 def upload_update_with_http_info(upl_id, upload_updatable, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.upload_update ...' end # verify the required parameter 'upl_id' is set if @api_client.config.client_side_validation && upl_id.nil? fail ArgumentError, "Missing the required parameter 'upl_id' when calling UploadsApi.upload_update" end pattern = Regexp.new(/^upl_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && upl_id !~ pattern fail ArgumentError, "invalid value for 'upl_id' when calling UploadsApi.upload_update, must conform to the pattern #{pattern}." end # verify the required parameter 'upload_updatable' is set if @api_client.config.client_side_validation && upload_updatable.nil? fail ArgumentError, "Missing the required parameter 'upload_updatable' when calling UploadsApi.upload_update" end # resource path local_var_path = '/uploads/{upl_id}'.sub('{' + 'upl_id' + '}', CGI.escape(upl_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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(upload_updatable) # return_type return_type = opts[:debug_return_type] || 'Upload' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.upload_update", :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: UploadsApi#upload_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#uploads_list_with_http_info(opts = {}) ⇒ Array<(Array<Upload>, Integer, Hash)>
list Returns a list of your uploads. Optionally, filter uploads by campaign.
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 |
# File 'lib/lob/api/uploads_api.rb', line 554 def uploads_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UploadsApi.uploads_list ...' end pattern = Regexp.new(/^cmp_[a-zA-Z0-9]+$/) if @api_client.config.client_side_validation && !opts[:'campaign_id'].nil? && opts[:'campaign_id'] !~ pattern fail ArgumentError, "invalid value for 'opts[:\"campaign_id\"]' when calling UploadsApi.uploads_list, must conform to the pattern #{pattern}." end # resource path local_var_path = '/uploads' # query parameters query_params = opts[:query_params] || {} query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Upload>' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth'] = opts.merge( :operation => :"UploadsApi.uploads_list", :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: UploadsApi#uploads_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |