Skip to content

Commit

Permalink
Merge pull request #13 from chamberflag/feature/version-1.5
Browse files Browse the repository at this point in the history
Bump version to 1.5, update README
  • Loading branch information
joelbarker2011 authored Oct 16, 2018
2 parents 11e1c80 + f0fc281 commit 90bfc70
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
echosign (1.0.2)
echosign (1.5.0)
httparty (~> 0.16)
json (~> 2)
oauth2 (~> 1)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
yard (0.8.7.4)
yard (0.9.16)

PLATFORMS
ruby
Expand All @@ -111,7 +111,7 @@ DEPENDENCIES
simplecov (~> 0.16)
vcr (~> 4)
webmock (~> 3)
yard (~> 0.8)
yard (~> 0.9)

BUNDLED WITH
1.16.6
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ echosign

Ruby Gem to consume Adobe's EchoSign e-signature service - REST service v5


## Installation

```
Expand All @@ -14,22 +13,56 @@ gem install echosign

## Documentation

The bulk of the API is on the [Echosign::Client class](http://rdoc.info/github/bernardworthy/echosign/frames/Echosign/Client)
The bulk of the API is on the [Echosign::Client class](http://rdoc.info/github/chamberflag/echosign/frames/Echosign/Client)

You can read Echosign's full [API Documentation](http://rdoc.info/github/bernardworthy/echosign/frames)
You can read Echosign's full [API Documentation](http://rdoc.info/github/chamberflag/echosign/frames)

It wouldn't hurt to read Adobe's [Echosign API documentation](https://secure.echosign.com/public/docs/restapi/v5)

## Usage

#### Initializing a client
#### Initializing a client with an existing refresh token

```
require 'echosign'
credentials = Echosign::Refresh.new(app_id, app_secret, refresh_token)
credentials = Echosign::Credentials.new(app_id, app_secret)
access_token = credentials.refresh_access_token(refresh_token)
client = Echosign::Client.new(access_token)
```

#### Initializing a client with an authorization code

Workflow before authorizing:
- `redirect_uri` must be set in the EchoSign API configuration
- `scope` will typically be something like `'agreement_write:account agreement_send:account'`

```
require 'echosign'
credentials = Echosign::Credentials.new(app_id, app_secret)
redirect_to credentials.authorize_url(redirect_uri, scope)
```

Workflow after authorizing:
```
require 'echosign'
credentials = Echosign::Credentials.new(app_id, app_secret)
token = credentials.get_token(params[:code], redirect_uri)
# you should persist credentials.refresh_token somewhere to use in future
client = Echosign::Client.new(token)
```

#### Initializing a client with a legacy integration key

```
require 'echosign'
client = Echosign::Client.new(credentials)
client = Echosign::Client.new(integration_key)
```

#### Setting up a new agreement from a URL
Expand All @@ -49,9 +82,9 @@ recipient_params = {
role: 'SIGNER', email: 'superguy@whatsit.com'
}
agreement_info_params = {
agreement_info = {
fileInfos: [ Echosign::Fileinfo.new(file_info_params) ],
recipients: [ Echosign::Recipient.new(recipient_params)],
recipientSetInfos: [ Echosign::Recipient.new(recipient_params)],
signatureFlow: "SENDER_SIGNS_LAST",
signatureType: "ESIGN",
name: "Rumplestiltskin Contract"
Expand Down
8 changes: 4 additions & 4 deletions echosign.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ require 'echosign/version'
Gem::Specification.new do |spec|
spec.name = "echosign"
spec.version = Echosign::VERSION
spec.authors = ["Bernard Worthy"]
spec.email = ["cthomas@railjumper.com"]
spec.authors = ["Joel Barker", "Bernard Worthy", "Chuck Thomas"]
spec.email = ["joel@mojamail.com"]
spec.summary = 'Package summary'
spec.description = "A ruby gem that simplifies the use of Adobe's EchoSign web API."
spec.homepage = "http://github.com/bernardworthy/echosign"
spec.homepage = "http://github.com/chamberflag/echosign"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0")
Expand All @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "simplecov", "~> 0.16"
spec.add_development_dependency "vcr", "~> 4"
spec.add_development_dependency "webmock", "~> 3"
spec.add_development_dependency "yard", "~> 0.8"
spec.add_development_dependency "yard", "~> 0.9"

spec.add_dependency "httparty", "~> 0.16"
spec.add_dependency "json", "~> 2"
Expand Down
3 changes: 1 addition & 2 deletions lib/echosign/agreement/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ def create_agreement(agreement)

# Gets list of agreements
#
# @param agreement [Echosign::Agreement]
# @return [String] Agreement ID
# @return [Hash] An array of user agreement items
def get_agreements
get_agreements_response = request(:get_agreements)
get_agreements_response.fetch("userAgreementList")
Expand Down
5 changes: 2 additions & 3 deletions lib/echosign/mega_sign/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ def create_mega_sign(mega_sign)

# Gets list of mega_signs
#
# @param mega_sign [Echosign::Agreement]
# @return [String] Agreement ID
# @return [Hash] An array of mega sign parent agreements
def get_mega_signs
get_mega_signs_response = request(:get_mega_signs)
get_mega_signs_response.fetch("userAgreementList")
get_mega_signs_response.fetch("megaSignList")
end

# Gets detailed info on an mega_sign
Expand Down
2 changes: 1 addition & 1 deletion lib/echosign/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Echosign
VERSION = "1.0.2"
VERSION = "1.5.0"
end

0 comments on commit 90bfc70

Please sign in to comment.