File Coverage

lib/Net/API/Stripe/Connect/Account/Capability.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/Connect/Account/Capability.pm
3             ## Version v0.101.0
4             ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2022/10/29
8             ##
9             ##----------------------------------------------------------------------------
10             package Net::API::Stripe::Connect::Account::Capability;
11             BEGIN
12             {
13 2     2   21196407 use strict;
  2         15  
  2         60  
14 2     2   10 use warnings;
  2         3  
  2         58  
15 2     2   9 use parent qw( Net::API::Stripe::Generic );
  2         4  
  2         8  
16 2     2   155 use vars qw( $VERSION );
  2         4  
  2         119  
17 2     2   38 our( $VERSION ) = 'v0.101.0';
18             };
19              
20 2     2   10 use strict;
  2         5  
  2         42  
21 2     2   10 use warnings;
  2         4  
  2         389  
22              
23 0     0 1   sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
24              
25 0     0 1   sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
26              
27 0     0 1   sub account { return( shift->_set_get_scalar_or_object( 'account', 'Net::API::Stripe::Connect::Account', @_ ) ); }
28              
29 0     0 1   sub future_requirements { return( shift->_set_get_object( 'future_requirements', 'Net::API::Stripe::Connect::Account::Requirements', @_ ) ); }
30              
31 0     0 1   sub requested { return( shift->_set_get_boolean( 'requested', @_ ) ); }
32              
33 0     0 1   sub requested_at { return( shift->_set_get_datetime( 'requested_at', @_ ) ); }
34              
35 0     0 1   sub requirements { return( shift->_set_get_object( 'requirements', 'Net::API::Stripe::Connect::Account::Requirements', @_ ) ); }
36              
37             ## active, inactive, pending, or unrequested.
38              
39 0     0 1   sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
40              
41             1;
42              
43             __END__
44              
45             =encoding utf8
46              
47             =head1 NAME
48              
49             Net::API::Stripe::Connect::Account::Capability - A Stripe Account Capability Object
50              
51             =head1 SYNOPSIS
52              
53             my $capa = $stripe->=capability({
54             account => $account_object,
55             requested => $stripe->true,
56             requested_at => '2020-04-01',
57             status => 'active',
58             });
59              
60             =head1 VERSION
61              
62             v0.101.0
63              
64             =head1 DESCRIPTION
65              
66             A hash containing the set of capabilities that was requested for this account and their associated states. Keys are names of capabilities. You can see the full list here (L<https://stripe.com/docs/api/capabilities/list>). Values may be I<active>, I<inactive>, or I<pending>.
67              
68             =head1 CONSTRUCTOR
69              
70             =head2 new( %ARG )
71              
72             Creates a new L<Net::API::Stripe::Connect::Account::Capability> object.
73             It may also take an hash like arguments, that also are method of the same name.
74              
75             =head1 METHODS
76              
77             =head2 id string
78              
79             The identifier for the capability.
80              
81             =head2 object string, value is "capability"
82              
83             String representing the object’s type. Objects of the same type share the same value.
84              
85             =head2 account string (expandable)
86              
87             The account for which the capability enables functionality.
88              
89             When expanded, this is a L<Net::API::Stripe::Connect::Account> object.
90              
91             =head2 future_requirements object
92              
93             Information about the upcoming new requirements for the capability, including what information needs to be collected, and by when.
94              
95             This is a L<Net::API::Stripe::Connect::Account::Requirements> object.
96              
97             =head2 requested boolean
98              
99             Whether the capability has been requested.
100              
101             =head2 requested_at timestamp
102              
103             Time at which the capability was requested. Measured in seconds since the Unix epoch.
104              
105             =head2 requirements hash
106              
107             Information about the requirements for the capability, including what information needs to be collected, and by when.
108              
109             This is a L<Net::API::Stripe::Connect::Account::Requirements> object.
110              
111             =head2 status string
112              
113             The status of the capability. Can be active, inactive, pending, or unrequested.
114              
115             =head1 API SAMPLE
116              
117             {
118             "id": "card_payments",
119             "object": "capability",
120             "account": "acct_fake123456789",
121             "requested": true,
122             "requested_at": 1571480455,
123             "requirements": {
124             "current_deadline": null,
125             "currently_due": [],
126             "disabled_reason": null,
127             "eventually_due": [],
128             "past_due": [],
129             "pending_verification": []
130             },
131             "status": "active"
132             }
133             =head1 HISTORY
134              
135             =head2 v0.1
136              
137             Initial version
138              
139             =head1 AUTHOR
140              
141             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
142              
143             =head1 SEE ALSO
144              
145             Stripe API documentation:
146              
147             L<https://stripe.com/docs/api/accounts/object>
148              
149             =head1 COPYRIGHT & LICENSE
150              
151             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
152              
153             You can use, copy, modify and redistribute this package and associated
154             files under the same terms as Perl itself.
155              
156             =cut