-
Notifications
You must be signed in to change notification settings - Fork 167
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
Conversation
I'm also using rspec
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
…lope from an Envelope object.
…ut needing to update the Tabs afterwards
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! |
@karneyli this is a nice redesign of the project; well done on the tests especially. Are you still doing stuff with docusign these days? |
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! |
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.