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