@@ -22,7 +22,7 @@ def __init__(self, client):
2222 self .account = self .client ['Account' ]
2323 self .ticket = self .client ['Ticket' ]
2424
25- def list_tickets (self , open_status = True , closed_status = True , limit = None ):
25+ def list_tickets (self , open_status = True , closed_status = True , limit = None , all_tickets = None ):
2626 """List all tickets.
2727
2828 :param boolean open_status: include open tickets
@@ -33,6 +33,7 @@ def list_tickets(self, open_status=True, closed_status=True, limit=None):
3333 createDate, lastEditDate, accountId, status, updateCount]"""
3434
3535 call = 'getTickets'
36+ # print('All Checks ',open_status, closed_status,all_tickets)
3637 if not all ([open_status , closed_status ]):
3738 if open_status :
3839 call = 'getOpenTickets'
@@ -41,6 +42,9 @@ def list_tickets(self, open_status=True, closed_status=True, limit=None):
4142 else :
4243 raise ValueError ("open_status and closed_status cannot both be False" )
4344
45+ if all ([open_status , all_tickets ]):
46+ return self .client .call ('Account' , call , mask = mask , iter = all_tickets , limit = limit )
47+
4448 return self .client .call ('Account' , call , mask = mask , iter = False , limit = limit )
4549
4650 def list_subjects (self ):
0 commit comments