Business/CyberSource/Request/StandAloneCredit.pm

filter: Statementstmt 89.4% 17 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 80.7% 21 / 26 CC 2 SCAR 9.8
CC
2
Cov
81%
BUILD
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Business/CyberSource/Request/FollowOnCredit.pm ↑ Summary Business/CyberSource/Rule.pm »
1 package Business::CyberSource::Request::StandAloneCredit;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.010007'; # VERSION
7  
8 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 extends 'Business::CyberSource::Request::Credit';
10 1 with qw(
11 Business::CyberSource::Request::Role::BillingInfo
12 Business::CyberSource::Request::Role::CreditCardInfo
13 );
14  
15 sub BUILD { ## no critic ( Subroutines::RequireFinalReturn )
16 0 ▶ my $self = shift;
Subroutine BUILD: not called CC=2 SCAR=17.9
17 0 ▶ die ## no critic ( ErrorHandling::RequireCarping )
Branch: 1 branch
BranchTrueFalseTotal
if $self->service->has_request_id 0 0 0
18 use_module('Business::CyberSource::Exception::AttributeIsRequiredNotToBeSet')
19 ->new(
20 attribute_name => 'request_id',
21 class_name => __PACKAGE__,
22 message => 'a Stand Alone Credit should not set a request_id'
23 ) if $self->service->has_request_id;
24 }
25  
26 1 __PACKAGE__->meta->make_immutable;
27 1 1;
28  
29 # ABSTRACT: CyberSource Credit Request Object
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 Business::CyberSource::Request::StandAloneCredit - CyberSource Credit Request Object
40  
41 =head1 VERSION
42  
43 version 0.010007
44  
45 =head1 SYNOPSIS
46  
47 use Business::CyberSource::Request::StandAloneCredit;
48  
49 my $req = Business::CyberSource::Request::StandAloneCredit->new({
50 reference_code => 'merchant reference code',
51 bill_to => {
52 first_name => 'Caleb',
53 last_name => 'Cushing',
54 street => 'somewhere',
55 city => 'Houston',
56 state => 'TX',
57 postal_code => '77064',
58 country => 'US',
59 email => 'xenoterracide@gmail.com',
60 },
61 purchase_totals => {
62 total => 5.00,
63 currency => 'USD',
64 },
65 card => {
66 account_number => '4111-1111-1111-1111',
67 expiration => {
68 month => '09',
69 year => '2025',
70 },
71 },
72 });
73  
74 =head1 DESCRIPTION
75  
76 This object allows you to create a request for a standalone credit.
77  
78 =head1 EXTENDS
79  
80 L<Business::CyberSource::Request::Credit>
81  
82 =head1 WITH
83  
84 =over
85  
86 =item L<Business::CyberSource::Request::Role::BillingInfo>
87  
88 =item L<Business::CyberSource::Request::Role::CreditCardInfo>
89  
90 =back
91  
92 =head1 BUGS
93  
94 Please report any bugs or feature requests on the bugtracker website
95 https://github.com/xenoterracide/business-cybersource/issues
96  
97 When submitting a bug or request, please include a test-file or a
98 patch to an existing test-file that illustrates the bug or desired
99 feature.
100  
101 =head1 AUTHOR
102  
103 Caleb Cushing <xenoterracide@gmail.com>
104  
105 =head1 COPYRIGHT AND LICENSE
106  
107 This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>.
108  
109 This is free software, licensed under:
110  
111 The Artistic License 2.0 (GPL Compatible)
112  
113 =cut
« Business/CyberSource/Request/FollowOnCredit.pm ↑ Summary Business/CyberSource/Rule.pm »