File Coverage

blib/lib/WWW/Picnic/Result/Cart.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package WWW::Picnic::Result::Cart;
2             our $VERSION = '0.100';
3             our $AUTHORITY = 'cpan:GETTY';
4             # ABSTRACT: Picnic shopping cart / order
5              
6 2     2   12 use Moo;
  2         3  
  2         12  
7              
8             extends 'WWW::Picnic::Result';
9              
10              
11             has id => (
12             is => 'ro',
13             lazy => 1,
14             default => sub { shift->_get('id') },
15             );
16              
17              
18             has type => (
19             is => 'ro',
20             lazy => 1,
21             default => sub { shift->_get('type') },
22             );
23              
24              
25             has status => (
26             is => 'ro',
27             lazy => 1,
28             default => sub { shift->_get('status') },
29             );
30              
31              
32             has items => (
33             is => 'ro',
34             lazy => 1,
35             default => sub { shift->_get('items') || [] },
36             );
37              
38              
39             has total_count => (
40             is => 'ro',
41             lazy => 1,
42             default => sub { shift->_get('total_count') || 0 },
43             );
44              
45              
46             has total_price => (
47             is => 'ro',
48             lazy => 1,
49             default => sub { shift->_get('total_price') || 0 },
50             );
51              
52              
53             has checkout_total_price => (
54             is => 'ro',
55             lazy => 1,
56             default => sub { shift->_get('checkout_total_price') || 0 },
57             );
58              
59              
60             has delivery_slots => (
61             is => 'ro',
62             lazy => 1,
63             default => sub { shift->_get('delivery_slots') || [] },
64             );
65              
66              
67             has selected_slot => (
68             is => 'ro',
69             lazy => 1,
70             default => sub { shift->_get('selected_slot') },
71             );
72              
73              
74             has deposit_breakdown => (
75             is => 'ro',
76             lazy => 1,
77             default => sub { shift->_get('deposit_breakdown') || [] },
78             );
79              
80              
81             1;
82              
83             __END__