Implement a partial billing command

This commit is contained in:
Nick Chambers 2022-08-21 18:37:10 -05:00
parent 63607e3d93
commit 562df63895
1 changed files with 15 additions and 0 deletions

15
vultron/cmds/billing.py Normal file
View File

@ -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 <id> is a specific entry from vultron_invoices
# billing invoice items <id> gets all entries of the invoice