summaryrefslogtreecommitdiffstats
path: root/lib/WWW/YNAB/SubTransaction.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/WWW/YNAB/SubTransaction.pm')
-rw-r--r--lib/WWW/YNAB/SubTransaction.pm49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/WWW/YNAB/SubTransaction.pm b/lib/WWW/YNAB/SubTransaction.pm
index 9c761aa..a5170b6 100644
--- a/lib/WWW/YNAB/SubTransaction.pm
+++ b/lib/WWW/YNAB/SubTransaction.pm
@@ -1,5 +1,26 @@
package WWW::YNAB::SubTransaction;
+
use Moose;
+# ABSTRACT: SubTransaction model object
+
+=head1 SYNOPSIS
+
+ use WWW::YNAB;
+
+ my $ynab = WWW::YNAB->new(...);
+ my @budgets = $ynab->budgets;
+ my $transaction = $budgets[0]->transaction('12345678-1234-1234-1234-1234567890ab');
+ my @subtransactions = $transaction->subtransactions;
+
+=head1 OVERVIEW
+
+See L<https://api.youneedabudget.com/v1#/Transactions> for more information.
+
+=cut
+
+=method id
+
+=cut
has id => (
is => 'ro',
@@ -7,36 +28,64 @@ has id => (
required => 1,
);
+=method transaction_id
+
+=cut
+
has transaction_id => (
is => 'ro',
isa => 'Str',
);
+=method amount
+
+=cut
+
has amount => (
is => 'ro',
isa => 'Int',
);
+=method memo
+
+=cut
+
has memo => (
is => 'ro',
isa => 'Maybe[Str]',
);
+=method payee_id
+
+=cut
+
has payee_id => (
is => 'ro',
isa => 'Maybe[Str]',
);
+=method category_id
+
+=cut
+
has category_id => (
is => 'ro',
isa => 'Maybe[Str]',
);
+=method transfer_account_id
+
+=cut
+
has transfer_account_id => (
is => 'ro',
isa => 'Maybe[Str]',
);
+=method deleted
+
+=cut
+
has deleted => (
is => 'ro',
isa => 'Bool',