0.0.6 • Published 19 days ago

@sogmi/financial-reports-generator v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
19 days ago

Financial Reports Generator

Tool to autogenerate financial reports of donations from Square and Paypal.

Prerequisites

Setup

By default this tool will look for the following environment variables. You can use a .env or just update the environment directly.

PAYPAL_CLIENT_ID = <client-id>
PAYPAL_CLIENT_SECRET = <secret-token>
SQUARE_APP_ID = <app-id>
SQUARE_ACCESS_TOKEN = <access-token>

You can alternatively specify these values ares function or command line arguments as detailed below

Usage

CLI Usage

# install
npm i -g @sogmi/financial-reports-generator

# run the command
sogmi-financial-reports-generator --start 06-01-2020 --end 06-30-2020 --output my-report.pdf

Javascript Usage

import generateReport from '@sogmi/financial-reports-generator';

generateReport({
    start: new Date('06-01-2020'),
    end: new Date('06-30-2020'),
    output: 'my-report.pdf',
});

Args

flagaliastypedescription
--start-sstringThe beginning date to grab transactions from
--end-estringThe ending date to grab transactions from
--output-ostringThe directory to output the reports to
--sandboxbooleanWhether to run in sandbox mode or not. When in sandbox mode the CLI will connect to the sandbox endpoints for Square and Paypal instead of the production endpoints. When using this flag make sure to use sandbox credentials instead of production credentials
--paypal-client-idstring(optional) Looks for PAYPAL_CLIENT_ID environment variable by default
--paypal-client-secretstring(optional) Looks for PAYPAL_CLIENT_SECRET environment variable by default
--square-app-idstring(optional) Looks for SQUARE_APP_ID environment variable by default
--square-access-tokenstring(optional) Looks for SQUARE_ACCESS_TOKEN environment variable by default
0.0.6

19 days ago

0.0.5

1 month ago

0.0.4

12 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago