| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Filename: Account.pm |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Class interface for an OFX account |
|
4
|
|
|
|
|
|
|
# http://www.ofx.net/ |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# Created February 11, 2008 Brandon Fosdick |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# Copyright 2008 Brandon Fosdick (BSD License) |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
# $Id: Account.pm,v 1.2 2008/03/04 04:22:27 bfoz Exp $ |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Finance::OFX::Account; |
|
13
|
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
2280
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
39
|
|
|
15
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
557
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '2'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new |
|
20
|
|
|
|
|
|
|
{ |
|
21
|
0
|
|
|
0
|
1
|
|
my ($this, %options) = @_; |
|
22
|
0
|
|
0
|
|
|
|
my $class = ref($this) || $this; |
|
23
|
0
|
|
|
|
|
|
my $self = {}; |
|
24
|
0
|
|
|
|
|
|
bless $self, $class; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Initialization |
|
27
|
0
|
|
|
|
|
|
$self->{Type} = delete $options{Type}; |
|
28
|
0
|
|
|
|
|
|
$self->{ID} = delete $options{ID}; |
|
29
|
0
|
|
|
|
|
|
$self->{FID} = delete $options{FID}; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return $self; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub type |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
0
|
|
|
0
|
1
|
|
my $s = shift; |
|
37
|
0
|
0
|
|
|
|
|
$s->{Type} = shift if scalar @_; |
|
38
|
0
|
|
|
|
|
|
$s->{Type}; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub fid |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
0
|
|
|
0
|
1
|
|
my $s = shift; |
|
44
|
0
|
0
|
|
|
|
|
$s->{FID} = shift if scalar @_; # Assign new value if an argument is given |
|
45
|
0
|
|
|
|
|
|
$s->{FID}; # Return the stored value |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub id |
|
49
|
|
|
|
|
|
|
{ |
|
50
|
0
|
|
|
0
|
1
|
|
my $s = shift; |
|
51
|
0
|
0
|
|
|
|
|
$s->{ID} = shift if scalar @_; |
|
52
|
0
|
|
|
|
|
|
$s->{ID}; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub bankacctfrom |
|
56
|
|
|
|
|
|
|
{ |
|
57
|
0
|
|
|
0
|
0
|
|
my $s = shift; |
|
58
|
0
|
|
|
|
|
|
''.$s->{FID}. |
|
59
|
|
|
|
|
|
|
''.$s->{ID}. |
|
60
|
|
|
|
|
|
|
''.$s->{Type}. |
|
61
|
|
|
|
|
|
|
''; |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |