You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to honor the order of metadata keys? We rely on a lot of metadata and the ordering is important. In our case alphabetical. An OrderedDict is passed to Charge.create() but it looks like the ordering gets lost in the api_requestor.py:_encode_nested_dict() func. Perhaps instead of
d {}
from collections import OrderedDict
d = OrderedDict()
Maybe there's a more clever way to handle that.
The text was updated successfully, but these errors were encountered:
I would personally advise against relying on a specific order for metadata keys. Stripe's API makes no guarantee around key order, and if I'm not mistaken returns metadata keys in alphabetical order, not insertion order. In any case, the ordering is more of an implementation detail than a formal contract.
Nevertheless, I've opened a PR for this (#614) as I think maintaining order in API requests and responses makes the client library more consistent and easier to reason around.
Would it be possible to honor the order of metadata keys? We rely on a lot of metadata and the ordering is important. In our case alphabetical. An OrderedDict is passed to Charge.create() but it looks like the ordering gets lost in the api_requestor.py:_encode_nested_dict() func. Perhaps instead of
Maybe there's a more clever way to handle that.
The text was updated successfully, but these errors were encountered: