| 1 | package Net::Easypost::Parcel; | ||
| 2 | 6 | $Net::Easypost::Parcel::VERSION = '0.23'; | |
| 3 | 6 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | with qw(Net::Easypost::PostOnBuild); | |
| 5 | 6 | with qw(Net::Easypost::Resource); | |
| 6 | |||
| 7 | 6 | has [qw/length width height weight predefined_package/] => ( | |
| 8 | is => 'rw', | ||
| 9 | ); | ||
| 10 | |||
| 11 | 6 | ▶ | sub _build_fieldnames { |
|
Subroutine
_build_fieldnames: called CC=1 SCAR=0.0
| |||
| 12 | 6 | return [qw/length width height weight predefined_package/]; | |
| 13 | } | ||
| 14 | 6 | ▶ | sub _build_role { 'parcel' } |
|
Subroutine
_build_role: called CC=1 SCAR=0.0
| |||
| 15 | 6 | ▶ | sub _build_operation { '/parcels' } |
|
Subroutine
_build_operation: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | 0 | ▶ | sub clone { |
|
Subroutine
clone: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 18 | 0 | my ($self) = @_; | |
| 19 | |||
| 20 | return Net::Easypost::Parcel->new( | ||
| 21 | 0 | map { $_ => $self->$_ } | |
| 22 | 0 | grep { defined $self->$_ } | |
| 23 | 0 | 'id', @{ $self->fieldnames } | |
| 24 | ); | ||
| 25 | } | ||
| 26 | |||
| 27 | 6 | 1; | |
| 28 | |||
| 29 | __END__ | ||