@@ -27,6 +27,10 @@ def __init__(self, client):
2727 self .client = client
2828
2929 def get_summary (self ):
30+ """Gets some basic account information
31+
32+ :return: Account object
33+ """
3034 mask = """mask[
3135 nextInvoiceTotalAmount,
3236 pendingInvoice[invoiceTotalAmount],
@@ -45,6 +49,10 @@ def get_summary(self):
4549 return self .client .call ('Account' , 'getObject' , mask = mask )
4650
4751 def get_upcoming_events (self ):
52+ """Retreives a list of Notification_Occurrence_Events that have not ended yet
53+
54+ :return: SoftLayer_Notification_Occurrence_Event
55+ """
4856 mask = "mask[id, subject, startDate, endDate, statusCode, acknowledgedFlag, impactedResourceCount, updateCount]"
4957 _filter = {
5058 'endDate' : {
@@ -61,9 +69,19 @@ def get_upcoming_events(self):
6169 return self .client .call ('Notification_Occurrence_Event' , 'getAllObjects' , filter = _filter , mask = mask , iter = True )
6270
6371 def ack_event (self , event_id ):
72+ """Acknowledge an event. This mostly prevents it from appearing as a notification in the control portal.
73+
74+ :param int event_id: Notification_Occurrence_Event ID you want to ack
75+ :return: True on success, Exception otherwise.
76+ """
6477 return self .client .call ('Notification_Occurrence_Event' , 'acknowledgeNotification' , id = event_id )
6578
6679 def get_event (self , event_id ):
80+ """Gets details about a maintenance event
81+
82+ :param int event_id: Notification_Occurrence_Event ID
83+ :return: Notification_Occurrence_Event
84+ """
6785 mask = """mask[
6886 acknowledgedFlag,
6987 attachments,
@@ -75,6 +93,13 @@ def get_event(self, event_id):
7593 return self .client .call ('Notification_Occurrence_Event' , 'getObject' , id = event_id , mask = mask )
7694
7795 def get_invoices (self , limit = 50 , closed = False , get_all = False ):
96+ """Gets an accounts invoices.
97+
98+ :param int limit: Number of invoices to get back in a single call.
99+ :param bool closed: If True, will also get CLOSED invoices
100+ :param bool get_all: If True, will paginate through invoices until all have been retrieved.
101+ :return: Billing_Invoice
102+ """
78103 mask = "mask[invoiceTotalAmount, itemCount]"
79104 _filter = {
80105 'invoices' : {
@@ -94,6 +119,11 @@ def get_invoices(self, limit=50, closed=False, get_all=False):
94119 return self .client .call ('Account' , 'getInvoices' , mask = mask , filter = _filter , iter = get_all , limit = limit )
95120
96121 def get_billing_items (self , identifier ):
122+ """Gets all topLevelBillingItems from a specific invoice
123+
124+ :param int identifier: Invoice Id
125+ :return: Billing_Invoice_Item
126+ """
97127
98128 mask = """mask[
99129 id, description, hostName, domainName, oneTimeAfterTaxAmount, recurringAfterTaxAmount, createDate,
0 commit comments