No commit activity in last 3 years
No release in over 3 years
The esignatur.dk provides methods for developers to integrate API in any ruby application.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 5.6
~> 10.0
~> 2.9
~> 1.21

Runtime

~> 0.9
~> 1.8
 Project Readme

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

  1. Get started with [Signup] https://www.esignatur.dk/kom-i-gang/
  2. 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'}
  1. Get the Base64 encoded document of the signing pdf. For eg:
   pdf_encoded = Base64.encode64(open("sample_document.pdf").to_a.join)
  1. Get all the signing details in a hash (Check https://api.esignatur.dk/Documentation/Order for more details):
   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'
              }
            ]
          }
        ]
     }
  1. Create request api client with headers:
   client = Esignatur::APIClient.new(headers)
  1. 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

  1. Fork it ( https://github.com/[my-github-username]/ruby-api-esignatur/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

ruby-api-esignatur

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.

  • 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.