| 1 | package WWW::Picnic::Result::Article; | ||||||||||
| 2 | 2 | our $VERSION = '0.100'; | |||||||||
| 3 | 2 | our $AUTHORITY = 'cpan:GETTY'; | |||||||||
| 4 | # ABSTRACT: Detailed Picnic product/article information | ||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | extends 'WWW::Picnic::Result'; | |||||||||
| 9 | |||||||||||
| 10 | |||||||||||
| 11 | has id => ( | ||||||||||
| 12 | is => 'ro', | ||||||||||
| 13 | lazy => 1, | ||||||||||
| 14 | 1 | ▶ | default => sub { shift->_get('id') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 2 | ); | |||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | has name => ( | ||||||||||
| 19 | is => 'ro', | ||||||||||
| 20 | lazy => 1, | ||||||||||
| 21 | 1 | ▶ | default => sub { shift->_get('name') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 2 | ); | |||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | has description => ( | ||||||||||
| 26 | is => 'ro', | ||||||||||
| 27 | lazy => 1, | ||||||||||
| 28 | 1 | ▶ | default => sub { shift->_get('description') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 29 | 2 | ); | |||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | has type => ( | ||||||||||
| 33 | is => 'ro', | ||||||||||
| 34 | lazy => 1, | ||||||||||
| 35 | 0 | ▶ | default => sub { shift->_get('type') }, | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 36 | 2 | ); | |||||||||
| 37 | |||||||||||
| 38 | |||||||||||
| 39 | has images => ( | ||||||||||
| 40 | is => 'ro', | ||||||||||
| 41 | lazy => 1, | ||||||||||
| 42 | 0 | ▶ | default => sub { shift->_get('images') || [] }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 43 | 2 | ); | |||||||||
| 44 | |||||||||||
| 45 | |||||||||||
| 46 | has image_ids => ( | ||||||||||
| 47 | is => 'ro', | ||||||||||
| 48 | lazy => 1, | ||||||||||
| 49 | 0 | ▶ | default => sub { shift->_get('image_ids') || [] }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 50 | 2 | ); | |||||||||
| 51 | |||||||||||
| 52 | |||||||||||
| 53 | has price_info => ( | ||||||||||
| 54 | is => 'ro', | ||||||||||
| 55 | lazy => 1, | ||||||||||
| 56 | 1 | ▶ | default => sub { shift->_get('price_info') || {} }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 57 | 2 | ); | |||||||||
| 58 | |||||||||||
| 59 | |||||||||||
| 60 | sub price { | ||||||||||
| 61 | 1 | ▶ | my ( $self ) = @_; | ||||||||
|
Subroutine
price: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 62 | 1 | return $self->price_info->{price}; | |||||||||
| 63 | } | ||||||||||
| 64 | |||||||||||
| 65 | |||||||||||
| 66 | sub original_price { | ||||||||||
| 67 | 1 | ▶ | my ( $self ) = @_; | ||||||||
|
Subroutine
original_price: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 68 | 1 | return $self->price_info->{original_price}; | |||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | |||||||||||
| 72 | sub deposit { | ||||||||||
| 73 | 1 | ▶ | my ( $self ) = @_; | ||||||||
|
Subroutine
deposit: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 74 | 1 | return $self->price_info->{deposit}; | |||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | |||||||||||
| 78 | has unit_quantity => ( | ||||||||||
| 79 | is => 'ro', | ||||||||||
| 80 | lazy => 1, | ||||||||||
| 81 | 1 | ▶ | default => sub { shift->_get('unit_quantity') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 82 | 2 | ); | |||||||||
| 83 | |||||||||||
| 84 | |||||||||||
| 85 | has max_order_quantity => ( | ||||||||||
| 86 | is => 'ro', | ||||||||||
| 87 | lazy => 1, | ||||||||||
| 88 | 1 | ▶ | default => sub { shift->_get('max_order_quantity') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 89 | 2 | ); | |||||||||
| 90 | |||||||||||
| 91 | |||||||||||
| 92 | has labels => ( | ||||||||||
| 93 | is => 'ro', | ||||||||||
| 94 | lazy => 1, | ||||||||||
| 95 | 1 | ▶ | default => sub { shift->_get('labels') || [] }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 96 | 2 | ); | |||||||||
| 97 | |||||||||||
| 98 | |||||||||||
| 99 | has allergies => ( | ||||||||||
| 100 | is => 'ro', | ||||||||||
| 101 | lazy => 1, | ||||||||||
| 102 | 0 | ▶ | default => sub { shift->_get('allergies') || {} }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 103 | 2 | ); | |||||||||
| 104 | |||||||||||
| 105 | |||||||||||
| 106 | has highlights => ( | ||||||||||
| 107 | is => 'ro', | ||||||||||
| 108 | lazy => 1, | ||||||||||
| 109 | 0 | ▶ | default => sub { shift->_get('highlights') || [] }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 110 | 2 | ); | |||||||||
| 111 | |||||||||||
| 112 | |||||||||||
| 113 | has perishable => ( | ||||||||||
| 114 | is => 'ro', | ||||||||||
| 115 | lazy => 1, | ||||||||||
| 116 | 1 | ▶ | default => sub { shift->_get('perishable') }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 117 | 2 | ); | |||||||||
| 118 | |||||||||||
| 119 | |||||||||||
| 120 | 2 | 1; | |||||||||
| 121 | |||||||||||
| 122 | __END__ | ||||||||||