Closed jakyns closed 6 years ago
👍 tested with
import omise
omise.api_secret = 'skey_test_...'
customers = omise.Customer.retrieve('?limit=3')
print(customers.limit) # 3
print(customers[0]) # <Customer id='cust_test_...' at 0x...>
note, I didn't review omise/test/__init__.py
file 😝
Looks a bit weird, would love to have this as a method on Base
instead. I'll comment later.
Merging this for now since we have other endpoints that have behavior that retrieve()
without parameters returns the whole collection. I believe we should deprecate returning collection in retrieve()
in favor for list()
which should return an iterator.
Right now, customer can't call
omise.Customer.retrieve()
(call retrieve in Customer class without argument). This PR will setcustomer_id=None
in default param so they can get Customer collection then.