Docusign/requestSignatureFromTemplate.pm

filter: Statementstmt 56.5% 13 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 54.8% 17 / 31 CC 2 SCAR 9.8
CC
2
Cov
52%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Docusign/requestSignatureFromDocument.pm ↑ Summary Docusign/changeEnvelopeStatus.pm »
1 package Document::eSign::Docusign::requestSignatureFromTemplate;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 Document::eSign::Docusign::requestSignatureFromTemplate - Uses a template to create and send a new envelope.
10  
11 =head1 VERSION
12  
13 Version 0.02
14  
15 =cut
16  
17 =head1 functions
18  
19 =head2 requestSignatureFromTemplate($parent, $vars)
20  
21 my $response = $ds->requestSignatureFromTemplate(
22 {
23 accountId => $ds->accountid,
24 emailSubject => 'Hello Signer World!',
25 emailBlurb => 'Please sign my document.',
26 templateId => 'GUID-OF-TEMPLATE-FROM-TEMPLATES',
27 templateRoles => [
28 {
29 email => 'somebody@somedomain.org',
30 name => 'Joe Somebody',
31 roleName => 'Signer1', # Corresponds to template signer ID.
32 }
33 ],
34 status => 'sent'
35 }
36 );
37
38 print "Got envelopeId: " . $response->{envelopeId} . "\n";
39
40 For more complicated examples, refer to Docusign's API Documentation.
41  
42 =cut
43  
44 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
45 0 ▶ carp("Got sign template request: " . Dumper(@_)) if $_[1]->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $_[1]->debug 0 0 0
46 0 my $class = shift;
47 0 my $main = shift;
48 0 my $vars = shift;
49 0 my $documentfh = shift;
50
51 0 my $self = bless {}, $class;
52
53 0 my $uri = '/envelopes';
54
55 0 my $creds = $main->buildCredentials();
56
57 0 my $response = $main->sendRequest('POST', 'application/json', $creds, $main->baseUrl . $uri, $vars);
58
59 0 return $response;
60 }
61  
62  
63 1 1;
« Docusign/requestSignatureFromDocument.pm ↑ Summary Docusign/changeEnvelopeStatus.pm »