Class: PDFGeneratorAPI::FormsApi
- Inherits:
-
Object
- Object
- PDFGeneratorAPI::FormsApi
- Defined in:
- lib/pdf_generator_api_client/api/forms_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_form(form_configuration_new, opts = {}) ⇒ InlineObject17
Create form Creates a new form based on the configuration sent in the request body.
-
#create_form_with_http_info(form_configuration_new, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Create form Creates a new form based on the configuration sent in the request body.
-
#delete_form(form_id, opts = {}) ⇒ nil
Delete form Deletes the form with specified id.
-
#delete_form_with_http_info(form_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete form Deletes the form with specified id.
-
#get_form(form_id, opts = {}) ⇒ InlineObject17
Get form Returns form configuration.
-
#get_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Get form Returns form configuration.
-
#get_forms(opts = {}) ⇒ InlineObject6
Get forms Returns a list of forms available for the organization.
-
#get_forms_with_http_info(opts = {}) ⇒ Array<(InlineObject6, Integer, Hash)>
Get forms Returns a list of forms available for the organization.
-
#import_form(import_form_request, opts = {}) ⇒ InlineObject17
Import Form Creates a new form based on editable PDF.
-
#import_form_with_http_info(import_form_request, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Import Form Creates a new form based on editable PDF.
-
#initialize(api_client = ApiClient.default) ⇒ FormsApi
constructor
A new instance of FormsApi.
-
#open_form_builder(opts = {}) ⇒ InlineObject19
Open new form builder Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
-
#open_form_builder_for_existing_form(form_id, opts = {}) ⇒ InlineObject19
Open existing form builder Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
-
#open_form_builder_for_existing_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject19, Integer, Hash)>
Open existing form builder Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
-
#open_form_builder_with_http_info(opts = {}) ⇒ Array<(InlineObject19, Integer, Hash)>
Open new form builder Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
-
#share_form(form_id, opts = {}) ⇒ InlineObject18
Share form Creates an unique sharing URL to collect form data.
-
#share_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject18, Integer, Hash)>
Share form Creates an unique sharing URL to collect form data.
-
#update_form(form_id, form_configuration_new, opts = {}) ⇒ InlineObject17
Update form Updates the form configuration.
-
#update_form_with_http_info(form_id, form_configuration_new, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Update form Updates the form configuration.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_form(form_configuration_new, opts = {}) ⇒ InlineObject17
Create form Creates a new form based on the configuration sent in the request body.
27 28 29 30 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 27 def create_form(form_configuration_new, opts = {}) data, _status_code, _headers = create_form_with_http_info(form_configuration_new, opts) data end |
#create_form_with_http_info(form_configuration_new, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Create form Creates a new form based on the configuration sent in the request body.
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 83 84 85 86 87 88 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 37 def create_form_with_http_info(form_configuration_new, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.create_form ...' end # verify the required parameter 'form_configuration_new' is set if @api_client.config.client_side_validation && form_configuration_new.nil? fail ArgumentError, "Missing the required parameter 'form_configuration_new' when calling FormsApi.create_form" end # resource path local_var_path = '/forms' # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(form_configuration_new) # return_type return_type = opts[:debug_return_type] || 'InlineObject17' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.create_form", :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: FormsApi#create_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_form(form_id, opts = {}) ⇒ nil
Delete form Deletes the form with specified id
95 96 97 98 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 95 def delete_form(form_id, opts = {}) delete_form_with_http_info(form_id, opts) nil end |
#delete_form_with_http_info(form_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete form Deletes the form with specified id
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 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 105 def delete_form_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.delete_form ...' end # verify the required parameter 'form_id' is set if @api_client.config.client_side_validation && form_id.nil? fail ArgumentError, "Missing the required parameter 'form_id' when calling FormsApi.delete_form" end # resource path local_var_path = '/forms/{formId}'.sub('{' + 'formId' + '}', CGI.escape(form_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']) unless header_params['Accept'] # 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] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.delete_form", :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: FormsApi#delete_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_form(form_id, opts = {}) ⇒ InlineObject17
Get form Returns form configuration
158 159 160 161 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 158 def get_form(form_id, opts = {}) data, _status_code, _headers = get_form_with_http_info(form_id, opts) data end |
#get_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Get form Returns form configuration
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 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 168 def get_form_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.get_form ...' end # verify the required parameter 'form_id' is set if @api_client.config.client_side_validation && form_id.nil? fail ArgumentError, "Missing the required parameter 'form_id' when calling FormsApi.get_form" end # resource path local_var_path = '/forms/{formId}'.sub('{' + 'formId' + '}', CGI.escape(form_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineObject17' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.get_form", :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: FormsApi#get_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_forms(opts = {}) ⇒ InlineObject6
Get forms Returns a list of forms available for the organization
222 223 224 225 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 222 def get_forms(opts = {}) data, _status_code, _headers = get_forms_with_http_info(opts) data end |
#get_forms_with_http_info(opts = {}) ⇒ Array<(InlineObject6, Integer, Hash)>
Get forms Returns a list of forms available for the organization
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 233 def get_forms_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.get_forms ...' end # resource path local_var_path = '/forms' # 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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineObject6' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.get_forms", :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: FormsApi#get_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#import_form(import_form_request, opts = {}) ⇒ InlineObject17
Import Form Creates a new form based on editable PDF
284 285 286 287 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 284 def import_form(import_form_request, opts = {}) data, _status_code, _headers = import_form_with_http_info(import_form_request, opts) data end |
#import_form_with_http_info(import_form_request, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Import Form Creates a new form based on editable PDF
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 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 294 def import_form_with_http_info(import_form_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.import_form ...' end # verify the required parameter 'import_form_request' is set if @api_client.config.client_side_validation && import_form_request.nil? fail ArgumentError, "Missing the required parameter 'import_form_request' when calling FormsApi.import_form" end # resource path local_var_path = '/forms/import' # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(import_form_request) # return_type return_type = opts[:debug_return_type] || 'InlineObject17' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.import_form", :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: FormsApi#import_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#open_form_builder(opts = {}) ⇒ InlineObject19
Open new form builder Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
351 352 353 354 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 351 def open_form_builder(opts = {}) data, _status_code, _headers = open_form_builder_with_http_info(opts) data end |
#open_form_builder_for_existing_form(form_id, opts = {}) ⇒ InlineObject19
Open existing form builder Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
409 410 411 412 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 409 def open_form_builder_for_existing_form(form_id, opts = {}) data, _status_code, _headers = open_form_builder_for_existing_form_with_http_info(form_id, opts) data end |
#open_form_builder_for_existing_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject19, Integer, Hash)>
Open existing form builder Creates a Form Builder session for editing an existing form and returns a URL that can be used to open the embeddable Form Builder.
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 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 419 def open_form_builder_for_existing_form_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.open_form_builder_for_existing_form ...' end # verify the required parameter 'form_id' is set if @api_client.config.client_side_validation && form_id.nil? fail ArgumentError, "Missing the required parameter 'form_id' when calling FormsApi.open_form_builder_for_existing_form" end # resource path local_var_path = '/forms/{formId}/open'.sub('{' + 'formId' + '}', CGI.escape(form_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineObject19' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.open_form_builder_for_existing_form", :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: FormsApi#open_form_builder_for_existing_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#open_form_builder_with_http_info(opts = {}) ⇒ Array<(InlineObject19, Integer, Hash)>
Open new form builder Creates a new Form Builder session and returns a URL that can be used to open the embeddable Form Builder for creating a new form.
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 394 395 396 397 398 399 400 401 402 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 360 def open_form_builder_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.open_form_builder ...' end # resource path local_var_path = '/forms/open' # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineObject19' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.open_form_builder", :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: FormsApi#open_form_builder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#share_form(form_id, opts = {}) ⇒ InlineObject18
Share form Creates an unique sharing URL to collect form data
472 473 474 475 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 472 def share_form(form_id, opts = {}) data, _status_code, _headers = share_form_with_http_info(form_id, opts) data end |
#share_form_with_http_info(form_id, opts = {}) ⇒ Array<(InlineObject18, Integer, Hash)>
Share form Creates an unique sharing URL to collect form data
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 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 482 def share_form_with_http_info(form_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.share_form ...' end # verify the required parameter 'form_id' is set if @api_client.config.client_side_validation && form_id.nil? fail ArgumentError, "Missing the required parameter 'form_id' when calling FormsApi.share_form" end # resource path local_var_path = '/forms/{formId}/share'.sub('{' + 'formId' + '}', CGI.escape(form_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'InlineObject18' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.share_form", :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: FormsApi#share_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_form(form_id, form_configuration_new, opts = {}) ⇒ InlineObject17
Update form Updates the form configuration. The form configuration must be complete as the entire configuration is replaced and not merged.
536 537 538 539 |
# File 'lib/pdf_generator_api_client/api/forms_api.rb', line 536 def update_form(form_id, form_configuration_new, opts = {}) data, _status_code, _headers = update_form_with_http_info(form_id, form_configuration_new, opts) data end |
#update_form_with_http_info(form_id, form_configuration_new, opts = {}) ⇒ Array<(InlineObject17, Integer, Hash)>
Update form Updates the form configuration. The form configuration must be complete as the entire configuration is replaced and not merged.
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 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/pdf_generator_api_client/api/forms_api.rb', line 547 def update_form_with_http_info(form_id, form_configuration_new, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FormsApi.update_form ...' end # verify the required parameter 'form_id' is set if @api_client.config.client_side_validation && form_id.nil? fail ArgumentError, "Missing the required parameter 'form_id' when calling FormsApi.update_form" end # verify the required parameter 'form_configuration_new' is set if @api_client.config.client_side_validation && form_configuration_new.nil? fail ArgumentError, "Missing the required parameter 'form_configuration_new' when calling FormsApi.update_form" end # resource path local_var_path = '/forms/{formId}'.sub('{' + 'formId' + '}', CGI.escape(form_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']) 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(form_configuration_new) # return_type return_type = opts[:debug_return_type] || 'InlineObject17' # auth_names auth_names = opts[:debug_auth_names] || ['JSONWebTokenAuth'] = opts.merge( :operation => :"FormsApi.update_form", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FormsApi#update_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |