WebService::ValidSign::API::DocumentPackage - A REST API client for ValidSign
version 0.003
You should not need to instantiate this object yourself. Use WebService::ValidSign for this.
use WebService::ValidSign; my $api = WebService::ValidSign->new( secret => 'foo', endpoint => 'https://some.url/api', ); my $pkg_api = $api->package;
Implement the endpoint as required by WebService::ValidSign::API.
$self->find("someid");
Find a document package based on the ID. You get a WebService::ValidSign::Object::DocumentPackage object when we have found the document package.
CAVEAT!
The object is not full up to spec, as the documents are still an arrayref filled with hashrefs. Later implementations will try to fix this issue.
$self->create($pkg);
Create a document package on the ValidSign side. You need to pass a Webservice::ValidSign::Object::DocumentPackage to the call. It cannot have and ID as you would be able to create two packages with the same ID. You can call this function with, or without documents attached to the document package.
$self->create_with_documents($pkg);
Similar to the create call, but this one can only be called when there are documents attached to the document package.
$self->download_document($pkg, $document_id);
Download a document from package. When no document id is supplied we will only download the first document. If you supply one, we will use this document id. There is not check to see if the document actually exists in the document package. Callers should check these themselves (via the find command).
find
$self->download_documents($pkg);
Download all documents from the package. You will get a filehandle to a zip file. Use Archive::ZIP to extract the files.
Wesley Schwengle <waterkip@cpan.org>
This software is Copyright (c) 2019 by Wesley Schwengle.
This is free software, licensed under:
The (three-clause) BSD License
To install WebService::ValidSign, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::ValidSign
CPAN shell
perl -MCPAN -e shell install WebService::ValidSign
For more information on module installation, please visit the detailed CPAN module installation guide.