Skip to content

Commit

Permalink
Merge pull request #129 from docusign/DEVDOCS-10537
Browse files Browse the repository at this point in the history
adding codeDepot markers
  • Loading branch information
raileendr authored Jun 28, 2023
2 parents 665b5a6 + ab74baf commit 97d5d8a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/services/e_sign/eg011_embedded_sending_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ def initialize(args)
end

def worker
# Step 1. Create the envelope as a draft using eg002's worker
# Create the envelope as a draft using eg002's worker
# Exceptions will be caught by the calling function
#ds-snippet-start:eSign11Step2
results = create_envelope(args)
envelope_id = results['envelope_id']
# Step 2. Create the sender view
#ds-snippet-end:eSign11Step2

#ds-snippet-start:eSign11Step3
# Create the sender view
view_request = DocuSign_eSign::ReturnUrlRequest.new({ returnUrl: args[:ds_return_url] })
envelope_api = create_envelope_api(args)
results = envelope_api.create_sender_view args[:account_id], envelope_id, view_request
# Switch to the Recipients/Documents view if requested by the user in the form
url = results.url
url = url.sub! 'send=1', 'send=0' if args[:starting_view] == 'recipient'

{ 'envelope_id' => envelope_id, 'redirect_url' => url }
#ds-snippet-end:eSign11Step3
end

private
Expand Down

0 comments on commit 97d5d8a

Please sign in to comment.