File Coverage

lib/Net/API/Stripe/Issuing/Dispute/Evidence.pm
Criterion Covered Total %
statement 19 27 70.3
branch n/a
condition n/a
subroutine 7 15 46.6
pod 8 8 100.0
total 34 50 68.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Issuing/Dispute/Evidence.pm
3             ## Version v0.101.0
4             ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2020/11/29
8             ## All rights reserved
9             ##
10             ## This program is free software; you can redistribute it and/or modify it
11             ## under the same terms as Perl itself.
12             ##----------------------------------------------------------------------------
13             BEGIN
14             {
15             use strict;
16 2     2   24087911 use warnings;
  2         14  
  2         64  
17 2     2   10 use parent qw( Net::API::Stripe::Generic );
  2         6  
  2         60  
18 2     2   10 use vars qw( $VERSION );
  2         4  
  2         10  
19 2     2   152 our( $VERSION ) = 'v0.101.0';
  2         4  
  2         125  
20 2     2   54 };
21              
22             use strict;
23 2     2   13 use warnings;
  2         5  
  2         45  
24 2     2   9  
  2         5  
  2         806  
25             {
26 0     0 1   additional_documentation => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
27             canceled_at => { type => "datetime" },
28             cancellation_policy_provided => { type => "boolean" },
29             cancellation_reason => { type => "scalar" },
30             expected_at => { type => "datetime" },
31             explanation => { type => "scalar" },
32             product_description => { type => "scalar" },
33             product_type => { type => "scalar" },
34             return_status => { type => "scalar" },
35             returned_at => { type => "datetime" },
36             }, @_ ) ); }
37              
38             {
39             additional_documentation => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
40 0     0 1   card_statement => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
41             cash_receipt => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
42             check_image => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
43             explanation => { type => "scalar" },
44             original_transaction => { type => "scalar" },
45             }, @_ ) ); }
46              
47              
48             {
49             additional_documentation => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
50 0     0 1   explanation => { type => "scalar" },
51             received_at => { type => "datetime" },
52 0     0 1   return_description => { type => "scalar" },
53             return_status => { type => "scalar" },
54             returned_at => { type => "datetime" },
55             }, @_ ) ); }
56              
57             {
58             additional_documentation => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
59             expected_at => { type => "datetime" },
60             explanation => { type => "scalar" },
61             product_description => { type => "scalar" },
62 0     0 1   product_type => { type => "scalar" },
63             }, @_ ) ); }
64              
65              
66              
67             {
68             additional_documentation => { package => "Net::API::Stripe::File", type => "scalar_or_object" },
69             canceled_at => { type => "datetime" },
70             cancellation_reason => { type => "scalar" },
71 0     0 1   explanation => { type => "scalar" },
72             received_at => { type => "datetime" },
73 0     0 1   }, @_ ) ); }
74              
75 0     0 1   1;
76              
77              
78             =encoding utf8
79              
80             =head1 NAME
81              
82             Net::API::Stripe::Issuing::Dispute::Evidence - A Stripe Issued Card Dispute Evidence Object
83              
84             =head1 SYNOPSIS
85              
86             my $ev = $stripe->issuing_dispute->evidence({
87             fraudulent =>
88             {
89             dispute_explanation => 'Service not provided',
90             uncategorized_file => $file_object,
91             },
92             other =>
93             {
94             dispute_explanation => 'Service was not provided',
95             uncategorized_file => $file_object,
96             },
97             });
98              
99             =head1 VERSION
100              
101             v0.101.0
102              
103             =head1 DESCRIPTION
104              
105             Evidence related to the dispute. This hash will contain exactly one non-null value, containing an evidence object that matches its reason
106              
107             This is instantiated by method B<evidence> in module L<Net::API::Stripe::Issuing::Dispute>
108              
109             =head1 CONSTRUCTOR
110              
111             =head2 new( %ARG )
112              
113             Creates a new L<Net::API::Stripe::Issuing::Dispute::Evidence> object.
114             It may also take an hash like arguments, that also are method of the same name.
115              
116             =head1 METHODS
117              
118             =head2 canceled hash
119              
120             Evidence provided when C<reason> is 'canceled'.
121              
122             It has the following properties:
123              
124             =over 4
125              
126             =item I<additional_documentation> string expandable
127              
128             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Additional documentation supporting the dispute.
129              
130             When expanded this is an L<Net::API::Stripe::File> object.
131              
132             =item I<canceled_at> timestamp
133              
134             Date when order was canceled.
135              
136             =item I<cancellation_policy_provided> boolean
137              
138             Whether the cardholder was provided with a cancellation policy.
139              
140             =item I<cancellation_reason> string
141              
142             Reason for canceling the order.
143              
144             =item I<expected_at> timestamp
145              
146             Date when the cardholder expected to receive the product.
147              
148             =item I<explanation> string
149              
150             Explanation of why the cardholder is disputing this transaction.
151              
152             =item I<product_description> string
153              
154             Description of the merchandise or service that was purchased.
155              
156             =item I<product_type> string
157              
158             Whether the product was a merchandise or service.
159              
160             =item I<return_status> string
161              
162             Result of cardholder's attempt to return the product.
163              
164             =item I<returned_at> timestamp
165              
166             Date when the product was returned or attempted to be returned.
167              
168             =back
169              
170             =head2 duplicate hash
171              
172             Evidence provided when `reason` is 'duplicate'.'
173              
174             It has the following properties:
175              
176             =over 4
177              
178             =item I<additional_documentation> string expandable
179              
180             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Additional documentation supporting the dispute.
181              
182             When expanded this is an L<Net::API::Stripe::File> object.
183              
184             =item I<card_statement> string expandable
185              
186             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Copy of the card statement showing that the product had already been paid for.
187              
188             When expanded this is an L<Net::API::Stripe::File> object.
189              
190             =item I<cash_receipt> string expandable
191              
192             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Copy of the receipt showing that the product had been paid for in cash.
193              
194             When expanded this is an L<Net::API::Stripe::File> object.
195              
196             =item I<check_image> string expandable
197              
198             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Image of the front and back of the check that was used to pay for the product.
199              
200             When expanded this is an L<Net::API::Stripe::File> object.
201              
202             =item I<explanation> string
203              
204             Explanation of why the cardholder is disputing this transaction.
205              
206             =item I<original_transaction> string
207              
208             Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
209              
210             =back
211              
212             =head2 fraudulent hash
213              
214             Evidence to support a fraudulent dispute. This will only be present if your dispute’s reason is fraudulent.
215              
216             This is a L<Net::API::Stripe::Issuing::Dispute::Evidence::Fraudulent> object.
217              
218             =head2 merchandise_not_as_described hash
219              
220             Evidence provided when C<reason> is 'merchandise_not_as_described'.'
221              
222             It has the following properties:
223              
224             =over 4
225              
226             =item I<additional_documentation> string expandable
227              
228             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Additional documentation supporting the dispute.
229              
230             When expanded this is an L<Net::API::Stripe::File> object.
231              
232             =item I<explanation> string
233              
234             Explanation of why the cardholder is disputing this transaction.
235              
236             =item I<received_at> timestamp
237              
238             Date when the product was received.
239              
240             =item I<return_description> string
241              
242             Description of the cardholder's attempt to return the product.
243              
244             =item I<return_status> string
245              
246             Result of cardholder's attempt to return the product.
247              
248             =item I<returned_at> timestamp
249              
250             Date when the product was returned or attempted to be returned.
251              
252             =back
253              
254             =head2 not_received hash
255              
256             Evidence provided when C<reason> is 'not_received'.
257              
258             It has the following properties:
259              
260             =over 4
261              
262             =item I<additional_documentation> string expandable
263              
264             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Additional documentation supporting the dispute.
265              
266             When expanded this is an L<Net::API::Stripe::File> object.
267              
268             =item I<expected_at> timestamp
269              
270             Date when the cardholder expected to receive the product.
271              
272             =item I<explanation> string
273              
274             Explanation of why the cardholder is disputing this transaction.
275              
276             =item I<product_description> string
277              
278             Description of the merchandise or service that was purchased.
279              
280             =item I<product_type> string
281              
282             Whether the product was a merchandise or service.
283              
284             =back
285              
286             =head2 other hash
287              
288             Evidence to support an uncategorized dispute. This will only be present if your dispute’s reason is other.
289              
290             This is a L<Net::API::Stripe::Issuing::Dispute::Evidence::Other> object.
291              
292             =head2 reason string
293              
294             The reason for filing the dispute. Its value will match the field containing the evidence.
295              
296             =head2 service_not_as_described hash
297              
298             Evidence provided when C<reason> is 'service_not_as_described'.
299              
300             It has the following properties:
301              
302             =over 4
303              
304             =item I<additional_documentation> string expandable
305              
306             (ID of a L<file upload|https://stripe.com/docs/guides/file-upload>) Additional documentation supporting the dispute.
307              
308             When expanded this is an L<Net::API::Stripe::File> object.
309              
310             =item I<canceled_at> timestamp
311              
312             Date when order was canceled.
313              
314             =item I<cancellation_reason> string
315              
316             Reason for canceling the order.
317              
318             =item I<explanation> string
319              
320             Explanation of why the cardholder is disputing this transaction.
321              
322             =item I<received_at> timestamp
323              
324             Date when the product was received.
325              
326             =back
327              
328             =head1 API SAMPLE
329              
330             {
331             "id": "idp_fake123456789",
332             "object": "issuing.dispute",
333             "amount": 100,
334             "created": 1571480456,
335             "currency": "usd",
336             "disputed_transaction": "ipi_fake123456789",
337             "evidence": {
338             "fraudulent": {
339             "dispute_explanation": "Fraud; card reported lost on 10/19/2019",
340             "uncategorized_file": null
341             },
342             "other": null
343             },
344             "livemode": false,
345             "metadata": {},
346             "reason": "fraudulent",
347             "status": "under_review"
348             }
349              
350             =head1 HISTORY
351              
352             =head2 v0.1
353              
354             Initial version
355              
356             =head1 AUTHOR
357              
358             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
359              
360             =head1 SEE ALSO
361              
362             Stripe API documentation:
363              
364             L<https://stripe.com/docs/api/issuing/disputes>, L<https://stripe.com/docs/issuing/disputes>
365              
366             =head1 COPYRIGHT & LICENSE
367              
368             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
369              
370             You can use, copy, modify and redistribute this package and associated
371             files under the same terms as Perl itself.
372              
373             =cut