| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Connect/Account/ExternalAccounts.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::ExternalAccounts; |
|
11
|
|
|
|
|
|
|
BEGIN |
|
12
|
|
|
|
|
|
|
{ |
|
13
|
1
|
|
|
1
|
|
850
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
29
|
|
|
14
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::List ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5
|
|
|
15
|
1
|
|
|
1
|
|
273
|
our( $VERSION ) = 'v0.100.0'; |
|
16
|
|
|
|
|
|
|
}; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Inhertied |
|
19
|
|
|
|
|
|
|
# sub object { shift->_set_get_scalar( 'object', @_ ); } |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
## The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. |
|
22
|
|
|
|
|
|
|
## sub data { shift->_set_get_array( 'data', @_ ); } |
|
23
|
|
|
|
|
|
|
sub data |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
0
|
|
|
0
|
1
|
|
my $self = shift( @_ ); |
|
26
|
0
|
0
|
|
|
|
|
if( @_ ) |
|
27
|
|
|
|
|
|
|
{ |
|
28
|
|
|
|
|
|
|
local $process = sub |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
0
|
|
|
0
|
|
|
my $ref = shift( @_ ); |
|
31
|
0
|
|
0
|
|
|
|
my $type = $ref->{object} || return( $self->error( "No object type could be found in hash: ", sub{ $self->_dumper( $ref ) } ) ); |
|
32
|
0
|
|
|
|
|
|
my $class = $self->_object_type_to_class( $type ); |
|
33
|
0
|
|
|
|
|
|
$self->_message( 3, "Object type $type has class $class" ); |
|
34
|
0
|
|
|
|
|
|
my $o = $self->_instantiate_object( 'data', $class, $ref ); |
|
35
|
0
|
|
|
|
|
|
$self->{data} = $o; |
|
36
|
|
|
|
|
|
|
## return( $class->new( %$ref ) ); |
|
37
|
|
|
|
|
|
|
## return( $self->_set_get_object( 'object', $class, $ref ) ); |
|
38
|
0
|
|
|
|
|
|
}; |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if( ref( $_[0] ) eq 'HASH' ) |
|
|
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
{ |
|
42
|
0
|
|
|
|
|
|
my $o = $process->( @_ ) |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
## An array of objects hash |
|
45
|
|
|
|
|
|
|
elsif( ref( $_[0] ) eq 'ARRAY' ) |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
0
|
|
|
|
|
|
my $arr = shift( @_ ); |
|
48
|
0
|
|
|
|
|
|
my $res = []; |
|
49
|
0
|
|
|
|
|
|
foreach my $data ( @$arr ) |
|
50
|
|
|
|
|
|
|
{ |
|
51
|
0
|
|
0
|
|
|
|
my $o = $process->( $data ) || return( $self->error( "Unable to create object: ", $self->error ) ); |
|
52
|
0
|
|
|
|
|
|
push( @$res, $o ); |
|
53
|
|
|
|
|
|
|
} |
|
54
|
0
|
|
|
|
|
|
$self->{data} = $res; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
} |
|
57
|
0
|
|
|
|
|
|
return( $self->{data} ); |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# Inhertied |
|
61
|
|
|
|
|
|
|
# sub has_more { shift->_set_get_scalar( 'has_more', @_ ); } |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# Inhertied |
|
64
|
|
|
|
|
|
|
# sub total_count { shift->_set_get_scalar( 'total_count', @_ ); } |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# Inhertied |
|
67
|
|
|
|
|
|
|
# sub url { shift->_set_get_uri( 'url', @_ ); } |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=encoding utf8 |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 NAME |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Net::API::Stripe::Connect::Account::ExternalAccounts - A Stripe External Accounts List Object |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 VERSION |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
v0.100.0 |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This module inherits everything from L<Net::API::Stripe::List> module and overrides only the B<data> method |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This is instantiated from method B<external_accounts> in module L<Net::API::Stripe::Connect::Account> |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 AUTHOR |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Stripe API documentation: |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L<https://stripe.com/docs/api> |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
|
104
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |