]> Dogcows Code - chaz/homebank2ledger/blobdiff - lib/App/HomeBank2Ledger/Ledger.pm
Version 0.010
[chaz/homebank2ledger] / lib / App / HomeBank2Ledger / Ledger.pm
index 18522cb55861a86f1557e4df76fb0ad181130626..69af8a6da29444f0590528caf7c9d7fd3fcaecd7 100644 (file)
@@ -5,7 +5,7 @@ package App::HomeBank2Ledger::Ledger;
 use warnings;
 use strict;
 
-our $VERSION = '0.001'; # VERSION
+our $VERSION = '0.010'; # VERSION
 
 
 sub new {
@@ -63,7 +63,7 @@ App::HomeBank2Ledger::Ledger - Ledger data representation
 
 =head1 VERSION
 
-version 0.001
+version 0.010
 
 =head1 SYNOPSIS
 
@@ -86,59 +86,17 @@ Here is a specification for the substructures:
 This is a fully-qualified account name. Names may contain colons for representing a hierarchy of
 accounts. Examples:
 
-=head1 ATTRIBUTES
-
-=head2 accounts
-
-Get an arrayref of accounts.
-
-=head2 commodities
-
-Get an arrayref of commodities.
-
-=head2 payees
-
-Get an arrayref of payees.
-
-=head2 tags
-
-Get an arrayref of tags.
-
-=head2 transactions
-
-Get an arrayref of transactions.
-
-=head1 METHODS
-
-=head2 new
+=over 4
 
-    $ledger = App::HomeBank2Ledger::Ledger->new(%ledger_data);
+=item *
 
-Construct a new ledger instance.
+"Assets:Bank:Chase1234"
 
-=head2 add_accounts
+=item *
 
-Add accounts.
+"Liabilities:Credit Card:Capital One"
 
-=head2 add_commodities
-
-Add commodities.
-
-=head2 add_payees
-
-Add payees.
-
-=head2 add_tags
-
-Add tags.
-
-=head2 add_transactions
-
-Add transactions.
-
-=for: list
-* "Assets:Bank:Chase1234"
-* "Liabilities:Credit Card:CapitalOne"
+=back
 
 =head2 commodity
 
@@ -165,9 +123,11 @@ This is a hashref like this:
 
     {
         date        => '2019-06-12',        # required
-        payee       => 'Malcolm Reynolds',  # required
+        aux_date    => '2019-06-13',        # optional
         status      => 'cleared',           # optional; can be "cleared" or "pending"
-        memo        => 'Medical supplies',  # optional
+        code        => '1234',              # optional
+        payee       => 'Malcolm Reynolds',  # required
+        note        => 'Medical supplies',  # optional
         postings    => [                    # required
             {
                 account     => 'Some Account',  # required
@@ -183,14 +143,75 @@ This is a hashref like this:
                     frac    => 2,
                 },
                 payee       => 'Somebody',      # optional
-                memo        => 'Whatever',      # optional
+                note        => 'Whatever',      # optional
                 status      => 'pending',       # optional; can be "cleared" or "pending"
                 tags        => [qw(niska train-job)],
+                lot         => {                # optional
+                    date        => '2019-01-28',
+                    price       => {
+                        amount      => '15.00',
+                        commodity   => { ... },
+                    },
+                },
+                cost        => {                # optional
+                    amount      => '10.00',
+                    commodity   => { ... },
+                },
             },
             ...
         ],
     }
 
+=head1 ATTRIBUTES
+
+=head2 accounts
+
+Get an arrayref of accounts.
+
+=head2 commodities
+
+Get an arrayref of commodities.
+
+=head2 payees
+
+Get an arrayref of payees.
+
+=head2 tags
+
+Get an arrayref of tags.
+
+=head2 transactions
+
+Get an arrayref of transactions.
+
+=head1 METHODS
+
+=head2 new
+
+    $ledger = App::HomeBank2Ledger::Ledger->new(%ledger_data);
+
+Construct a new ledger instance.
+
+=head2 add_accounts
+
+Add accounts.
+
+=head2 add_commodities
+
+Add commodities.
+
+=head2 add_payees
+
+Add payees.
+
+=head2 add_tags
+
+Add tags.
+
+=head2 add_transactions
+
+Add transactions.
+
 =head1 BUGS
 
 Please report any bugs or feature requests on the bugtracker website
This page took 0.022649 seconds and 4 git commands to generate.