| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Finance::Bank::Postbank_de::APIv1::Account; |
|
2
|
10
|
|
|
10
|
|
72
|
use Moo; |
|
|
10
|
|
|
|
|
26
|
|
|
|
10
|
|
|
|
|
66
|
|
|
3
|
10
|
|
|
10
|
|
2967
|
use Filter::signatures; |
|
|
10
|
|
|
|
|
41
|
|
|
|
10
|
|
|
|
|
88
|
|
|
4
|
10
|
|
|
10
|
|
323
|
no warnings 'experimental::signatures'; |
|
|
10
|
|
|
|
|
24
|
|
|
|
10
|
|
|
|
|
374
|
|
|
5
|
10
|
|
|
10
|
|
63
|
use feature 'signatures'; |
|
|
10
|
|
|
|
|
106
|
|
|
|
10
|
|
|
|
|
7211
|
|
|
6
|
|
|
|
|
|
|
extends 'HAL::Resource'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.57'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Finance::Bank::Postbank_de::APIv1::Account - Postbank Account |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
for my $account ($bp->get_accounts()) { |
|
17
|
|
|
|
|
|
|
print $account->productType; |
|
18
|
|
|
|
|
|
|
print $account->name; |
|
19
|
|
|
|
|
|
|
print $account->iban; |
|
20
|
|
|
|
|
|
|
print $account->currency; |
|
21
|
|
|
|
|
|
|
print $account->amount; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 ACCESSORS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over 4 |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item * |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
C |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item * |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item * |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
C |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item * |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
C |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item * |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
C |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item * |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
C |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item * |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
C |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=back |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
has [ 'accountHolder', 'name', 'iban', 'currency', 'amount', |
|
59
|
|
|
|
|
|
|
'productType', |
|
60
|
|
|
|
|
|
|
] => ( is => 'ro' ); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 METHODS |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 C<< ->transactions >> |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Returns the transactions in this account as a list |
|
67
|
|
|
|
|
|
|
of L objects. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
|
70
|
|
|
|
|
|
|
|
|
71
|
0
|
|
|
0
|
0
|
0
|
sub transactions_future( $self ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
72
|
0
|
|
|
0
|
|
0
|
$self->fetch_resource_future( 'transactions' )->then(sub( $r ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
73
|
|
|
|
|
|
|
$self->inflate_list( |
|
74
|
|
|
|
|
|
|
'Finance::Bank::Postbank_de::APIv1::Transaction', |
|
75
|
|
|
|
|
|
|
$r->_embedded->{transactionDTOList} |
|
76
|
|
|
|
|
|
|
) |
|
77
|
0
|
|
|
|
|
0
|
}); |
|
|
0
|
|
|
|
|
0
|
|
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
0
|
sub transactions( $self ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
81
|
0
|
|
|
|
|
0
|
$self->transactions_future->get |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
11
|
|
|
11
|
0
|
42
|
sub transactions_csv_future( $self ) { |
|
|
11
|
|
|
|
|
28
|
|
|
|
11
|
|
|
|
|
34
|
|
|
85
|
11
|
|
|
11
|
|
35
|
$self->fetch_resource_future( 'transactions' )->then(sub( $r ) { |
|
|
11
|
|
|
|
|
2524
|
|
|
|
11
|
|
|
|
|
48
|
|
|
86
|
11
|
|
|
|
|
665
|
my $tr = HAL::Resource->new( %$r ); |
|
87
|
11
|
|
|
|
|
466
|
$self->ua->get( $tr->resource_url('transactions_csv' )); |
|
88
|
11
|
|
|
|
|
977120
|
Future->done( $self->ua->content ); |
|
89
|
11
|
|
|
|
|
172
|
}); |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 C<< ->transactions_csv >> |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=cut |
|
95
|
|
|
|
|
|
|
|
|
96
|
11
|
|
|
11
|
1
|
34
|
sub transactions_csv( $self ) { |
|
|
11
|
|
|
|
|
43
|
|
|
|
11
|
|
|
|
|
32
|
|
|
97
|
11
|
|
|
|
|
83
|
$self->transactions_csv_future->get |
|
98
|
|
|
|
|
|
|
} |
|
99
|
|
|
|
|
|
|
|
|
100
|
0
|
|
|
0
|
0
|
0
|
sub transactions_xml_future( $self ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
101
|
0
|
|
|
0
|
|
0
|
$self->fetch_resource_future( 'transactions' )->then(sub( $r ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
102
|
0
|
|
|
|
|
0
|
my $tr = HAL::Resource->new( %$r ); |
|
103
|
0
|
|
|
|
|
0
|
$self->ua->get( $tr->resource_url('transactions_xml' )); |
|
104
|
0
|
|
|
|
|
0
|
Future->done( $self->ua->content ); |
|
105
|
0
|
|
|
|
|
0
|
}); |
|
106
|
|
|
|
|
|
|
} |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 C<< ->transactions_xml >> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
|
111
|
|
|
|
|
|
|
|
|
112
|
0
|
|
|
0
|
1
|
0
|
sub transactions_xml( $self ) { |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
113
|
0
|
|
|
|
|
0
|
$self->transactions_xml_future->get |
|
114
|
|
|
|
|
|
|
} |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 C<< ->is_depot >> |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Returns true if the account is a brokerage account. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
|
121
|
|
|
|
|
|
|
|
|
122
|
14
|
|
|
14
|
1
|
22
|
sub is_depot( $self ) { |
|
|
14
|
|
|
|
|
23
|
|
|
|
14
|
|
|
|
|
18
|
|
|
123
|
14
|
|
|
|
|
84
|
$self->productType =~ /^depot$/i |
|
124
|
|
|
|
|
|
|
} |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 C<< ->is_mortgage >> |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Returns true if the account is a mortgage repayment account |
|
129
|
|
|
|
|
|
|
("Baufinanzierung"). |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
|
132
|
|
|
|
|
|
|
|
|
133
|
12
|
|
|
12
|
1
|
21
|
sub is_mortgage( $self ) { |
|
|
12
|
|
|
|
|
18
|
|
|
|
12
|
|
|
|
|
17
|
|
|
134
|
12
|
|
|
|
|
77
|
$self->productType =~ /^baufinanzierung$/i |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 C<< ->is_checking >> |
|
138
|
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Returns true if the account is a simple checking account. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=cut |
|
142
|
|
|
|
|
|
|
|
|
143
|
0
|
|
|
0
|
1
|
|
sub is_checking( $self ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
144
|
0
|
|
|
|
|
|
$self->productType =~ /^giro$/i |
|
145
|
|
|
|
|
|
|
} |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 C<< ->is_savings >> |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Returns true if the account is a simple savings account. |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=cut |
|
152
|
|
|
|
|
|
|
|
|
153
|
0
|
|
|
0
|
1
|
|
sub is_savings( $self ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
$self->productType =~ /^spar$/i |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 C<< ->is_calldeposit >> |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
Returns true if the account is a call deposit account. |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=cut |
|
162
|
|
|
|
|
|
|
|
|
163
|
0
|
|
|
0
|
1
|
|
sub is_calldeposit( $self ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
164
|
0
|
|
|
|
|
|
$self->productType =~ /^tagesgeld$/i |
|
165
|
|
|
|
|
|
|
} |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
1; |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head1 AUTHOR |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Max Maischein, Ecorion@cpan.orgE |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
L, L. |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head1 REPOSITORY |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
The public repository of this module is |
|
180
|
|
|
|
|
|
|
L. |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 SUPPORT |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
The public support forum of this module is |
|
185
|
|
|
|
|
|
|
L. |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head1 BUG TRACKER |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Please report bugs in this module via the RT CPAN bug queue at |
|
190
|
|
|
|
|
|
|
L |
|
191
|
|
|
|
|
|
|
or via mail to L. |
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head1 COPYRIGHT (c) |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
Copyright 2003-2019 by Max Maischein C. |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head1 LICENSE |
|
198
|
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
This module is released under the same terms as Perl itself. |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |