RequestPart/Card.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod n/a totaltotal 100% 39 / 39 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« RequestPart/Address.pm ↑ Summary RequestPart/Check.pm »
1 package Business::PaperlessTrans::RequestPart::Card;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.002000'; # VERSION
7  
8 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 extends 'MooseY::RemoteHelper::MessagePart';
11 2 with qw(
12 MooseX::RemoteHelper::CompositeSerialization
13 Business::PaperlessTrans::Role::Address
14 Business::PaperlessTrans::Role::NameOnAccount
15 Business::PaperlessTrans::Role::Identification
16 Business::PaperlessTrans::Role::EmailAddress
17 );
18  
19 2 ▶use MooseX::Types::Common::String qw( NonEmptySimpleStr );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶use MooseX::Types::CreditCard 0.002 qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
21 CardNumber
22 CardExpiration
23 CardSecurityCode
24 2 );
25  
26 2 has number => (
27 isa => CardNumber,
28 is => 'ro',
29 required => 1,
30 remote_name => 'CardNumber',
31 );
32  
33 2 has security_code => (
34 isa => CardSecurityCode,
35 remote_name => 'SecurityCode',
36 predicate => 'has_security_code',
37 is => 'ro',
38 );
39  
40 2 has track_data => (
41 isa => NonEmptySimpleStr,
42 is => 'ro',
43 remote_name => 'TrackData',
44 );
45  
46 2 has expiration => (
47 isa => CardExpiration,
48 is => 'ro',
49 required => 1,
50 coerce => 1,
51 handles => [qw( month year )],
52 );
53  
54 has _expiration_month => (
55 isa => 'Int',
56 remote_name => 'ExpirationMonth',
57 is => 'ro',
58 lazy => 1,
59 reader => undef,
60 writer => undef,
61 init_arg => undef,
62 2 ▶ default => sub { shift->expiration->month },
Subroutine __ANON__: called CC=1 SCAR=0.0
63 2 );
64  
65 has _expiration_year => (
66 isa => 'Int',
67 remote_name => 'ExpirationYear',
68 is => 'ro',
69 lazy => 1,
70 reader => undef,
71 writer => undef,
72 init_arg => undef,
73 2 ▶ default => sub { shift->expiration->year },
Subroutine __ANON__: called CC=1 SCAR=0.0
74 2 );
75  
76 2 __PACKAGE__->meta->make_immutable;
77 2 1;
78 # ABSTRACT: Card
79  
80 __END__
« RequestPart/Address.pm ↑ Summary RequestPart/Check.pm »