From 562df6389565aac38a29632ee0ca3555128a8012 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Sun, 21 Aug 2022 18:37:10 -0500 Subject: [PATCH] Implement a partial billing command --- vultron/cmds/billing.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vultron/cmds/billing.py diff --git a/vultron/cmds/billing.py b/vultron/cmds/billing.py new file mode 100644 index 0000000..6f911d4 --- /dev/null +++ b/vultron/cmds/billing.py @@ -0,0 +1,15 @@ +import vultron.cmd + +class Billing(vultron.cmd.Command): + def vultron_list(self): # == billing history list (lists all payments and voices) + """Display all billing history.""" + + billing = self.api.get("billing", "history") + return billing["billing_history"] + + def vultron_invoices(self): # == billing invoice list + invoices = self.api.get("billing", "invoices") + return invoices["billing_invoices"] + +# billing invoice get is a specific entry from vultron_invoices +# billing invoice items gets all entries of the invoice