Socket
Book a DemoInstallSign in
Socket

ruby-api-esignatur

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruby-api-esignatur

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Ruby::Api::Esignatur

Get your documents digitalized with https://www.esignatur.dk (esignatur is Denmark's safest digital signing solution for both private and public companies).

This gem is a Ruby wrapper for the esignatur API & provides all supported methods. Get the API details here: https://api.esignatur.dk/

Installation

If integrating with Rails 3.x, 4.x version:

Add this line to your application's Gemfile:

gem 'ruby-api-esignatur'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-api-esignatur

Get Started

  • Get started with [Signup] https://www.esignatur.dk/kom-i-gang/
  • Before creating signing orders, you should have:
    • SenderEmail (E-mail address of sender)
    • CreatorId (Id of document creator).
    • Identification (Cvr/Cpr of signer).

##Usage

####Headers:

Set the default headers with your signatur ID:

  headers = {'Content-Type' => 'application/json',
    'X-Esignatur-Id' => '1aaXXXX-XXXX-XXXX-XXXX-XXXXXXXXX044'}
Creating Signing Order (https://api.esignatur.dk/Documentation/Order):
  • Get the Base64 encoded document of the signing pdf. For eg:
   pdf_encoded = Base64.encode64(open("sample_document.pdf").to_a.join)
   signing_body = {CreatorId: "9208-XXXX-X-XXXXXXXXX650",
        SenderEmail: "sender@example.com",
        CommonNote: "This is a test order for signing.",
        EndDate: Time.now,
        Documents: [
          {
            title: "Signing Contract",
            Filename: "contract.pdf",
            DocumentFormat: "Pdf",
            DocumentData: pdf_encoded
          }
        ],
        steps: [
          {
            Signers: [
              {
                name: 'Name1',
                email: 'signer@example.com',
                identification: '23434234234234'
              }
            ]
          }
        ]
     }

  • Create request api client with headers:
   client = Esignatur::APIClient.new(headers)
  • Send the creating order request with order details:
  response = client.create_order(signing_body)
Get All pending orders:
response = client.pending_orders("sender@example.com") #E-mail address of sender. Set to blank disable e-mail filtering.
Get Order Status:
response = client.order_status(("sender@example.com", "c00XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX608")
# More details on: https://api.esignatur.dk/Documentation/Status
Download Signed Document:

Note: The output from these methods tends to be quite large.

response = client.get_document(Id: "34XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX166", DocumentIndex: 0)
# More details on: https://api.esignatur.dk/Documentation/Pades

Submitting an Issue

We use the GitHub issue tracker to track bugs and features.

Contributing

ruby-api-esignatur

Supported Rubies

This library aims to support the following Ruby implementations:

If something doesn't work on one of these interpreters, it should be considered a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be personally responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

Todos

  • Need to add other API methods.
  • Need to fully test all the methods.
  • Need to add a history log for additional contributers.

##Credits moorem.com: Ruby on Rails, iOS and Android developers

Copyright (c) 2015 moorem.com, released under the LICENSE.

FAQs

Package last updated on 06 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.