Business/CyberSource/Request/Credit.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 35 / 35 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Business/CyberSource/Request/Capture.pm ↑ Summary Business/CyberSource/Request/DCC.pm »
1 package Business::CyberSource::Request::Credit;
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.010007'; # VERSION
7  
8 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 extends 'Business::CyberSource::Request';
10 4 with qw(
11 Business::CyberSource::Request::Role::DCC
12 Business::CyberSource::Request::Role::TaxService
13 );
14  
15 4 ▶use MooseX::Types::CyberSource qw( BillTo Card CreditService);
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 4 ▶use Module::Runtime qw( use_module );
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 sub _build_service {
20 1 ▶ use_module('Business::CyberSource::RequestPart::Service::Credit');
Subroutine _build_service: called CC=1 SCAR=0.0
21 1 return Business::CyberSource::RequestPart::Service::Credit->new;
22 }
23  
24 4 has '+service' => (
25 isa => CreditService,
26 remote_name => 'ccCreditService'
27 );
28  
29 4 has bill_to => (
30 isa => BillTo,
31 remote_name => 'billTo',
32 traits => ['SetOnce'],
33 is => 'rw',
34 coerce => 1,
35 );
36  
37 4 has card => (
38 isa => Card,
39 remote_name => 'card',
40 traits => ['SetOnce'],
41 is => 'rw',
42 coerce => 1,
43 );
44  
45 4 __PACKAGE__->meta->make_immutable;
46 4 1;
47  
48 # ABSTRACT: CyberSource Credit Request Object
49  
50 __END__
51  
52 =pod
53  
54 =encoding UTF-8
55  
56 =head1 NAME
57  
58 Business::CyberSource::Request::Credit - CyberSource Credit Request Object
59  
60 =head1 VERSION
61  
62 version 0.010007
63  
64 =head1 SYNOPSIS
65  
66 use Business::CyberSource::Request::Credit;
67  
68 my $req = Business::CyberSource::Request::Credit->new({
69 reference_code => 'merchant reference code',
70 bill_to => {
71 first_name => 'Caleb',
72 last_name => 'Cushing',
73 street => 'somewhere',
74 city => 'Houston',
75 state => 'TX',
76 postal_code => '77064',
77 country => 'US',
78 email => 'xenoterracide@gmail.com',
79 },
80 purchase_totals => {
81 total => 5.00,
82 currency => 'USD',
83 },
84 card => {
85 account_number => '4111-1111-1111-1111',
86 expiration => {
87 month => '09',
88 year => '2025',
89 },
90 },
91 });
92  
93 =head1 DESCRIPTION
94  
95 This object allows you to create a request for a credit. You can use
96 L<Business::CyberSource::Request::StandAloneCredit> or the
97 L<Business::CyberSource::Request::FollowOnCredit> if you want your objects to
98 be checked for all required fields.
99  
100 =head1 EXTENDS
101  
102 L<Business::CyberSource::Request>
103  
104 =head1 WITH
105  
106 =over
107  
108 =item L<Business::CyberSource::Request::Role::DCC>
109  
110 =back
111  
112 =head1 BUGS
113  
114 Please report any bugs or feature requests on the bugtracker website
115 https://github.com/xenoterracide/business-cybersource/issues
116  
117 When submitting a bug or request, please include a test-file or a
118 patch to an existing test-file that illustrates the bug or desired
119 feature.
120  
121 =head1 AUTHOR
122  
123 Caleb Cushing <xenoterracide@gmail.com>
124  
125 =head1 COPYRIGHT AND LICENSE
126  
127 This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>.
128  
129 This is free software, licensed under:
130  
131 The Artistic License 2.0 (GPL Compatible)
132  
133 =cut
« Business/CyberSource/Request/Capture.pm ↑ Summary Business/CyberSource/Request/DCC.pm »