| 1 | package Net::Async::Webservice::UPS::Label; | ||||||||||
| 2 | 1 | $Net::Async::Webservice::UPS::Label::VERSION = '1.1.4'; | |||||||||
| 3 | { | ||||||||||
| 4 | 1 | $Net::Async::Webservice::UPS::Label::DIST = 'Net-Async-Webservice-UPS'; | |||||||||
| 5 | } | ||||||||||
| 6 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use 5.010; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use Net::Async::Webservice::UPS::Types qw(:types); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | # ABSTRACT: a label for a shipment request | ||||||||||
| 12 | |||||||||||
| 13 | |||||||||||
| 14 | 1 | has code => ( | |||||||||
| 15 | is => 'ro', | ||||||||||
| 16 | isa => ImageType, | ||||||||||
| 17 | required => 1, | ||||||||||
| 18 | ); | ||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | 3 | ▶ | sub as_hash { | ||||||||
|
Subroutine
as_hash: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||
| 22 | 3 | my ($self) = @_; | |||||||||
| 23 | |||||||||||
| 24 | return { | ||||||||||
| 25 | 3 | ▶ | LabelPrintMethod => { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | Code => $self->code, | ||||||||||
| 27 | }, | ||||||||||
| 28 | ( $self->code eq 'GIF' ? ( | ||||||||||
| 29 | HTTPUserAgent => 'Mozilla/4.5', | ||||||||||
| 30 | LabelImageFormat => 'GIF', | ||||||||||
| 31 | ) : ( | ||||||||||
| 32 | LabelStockSize => { | ||||||||||
| 33 | Height => 4, | ||||||||||
| 34 | Width => 6, | ||||||||||
| 35 | }, | ||||||||||
| 36 | ) ), | ||||||||||
| 37 | }; | ||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 1 | 1; | |||||||||
| 41 | |||||||||||
| 42 | __END__ | ||||||||||