File Coverage

lib/Net/API/Stripe/Issuing/Dispute.pm
Criterion Covered Total %
statement 19 32 59.3
branch n/a
condition n/a
subroutine 7 20 35.0
pod 13 13 100.0
total 39 65 60.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Issuing/Dispute.pm
3             ## Version v0.100.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2020/05/15
8             ##
9             ##----------------------------------------------------------------------------
10             ## https://stripe.com/docs/api/issuing/disputes
11             BEGIN
12             {
13             use strict;
14 2     2   23990270 use warnings;
  2         16  
  2         65  
15 2     2   11 use parent qw( Net::API::Stripe::Generic );
  2         4  
  2         64  
16 2     2   11 use vars qw( $VERSION );
  2         4  
  2         11  
17 2     2   146 our( $VERSION ) = 'v0.100.0';
  2         6  
  2         112  
18 2     2   58 };
19              
20             use strict;
21 2     2   15 use warnings;
  2         4  
  2         45  
22 2     2   8  
  2         4  
  2         627  
23              
24 0     0 1    
25              
26 0     0 1    
27              
28 0     0 1    
29              
30 0     0 1    
31              
32 0     0 1    
33              
34 0     0 1    
35              
36 0     0 1   1;
37              
38 0     0 1    
39             =encoding utf8
40 0     0 1    
41             =head1 NAME
42 0     0 1    
43             Net::API::Stripe::Issuing::Dispute - A Stripe Issued Card Transaction Dispute Object
44 0     0 1    
45             =head1 SYNOPSIS
46 0     0 1    
47             my $dispute = $stripe->issuing_dispute({
48 0     0 1   amount => 2000,
49             currency => 'jpy',
50             disputed_transaction => $issuing_transaction_object,
51             evidence => $dispute_evidence_object,
52             livemode => $stripe->false,
53             metadata => { transaction_id => 123 },
54             reason => 'Something went wrong',
55             status => 'lost',
56             });
57              
58             See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
59              
60             =head1 VERSION
61              
62             v0.100.0
63              
64             =head1 DESCRIPTION
65              
66             As a card issuer (L<https://stripe.com/docs/issuing>), you can dispute transactions (L<https://stripe.com/docs/issuing/disputes>) that you do not recognize, suspect to be fraudulent, or have some other issue.
67              
68             This module looks similar to the L<Net::API::Stripe::Dispute> and has overlapping fields, but the B<event> method points to different modules, so it is by design that there are 2 <*::Dispute::Evidence> modules.
69              
70             =head1 CONSTRUCTOR
71              
72             =head2 new( %ARG )
73              
74             Creates a new L<Net::API::Stripe::Issuing::Dispute> object.
75             It may also take an hash like arguments, that also are method of the same name.
76              
77             =head1 METHODS
78              
79             =head2 id string
80              
81             Unique identifier for the object.
82              
83             =head2 object string, value is "issuing.dispute"
84              
85             String representing the object’s type. Objects of the same type share the same value.
86              
87             =head2 amount integer
88              
89             Disputed amount. Usually the amount of the disputed_transaction, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
90              
91             =head2 balance_transactions array
92              
93             List of balance transactions associated with the dispute.
94              
95             =head2 created timestamp
96              
97             Time at which the object was created. Measured in seconds since the Unix epoch.
98              
99             =head2 currency currency
100              
101             The currency the disputed_transaction was made in.
102              
103             =head2 disputed_transaction string (expandable)
104              
105             The transaction being disputed.
106              
107             When expanded, this is a L<Net::API::Stripe::Issuing::Transaction> object.
108              
109             =head2 evidence hash
110              
111             Evidence related to the dispute. This hash will contain exactly one non-null value, containing an evidence object that matches its reason
112              
113             This is a L<Net::API::Stripe::Issuing::Dispute::Evidence> object.
114              
115             =head2 livemode boolean
116              
117             Has the value true if the object exists in live mode or the value false if the object exists in test mode.
118              
119             =head2 metadata hash
120              
121             Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
122              
123             =head2 reason string
124              
125             Reason for this dispute. One of other or fraudulent.
126              
127             =head2 status string
128              
129             Current status of dispute. One of lost, under_review, unsubmitted, or won.
130              
131             =head2 transaction expandable
132              
133             The transaction being disputed.
134              
135             When expanded this is an L<Net::API::Stripe::Issuing::Transaction> object.
136              
137             =head1 API SAMPLE
138              
139             {
140             "id": "idp_fake123456789",
141             "object": "issuing.dispute",
142             "amount": 100,
143             "created": 1571480456,
144             "currency": "usd",
145             "disputed_transaction": "ipi_fake123456789",
146             "evidence": {
147             "fraudulent": {
148             "dispute_explanation": "Fraud; card reported lost on 10/19/2019",
149             "uncategorized_file": null
150             },
151             "other": null
152             },
153             "livemode": false,
154             "metadata": {},
155             "reason": "fraudulent",
156             "status": "under_review"
157             }
158              
159             =head1 HISTORY
160              
161             =head2 v0.1
162              
163             Initial version
164              
165             =head1 AUTHOR
166              
167             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
168              
169             =head1 SEE ALSO
170              
171             Stripe API documentation:
172              
173             L<https://stripe.com/docs/api/issuing/disputes>, L<https://stripe.com/docs/issuing/disputes>
174              
175             =head1 COPYRIGHT & LICENSE
176              
177             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
178              
179             You can use, copy, modify and redistribute this package and associated
180             files under the same terms as Perl itself.
181              
182             =cut