lib/WebService/Braintree/Dispute.pm

filter: Statementstmt 60.0% 21 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 46.1% 6 / 13 Podpod 100% 7 / 7 totaltotal 61.8% 34 / 55 CC 1 SCAR 4.3
CC
1
Cov
60%
accept
2.0
finalize
2.0
add_file_evidence
2.0
CRAP 1.5
« lib/WebService/Braintree/CreditCardVerification.pm ↑ Summary lib/WebService/Braintree/ApplePay.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::Dispute;
4 22 $WebService::Braintree::Dispute::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::Dispute
11  
12 =head1 PURPOSE
13  
14 This class represents a dispute.
15  
16 =cut
17  
18 22 ▶use WebService::Braintree::Dispute::Kind;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 22 ▶use WebService::Braintree::Dispute::Reason;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 22 ▶use WebService::Braintree::Dispute::Status;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 22 with 'WebService::Braintree::Role::Interface';
25  
26 =head1 CLASS METHODS
27  
28 =head2 accept
29  
30 This takes a dispute_id, marks it as accepted, and returns a L<response|WebService::Braintee::Result> (if found).
31  
32 =cut
33  
34 0 ▶sub accept {
Subroutine accept: not called CC=1 SCAR=6.9
Pod documented
35 0 my ($class, $id) = @_;
36 0 $class->gateway->dispute->accept($id);
37 }
38  
39 =head2 finalize
40  
41 This takes a dispute_id, marks it as finalized, and returns a L<response|WebService::Braintee::Result> (if found).
42  
43 =cut
44  
45 0 ▶sub finalize {
Subroutine finalize: not called CC=1 SCAR=6.9
Pod documented
46 0 my ($class, $id) = @_;
47 0 $class->gateway->dispute->finalize($id);
48 }
49  
50 =head2 add_file_evidence
51  
52 This takes a dispute_id and a C<document_upload_id|WebService::Braintree::DocumentUpload>,
53 adds the upload to the dispute, and returns a L<response|WebService::Braintee::Result> (if found) with the C<< evidence() >> set.
54  
55 =cut
56  
57 0 ▶sub add_file_evidence {
Subroutine add_file_evidence: not called CC=1 SCAR=6.9
Pod documented
58 0 my ($class, $id, $upload_id) = @_;
59 0 $class->gateway->dispute->add_file_evidence($id, $upload_id);
60 }
61  
62 =head2 add_text_evidence
63  
64 This takes a dispute_id and a comment, adds the comment to the dispute, and returns a L<response|WebService::Braintee::Result> (if found) with the C<< evidence() >> set.
65  
66 =cut
67  
68 0 ▶sub add_text_evidence {
Subroutine add_text_evidence: not called CC=1 SCAR=6.9
Pod documented
69 0 my ($class, $id, $content) = @_;
70 0 $class->gateway->dispute->add_text_evidence($id, $content);
71 }
72  
73 =head2 remove_evidence
74  
75 This takes a dispute_id and an evidence_id, removes the evidence from the dispute, and returns a L<response|WebService::Braintee::Result> (if found).
76  
77  
78 =cut
79  
80 0 ▶sub remove_evidence {
Subroutine remove_evidence: not called CC=1 SCAR=6.9
Pod documented
81 0 my ($class, $id, $evidence_id) = @_;
82 0 $class->gateway->dispute->remove_evidence($id, $evidence_id);
83 }
84  
85 =head2 find
86  
87 This takes a dispute_id and returns a L<response|WebService::Braintee::Result> with the C<< dispute() >> set.
88  
89 =cut
90  
91 0 ▶sub find {
Subroutine find: not called CC=1 SCAR=6.9
Pod documented
92 0 my ($class, $id) = @_;
93 0 $class->gateway->dispute->find($id);
94 }
95  
96 =head2 search()
97  
98 This takes a subref which is used to set the search parameters and returns a
99 L<collection|WebService::Braintree::ResourceCollection> of the matching
100 L<customers|WebService::Braintree::_::Dispute>.
101  
102 Please see L<Searching|WebService::Braintree/SEARCHING> for more information on
103 the subref and how it works.
104  
105 Please see L<WebService::Braintree::DisputeSearch> for more
106  
107 =cut
108  
109 0 ▶sub search {
Subroutine search: not called CC=1 SCAR=6.9
Pod documented
110 0 my ($class, $block) = @_;
111 0 $class->gateway->dispute->search($block);
112 }
113  
114 22 __PACKAGE__->meta->make_immutable;
115  
116 22 1;
117 __END__
« lib/WebService/Braintree/CreditCardVerification.pm ↑ Summary lib/WebService/Braintree/ApplePay.pm »