Closed thrau closed 3 years ago
thanks for the comments, will make the changes towards the weekend
so i amended the history with the changes as suggested. and sorry in advance for the scope creep: i also added a couple of flake8 fixes and two lines to the gitignore (pycharm directories and the default .venv folder).
also added the implementation of the customers/:id/sources?object=
filter
i updated the PR with your change requests @H--o-l, hope to get this over the line now
with respect to the if kwargs
check:
stripe does return an error on unknown arguments. however the error message is completely different from what localstripe returns:
% curl "https://api.stripe.com/v1/plans?foo=bar" -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:
{
"error": {
"code": "parameter_unknown",
"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",
"message": "Received unknown parameter: foo",
"param": "foo",
"type": "invalid_request_error"
}
}
i mean sure, i'll add the assert to the methods i added (it's your project of course, so your decision). however
PaymentMethod._api_list_all
doesn't do the check either.which is all fine i suppose, just something to think about.
anyway. i made all the requested changes.
This PR adds several improvements to listing products, plans, customers, and subscriptions (stripe features that we use at @localstack)
/v1/products
to take the optionalactive=true|false
keyword/v1/plans
object=card
filter argument to/v1/customers/{id}/sources
trial_from_plan
boolean flag for/v1/subscriptions
I tried to conform to the semantic commit messages i found in the history, and tried to keep the code style as close to the original code as possible. Happy to make changes.