summaryrefslogtreecommitdiffstats
path: root/lib/WWW/YNAB/Account.pm
blob: 6ce05bc391a6b0d108e219bdb67d8e576d1e8e9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package WWW::YNAB::Account;
use Moose;

use Moose::Util::TypeConstraints qw(enum);

with 'WWW::YNAB::ModelHelpers';

has id => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

has name => (
    is  => 'ro',
    isa => 'Str',
);

has type => (
    is  => 'ro',
    isa => enum([
        qw(checking savings cash creditCard lineOfCredit
           otherAsset otherLiability payPal merchantAccount
           investmentAccount mortgage)
    ]),
);

has on_budget => (
    is  => 'ro',
    isa => 'Bool',
);

has closed => (
    is  => 'ro',
    isa => 'Bool',
);

has note => (
    is  => 'ro',
    isa => 'Maybe[Str]',
);

has balance => (
    is  => 'ro',
    isa => 'Int',
);

has cleared_balance => (
    is  => 'ro',
    isa => 'Int',
);

has uncleared_balance => (
    is  => 'ro',
    isa => 'Int',
);

has deleted => (
    is  => 'ro',
    isa => 'Bool',
);

has _ua => (
    is       => 'ro',
    isa      => 'WWW::YNAB::UA',
    required => 1,
);

__PACKAGE__->meta->make_immutable;
no Moose;

1;