File Coverage

blib/lib/Business/Shipping/UPS_Online/Shipment.pm
Criterion Covered Total %
statement 12 16 75.0
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 22 77.2


line stmt bran cond sub pod time code
1             package Business::Shipping::UPS_Online::Shipment;
2              
3             =head1 NAME
4              
5             Business::Shipping::UPS_Online::Shipment
6              
7             =head1 METHODS
8              
9             =cut
10              
11 2     2   5345 use Any::Moose;
  2         5  
  2         17  
12 2     2   1315 use Business::Shipping::Config;
  2         5  
  2         168  
13 2     2   12 use Business::Shipping::Logging;
  2         4  
  2         269  
14 2     2   13 use version; our $VERSION = qv('400');
  2         9  
  2         16  
15              
16             extends 'Business::Shipping::Shipment::UPS';
17              
18             # of 'Business::Shipping::UPS_Online::Package' objects
19             has 'packages' => (
20             is => 'rw',
21             isa => 'ArrayRef[Business::Shipping::UPS_Online::Package]',
22             default => sub { [Business::Shipping::UPS_Online::Package->new()] },
23             auto_deref => 1
24             );
25             has 'max_weight' => (is => 'rw', default => 150);
26             has 'cod' => (is => 'rw');
27             has 'cod_funds_code' => (is => 'rw');
28             has 'cod_value' => (is => 'rw');
29              
30             =head2 packages_push
31              
32             Syntatic sugar to avoid push @{$self->packages()}, $new_package;
33              
34             =cut
35              
36             sub packages_push {
37 0     0 1   my ($self, $new_package) = @_;
38 0           push @{ $self->packages() }, $new_package;
  0            
39 0           return;
40             }
41              
42             __PACKAGE__->meta()->make_immutable();
43              
44             1;
45              
46             __END__