Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create envelope w tags #67

Closed
wants to merge 22 commits into from
Closed

Create envelope w tags #67

wants to merge 22 commits into from

Conversation

karneyli
Copy link

Instead of creating an Envelope in draft status, retrieving the tabs, updating them, and then setting the status to sent, we can just do it all in one call (saving a lot of time and potential API call failures in service call chain with Docusign)

I wanted to simplify the design a bit, doing so required implemeting model objects for CompositeTemplate, ServerTemplate, and InlineTemplate.

A envelope made up of CompositeTemplates is actually made up of a collection of CompositeTemplates. Each CompositeTemplate has a list of ServerTemplates, if we want to set the recipients we need to set Tags we need to create an InlineTemplate in the CompositeTemplate.

We call to_h for every object in the tree and create the final map that is sent to DocuSign.

I've included call.rb as an example of how to make a call (in test ) using our server templates and supporting a scenario where we need to send the Envelope to a client, then after the client signs, to ShareOwner and to our CCO to sign. If you look at the server templates in DocuSign you'll see that there's email lists that are automatically cc-ed after the client has signed.

moving code over from wealthsimple into docusign_rest
for a Array of objects, if the contents are Tab subclasses groups the
tabs by the collection name.
…to_h on each tab instance

also remove .merge_tabs and .merge which are operations we only did for
retrieving and updating tabs which we no longer want to do
@6 6 deleted the create_envelope_w_tags branch September 30, 2015 00:26
@jondkinney
Copy link
Owner

This is pretty epic. Thanks for the PR. I'm heading out for a week-long business trip in a few hours so I won't be able to review and/or merge this for a bit. But I'll definitely take a look soon. Thanks!

@tcopeland tcopeland mentioned this pull request May 4, 2017
@tcopeland
Copy link
Collaborator

@karneyli this is a nice redesign of the project; well done on the tests especially. Are you still doing stuff with docusign these days?

@tcopeland
Copy link
Collaborator

I'm going to close this, but I'm keeping a reference to this from #103 since there's a lot of good stuff in here. Thanks again!

@tcopeland tcopeland closed this May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants