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