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