Skip to content

Latest commit

 

History

History
181 lines (144 loc) · 10.7 KB

README.md

File metadata and controls

181 lines (144 loc) · 10.7 KB

docspring

DocSpring - the Ruby gem for the API v1

DocSpring is a service that helps you fill out and sign PDF templates.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.4.1
  • Build package: com.docspring.codegen.DocSpringRubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build docspring.gemspec

Then either install the gem locally:

gem install ./docspring-1.4.1.gem

(for development, run gem install --dev ./docspring-1.4.1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'docspring', '~> 1.4.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'docspring', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'docspring'

# Setup authorization
DocSpring.configure do |config|
  # Configure HTTP basic authorization: api_token_basic
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = DocSpring::PDFApi.new
template_id = 'tpl_000000000000000002' # String | 
add_fields_data = DocSpring::AddFieldsData.new # AddFieldsData | 

begin
  #Add new fields to a Template
  result = api_instance.add_fields_to_template(template_id, add_fields_data)
  p result
rescue DocSpring::ApiError => e
  puts "Exception when calling PDFApi->add_fields_to_template: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.docspring.com/api/v1

Class Method HTTP request Description
DocSpring::PDFApi add_fields_to_template PUT /templates/{template_id}/add_fields Add new fields to a Template
DocSpring::PDFApi batch_generate_pdf_v1 POST /templates/{template_id}/submissions/batch Generates multiple PDFs
DocSpring::PDFApi batch_generate_pdfs POST /submissions/batches Generates multiple PDFs
DocSpring::PDFApi combine_pdfs POST /combined_submissions?v=2 Merge submission PDFs, template PDFs, or custom files
DocSpring::PDFApi combine_submissions POST /combined_submissions Merge generated PDFs together
DocSpring::PDFApi copy_template POST /templates/{template_id}/copy Copy a Template
DocSpring::PDFApi create_custom_file_from_upload POST /custom_files Create a new custom file from a cached presign upload
DocSpring::PDFApi create_data_request_token POST /data_requests/{data_request_id}/tokens Creates a new data request token for form authentication
DocSpring::PDFApi create_folder POST /folders/ Create a folder
DocSpring::PDFApi create_html_template POST /templates?desc=html Create a new HTML template
DocSpring::PDFApi create_pdf_template POST /templates Create a new PDF template with a form POST file upload
DocSpring::PDFApi create_pdf_template_from_upload POST /templates?desc=cached_upload Create a new PDF template from a cached presign upload
DocSpring::PDFApi delete_folder DELETE /folders/{folder_id} Delete a folder
DocSpring::PDFApi expire_combined_submission DELETE /combined_submissions/{combined_submission_id} Expire a combined submission
DocSpring::PDFApi expire_submission DELETE /submissions/{submission_id} Expire a PDF submission
DocSpring::PDFApi generate_pdf POST /templates/{template_id}/submissions Generates a new PDF
DocSpring::PDFApi get_combined_submission GET /combined_submissions/{combined_submission_id} Check the status of a combined submission (merged PDFs)
DocSpring::PDFApi get_data_request GET /data_requests/{data_request_id} Look up a submission data request
DocSpring::PDFApi get_full_template GET /templates/{template_id}?full=true Fetch the full template attributes
DocSpring::PDFApi get_presign_url GET /uploads/presign Get a presigned URL so that you can upload a file to our AWS S3 bucket
DocSpring::PDFApi get_submission GET /submissions/{submission_id} Check the status of a PDF
DocSpring::PDFApi get_submission_batch GET /submissions/batches/{submission_batch_id} Check the status of a submission batch job
DocSpring::PDFApi get_template GET /templates/{template_id} Check the status of an uploaded template
DocSpring::PDFApi get_template_schema GET /templates/{template_id}/schema Fetch the JSON schema for a template
DocSpring::PDFApi list_folders GET /folders/ Get a list of all folders
DocSpring::PDFApi list_submissions GET /submissions List all submissions
DocSpring::PDFApi list_submissions_0 GET /templates/{template_id}/submissions List all submissions for a given template
DocSpring::PDFApi list_templates GET /templates Get a list of all templates
DocSpring::PDFApi move_folder_to_folder POST /folders/{folder_id}/move Move a folder
DocSpring::PDFApi move_template_to_folder POST /templates/{template_id}/move Move Template to folder
DocSpring::PDFApi rename_folder POST /folders/{folder_id}/rename Rename a folder
DocSpring::PDFApi test_authentication GET /authentication Test Authentication
DocSpring::PDFApi update_data_request PUT /data_requests/{data_request_id} Update a submission data request
DocSpring::PDFApi update_template PUT /templates/{template_id} Update a Template

Documentation for Models

Documentation for Authorization

api_token_basic

  • Type: HTTP basic authentication