File Coverage

blib/lib/Business/CyberSource/Request/Authorization.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 27 27 100.0


line stmt bran cond sub pod time code
1             package Business::CyberSource::Request::Authorization;
2 3     3   1559214 use strict;
  3         4  
  3         81  
3 3     3   12 use warnings;
  3         3  
  3         79  
4 3     3   846 use namespace::autoclean;
  3         21836  
  3         21  
5              
6             our $VERSION = '0.010007'; # VERSION
7              
8 3     3   1095 use Moose;
  3         558109  
  3         17  
9             extends 'Business::CyberSource::Request';
10             with qw(
11             Business::CyberSource::Request::Role::BillingInfo
12             Business::CyberSource::Request::Role::CreditCardInfo
13             Business::CyberSource::Request::Role::DCC
14             Business::CyberSource::Request::Role::TaxService
15             );
16              
17 3     3   15257 use MooseX::Types::CyberSource qw( BusinessRules AuthService );
  3         10  
  3         21  
18              
19 3     3   18021 use Module::Runtime qw( use_module );
  3         6  
  3         27  
20              
21             has '+service' => (
22             remote_name => 'ccAuthService',
23             isa => AuthService,
24             lazy_build => 0,
25             );
26              
27             sub _build_service {
28 4     4   9212 use_module('Business::CyberSource::RequestPart::Service::Auth');
29 4         197 return Business::CyberSource::RequestPart::Service::Auth->new;
30             }
31              
32             has business_rules => (
33             isa => BusinessRules,
34             remote_name => 'businessRules',
35             traits => ['SetOnce'],
36             is => 'rw',
37             coerce => 1,
38             );
39              
40             __PACKAGE__->meta->make_immutable;
41             1;
42              
43             # ABSTRACT: CyberSource Authorization Request object
44              
45             __END__
46              
47             =pod
48              
49             =encoding UTF-8
50              
51             =head1 NAME
52              
53             Business::CyberSource::Request::Authorization - CyberSource Authorization Request object
54              
55             =head1 VERSION
56              
57             version 0.010007
58              
59             =head1 SYNOPSIS
60              
61             use Business::CyberSource::Request::Authorization;
62              
63             Business::CyberSource::Request::Authorization->new({
64             reference_code => '42',
65             bill_to => {
66             first_name => 'Caleb',
67             last_name => 'Cushing',
68             street => '100 somewhere st',
69             city => 'Houston',
70             state => 'TX',
71             postal_code => '77064',
72             country => 'US',
73             email => 'xenoterracide@gmail.com',
74             },
75             purchase_totals => {
76             currency => 'USD',
77             total => 5.00,
78             },
79             card => {
80             account_number => '4111111111111111',
81             expiration => {
82             month => 9,
83             year => 2025,
84             },
85             },
86             });
87              
88             =head1 DESCRIPTION
89              
90             Offline authorization means that when you submit an order using a credit card,
91             you will not know if the funds are available until you capture the order and
92             receive confirmation of payment. You typically will not ship the goods until
93             you receive this payment confirmation. For offline credit cards, it will take
94             typically five days longer to receive payment confirmation than for online
95             cards.
96              
97             =head1 EXTENDS
98              
99             L<Business::CyberSource::Request>
100              
101             =head1 WITH
102              
103             =over
104              
105             =item L<Business::CyberSource::Request::Role::BillingInfo>
106              
107             =item L<Business::CyberSource::Request::Role::CreditCardInfo>
108              
109             =item L<Business::CyberSource::Request::Role::DCC>
110              
111             =item L<Business::CyberSource::Request::Role::TaxService>
112              
113             =back
114              
115             =head1 ATTRIBUTES
116              
117             =head2 references_code
118              
119             Merchant Reference Code
120              
121             =head2 bill_to
122              
123             L<Business::CyberSource::RequestPart::BillTo>
124              
125             =head2 purchase_totals
126              
127             L<Business::CyberSource::RequestPart::PurchaseTotals>
128              
129             =head2 card
130              
131             L<Business::CyberSource::RequestPart::Card>
132              
133             =head2 business_rules
134              
135             L<Business::CyberSource::RequestPart::BusinessRules>
136              
137             =for Pod::Coverage BUILD
138              
139             =head1 BUGS
140              
141             Please report any bugs or feature requests on the bugtracker website
142             https://github.com/xenoterracide/business-cybersource/issues
143              
144             When submitting a bug or request, please include a test-file or a
145             patch to an existing test-file that illustrates the bug or desired
146             feature.
147              
148             =head1 AUTHOR
149              
150             Caleb Cushing <xenoterracide@gmail.com>
151              
152             =head1 COPYRIGHT AND LICENSE
153              
154             This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>.
155              
156             This is free software, licensed under:
157              
158             The Artistic License 2.0 (GPL Compatible)
159              
160             =cut