| 1 | package Business::PaperlessTrans::RequestPart::Identification; | ||
| 2 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 4 | our $VERSION = '0.002000'; # VERSION | |
| 7 | |||
| 8 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 4 | extends 'MooseY::RemoteHelper::MessagePart'; | |
| 11 | 4 | with qw( | |
| 12 | MooseX::RemoteHelper::CompositeSerialization | ||
| 13 | Business::PaperlessTrans::Role::State | ||
| 14 | Business::PaperlessTrans::Role::Address | ||
| 15 | ); | ||
| 16 | |||
| 17 | 4 | ▶ | use MooseX::Types::Common::String qw( NonEmptySimpleStr ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 4 | ▶ | use MooseX::Types::Common::Numeric qw( SingleDigit ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 4 | ▶ | use MooseX::Types::DateTime qw( DateTime ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | my $dt_fmt | ||
| 22 | 6 | ▶ | = sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 23 | 6 | my ( $attr, $instance ) = @_; | |
| 24 | 6 | return $attr->get_value( $instance )->format_cldr('MM/dd/YYYY'); | |
| 25 | 4 | }; | |
| 26 | |||
| 27 | 4 | has id_type => ( | |
| 28 | isa => SingleDigit, | ||
| 29 | is => 'ro', | ||
| 30 | required => 1, | ||
| 31 | remote_name => 'IDType', | ||
| 32 | ); | ||
| 33 | |||
| 34 | 4 | has number => ( | |
| 35 | isa => NonEmptySimpleStr, | ||
| 36 | is => 'ro', | ||
| 37 | remote_name => 'Number', | ||
| 38 | required => 1, | ||
| 39 | ); | ||
| 40 | |||
| 41 | 4 | has expiration => ( | |
| 42 | isa => DateTime, | ||
| 43 | is => 'ro', | ||
| 44 | coerce => 1, | ||
| 45 | remote_name => 'Expiration', | ||
| 46 | serializer => $dt_fmt, | ||
| 47 | ); | ||
| 48 | |||
| 49 | 4 | has date_of_birth => ( | |
| 50 | isa => DateTime, | ||
| 51 | is => 'ro', | ||
| 52 | coerce => 1, | ||
| 53 | remote_name => 'DOB', | ||
| 54 | serializer => $dt_fmt, | ||
| 55 | ); | ||
| 56 | |||
| 57 | 4 | __PACKAGE__->meta->make_immutable; | |
| 58 | 4 | 1; | |
| 59 | # ABSTRACT: Identification | ||
| 60 | |||
| 61 | __END__ | ||