| 1 | package Net::Easypost::CustomsItem; | ||
| 2 | 1 | $Net::Easypost::CustomsItem::VERSION = '0.23'; | |
| 3 | 1 | ▶ | use Types::Standard qw/Num Str Undef/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | with qw/Net::Easypost::PostOnBuild/; | |
| 7 | 1 | with qw/Net::Easypost::Resource/; | |
| 8 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | has [qw/description hs_tariff_number origin_country code currency/] => ( | |
| 11 | is => 'rw', | ||
| 12 | isa => Str|Undef | ||
| 13 | ); | ||
| 14 | |||
| 15 | 1 | has [qw/quantity value weight/] => ( | |
| 16 | is => 'rw', | ||
| 17 | isa => Num | ||
| 18 | ); | ||
| 19 | |||
| 20 | 1 | ▶ | sub _build_fieldnames { |
|
Subroutine
_build_fieldnames: called CC=1 SCAR=0.0
| |||
| 21 | return [ | ||
| 22 | 1 | qw/ | |
| 23 | code | ||
| 24 | currency | ||
| 25 | description | ||
| 26 | hs_tariff_number | ||
| 27 | origin_country | ||
| 28 | quantity | ||
| 29 | value | ||
| 30 | weight | ||
| 31 | / | ||
| 32 | ]; | ||
| 33 | } | ||
| 34 | |||
| 35 | 1 | ▶ | sub _build_role { 'customs_item' } |
|
Subroutine
_build_role: called CC=1 SCAR=0.0
| |||
| 36 | |||
| 37 | 1 | ▶ | sub _build_operation { '/customs_items' } |
|
Subroutine
_build_operation: called CC=1 SCAR=0.0
| |||
| 38 | |||
| 39 | 0 | ▶ | sub clone { |
|
Subroutine
clone: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 40 | 0 | my ($self) = @_; | |
| 41 | |||
| 42 | return Net::Easypost::CustomsItems->new( | ||
| 43 | 0 | map { $_ => $self->$_ } | |
| 44 | 0 | grep { defined $self->$_ } @{ $self->fieldnames } | |
| 45 | ); | ||
| 46 | } | ||
| 47 | |||
| 48 | 1 | 1; | |
| 49 | |||
| 50 | __END__ | ||