diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-06-23 19:59:49 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-06-23 19:59:49 -0400 |
commit | 695895e26618cbfaa89183848cbeadd7ab9a0d5b (patch) | |
tree | d6ea2d037365c212b61581ff3734673f9e6a488f /lib/WWW/YNAB/Account.pm | |
parent | 84b1fc5ec0a38eef8c82e7e403da2378b37095a6 (diff) | |
download | www-ynab-695895e26618cbfaa89183848cbeadd7ab9a0d5b.tar.gz www-ynab-695895e26618cbfaa89183848cbeadd7ab9a0d5b.zip |
initial implementation
Diffstat (limited to 'lib/WWW/YNAB/Account.pm')
-rw-r--r-- | lib/WWW/YNAB/Account.pm | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/lib/WWW/YNAB/Account.pm b/lib/WWW/YNAB/Account.pm new file mode 100644 index 0000000..6ce05bc --- /dev/null +++ b/lib/WWW/YNAB/Account.pm @@ -0,0 +1,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; |