@@ -22,11 +22,12 @@ 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 ):
25+ def list_tickets (self , open_status = True , closed_status = True , limit = None ):
2626 """List all tickets.
2727
2828 :param boolean open_status: include open tickets
2929 :param boolean closed_status: include closed tickets
30+ :param int limit: result limit
3031 """
3132 mask = """mask[id, serviceProviderResourceId, title, assignedUser[firstName, lastName], priority,
3233 createDate, lastEditDate, accountId, status, updateCount]"""
@@ -39,7 +40,8 @@ def list_tickets(self, open_status=True, closed_status=True):
3940 call = 'getClosedTickets'
4041 else :
4142 raise ValueError ("open_status and closed_status cannot both be False" )
42- return self .client .call ('Account' , call , mask = mask , iter = False , limit = 100 )
43+
44+ return self .client .call ('Account' , call , mask = mask , iter = False , limit = limit )
4345
4446 def list_subjects (self ):
4547 """List all ticket subjects."""
0 commit comments