Brandur 07f939b46b Fix query encoding for integer-indexed maps
As reported in #608, integer-indexed maps currently work when passed as
part of the body, but they are reverted to non-indexed maps when passed
in the query.

It turns out that we actually had two problems:

1. We weren't calling our `Util.encode_parameters` on our query
   parameters anywhere, and it's this method will does the integer
   encoding.

2. Even when I fixed (1) by calling `Util.encode_parameters`, Faraday
   would still strip the integer indexes as they were transformed in
   its default `NestedParamsEncoder`.

Here we fix both issues by calling `Util.encode_parameters` and sending
Faraday a custom encoder which bypasses its normal shenanigans.

Unfortunately, this has turned out to be somewhat difficult to test
because the integer-indexed maps also seem to confuse Webmock, which
strips them down to standard maps (I even tried testing against a
string, and it still got it wrong). I did use stripe-mock though to
verify that we are now sending the right payload.

Fixes #608.
2019-02-01 09:14:54 -08:00
..
2018-07-26 13:35:50 -04:00
2018-07-27 19:14:37 -04:00
2018-09-24 13:43:32 -07:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-07-19 14:23:07 +02:00
2018-08-03 00:07:27 +02:00
2018-07-19 14:23:07 +02:00
2018-08-14 14:44:43 -07:00
2018-10-30 10:25:10 -07:00
2018-11-28 09:50:42 -05:00
2018-08-03 12:50:39 +02:00
2019-01-23 15:47:00 -08:00