1296 Commits

Author SHA1 Message Date
Brandur
58512a90d8 Bump version to 4.7.1 v4.7.1 2019-02-01 09:28:47 -08:00
Brandur
42d4f42b12
Merge pull request #740 from stripe/brandur-fix-query-encoding
Fix query encoding for integer-indexed maps
2019-02-01 09:28:00 -08:00
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
Remi Jannel
94bafb451f Bump version to 4.7.0 v4.7.0 2019-01-23 15:47:00 -08:00
remi-stripe
3366cacd6a
Merge pull request #735 from stripe/remi-fix-checkout-sessions
Move CheckoutSession to the Checkout namespace and rename to Session
2019-01-23 15:40:26 -08:00
Brandur
41b6968787
Merge pull request #738 from stripe/brandur-port-in-output
Add port in "started stripe-mock" output
2019-01-22 12:25:37 -08:00
Brandur
15af271408 Add port in "started stripe-mock" output
A tiny tweak to add the port chosen by stripe-mock to the "starting
stripe-mock" output. This gives the user a little more information
(which might be handy if something isn't working), and brings it inline
with Go's output format: https://github.com/stripe/stripe-go/pull/780
2019-01-22 12:15:31 -08:00
Brandur
a5472ed04a
Merge pull request #737 from stripe/brandur-select-port
Have stripe-mock select a port number
2019-01-22 09:00:56 -08:00
Olivier Bellone
130704a09a
Bump version to 4.6.0 v4.6.0 2019-01-21 13:21:22 +01:00
Olivier Bellone
bc62c80320
Merge pull request #736 from stripe/ob-serialize-individual
Properly serialize `individual` on Account objects
2019-01-21 13:19:13 +01:00
Brandur
ad20248ee3 Have stripe-mock select a port number
When starting a stripe-mock for a custom OpenAPI spec, pass `-http-port
0` on startup, which tells stripe-mock to select a port, then extract
that port from its output.

This is not a total win because we now have to rely on string matching,
but it is better in that (1) it gets a port more efficiently, (2) it
eliminates a race condition where another process could take the port we
found before stripe-mock gets to start, and (3) it starts a little
faster as we take advantage of the fact that we know stripe-mock has
started when we've found a port in its output (in my tests it took ~0.2
to 0.3 seconds compared to a 1 second sleep).
2019-01-18 16:38:52 -08:00
Olivier Bellone
6b89b3b6c1
Properly serialize individual on Account objects 2019-01-18 15:31:47 +01:00
Remi Jannel
359a0c9cdf Move CheckoutSession to the Checkout namespace and rename to Session 2019-01-16 18:50:14 -08:00
Olivier Bellone
7f55cf3a9c
Merge pull request #715 from stripe/ob-openapi-files
Detect custom OpenAPI spec file and start stripe-mock from test suite
2019-01-11 12:08:49 +01:00
Olivier Bellone
dbf8a41244
Embed OpenAPI files and start stripe-mock from test suite 2019-01-10 15:06:01 +01:00
mickjermsurawong-stripe
9776f674f1
Merge pull request #734 from stripe/mickjermsurawong/update-stripe-mock-version
bump strip mock version to 0.40.1
2019-01-09 16:03:34 -08:00
Mick Jermsurawong
652047f130 bump strip mock version to 0.40.1 2019-01-09 15:55:41 -08:00
Olivier Bellone
af1c829a41
Merge pull request #721 from stripe/ob-fix-ci
CI fixes
2019-01-05 20:22:44 +01:00
Olivier Bellone
fe4e21c8db
Remove to_hash method on NilClass after test 2019-01-04 17:34:51 +01:00
Olivier Bellone
0a63716682
Pin bundler to 1.x 2019-01-04 16:02:56 +01:00
Brandur
55b4d78026 Bump version to 4.5.0 v4.5.0 2019-01-02 08:00:53 -07:00
Brandur
365759e0b0
Merge pull request #719 from stripe/brandur-support-express-authorize
Generate OAuth authorize URLs for express accounts
2019-01-02 08:00:02 -07:00
Brandur
403be3b106 Generate OAuth authorize URLs for express accounts
Connect with Express accounts uses a slightly different version of the
OAuth authorize URL [1] in that it's prefixed with `/express`.

Here we add a new option to `Stripe::OAuth.authorize_url` which allows
`express: true` to be passed in to generate the Express variant.

Note that the token endpoint has no equivalent so we don't need the
option there.

Fixes #717.

[1] https://stripe.com/docs/connect/oauth-reference#express-account-differences
2018-12-31 13:47:35 -07:00
Brandur
6f81c907e8 Bump version to 4.4.1 v4.4.1 2018-12-31 11:09:56 -07:00
Brandur
4d7f15f881
Merge pull request #718 from seratch/typo-misspell
Fix typo/misspell in comments & error messages
2018-12-31 10:07:44 -08:00
Kazuhiro Sera
4081d8c5ed Fix typo/misspell in comments & error messages 2018-12-31 15:26:56 +09:00
Remi Jannel
e2c352de07 Bump version to 4.4.0 v4.4.0 2018-12-21 09:43:55 +01:00
remi-stripe
b99ed974d4
Merge pull request #716 from stripe/remi-add-checkout-sessions
Add support for Checkout Sessions
2018-12-21 09:39:19 +01:00
Remi Jannel
0747d59752 Add support for the Checkout Session resource 2018-12-21 09:20:29 +01:00
Olivier Bellone
98851f9ad3
Bump version to 4.3.0 v4.3.0 2018-12-10 17:21:21 -08:00
Olivier Bellone
ab17913243
Merge pull request #711 from stripe/remi-add-account-links
Add support for the Account Link resource
2018-12-11 02:20:50 +01:00
Remi Jannel
220bac9397 Add support for the Account Link resource 2018-12-07 16:06:04 -08:00
Remi Jannel
c186e71c92 Revert "Add support for the Account Link resource"
This reverts commit 335c40b4d8cf974c427f34024072272441a5131e.
2018-12-07 16:05:05 -08:00
Remi Jannel
335c40b4d8 Add support for the Account Link resource 2018-12-07 15:54:50 -08:00
Remi Jannel
b34d527f60 Bump version to 4.2.0 v4.2.0 2018-11-28 11:42:22 -05:00
remi-stripe
ed10fc811d
Merge pull request #705 from stripe/remi-add-radar-review
Add support for the Review resource
2018-11-28 10:50:06 -05:00
Remi Jannel
0383de9dc2 Add support for the Review resource 2018-11-28 09:50:42 -05:00
Olivier Bellone
3c7995f030
Bump version to 4.1.0 v4.1.0 2018-11-27 14:17:38 +01:00
Olivier Bellone
e66705aa84
Merge pull request #695 from stripe/remi-add-radar-lists
Add support for Radar List and ListItem resources
2018-11-27 14:16:35 +01:00
Remi Jannel
ceab2740c1
Add support for Radar List and ListItem resources 2018-11-27 14:10:18 +01:00
Brandur
67c88f3572 Bump version to 4.0.3 v4.0.3 2018-11-19 08:29:15 -08:00
Brandur
d54ac0439e
Merge pull request #703 from stripe/ob-fix-windows
Don't use net-http-persistent on Windows
2018-11-19 08:28:02 -08:00
Olivier Bellone
bea6d5dd12
Don't use net-http-persistent on Windows 2018-11-19 12:37:58 +01:00
Olivier Bellone
aa611c268c
Bump version to 4.0.2 v4.0.2 2018-11-16 18:07:00 +01:00
Olivier Bellone
42f4c84505
Merge pull request #701 from stripe/ob-bump-faraday
Bump Faraday minimum version to 0.13.0
2018-11-16 18:05:20 +01:00
Olivier Bellone
c80a491e03
Bump Faraday minimum version to 0.13.0 2018-11-16 13:54:26 +01:00
Brandur
63d95e1e34 Bump version to 4.0.1 v4.0.1 2018-11-15 14:54:06 -08:00
Brandur
10f235584c
Merge pull request #699 from stripe/brandur-check-request-id
Only send telemetry if request ID was present
2018-11-15 14:53:29 -08:00
Brandur
78df532c8c Only send telemetry if request ID was present
Tweaks telemetry implementation slightly to be inline with the recent
implementation in stripe-php. Telemetry isn't much good if a request ID
wasn't present, so we only send telemetry if it was.
2018-11-15 14:45:45 -08:00
Brandur
8c4813fcbf Bump version to 4.0.0 v4.0.0 2018-11-15 10:41:58 -08:00