ginal API interface and
simply supplies an OO interface in perl to abstract the need to construct JSON and
web calls. It also uses all of the standard perl modules around these. Below is the
list of a
u with the examples for each of the calls. Each call returns a hashref
that contains the response JSON from Docusign. Errors are passed back with a single
reference $response->{error}. This will conta
s';
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->baseUrl . $uri, $vars);
return $response;
}
1;
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
package Document::eSign::Docusign::sendRequest;
use strict;
use warnings;
use JSON;
use LWP::UserAgent;
use HTTP::Headers;
use URI;
use Carp;
use Data::Dumper;
=head1 NAME
Document::eSign::Docusign:
DocuSign-Authentication' => $credentials,
Accept => 'application/json',
),
);
$ua->add_handler( "request_send", sub { shift->dump; return } )
if
e, $jsonparams, $multipart );
my $json = JSON->new->allow_nonref;
if ( defined $params
&& defined $contenttype
&& $contenttype =~ /json|multipart/i )
{
$jsonpara
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
eded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('PUT', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
ded.
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('POST', 'application/json', $creds, $main->defaultUrl . $uri, $vars);
return $response;
}
1;
Id};
my $creds = $main->buildCredentials();
my $response = $main->sendRequest('PUT', 'application/json', $creds, $main->baseUrl . $uri, $vars);
return $response;
}
1;
ckage Document::eSign::Docusign::buildCredentials;
use strict;
use warnings;
use XML::LibXML;
use JSON;
# Builds the auth credentials.
=head1 NAME
Document::eSign::Docusign::buildCredentials - Buil
Version 0.02
=head1 functions
=head2 new($parent)
Builds an XML or JSON login string for the Docusign header. Setting "usejsononly" to a non-undef (null) in the constructor determines this behavio
return $main->authxml;
}
if ( $main->usejsononly ) {
my $json = JSON->new();
$main->authxml($json->encode(
{
Username => $main->