Skip to content

Commit ff4f3a1

Browse files
committed
adding more info to summary
1 parent d78a7b9 commit ff4f3a1

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

SoftLayer/CLI/billing/summary.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def cli(env):
1717
table = formatting.Table(['Name', 'Value'])
1818
balance = billing.get_balance()
1919
next_balance = billing.get_next_balance()
20+
last_bill_date = billing.get_latest_bill_date()
2021
table.add_row(['Current Balance', balance])
2122
table.add_row(['Estimated Next Balance', next_balance])
23+
table.add_row(['Last Billing Date', last_bill_date])
2224
return table

SoftLayer/managers/billing.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@ def get_next_balance(self):
7474
result = self.account.getNextInvoiceTotalAmount()
7575
return result
7676

77+
def get_latest_bill_date(self):
78+
"""
79+
80+
:return: billing account info
81+
"""
82+
result = self.account.getLatestBillDate()
83+
return result
84+
85+
def get_next_bill_items(self):
86+
"""
87+
88+
:return: billing account info
89+
"""
90+
result = self.account.getAllBillingItems()
91+
print result
92+
return result
93+
7794
def list_resources(self, from_date=None, to_date=None, **kwargs):
7895
""" Retrieve a list of all ordered resources along with their costing.
7996

0 commit comments

Comments
 (0)