| 1 | package Net::Async::Webservice::UPS::Contact; | ||||||||||||||||||||||||||
| 2 | 5 | $Net::Async::Webservice::UPS::Contact::VERSION = '1.1.4'; | |||||||||||||||||||||||||
| 3 | { | ||||||||||||||||||||||||||
| 4 | 5 | $Net::Async::Webservice::UPS::Contact::DIST = 'Net-Async-Webservice-UPS'; | |||||||||||||||||||||||||
| 5 | } | ||||||||||||||||||||||||||
| 6 | 5 | ▶ | use Moo; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 7 | 5 | ▶ | use 5.010; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 8 | 5 | ▶ | use Types::Standard qw(Str); | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 9 | 5 | ▶ | use Net::Async::Webservice::UPS::Types ':types'; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 10 | 5 | ▶ | use Net::Async::Webservice::UPS::Address; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 11 | 5 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||
| 13 | # ABSTRACT: a "contact" for UPS | ||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||
| 16 | 5 | has name => ( | |||||||||||||||||||||||||
| 17 | is => 'ro', | ||||||||||||||||||||||||||
| 18 | isa => Str, | ||||||||||||||||||||||||||
| 19 | required => 0, | ||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||
| 23 | 5 | has company_name => ( | |||||||||||||||||||||||||
| 24 | is => 'ro', | ||||||||||||||||||||||||||
| 25 | isa => Str, | ||||||||||||||||||||||||||
| 26 | required => 0, | ||||||||||||||||||||||||||
| 27 | ); | ||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||
| 30 | 5 | has attention_name => ( | |||||||||||||||||||||||||
| 31 | is => 'ro', | ||||||||||||||||||||||||||
| 32 | isa => Str, | ||||||||||||||||||||||||||
| 33 | required => 0, | ||||||||||||||||||||||||||
| 34 | ); | ||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||
| 37 | 5 | has phone_number => ( | |||||||||||||||||||||||||
| 38 | is => 'ro', | ||||||||||||||||||||||||||
| 39 | isa => Str, | ||||||||||||||||||||||||||
| 40 | required => 0, | ||||||||||||||||||||||||||
| 41 | ); | ||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||
| 44 | 5 | has email_address => ( | |||||||||||||||||||||||||
| 45 | is => 'ro', | ||||||||||||||||||||||||||
| 46 | isa => Str, | ||||||||||||||||||||||||||
| 47 | required => 0, | ||||||||||||||||||||||||||
| 48 | ); | ||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||
| 51 | 5 | has address => ( | |||||||||||||||||||||||||
| 52 | is => 'ro', | ||||||||||||||||||||||||||
| 53 | isa => Address, | ||||||||||||||||||||||||||
| 54 | required => 1, | ||||||||||||||||||||||||||
| 55 | ); | ||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||
| 58 | 9 | ▶ | sub as_hash { | ||||||||||||||||||||||||
|
Subroutine
as_hash: called CC=7 SCAR=22.6
Pod
documented
| |||||||||||||||||||||||||||
| 59 | 9 | my ($self,$shape) = @_; | |||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||
| 61 | 9 | ▶ | $shape ||= 'Ship'; | ||||||||||||||||||||||||
|
Condition50%1/2
$shape ||= "Ship"
MC/DC0%0/1
$shape ||= "Ship"
$shape
Truth table50%1/2
A
A= $shape
| |||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||
| 63 | return { | ||||||||||||||||||||||||||
| 64 | ( $self->name ? ( Name => $self->name ) : () ), | ||||||||||||||||||||||||||
| 65 | ( $self->company_name ? ( CompanyName => $self->company_name ) : () ), | ||||||||||||||||||||||||||
| 66 | ( $self->attention_name ? ( AttentionName => $self->attention_name ) : () ), | ||||||||||||||||||||||||||
| 67 | ( $self->phone_number ? ( PhoneNumber => $self->phone_number ) : () ), | ||||||||||||||||||||||||||
| 68 | ( $self->email_address ? ( EmailAddress => $self->email_address ) : () ), | ||||||||||||||||||||||||||
| 69 | 9 | ▶ | %{ $self->address->as_hash($shape) }, | ||||||||||||||||||||||||
|
Branch: 5 branches
| |||||||||||||||||||||||||||
| 70 | }; | ||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||
| 74 | 0 | ▶ | sub cache_id { | ||||||||||||||||||||||||
|
Subroutine
cache_id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||
| 75 | 0 | my ($self) = @_; | |||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||
| 77 | 0 | return $self->address->cache_id; | |||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||
| 80 | 5 | 1; | |||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||
| 82 | __END__ | ||||||||||||||||||||||||||