Code Monkey home page Code Monkey logo

etsechosignbundle's Introduction

ETSEchoSignBundle

ETSEchoSignBundle provides a wrapper to EchoSign APIs: https://secure.echosign.com/public/docs/EchoSignDocumentService16

Build Status Scrutinizer Code Quality SensioLabsInsight

Installation

You can install the bundle by using composer.

composer.phar require ets/echosign-bundle

Use dev-master when it asks which version to install.

##Enabling the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new ETS\EchoSignBundle\ETSEchoSignBundle()
    );
}

Configuration

The bundle requires mandatory parameters, in your config.yml:

ets_echo_sign:
    api:
        key:  YOUR_API_KEY
        gateway:  ECHOSIGN_API_GATEWAY #e.g: https://secure.echosign.com/services/EchoSignDocumentService16
        wsdl:  ECHOSIGN_API_WSDL_URL #e.g: https://secure.echosign.com/services/EchoSignDocumentService16?wsdl

You could also activate the debug option:

ets_echo_sign:
    debug:
        prefix:  YOUR_PREFIX

It does nothing more than adding the prefix to the filename when uploading. Since EchoSign offers no way to organize your files, the prefix should help you classify uploaded files in a "cleaner" way. For example, you could have a prefix "DEV_" for local development, "PREPROD_" for preprod environment.

And you have to specify a list of email addresses to use as recipients:

ets_echo_sign:
    recipients:  [[email protected]]

Available APIs

Client service offers wrappers to the most used methods:

  • sendDocument
  • getDocumentInfo
  • removeDocument
  • getMyDocuments

To send a document:

$recipients = new RecipientInfoCollection('[email protected]');
$fileCollections = new FileInfoCollection();
$fileCollections->addFileInfo(new FileInfo('file.pdf', 'file.pdf'));
$documentCreationInfo = new DocumentCreationInfo($recipients, 'Test document', $fileCollections);
$this->getContainer()->get('ets.echo.sign.client')->sendDocument($documentCreationInfo);

The method returns the document key of the newly uploaded file

To get info on a document

$this->getContainer()->get('ets.echo_sign.client')->getDocumentInfo($documentKey);

If the document doesn't exist, it will return null instead of a SoapFault exception as implemented by the original API.

To remove a document

$this->getContainer()->get('ets.echo_sign.client')->removeDocument($documentKey);

To retrieve all documents

$this->getContainer()->get('ets.echo_sign.client')->getMyDocuments();

Code License:

Resources/meta/LICENSE

etsechosignbundle's People

Contributors

ch3ric avatar lepiaf avatar lewisw avatar passkey1510 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.