Business/CyberSource/Request/Sale.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Business/CyberSource/Request/Role/TaxService.pm ↑ Summary Business/CyberSource/RequestPart/Item.pm »
1 package Business::CyberSource::Request::Sale;
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::Authorization';
10  
11 1 ▶use MooseX::Types::CyberSource qw( Service );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 has capture_service => (
14 isa => Service,
15 remote_name => 'ccCaptureService',
16 is => 'ro',
17 lazy => 1,
18 coerce => 1,
19 reader => undef,
20 init_arg => undef,
21 builder => '_build_service',
22 );
23  
24 1 __PACKAGE__->meta->make_immutable;
25 1 1;
26  
27 # ABSTRACT: Sale Request Object
28  
29 __END__
30  
31 =pod
32  
33 =encoding UTF-8
34  
35 =head1 NAME
36  
37 Business::CyberSource::Request::Sale - Sale Request Object
38  
39 =head1 VERSION
40  
41 version 0.010007
42  
43 =head1 SYNOPSIS
44  
45 use Business::CyberSource::Request::Sale;
46  
47 my $req
48 = Business::CyberSource::Request::Sale->new({
49 reference_code => 't601',
50 bill_to => {
51 first_name => 'Caleb',
52 last_name => 'Cushing',
53 street => 'somewhere',
54 city => 'Houston',
55 state => 'TX',
56 postal_code => '77064',
57 country => 'US',
58 email => 'xenoterracide@gmail.com',
59 },
60 purchase_totals => {
61 total => 3000.00,
62 currency => 'USD',
63 },
64 card => {
65 account_number => '4111-1111-1111-1111',
66 expiration => {
67 month => 9,
68 year => 2025,
69 },
70 },
71 });
72  
73 =head1 DESCRIPTION
74  
75 A sale is a bundled authorization and capture. You can use a sale instead of a
76 separate authorization and capture if there is no delay between taking a
77 customer's order and shipping the goods. A sale is typically used for
78 electronic goods and for services that you can turn on immediately.
79  
80 =head1 EXTENDS
81  
82 L<Business::CyberSource::Request::Authorization>
83  
84 =head1 ATTRIBUTES
85  
86 =head2 capture_service
87  
88 Sale does both authorization and capture and so needs another service
89 attribute. It is built for you and cannot be modified.
90  
91 =head1 BUGS
92  
93 Please report any bugs or feature requests on the bugtracker website
94 https://github.com/xenoterracide/business-cybersource/issues
95  
96 When submitting a bug or request, please include a test-file or a
97 patch to an existing test-file that illustrates the bug or desired
98 feature.
99  
100 =head1 AUTHOR
101  
102 Caleb Cushing <xenoterracide@gmail.com>
103  
104 =head1 COPYRIGHT AND LICENSE
105  
106 This software is Copyright (c) 2016 by Caleb Cushing <xenoterracide@gmail.com>.
107  
108 This is free software, licensed under:
109  
110 The Artistic License 2.0 (GPL Compatible)
111  
112 =cut
« Business/CyberSource/Request/Role/TaxService.pm ↑ Summary Business/CyberSource/RequestPart/Item.pm »