Add fonction to list bills to download
This commit is contained in:
parent
7c147cecab
commit
749162188d
1 changed files with 20 additions and 0 deletions
|
|
@ -97,3 +97,23 @@ class Boobill(ReplApplication):
|
|||
for backend, history in self.do(do, backends=names):
|
||||
self.format(history)
|
||||
self.flush()
|
||||
|
||||
def do_bills(self, id):
|
||||
"""
|
||||
bills Id
|
||||
|
||||
Get the list of bills documents
|
||||
"""
|
||||
|
||||
id, backend_name = self.parse_id(id)
|
||||
if not id:
|
||||
print >>sys.stderr, 'Error: please give an subscription ID (hint: use subscriptions command)'
|
||||
return 2
|
||||
names = (backend_name,) if backend_name is not None else None
|
||||
|
||||
def do(backend):
|
||||
return backend.iter_bills(id)
|
||||
|
||||
for backend, date in self.do(do, backends=names):
|
||||
self.format(date)
|
||||
self.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue