NAME
Shipment::Label
VERSION
version 3.04
SYNOPSIS
use Shipment::Label;
my $label = Shipment::Label->new(
data => $file_contents,
file_name => 'label.pdf',
);
$label->save('/tmp/') ## writes label to disk at /tmp/label.pdf
NAME
Shipment::Label - a shipping label/document
ABOUT
This class defines a shipping label and provides a method for saving to disk. It can also be used to store other shipping documents.
Class Attributes
tracking_id
The tracking id of the label
type: String
data
The actual file content (must not be base64 encoded which is usually how it comes through the intertubes)
type: String
content_type
The content type of the file (application/pdf, text/epl, image/gif, etc). Currently not used for anything in particular.
type: String
file_name
The file name to be used when saving the file to disk
type: String
Class Methods
data_base64
returns BASE64 encoded file content
type: String
save
$label->save('/tmp/');
Saves the file to disk. Will save to the cwd if nothing is specified
AUTHOR
Andrew Baerg @ <andrew at pullingshots dot ca>
http://pullingshots.ca/
BUGS
Issues can be submitted at https://github.com/pullingshots/Shipment/issues
COPYRIGHT
Copyright (C) 2016 Andrew J Baerg, All Rights Reserved
NO WARRANTY
Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Andrew Baerg <baergaj@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by Andrew Baerg.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.