File Coverage

lib/Net/API/Stripe/Connect/Account/Settings/Payouts.pm
Criterion Covered Total %
statement 19 22 86.3
branch n/a
condition n/a
subroutine 7 10 70.0
pod 3 3 100.0
total 29 35 82.8


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