File Coverage

blib/lib/Net/API/Stripe/Connect/Account/Settings/Payouts.pm
Criterion Covered Total %
statement 7 10 70.0
branch n/a
condition n/a
subroutine 3 6 50.0
pod 3 3 100.0
total 13 19 68.4


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Connect/Account/Settings/Payouts.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::Settings::Payouts;
11             BEGIN
12             {
13 1     1   829 use strict;
  1         2  
  1         27  
14 1     1   5 use parent qw( Net::API::Stripe::Generic );
  1         2  
  1         4  
15 1     1   137 our( $VERSION ) = 'v0.100.0';
16             };
17              
18 0     0 1   sub debit_negative_balances { return( shift->_set_get_boolean( 'debit_negative_balances', @_ ) ); }
19              
20             sub schedule
21             {
22 0     0 1   return( shift->_set_get_class( 'schedule',
23             {
24             delay_days => { type => 'integer' },
25             interval => { type => 'scalar' },
26             monthly_anchor => { type => 'integer' },
27             weekly_anchor => { type => 'scalar' }
28             }, @_ ) );
29             }
30              
31 0     0 1   sub statement_descriptor { return( shift->_set_get_scalar( 'statement_descriptor', @_ ) ); }
32              
33              
34             1;
35              
36             __END__
37              
38             =encoding utf8
39              
40             =head1 NAME
41              
42             Net::API::Stripe::Connect::Account::Settings::Payouts - A Stripe Account Settings Object for Payouts
43              
44             =head1 SYNOPSIS
45              
46             my $payouts = $stripe->account->settings->payouts({
47             debit_negative_balances => $stripe->false,
48             schedule =>
49             {
50             delay_days => 7,
51             interval => 'weekly',
52             weekly_anchor => 'monday',
53             },
54             statement_descriptor => 'Weekly payout',
55             });
56              
57             =head1 VERSION
58              
59             v0.100.0
60              
61             =head1 DESCRIPTION
62              
63             Settings used to configure the account within the Stripe dashboard.
64              
65             This is instantiated by method B<payouts> from module L<Net::API::Stripe::Connect::Account::Settings>
66              
67             =head1 CONSTRUCTOR
68              
69             =over 4
70              
71             =item B<new>( %ARG )
72              
73             Creates a new L<Net::API::Stripe::Connect::Account::Settings::Payouts> object.
74             It may also take an hash like arguments, that also are method of the same name.
75              
76             =back
77              
78             =head1 METHODS
79              
80             =over 4
81              
82             =item B<debit_negative_balances> boolean
83              
84             A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See L<Stripe Understanding Connect Account Balances documentation|https://stripe.com/docs/connect/account-balances> for details. Default value is true for Express accounts and false for Custom accounts.
85              
86             =item B<schedule> hash
87              
88             Details on when funds from charges are available, and when they are paid out to an external account. See L<Stripe Setting Bank and Debit Card Payouts documentation|https://stripe.com/docs/connect/bank-transfers#payout-information> for details.
89              
90             This is a dynamic class with name L<Net::API::Stripe::Connect::Account::Settings::Payouts::Schedule>. It is created using method B<_set_get_class> from module L<Module::Generic>
91              
92             =over 8
93              
94             =item I<delay_days> positive integer or zero
95              
96             The number of days charges for the account will be held before being paid out.
97              
98             =item I<interval> string
99              
100             How frequently funds will be paid out. One of manual (payouts only created via API call), daily, weekly, or monthly.
101              
102             =item I<monthly_anchor> positive integer or zero
103              
104             The day of the month funds will be paid out. Only shown if interval is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
105              
106             =item I<weekly_anchor> string
107              
108             The day of the week funds will be paid out, of the style ‘monday’, ‘tuesday’, etc. Only shown if interval is weekly.
109              
110             =back
111              
112             =item B<statement_descriptor> string
113              
114             The text that appears on the bank account statement for payouts. If not set, this defaults to the platform’s bank descriptor as set in the Dashboard.
115              
116             =back
117              
118             =head1 API SAMPLE
119              
120             {
121             "id": "acct_fake123456789",
122             "object": "account",
123             "business_profile": {
124             "mcc": null,
125             "name": "My Shop, Inc",
126             "product_description": "Great products shipping all over the world",
127             "support_address": {
128             "city": "Tokyo",
129             "country": "JP",
130             "line1": "1-2-3 Kudan-minami, Chiyoda-ku",
131             "line2": "",
132             "postal_code": "100-0012",
133             "state": ""
134             },
135             "support_email": "billing@example.com",
136             "support_phone": "+81312345678",
137             "support_url": "",
138             "url": "https://www.example.com"
139             },
140             "business_type": "company",
141             "capabilities": {
142             "card_payments": "active"
143             },
144             "charges_enabled": true,
145             "country": "JP",
146             "default_currency": "jpy",
147             "details_submitted": true,
148             "email": "tech@example.com",
149             "metadata": {},
150             "payouts_enabled": true,
151             "settings": {
152             "branding": {
153             "icon": "file_fake123456789",
154             "logo": null,
155             "primary_color": "#0e77ca"
156             },
157             "card_payments": {
158             "decline_on": {
159             "avs_failure": false,
160             "cvc_failure": false
161             },
162             "statement_descriptor_prefix": null
163             },
164             "dashboard": {
165             "display_name": "myshop-inc",
166             "timezone": "Asia/Tokyo"
167             },
168             "payments": {
169             "statement_descriptor": "MYSHOP, INC",
170             "statement_descriptor_kana": "マイショップインク",
171             "statement_descriptor_kanji": "マイショップインク"
172             },
173             "payouts": {
174             "debit_negative_balances": true,
175             "schedule": {
176             "delay_days": 4,
177             "interval": "weekly",
178             "weekly_anchor": "thursday"
179             },
180             "statement_descriptor": null
181             }
182             },
183             "type": "standard"
184             }
185              
186             =head1 HISTORY
187              
188             =head2 v0.1
189              
190             Initial version
191              
192             =head1 AUTHOR
193              
194             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
195              
196             =head1 SEE ALSO
197              
198             Stripe API documentation:
199              
200             L<https://stripe.com/docs/api/accounts/object>
201              
202             =head1 COPYRIGHT & LICENSE
203              
204             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
205              
206             You can use, copy, modify and redistribute this package and associated
207             files under the same terms as Perl itself.
208              
209             =cut