lib/WebService/Braintree/DocumentUpload.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 76.9% 20 / 26 CC 2 SCAR 9.8
CC
2
Cov
79%
create
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« lib/WebService/Braintree/Customer.pm ↑ Summary lib/WebService/Braintree/Xml.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::DocumentUpload;
4 22 $WebService::Braintree::DocumentUpload::VERSION = '1.7';
5 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WebService::Braintree::DocumentUpload
11  
12 =head1 PURPOSE
13  
14 This class creates document uploads.
15  
16 =cut
17  
18 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 22 with 'WebService::Braintree::Role::Interface';
21  
22 22 ▶use WebService::Braintree::DocumentUpload::Kind;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 =head2 create()
25  
26 This takes a hashref of parameters and returns a L<response|WebService::Braintee::Result> with the C<< document_upload() >> set.
27  
28 The parameters are:
29  
30 =over 4
31  
32 =item kind
33  
34 This is the L<kind of document|WebService::Braintree::DocumentUpload::Kind>.
35  
36 =item file
37  
38 This is a path on the server for the file to upload. The extension will be used
39 to determine the mime type.
40  
41 =back
42  
43 =cut
44  
45 0 ▶sub create {
Subroutine create: not called CC=2 SCAR=17.9
Pod documented
46 0 my ($class, $params) = @_;
47 0 ▶ $class->gateway->document_upload->create($params // {});
Condition0%0/2
$params // {}
l!l
00
MC/DC0%0/1
$params // {}
$params
Truth table0%0/2
A
A= $params
Aresult
11
00
48 }
49  
50 22 __PACKAGE__->meta->make_immutable;
51  
52 22 1;
53 __END__
« lib/WebService/Braintree/Customer.pm ↑ Summary lib/WebService/Braintree/Xml.pm »