Stripe/Connect/Account/Requirements.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%
current_deadline
2.0
currently_due
2.0
disabled_reason
2.0
CRAP 1.7
« Stripe/Connect/Account/Capability.pm ↑ Summary Stripe/Customer/TaxInfoVerification.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Connect/Account/Requirements.pm
3 ## Version v0.100.0
4 ## Copyright(c) 2019 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::Connect::Account::Requirements;
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.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 };
17  
18 0 ▶sub current_deadline { return( shift->_set_get_datetime( 'current_deadline', @_ ) ); }
Subroutine current_deadline: not called CC=1 SCAR=6.9
Pod documented
19  
20 0 ▶sub currently_due { return( shift->_set_get_array( 'currently_due', @_ ) ); }
Subroutine currently_due: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub disabled_reason { return( shift->_set_get_scalar( 'disabled_reason', @_ ) ); }
Subroutine disabled_reason: not called CC=1 SCAR=6.9
Pod documented
23  
24 # sub errors { return( shift->_set_get_array( 'errors', @_ ) ); }
25 sub errors
26 {
27 0 ▶ return( shift->_set_get_class_array( 'errors',
Subroutine errors: not called CC=1 SCAR=6.9
Pod documented
28 {
29 code => { type => 'scalar' },
30 reason => { type => 'scalar' },
31 requirement => { type => 'scalar' },
32 })
33 );
34 }
35  
36 0 ▶sub eventually_due { return( shift->_set_get_array( 'eventually_due', @_ ) ); }
Subroutine eventually_due: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub past_due { return( shift->_set_get_array( 'past_due', @_ ) ); }
Subroutine past_due: not called CC=1 SCAR=6.9
Pod documented
39  
40 0 ▶sub pending_verification { return( shift->_set_get_array( 'pending_verification', @_ ) ); }
Subroutine pending_verification: not called CC=1 SCAR=6.9
Pod documented
41  
42 1 1;
43  
44 __END__
45  
46 =encoding utf8
47  
48 =head1 NAME
49  
50 Net::API::Stripe::Connect::Account::Requirements - A Stripe Account Requirements Object
51  
52 =head1 SYNOPSIS
53  
54 my $req = $stripe->person->requirements({
55 current_deadline => '2020-05-01',
56 errors => [
57 {
58 code => 'invalid_address_city_state_postal_code',
59 reason => 'Some reason why this failed',
60 requirement => 'some_field',
61 }
62 ],
63 });
64  
65 =head1 VERSION
66  
67 v0.100.0
68  
69 =head1 DESCRIPTION
70  
71 Information about the requirements for this person, including what information needs to be collected, and by when.
72  
73 This is instantiated from method B<requirements> in modules L<Net::API::Stripe::Connect::Account>, L<Net::API::Stripe::Connect::Person> and L<Net::API::Stripe::Issuing::Card::Holder>
74  
75 =head1 CONSTRUCTOR
76  
77 =over 4
78  
79 =item B<new>( %ARG )
80  
81 Creates a new L<Net::API::Stripe::Connect::Account::Requirements> object.
82 It may also take an hash like arguments, that also are method of the same name.
83  
84 =back
85  
86 =head1 METHODS
87  
88 =over 4
89  
90 =item B<current_deadline> timestamp
91  
92 The date the fields in currently_due must be collected by to keep the capability enabled for the account.
93  
94 This is a C<DateTime> object;
95  
96 =item B<currently_due> array containing strings
97  
98 Fields that need to be collected to keep the person’s account enabled. If not collected by the account’s current_deadline, these fields appear in past_due as well, and the account is disabled.
99  
100 =item B<disabled_reason> string
101  
102 If the capability is disabled, this string describes why. Possible values are requirement.fields_needed, pending.onboarding, pending.review, rejected_fraud, or rejected.other.
103  
104 =item B<errors> array of hash
105  
106 The fields that need to be collected again because validation or verification failed for some reason.
107  
108 This is an array reference of virtual objects class L<Net::API::Stripe::Connect::Account::Requirements::Errors>
109  
110 =over 4
111  
112 =item I<code> The code for the type of error. Possible enum values
113  
114 =over 8
115  
116 =item I<invalid_address_city_state_postal_code>
117  
118 The combination of the city, state, and postal code in the provided address could not be validated.
119  
120 =item I<invalid_street_address>
121  
122 The street name and/or number for the provided address could not be validated.
123  
124 =item I<invalid_value_other>
125  
126 An invalid value was provided for the related field. This is a general error code.
127  
128 =item I<verification_document_address_mismatch>
129  
130 The address on the document did not match the address on the account. Upload a document with a matching address or update the address on the account.
131  
132 =item I<verification_document_address_missing>
133  
134 The company address was missing on the document. Upload a document that includes the address.
135  
136 =item I<verification_document_corrupt>
137  
138 The uploaded file for the document was invalid or corrupt. Upload a new file of the document.
139  
140 =item I<verification_document_country_not_supported>
141  
142 The provided document was from an unsupported country.
143  
144 =item I<verification_document_dob_mismatch>
145  
146 The date of birth (DOB) on the document did not match the DOB on the account. Upload a document with a matching DOB or update the DOB on the account.
147  
148 =item I<verification_document_duplicate_type>
149  
150 The same type of document was used twice. Two unique types of documents are required for verification. Upload two different documents.
151  
152 =item I<verification_document_expired>
153  
154 The document could not be used for verification because it has expired. If it’s an identity document, its expiration date must be before the date the document was submitted. If it’s an address document, the issue date must be within the last six months.
155  
156 =item I<verification_document_failed_copy>
157  
158 The document could not be verified because it was detected as a copy (e.g., photo or scan). Upload the original document.
159  
160 =item I<verification_document_failed_greyscale>
161  
162 The document could not be used for verification because it was in greyscale. Upload a color copy of the document.
163  
164 =item I<verification_document_failed_other>
165  
166 The document could not be verified for an unknown reason. Ensure that the document follows the guidelines for document uploads.
167  
168 =item I<verification_document_failed_test_mode>
169  
170 A test data helper was supplied to simulate verification failure. Refer to the documentation for test file tokens.
171  
172 =item I<verification_document_fraudulent>
173  
174 The document was identified as altered or falsified.
175  
176 =item I<verification_document_id_number_mismatch>
177  
178 The company ID number on the account could not be verified. Correct any errors in the ID number field or upload a document that includes the ID number.
179  
180 =item I<verification_document_id_number_missing>
181  
182 The company ID number was missing on the document. Upload a document that includes the ID number.
183  
184 =item I<verification_document_incomplete>
185  
186 The document was cropped or missing important information. Upload a complete scan of the document.
187  
188 =item I<verification_document_invalid>
189  
190 The uploaded file was not one of the valid document types. Upload an acceptable ID document (e.g., ID card or passport).
191  
192 =item I<verification_document_manipulated>
193  
194 The document was identified as altered or falsified.
195  
196 =item I<verification_document_missing_back>
197  
198 The uploaded file was missing the back of the document. Upload a complete scan of the document.
199  
200 =item I<verification_document_missing_front>
201  
202 The uploaded file was missing the front of the document. Upload a complete scan of the document.
203  
204 =item I<verification_document_name_mismatch>
205  
206 The name on the document did not match the name on the account. Upload a document with a matching name or update the name on the account.
207  
208 =item I<verification_document_name_missing>
209  
210 The company name was missing on the document. Upload a document that includes the company name.
211  
212 =item I<verification_document_nationality_mismatch>
213  
214 The nationality on the document did not match the person’s stated nationality. Update the person’s stated nationality, or upload a document that matches it.
215  
216 =item I<verification_document_not_readable>
217  
218 The document could not be read. Ensure that the document follows the guidelines for document uploads.
219  
220 =item I<verification_document_not_uploaded>
221  
222 No document was uploaded. Upload the document again.
223  
224 =item I<verification_document_photo_mismatch>
225  
226 The document was identified as altered or falsified.
227  
228 =item I<verification_document_too_large>
229  
230 The uploaded file exceeded the 10 MB size limit. Resize the document and upload the new file.
231  
232 =item I<verification_document_type_not_supported>
233  
234 The provided document type was not accepted as proof of identity. Upload an acceptable ID document (e.g., ID card or passport).
235  
236 =item I<verification_failed_address_match>
237  
238 The address on the account could not be verified. Correct any errors in the address field or upload a document that includes the address.
239  
240 =item I<verification_failed_business_iec_number>
241  
242 The Importer Exporter Code (IEC) number could not be verified. Correct any errors in the company’s IEC number field. (India only)
243  
244 =item I<verification_failed_document_match>
245  
246 The document could not be verified. Upload a document that includes the company name, ID number, and address fields.
247  
248 =item I<verification_failed_id_number_match>
249  
250 The company ID number on the account could not be verified. Correct any errors in the ID number field or upload a document that includes the ID number.
251  
252 =item I<verification_failed_keyed_identity>
253  
254 The person’s keyed-in identity information could not be verified. Correct any errors or upload a document that matches the identity fields (e.g., name and date of birth) entered.
255  
256 =item I<verification_failed_keyed_match>
257  
258 The keyed-in information on the account could not be verified. Correct any errors in the company name, ID number, or address fields. You can also upload a document that includes those fields.
259  
260 =item I<verification_failed_name_match>
261  
262 The company name on the account could not be verified. Correct any errors in the company name field or upload a document that includes the company name.
263  
264 =item I<verification_failed_other>
265  
266 Verification failed for an unknown reason. Correct any errors and resubmit the required fields.
267  
268 =back
269  
270 =item I<reason>
271  
272 =item I<requirement>
273  
274 =back
275  
276 =item B<eventually_due> array containing strings
277  
278 Fields that need to be collected assuming all volume thresholds are reached. As fields are needed, they are moved to currently_due and the account’s current_deadline is set.
279  
280 =item B<past_due> array containing strings
281  
282 Fields that weren’t collected by the account’s current_deadline. These fields need to be collected to enable payouts for the person’s account.
283  
284 =item B<pending_verification> array containing strings
285  
286 Fields that may become required depending on the results of verification or review. An empty array unless an asynchronous verification is pending. If verification fails, the fields in this array become required and move to currently_due or past_due.
287  
288 =back
289  
290 =head1 API SAMPLE
291  
292 {
293 "id": "person_fake123456789",
294 "object": "person",
295 "account": "acct_fake123456789",
296 "created": 1571602397,
297 "dob": {
298 "day": null,
299 "month": null,
300 "year": null
301 },
302 "first_name_kana": null,
303 "first_name_kanji": null,
304 "gender": null,
305 "last_name_kana": null,
306 "last_name_kanji": null,
307 "metadata": {},
308 "relationship": {
309 "director": false,
310 "executive": false,
311 "owner": false,
312 "percent_ownership": null,
313 "representative": false,
314 "title": null
315 },
316 "requirements": {
317 "currently_due": [],
318 "eventually_due": [],
319 "past_due": [],
320 "pending_verification": []
321 },
322 "verification": {
323 "additional_document": {
324 "back": null,
325 "details": null,
326 "details_code": null,
327 "front": null
328 },
329 "details": null,
330 "details_code": null,
331 "document": {
332 "back": null,
333 "details": null,
334 "details_code": null,
335 "front": null
336 },
337 "status": "unverified"
338 }
339 }
340  
341 =head1 HISTORY
342  
343 =head2 v0.1
344  
345 Initial version
346  
347 =head1 AUTHOR
348  
349 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
350  
351 =head1 SEE ALSO
352  
353 Stripe API documentation:
354  
355 L<https://stripe.com/docs/api>
356  
357 =head1 COPYRIGHT & LICENSE
358  
359 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
360  
361 You can use, copy, modify and redistribute this package and associated
362 files under the same terms as Perl itself.
363  
364 =cut
« Stripe/Connect/Account/Capability.pm ↑ Summary Stripe/Customer/TaxInfoVerification.pm »