File Coverage

lib/WebService/Shippo/Rates.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 22 22 100.0


line stmt bran cond sub pod time code
1 7     7   33 use strict;
  7         11  
  7         166  
2 7     7   31 use warnings;
  7         11  
  7         170  
3 7     7   34 use MRO::Compat 'c3';
  7         9  
  7         287  
4              
5             package WebService::Shippo::Rates;
6             require WebService::Shippo::Rate;
7 7         1021 use base qw(
8             WebService::Shippo::Collection
9             WebService::Shippo::Fetch
10 7     7   32 );
  7         10  
11              
12             sub item_class () { 'WebService::Shippo::Rate' }
13              
14             sub collection_class () { __PACKAGE__ }
15              
16             BEGIN {
17 7     7   36 no warnings 'once';
  7         9  
  7         223  
18 7     7   225 *Shippo::Rates:: = *WebService::Shippo::Rates::;
19             }
20              
21             1;
22              
23             =pod
24              
25             =encoding utf8
26              
27             =head1 NAME
28              
29             WebService::Shippo::Rate - Rate collection class
30              
31             =head1 VERSION
32              
33             version 0.0.21
34              
35             =head1 DESCRIPTION
36              
37             Each valid Shipment object will automatically trigger the calculation
38             of all available rates. Depending on the state of the shipment's address
39             and parcel elements, there may be none, one or multiple rates.
40              
41             By default, the calculated rates will returned in two currencies:
42              
43             =over 2
44              
45             =item * The C attribute will contain the rate expressed in the
46             currency that is used in the country from which the parcel originates.
47              
48             =item * The C attribute will contain the rate expressed
49             in the currency that is used in the country to which the parcel is being
50             shipped.
51              
52             =back
53              
54             You can request rates expressed in a different currency. The full list
55             of supported currencies, along with their codes, can be viewed on
56             L.
57              
58             Re-requesting the rates with a different currency code will
59             re-queue the shipment, setting the Shipment object's C
60             attribute to B; the converted currency rates will only be
61             available once that attribute has been set to B.
62              
63             Rates are created asynchronously. The response time depends exclusively
64             on the carrier's server.
65              
66             =head1 API DOCUMENTATION
67              
68             For more information about Rates, consult the Shippo API documentation:
69              
70             =over 2
71              
72             =item * L
73              
74             =back
75              
76             =head1 REPOSITORY
77              
78             =over 2
79              
80             =item * L
81              
82             =item * L
83              
84             =back
85              
86             =head1 AUTHOR
87              
88             Iain Campbell
89              
90             =head1 COPYRIGHT AND LICENSE
91              
92             This software is copyright (c) 2015 by Iain Campbell.
93              
94             You may distribute this software under the terms of either the GNU General
95             Public License or the Artistic License, as specified in the Perl README
96             file.
97              
98              
99             =cut