File Coverage

lib/Net/API/Stripe/Payment/Source/CodeVerification.pm
Criterion Covered Total %
statement 19 21 90.4
branch n/a
condition n/a
subroutine 7 9 77.7
pod 2 2 100.0
total 28 32 87.5


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Payment/Source/CodeVerification.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             package Net::API::Stripe::Payment::Source::CodeVerification;
11             BEGIN
12             {
13 2     2   21178020 use strict;
  2         15  
  2         63  
14 2     2   10 use warnings;
  2         6  
  2         63  
15 2     2   12 use parent qw( Net::API::Stripe::Generic );
  2         4  
  2         12  
16 2     2   146 use vars qw( $VERSION );
  2         5  
  2         118  
17 2     2   37 our( $VERSION ) = 'v0.100.0';
18             };
19              
20 2     2   12 use strict;
  2         4  
  2         60  
21 2     2   14 use warnings;
  2         5  
  2         171  
22              
23 0     0 1   sub attempts_remaining { return( shift->_set_get_scalar( 'attempts_remaining', @_ ) ); }
24              
25 0     0 1   sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
26              
27             1;
28              
29             __END__
30              
31             =encoding utf8
32              
33             =head1 NAME
34              
35             Net::API::Stripe::Payment::Source::CodeVerification - A Stripe Code Verification Object
36              
37             =head1 SYNOPSIS
38              
39             my $code = $stripe->source->code_verification({
40             attempts_remaining => 2,
41             status => 'pending',
42             });
43              
44             =head1 VERSION
45              
46             v0.100.0
47              
48             =head1 DESCRIPTION
49              
50             Information related to the code verification flow. Present if the source is authenticated by a verification code (flow is code_verification).
51              
52             This is part of the L<Net::API::Stripe::Payment::Source> object
53              
54             =head1 CONSTRUCTOR
55              
56             =head2 new( %ARG )
57              
58             Creates a new L<Net::API::Stripe::Payment::Source::CodeVerification> object.
59             It may also take an hash like arguments, that also are method of the same name.
60              
61             =head1 METHODS
62              
63             =head2 attempts_remaining integer
64              
65             The number of attempts remaining to authenticate the source object with a verification code.
66              
67             =head2 status string
68              
69             The status of the code verification, either pending (awaiting verification, attempts_remaining should be greater than 0), succeeded (successful verification) or failed (failed verification, cannot be verified anymore as attempts_remaining should be 0).
70              
71             =head1 API SAMPLE
72              
73             {
74             "id": "src_fake123456789",
75             "object": "source",
76             "ach_credit_transfer": {
77             "account_number": "test_52796e3294dc",
78             "routing_number": "110000000",
79             "fingerprint": "kabvkbmvbmbv",
80             "bank_name": "TEST BANK",
81             "swift_code": "TSTEZ122"
82             },
83             "amount": null,
84             "client_secret": "src_client_secret_fake123456789",
85             "created": 1571314413,
86             "currency": "jpy",
87             "flow": "receiver",
88             "livemode": false,
89             "metadata": {},
90             "owner": {
91             "address": null,
92             "email": "jenny.rosen@example.com",
93             "name": null,
94             "phone": null,
95             "verified_address": null,
96             "verified_email": null,
97             "verified_name": null,
98             "verified_phone": null
99             },
100             "receiver": {
101             "address": "121042882-38381234567890123",
102             "amount_charged": 0,
103             "amount_received": 0,
104             "amount_returned": 0,
105             "refund_attributes_method": "email",
106             "refund_attributes_status": "missing"
107             },
108             "statement_descriptor": null,
109             "status": "pending",
110             "type": "ach_credit_transfer",
111             "usage": "reusable"
112             }
113              
114             =head1 HISTORY
115              
116             =head2 v0.1
117              
118             Initial version
119              
120             =head1 AUTHOR
121              
122             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
123              
124             =head1 SEE ALSO
125              
126             Stripe API documentation:
127              
128             L<https://stripe.com/docs/api/sources/object>
129              
130             =head1 COPYRIGHT & LICENSE
131              
132             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
133              
134             You can use, copy, modify and redistribute this package and associated
135             files under the same terms as Perl itself.
136              
137             =cut