8000 GitHub - infinitered/eversign: Elixir wrapper for Eversign API · GitHub
[go: up one dir, main page]

Skip to content
infiniteredPublic

About

Elixir wrapper for Eversign API

Resources

Stars

2 stars

Watchers

8 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eversign

Package for interacting with Eversign's API.

Originally built by Infinite Red, a U.S.-based web and mobile development company.

Installation

If available in Hex, the package can be installed by adding eversign to your list of dependencies in mix.exs:

def deps do
  [{:eversign, "~> 0.1.0"}]
end

Usage

In your config file:

  ## In prod/dev config

      config :eversign,
        access_key: {:system, "EVERSIGN_ACCESS_KEY"},
        business_id: {:system, "EVERSIGN_BUSINESS_ID"},
        api_module: Eversign.API.HTTP

  ## In test config:

      config :eversign,
        access_key: {:system, "EVERSIGN_ACCESS_KEY"},
        business_id: {:system, "EVERSIGN_BUSINESS_ID"},
        api_module: Eversign.API.Mock

Create document using a template:

  def create_eversign(opts) do
    %{ address: address, client: client } = opts

    params = %{
      template_id: "TemplateIDHere",
      title: "My Template Title",
      message: "Please sign this document for our records.",
      signers: [%{
        role: "Client",
        name: client.full_name,
        email: client.email,
      }, %{
        role: "Account Manager",
        name: "Jamon Holmgren",
        email: "jamon@infinite.red",
      }],
      fields: [%{
        identifier: "full-name",
        value: client.full_name
      },
      %{
        identifier: "street-address",
        value: "#{address.line_1}, #{address.line_2}"
      },
      %{
        identifier: "city-state-zip",
        value: "#{address.city}, #{address.state}, #{address.zip_code}"
      }]
    }

    %{ :ok, _data } = Evernote.use_template(params)
  end

Retrieve a document using a document ID:

  document = Eversign.get_document("document ID here")

TODO: Add rest of API, more examples.

About

Elixir wrapper for Eversign API

Resources

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages

0