Stripe/Issuing/Authorization/RequestHistory.pm

filter: Statementstmt 53.3% 8 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 30.0% 3 / 10 Podpod 100% 7 / 7 totaltotal 56.2% 18 / 32 CC 1 SCAR 5.3
CC
1
Cov
53%
approved
2.0
authorized_amount
2.0
authorized_currency
2.0
CRAP 1.7
« Stripe/Fraud/ValueList/Item.pm ↑ Summary Stripe/Issuing/Authorization/VerificationData.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Issuing/Authorization/RequestHistory.pm
3 ## Version v0.200.0
4 ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp>
6 ## Created 2019/11/02
7 ## Modified 2020/05/15
8 ##
9 ##----------------------------------------------------------------------------
10 package Net::API::Stripe::Issuing::Authorization::RequestHistory;
11 BEGIN
12 {
13 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ our( $VERSION ) = 'v0.200.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 };
17  
18 0 ▶sub approved { shift->_set_get_boolean( 'approved', @_ ); }
Subroutine approved: not called CC=1 SCAR=6.9
Pod documented
19  
20 0 ▶sub authorized_amount { shift->_set_get_number( 'authorized_amount', @_ ); }
Subroutine authorized_amount: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub authorized_currency { shift->_set_get_scalar( 'authorized_currency', @_ ); }
Subroutine authorized_currency: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub created { shift->_set_get_datetime( 'created', @_ ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub held_amount { shift->_set_get_number( 'held_amount', @_ ); }
Subroutine held_amount: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub held_currency { shift->_set_get_scalar( 'held_currency', @_ ); }
Subroutine held_currency: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub reason { shift->_set_get_scalar( 'reason', @_ ); }
Subroutine reason: not called CC=1 SCAR=6.9
Pod documented
31  
32 1 1;
33  
34 __END__
35  
36 =encoding utf8
37  
38 =head1 NAME
39  
40 Net::API::Stripe::Issuing::Authorization::RequestHistory - A Stripe Authorization History Request Object
41  
42 =head1 SYNOPSIS
43  
44 my $req_history = $stripe->authorization->req_history({
45 approved => $stripe->true,
46 authorized_amount => 2000,
47 authorized_currency => 'jpy',
48 created => '2020-04-12',
49 held_amount => 1000,
50 held_currency => 'jpy',
51 reason => 'webhook_declined',
52 });
53  
54 =head1 VERSION
55  
56 v0.200.0
57  
58 =head1 DESCRIPTION
59  
60 This is instantiated by method B<request_history> in module L<Net::API::Stripe::Issuing::Authorization>
61  
62 =head1 CONSTRUCTOR
63  
64 =over 4
65  
66 =item B<new>( %ARG )
67  
68 Creates a new L<Net::API::Stripe::Issuing::Authorization::RequestHistory> object.
69 It may also take an hash like arguments, that also are method of the same name.
70  
71 =back
72  
73 =head1 METHODS
74  
75 =over 4
76  
77 =item B<approved> boolean
78  
79 Whether this request was approved.
80  
81 =item B<authorized_amount> integer
82  
83 The amount that was authorized at the time of this request
84  
85 =item B<authorized_currency> string
86  
87 The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency.
88  
89 =item B<created> timestamp
90  
91 Time at which the object was created. Measured in seconds since the Unix epoch.
92  
93 =item B<held_amount> integer
94  
95 The amount Stripe held from your account to fund the authorization, if the request was approved
96  
97 =item B<held_currency> string
98  
99 The currency of the held amount
100  
101 =item B<reason> string
102  
103 One of authentication_failed, authorization_controls, card_active, card_inactive, insufficient_funds, account_compliance_disabled, account_inactive, suspected_fraud, webhook_approved, webhook_declined, or webhook_timeout.
104  
105 =back
106  
107 =head1 API SAMPLE
108  
109 {
110 "id": "iauth_fake123456789",
111 "object": "issuing.authorization",
112 "approved": true,
113 "authorization_method": "online",
114 "authorized_amount": 500,
115 "authorized_currency": "usd",
116 "balance_transactions": [],
117 "card": null,
118 "cardholder": null,
119 "created": 1540642827,
120 "held_amount": 0,
121 "held_currency": "usd",
122 "is_held_amount_controllable": false,
123 "livemode": false,
124 "merchant_data": {
125 "category": "taxicabs_limousines",
126 "city": "San Francisco",
127 "country": "US",
128 "name": "Rocket Rides",
129 "network_id": "1234567890",
130 "postal_code": "94107",
131 "state": "CA",
132 "url": null
133 },
134 "metadata": {},
135 "pending_authorized_amount": 0,
136 "pending_held_amount": 0,
137 "request_history": [],
138 "status": "reversed",
139 "transactions": [
140 {
141 "id": "ipi_fake123456789",
142 "object": "issuing.transaction",
143 "amount": -100,
144 "authorization": "iauth_fake123456789",
145 "balance_transaction": null,
146 "card": "ic_fake123456789",
147 "cardholder": null,
148 "created": 1540642827,
149 "currency": "usd",
150 "dispute": null,
151 "livemode": false,
152 "merchant_amount": null,
153 "merchant_currency": null,
154 "merchant_data": {
155 "category": "taxicabs_limousines",
156 "city": "San Francisco",
157 "country": "US",
158 "name": "Rocket Rides",
159 "network_id": "1234567890",
160 "postal_code": "94107",
161 "state": "CA",
162 "url": null
163 },
164 "metadata": {},
165 "type": "capture"
166 },
167 {
168 "id": "ipi_fake123456789",
169 "object": "issuing.transaction",
170 "amount": -100,
171 "authorization": "iauth_fake123456789",
172 "balance_transaction": null,
173 "card": "ic_fake123456789",
174 "cardholder": null,
175 "created": 1540642827,
176 "currency": "usd",
177 "dispute": null,
178 "livemode": false,
179 "merchant_amount": null,
180 "merchant_currency": null,
181 "merchant_data": {
182 "category": "taxicabs_limousines",
183 "city": "San Francisco",
184 "country": "US",
185 "name": "Rocket Rides",
186 "network_id": "1234567890",
187 "postal_code": "94107",
188 "state": "CA",
189 "url": null
190 },
191 "metadata": {},
192 "type": "capture"
193 }
194 ],
195 "verification_data": {
196 "address_line1_check": "not_provided",
197 "address_zip_check": "match",
198 "authentication": "none",
199 "cvc_check": "match"
200 },
201 "wallet_provider": null
202 }
203  
204 =head1 HISTORY
205  
206 =head2 v0.1
207  
208 Initial version
209  
210 =head2 v0.2
211  
212 Change helper method for B<approved> from B<_set_get_scalar> to B<_set_get_boolean>
213  
214 =head1 AUTHOR
215  
216 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
217  
218 =head1 SEE ALSO
219  
220 Stripe API documentation:
221  
222 L<https://stripe.com/docs/api>
223  
224 =head1 COPYRIGHT & LICENSE
225  
226 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
227  
228 You can use, copy, modify and redistribute this package and associated
229 files under the same terms as Perl itself.
230  
231 =cut
« Stripe/Fraud/ValueList/Item.pm ↑ Summary Stripe/Issuing/Authorization/VerificationData.pm »