How to change limit of retrieval in python ?

english

#1

i am trying to pass query (set limit to 50 ) but i dont see a wey to do that . By default i am getting 20 records.

omise.Transaction.limit= 50 // how to set limit
transactions = omise.Transaction.retrieve()

print(">>>>>>>")
print (transactions)
for i,transaction in enumerate(transactions):
    from pprint import pprint
    try:
        charge = omise.Charge.retrieve(transaction.source)
        pprint(charge.status)
    except Exception as e:
        pass
print(i+1)

Can anyone suggest me the correct way to set limit?


#2

Hi there,

you can use omise.Transaction.retrieve("?limit=xx") to limit the result.

Please replace xx with your number.

Hope this helps you well.