« Business/CyberSource/RequestPart/OtherTax.pm
↑ Summary
Business/CyberSource/RequestPart/Service/Tax.pm »
| 1 | package Business::CyberSource::RequestPart::BusinessRules; | ||||||||||
| 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.010008'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 2 | extends 'Business::CyberSource::MessagePart'; | |||||||||
| 10 | 2 | with 'MooseX::RemoteHelper::CompositeSerialization'; | |||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | use MooseX::Types::Moose qw( ArrayRef ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 2 | ▶ | use MooseX::Types::Common::String 0.001005 qw( NumericCode ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 2 | ▶ | use MooseX::Types::CyberSource qw( AVSResult ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | my $true_false | ||||||||||
| 17 | 2 | ▶ | = sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
| |||||||||||
| 18 | 2 | my ( $attr, $instance ) = @_; | |||||||||
| 19 | 2 | ▶ | return $attr->get_value( $instance ) ? 'true' : 'false'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 2 | }; | |||||||||
| 21 | |||||||||||
| 22 | 2 | has ignore_avs_result => ( | |||||||||
| 23 | isa => 'Bool', | ||||||||||
| 24 | remote_name => 'ignoreAVSResult', | ||||||||||
| 25 | predicate => 'has_ignore_avs_result', | ||||||||||
| 26 | traits => ['SetOnce'], | ||||||||||
| 27 | is => 'rw', | ||||||||||
| 28 | serializer => $true_false, | ||||||||||
| 29 | ); | ||||||||||
| 30 | |||||||||||
| 31 | 2 | has ignore_cv_result => ( | |||||||||
| 32 | isa => 'Bool', | ||||||||||
| 33 | remote_name => 'ignoreCVResult', | ||||||||||
| 34 | predicate => 'has_ignore_cv_result', | ||||||||||
| 35 | traits => ['SetOnce'], | ||||||||||
| 36 | is => 'rw', | ||||||||||
| 37 | serializer => $true_false, | ||||||||||
| 38 | ); | ||||||||||
| 39 | |||||||||||
| 40 | 2 | has ignore_dav_result => ( | |||||||||
| 41 | isa => 'Bool', | ||||||||||
| 42 | remote_name => 'ignoreDAVResult', | ||||||||||
| 43 | predicate => 'has_ignore_dav_result', | ||||||||||
| 44 | traits => ['SetOnce'], | ||||||||||
| 45 | is => 'rw', | ||||||||||
| 46 | serializer => $true_false, | ||||||||||
| 47 | ); | ||||||||||
| 48 | |||||||||||
| 49 | 2 | has ignore_export_result => ( | |||||||||
| 50 | isa => 'Bool', | ||||||||||
| 51 | remote_name => 'ignoreExportResult', | ||||||||||
| 52 | predicate => 'has_ignore_export_result', | ||||||||||
| 53 | traits => ['SetOnce'], | ||||||||||
| 54 | is => 'rw', | ||||||||||
| 55 | serializer => $true_false, | ||||||||||
| 56 | ); | ||||||||||
| 57 | |||||||||||
| 58 | 2 | has ignore_validate_result => ( | |||||||||
| 59 | isa => 'Bool', | ||||||||||
| 60 | remote_name => 'ignoreValidateResult', | ||||||||||
| 61 | predicate => 'has_ignore_validate_result', | ||||||||||
| 62 | traits => ['SetOnce'], | ||||||||||
| 63 | is => 'rw', | ||||||||||
| 64 | serializer => $true_false, | ||||||||||
| 65 | ); | ||||||||||
| 66 | |||||||||||
| 67 | has decline_avs_flags => ( | ||||||||||
| 68 | isa => ArrayRef[AVSResult], | ||||||||||
| 69 | remote_name => 'declineAVSFlags', | ||||||||||
| 70 | predicate => 'has_decline_avs_flags', | ||||||||||
| 71 | is => 'rw', | ||||||||||
| 72 | traits => ['Array'], | ||||||||||
| 73 | 1 | ▶ | serializer => sub { | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 74 | 1 | my ( $attr, $instance ) = @_; | |||||||||
| 75 | 1 | return join ' ', @{ $attr->get_value( $instance ) }; | |||||||||
| 76 | }, | ||||||||||
| 77 | 2 | ); | |||||||||
| 78 | |||||||||||
| 79 | 2 | has score_threshold => ( | |||||||||
| 80 | isa => NumericCode, | ||||||||||
| 81 | remote_name => 'scoreThreshold', | ||||||||||
| 82 | predicate => 'has_score_threshold', | ||||||||||
| 83 | traits => ['SetOnce'], | ||||||||||
| 84 | is => 'rw', | ||||||||||
| 85 | ); | ||||||||||
| 86 | |||||||||||
| 87 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 88 | 2 | 1; | |||||||||
| 89 | |||||||||||
| 90 | # ABSTRACT: Business Rules | ||||||||||
| 91 | |||||||||||
| 92 | __END__ | ||||||||||