=begin #API v1 #FormAPI is a service that helps you fill out and sign PDF templates. OpenAPI spec version: v1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 3.3.0-SNAPSHOT =end require 'spec_helper' require 'json' # Unit tests for FormAPI::PDFApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'PDFApi' do before do FormAPI.configure do |c| c.username = 'api_token123' c.password = 'testsecret123' c.host = 'localhost:31337' c.scheme = 'http' end end let(:api_instance) { FormAPI::PDFApi.new } after do # run after each test end describe 'test an instance of PDFApi' do it 'should create an instance of PDFApi' do expect(api_instance).to be_instance_of(FormAPI::PDFApi) end end # integration tests for batch_generate_pdf_v1 # Generates multiple PDFs # @param template_id # @param create_submission_data_batch_v1 # @param [Hash] opts the optional parameters # @return [Array] describe 'batch_generate_pdf_v1 test' do it 'should work' do template_id = 'tpl_000000000000000001' # String | create_submission_data_batch_v1 = nil # Array | result = api_instance.batch_generate_pdf_v1(template_id, create_submission_data_batch_v1) expect(result).to_not be_nil end end # integration tests for batch_generate_pdfs # Generates multiple PDFs # @param submission_batch_data # @param [Hash] opts the optional parameters # @return [CreateSubmissionBatchResponse] describe 'batch_generate_pdfs test' do it 'should work' do submission_batch_data = FormAPI::SubmissionBatchData.new # SubmissionBatchData | result = api_instance.batch_generate_pdfs(submission_batch_data) expect(result).to_not be_nil end end # integration tests for combine_submissions # Merge generated PDFs together # @param combined_submission_data # @param [Hash] opts the optional parameters # @return [CreateCombinedSubmissionResponse] describe 'combine_submissions test' do it 'should work' do combined_submission_data = FormAPI::CombinedSubmissionData.new # CombinedSubmissionData | result = api_instance.combine_submissions(combined_submission_data) expect(result).to_not be_nil end end # integration tests for create_data_request_token # Creates a new data request token for form authentication # @param data_request_id # @param [Hash] opts the optional parameters # @return [CreateSubmissionDataRequestTokenResponse] describe 'create_data_request_token test' do it 'should work' do data_request_id = 'drq_000000000000000001' # String | result = api_instance.create_data_request_token(data_request_id) expect(result).to_not be_nil end end # integration tests for create_template # Upload a new PDF template # @param template_document # @param template_name # @param [Hash] opts the optional parameters # @return [PendingTemplate] describe 'create_template test' do it 'should work' do template_document = File.new('/path/to/file') # File | template_name = 'template_name_example' # String | result = api_instance.create_template(template_document, template_name) expect(result).to_not be_nil end end # integration tests for expire_combined_submission # Expire a combined submission # @param combined_submission_id # @param [Hash] opts the optional parameters # @return [CombinedSubmission] describe 'expire_combined_submission test' do it 'should work' do combined_submission_id = 'com_000000000000000001' # String | result = api_instance.expire_combined_submission(combined_submission_id) expect(result).to_not be_nil end end # integration tests for expire_submission # Expire a PDF submission # @param submission_id # @param [Hash] opts the optional parameters # @return [Submission] describe 'expire_submission test' do it 'should work' do submission_id = 'sub_000000000000000001' # String | result = api_instance.expire_submission(submission_id) expect(result).to_not be_nil end end # integration tests for generate_pdf # Generates a new PDF # @param template_id # @param create_submission_data # @param [Hash] opts the optional parameters # @return [CreateSubmissionResponse] describe 'generate_pdf test' do it 'should work' do template_id = 'tpl_000000000000000001' # String | create_submission_data = FormAPI::CreateSubmissionData.new # CreateSubmissionData | result = api_instance.generate_pdf(template_id, create_submission_data) expect(result).to_not be_nil end end # integration tests for get_combined_submission # Check the status of a combined submission (merged PDFs) # @param combined_submission_id # @param [Hash] opts the optional parameters # @return [CombinedSubmission] describe 'get_combined_submission test' do it 'should work' do combined_submission_id = 'com_000000000000000001' # String | result = api_instance.get_combined_submission(combined_submission_id) expect(result).to_not be_nil end end # integration tests for get_data_request # Look up a submission data request # @param data_request_id # @param [Hash] opts the optional parameters # @return [SubmissionDataRequest] describe 'get_data_request test' do it 'should work' do data_request_id = 'drq_000000000000000001' # String | result = api_instance.get_data_request(data_request_id) expect(result).to_not be_nil end end # integration tests for get_submission # Check the status of a PDF # @param submission_id # @param [Hash] opts the optional parameters # @return [Submission] describe 'get_submission test' do it 'should work' do submission_id = 'sub_000000000000000001' # String | result = api_instance.get_submission(submission_id) expect(result).to_not be_nil end end # integration tests for get_submission_batch # Check the status of a submission batch job # @param submission_batch_id # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_submissions # @return [SubmissionBatch] describe 'get_submission_batch test' do it 'should work' do submission_batch_id = 'sba_000000000000000001' # String | opts = { include_submissions: true # BOOLEAN | } result = api_instance.get_submission_batch(submission_batch_id, opts) expect(result).to_not be_nil end end # integration tests for get_template # Check the status of an uploaded template # @param template_id # @param [Hash] opts the optional parameters # @return [Template] describe 'get_template test' do it 'should work' do template_id = 'tpl_000000000000000001' # String | result = api_instance.get_template(template_id) expect(result).to_not be_nil end end # integration tests for get_template_schema # Fetch the JSON schema for a template # @param template_id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_template_schema test' do it 'should work' do template_id = 'tpl_000000000000000001' # String | result = api_instance.get_template_schema(template_id) expect(result).to_not be_nil end end # integration tests for get_templates # Get a list of all templates # @param [Hash] opts the optional parameters # @option opts [Integer] :page Default: 1 # @option opts [Integer] :per_page Default: 50 # @return [Array