931 Commits

Author SHA1 Message Date
Brandur
8fe03b40fc Update OpenAPI specification and fixtures 2017-04-06 13:48:41 -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
f9fda0ed4c Small update for wording consistency and Vim hint 2017-03-28 12:16:45 -07:00
Brandur
cb841602fa Merge pull request #520 from stripe/brandur-update-openapi-conventions
Update some OpenAPI repository conventions
2017-03-23 17:29:46 -07:00
Brandur
96e03a8443 Update some OpenAPI repository conventions
See [1] for details, but a few conventions changed around the structure
of the OpenAPI repository and the data within the fixtures file. Here we
put in some minor changes to compensate for them.

[1] https://github.com/stripe/openapi/pull/3
2017-03-23 16:28:36 -07:00
Brandur
0727e11a5b Bump version to 2.1.0 v2.1.0 2017-03-17 12:17:00 -07:00
Brandur
53f97b5000 Merge pull request #515 from stripe/ob-delete-sources
Adds support for detaching sources from customers
2017-03-17 12:15:56 -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
89f207f993 Update fixtures files 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 v2.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 v2.0.2 2017-03-16 09:06:27 -07:00
Brandur
da9d8f7353 Merge pull request #517 from iamvery/fix-typo-in-json-error-handling
Replace invalid message Faraday::Response#code with valid #status
2017-03-16 09:02:10 -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
ae5bf8d460 Merge pull request #514 from stripe/brandur-update-certs-url
Point certificate bundle URL directly at cURL
2017-03-15 13:20:08 -07:00
Brandur
f4e0de5974 Also update our certificate bundle for good measure 2017-03-15 10:46:35 -07:00
Brandur
90344eeaa0 Point certificate bundle URL directly at cURL
We were using this GitHub link instead because the cURL site didn't
support HTTPS for the longest time. They do now, so repoint this URL.
2017-03-15 10:44:59 -07:00
Brandur
eb0883ee75 Merge pull request #513 from stripe/brandur-update-spec
Add Rake task to update OpenAPI specification
2017-03-14 23:52:10 -07:00
Brandur
effce7f181 Rename schema_data to spec_data for consistency 2017-03-14 17:07:50 -07:00
Brandur
4d7019bee6 Move OpenAPI spec from spec/ to openapi/
Naming a directory `spec` in a Ruby project is terribly ambiguous. This
clarifies the purpose of this directory and makes it easier to find if
you know that you're looking for OpenAPI.
2017-03-14 17:07:50 -07:00
Brandur
3b193db847 Add script to update the OpenAPI specification
Also fixes the task to retrieve a CA bundle which broke on the upgrade
from rest-client to Faraday.
2017-03-14 17:07:49 -07:00
Brandur
8564d3b629 Update bundle OpenAPI specification 2017-03-14 16:50:50 -07:00
Brandur
edac0b2c51 Merge pull request #511 from stripe/brandur-readme-update
Prefer use of the word "library" over "bindings"
2017-03-14 10:43:07 -07:00
Brandur
677454efe8 Link directly to API keys 2017-03-14 10:41:33 -07:00
Brandur
a84d8e7691 s/SDK/library/ 2017-03-14 10:38:54 -07:00
Brandur
500ace9f7b Prefer use of the word "SDK" over "bindings"
Minor difference in vernacular, but as noted in stripe/stripe-node#312,
the usage of the word "bindings" is unusual outside of Stripe.
2017-03-13 16:09:52 -07:00
Brandur
8f817b8365 Merge pull request #509 from stripe/brandur-bump-api-spec
Bump OpenAPI spec to latest
2017-02-24 10:19:12 -08:00
Brandur
6393ea6416 Expect cards instead of tokens 2017-02-23 18:12:51 -08:00
Brandur
3a0417c648 Add latest API spec and fixtures 2017-02-23 18:12:43 -08:00
Brandur
1bb9ac48b9 Bump version to 2.0.1 v2.0.1 2017-02-22 08:11:30 -08:00
Brandur
083038e7c0 Merge pull request #508 from stripe/brandur-fix-file-uploads
Properly encode file uploads
2017-02-22 08:07:53 -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 v2.0.0 2017-02-14 14:24:40 -08:00
Brandur
150432183a Merge pull request #505 from stripe/brandur-update-readme
Update README
2017-02-14 14:14:19 -08:00
Brandur
5dd5d2b608 Merge pull request #499 from stripe/brandur-openapi-test-suite
100% OpenAPI-powered test suite
2017-02-14 12:48:33 -08:00
Brandur
7d186618fc Update README
Adds a section on configuring a custom client, makes certain sections
more terse, and rewrites the "configuration section" to be more
consistent and prominent.
2017-02-14 12:48:07 -08:00
Brandur
d8f3609f25 Don't shadow outer variable 2017-02-14 12:19:16 -08:00
Brandur
9bf2f67f0c Remove some internal/deprecated API methods 2017-02-14 12:17:37 -08:00
Brandur
d917480324 Add descriptions for has_more 2017-02-14 12:17:37 -08:00
Brandur
9f150d8b05 New version of specs, now with list annotations 2017-02-14 12:17:37 -08:00
Brandur
6eae453735 Commit various spec improvements 2017-02-14 12:17:37 -08:00
Brandur
6b2e3c1eb5 Update create params for methods that were previously too forgiving 2017-02-14 12:17:37 -08:00
Brandur
b1adb9a1e9 Update OpenAPI spec 2017-02-14 12:17:37 -08:00
Brandur
d101b3a7a1 Remove OverrideSinatra and its features because they're unused
I'd originally added this class for the first stub pass that used
OpenAPI because I thought we'd need the ability to finetune some of our
stubbed responses. It turns out that we've been able to get away without
it so far so I'm removing it for now. This commit can be reverted if it
turns out that we need it back later.
2017-02-14 12:17:37 -08:00
Brandur
b0b219844c Fix wording: hyper-schema is now OpenAPI spec 2017-02-14 12:17:37 -08:00
Brandur
03af6d0ac8 Add .gitattributes to suppress spec changes in diffs 2017-02-14 12:17:37 -08:00
Brandur
02ea970f67 Remove all resource-related test data
Now that we're powering all test suites with the fixture data that's
generated along with the OpenAPI spec, we don't need this secondary
sample data anymore. Remove all of it except for helpers to simulate
different types of error responses.
2017-02-14 12:17:37 -08:00