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