459 Commits

Author SHA1 Message Date
Yossef Mendelssohn
21036261fc handle invalid_client error code from deauth
Actually handle the error code and make the right error, instead of
sending it through the `specific_api_error`.
2017-07-26 13:19:50 -04:00
Yossef Mendelssohn
9e1e755ccd add OAuth::InvalidClientError
Taking the explanation from
https://stripe.com/docs/connect/oauth-reference#post-deauthorize-error-codes
and trying to fit it in with the comment style.
2017-07-26 13:19:21 -04:00
Brandur
6914178677 Bump version to 3.0.2 2017-07-12 14:00:48 -07:00
Brandur
5786abcb7a Merge pull request #557 from stripe/slava-1156
Allows removing coupon via passing nil
2017-07-12 13:59:23 -07:00
Brandur
743de63894 Bump version to 3.0.1 2017-07-11 17:02:49 -07:00
Brandur
ab3b1c9dfb Remove now uneeded #saved_and_unchanged method 2017-07-11 12:41:03 -07:00
Brandur
3c632d68b7 Refactor #serialize_params_value to make key optional 2017-07-11 12:40:32 -07:00
Brandur
d90c2b8e74 Include IDs of resources set as properties
Tweaks the serialization behavior so that when a resource is explicitly
set to a resource's field and that resource is subsequently saved, then
if it looks like the set resource was persisted we extract its ID and
send it up to the API.

By slight extension we also throw an `ArgumentError` if it looks like
that set resource was _not_ persisted because if the user set it
explicitly then it was probably not their intention to have it silently
ignored by the library in the event of a problem.
2017-07-11 12:37:19 -07:00
Slava Akhmechet
78178f72d0 Following up with Brandur's fix suggestion 2017-07-10 13:59:23 -07:00
Slava Akhmechet
d0c4450e7e Allows removing coupon via passing nil 2017-07-07 11:27:26 -07:00
Brandur
bf8638a06f Bump version to 3.0.0 2017-06-27 11:37:55 -07:00
Olivier Bellone
78cd1d4f3d Add parameters when calling pay on an invoice 2017-06-27 14:01:08 +02:00
Marc Hesse
8139980f27 Bump version to 2.12.0 2017-06-20 18:31:57 -07:00
Marc Hesse
d69ccfc1dd Add support for ephemeral keys (#549) 2017-06-20 18:30:30 -07:00
Brandur
d152f0766c Bump version to 2.11.0 2017-05-26 14:18:29 -07:00
Andrew Yang
e66eac41d1 Warn user if a known opt (such as idempotency_key) is in params 2017-05-26 13:29:36 -07:00
Brandur
1d2359cfbc Bump version to 2.10.0 2017-05-25 10:16:06 -07:00
Olivier Bellone
330763aa02 Adds support for login links 2017-05-19 17:22:54 +02:00
Brandur
89cb224b39 Bump version to 2.9.0 2017-05-18 12:57:08 -07:00
Olivier Bellone
a645a78cd0 Add OAuth methods 2017-05-18 11:29:59 +02:00
Brandur
b27cd9b5ed Bump version to 2.8.0 2017-04-28 09:46:23 -07:00
Olivier Bellone
0376e242d9 Support for deserializing webhook events and verifying signatures 2017-04-28 14:25:40 +02:00
Brandur
5f18d3d18c Bump version to 2.7.0 2017-04-26 12:14:16 -07:00
Corey Farwell
408c697847 Add Stripe::InvoiceLineItem class.
Fixes #531.
2017-04-26 14:59:02 -04:00
Brandur
8cda03a1bf Bump version to 2.6.0 2017-04-26 11:35:51 -07:00
Corey Farwell
c4c38d63fc Add string constants for each of the Stripe object names. 2017-04-26 14:20:22 -04:00
Brandur
500dfd98a0 Bump version to 2.5.0 2017-04-24 16:35:33 -07:00
Corey Farwell
f057ee1893 Don't require opts param for convert_to_stripe_object. 2017-04-24 18:40:03 -04:00
Brandur
ed15772fd6 Bump version to 2.4.0 2017-04-18 06:05:52 -07:00
Brandur
cdccdbe4e2 Remove private modifier
Ruby 2.0 doesn't seem to like this syntax unfortunately.
2017-04-18 05:07:39 -07:00
Brandur
06992ef370 Add app info to User-Agent as well 2017-04-17 12:57:16 -07:00
Brandur
6acd21ac48 Support "app info" for plugins in Ruby
Adds support for "app info" (a mechanism that allows a plugin's author
to identify that plugin) in Ruby. This is already supported in PHP and
we're adding it elsewhere.
2017-04-14 14:37:01 -07:00
Brandur
74b5f08930 Bump version to 2.3.0 2017-04-14 09:48:55 -07:00
Brandur
420aac584b Annotate why we get this value with a comment 2017-04-14 09:47:51 -07:00
Jay Hayes
44bad70987 Include predicate for lazily added boolean accessors
Previously, the value of whatever accessor was missing was left out of
the call to build it. This had the effect of skipping over the
lazily-built predicate method when the missing accessor is for a
boolean.

Of course, I realize this all is a bit contrived as most of the time
folks aren't assigning these values manually to stripe objects. However,
in my testing it caught me by surprised that the behavior is asymmetric
depending on how and when values are assigned.

As such I believe this is a less surprising implementation.
2017-04-14 09:31:58 -05:00
Brandur
d2cada1c1c Bump version to 2.2.1 2017-04-07 12:18:42 -07:00
Brandur
2979e5fc62 Bump version to 2.2.0 2017-04-06 14:02:39 -07:00
Remi Jannel
65e8f505d5 Added support for the new Payout and RecipientTransfer objects
The Transfer object used to represent all movements of funds in Stripe. It
split in three resources:
- Transfer: this describes the movement of funds between Stripe accounts
and is specific to Stripe Connect.
- Payout: this describes the movement of funds from a Stripe account to a
bank account, debit card or any future payout method.
- RecipientTransfer: this describes the movement of funds from a Stripe
account to a Recipient's card or Bank Account. This is here for legacy
reasons and can only be accessed from an expanded BalanceTransaction.

This change is behind an API version so old API versions would still use
the Transfer object for everything while new API version would see the
split.

This applies beyond the new object as some properties/methods are removed
from Transfer and other properties are renamed on other objects.
2017-03-31 14:03:56 -04:00
Brandur
0727e11a5b Bump version to 2.1.0 2017-03-17 12:17:00 -07:00
Olivier Bellone
433c660cfe Fix sources 2017-03-17 16:11:05 +01:00
Olivier Bellone
58a965523a Fix cards 2017-03-17 16:11:05 +01:00
Olivier Bellone
b8e6a385cf Adds support for detaching sources from customers 2017-03-17 16:11:05 +01:00
Brandur
c9a3c7933b Bump version to 2.0.3 2017-03-16 13:03:27 -07:00
Brandur
bb53b3e63f Merge pull request #516 from stripe/ob-fix-512
Exclude client when dumping objects
2017-03-16 13:02:34 -07:00
Olivier Bellone
d3e40bb1de Exclude client when dumping objects 2017-03-16 20:54:13 +01:00
Brandur
66d8ecd0d0 Bump version to 2.0.2 2017-03-16 09:06:27 -07:00
Jay Hayes
20553e7422 Replace invalid message Faraday::Response#code with valid #status
The Faraday::Response object does not respond to #code. The correct
message is #status. It seems this case was previously unhandled by the
test suite as there was no case for the server responding "success" with
an invalid JSON body.
2017-03-16 06:24:45 -05:00
Brandur
1bb9ac48b9 Bump version to 2.0.1 2017-02-22 08:11:30 -08:00
Brandur
77c8535fa3 Properly encode file uploads
As described in #506, file uploads were broken on the way over to
Faraday and unfortunately I didn't catch it because the file upload
creation test wasn't using a matcher that was strict enough to really
catch anything.

Here we add the multipart middleware to our Faraday connection, add a
compatibility layer to `FileUpload` so that we can support `File` like
the rest-client based version always did (Faraday generally expects an
`UploadIO` object), and then tighten up our tests so that we'd be able
to catch future regressions.

Fixes #506.
2017-02-21 17:35:21 -08:00
Brandur
ea90ddb6d3 Bump version to 2.0.0 2017-02-14 14:24:40 -08:00