This is one step in fixing issue #88
It implements the GET '/v1/customers/{id}/sources' endpoint for a customer as described here: https://stripe.com/docs/api/cards/list
Also I've never written python before 😬
Things I still need to implement is supporting the object param but I'm not really sure where to start with that one. Please feel free to give me some feedback on this one.
What would you suggest for filtering out sources on their type for the object type param? Would I just initialize a new List then filter out the obj.sources based on their prefix?
something like: (pseudo code)
returnList = List('/v1/customers/' + self.id + '/sources')
returnList._list = obj.sources.filter source.startswith(object)
Looking at their docs it looks like object param can only be card or bank_account
Man can I just say you're awesome for creating this and for being patient with me as I'm working on this!!
Alright went off the beaten path did an override on Card._api_list_all to allow filtering of customer cards. If you're not a fan of this I can move that logic into the Customer._api_list_sources.
Let me know what you think
Also not sure why the build keeps failing 😬