13 Commits

Author SHA1 Message Date
Brandur
3f549fb5ad Port all tests over to OpenAPI
Follows the path established in 2d75c8f by porting the rest of
stripe-ruby's tests over to OpenAPI. There are a few other changes here
where I've removed some tests that are duplicated or don't make much
sense, or reorganized how we test certain things, but this commit is
largely the same migration operation applied in bulk a few dozen test
suites.
2017-02-14 12:17:37 -08:00
Brandur
3cf2ba3527 Use basic JSON.generate instead of make_response abstraction 2017-02-14 12:07:18 -08:00
Brandur
0019cfdc7e More updated tests 2017-02-14 12:07:18 -08:00
Brandur
7ed2abffdd Remove support for Ruby 1.9
This has been discussed, but we'll finally be doing it for the next
major version so that we can introduce a few features that depend on
gems that don't support 1.9.
2017-02-14 12:07:18 -08:00
Jacqueline
d2f783df34 Add support for multiplan subscriptions (#466)
* Add support for multiplan subscriptions:
Serialize indexed arrays into hashes with index keys in subscription create, subscription update, and upcoming invoice
Add a SubscriptionItem object that supports creation, deletion, update, listing, and retrieval

* Remove helpers that convert items array to indexed hash
2016-09-21 17:44:00 -07:00
Brandur
2a9413e155 Move away from rest-client's "symbol header names"
This moves away from rest-client's convention of using symbols as header
names so as to present less obfuscation as to how these are actually
named when they go over the wire.

Because headers can be injected via the bindings' API I was initially
worried that this change might break something, but upon inspection of
rest-client source, I can see now that headers take precedence as
assigned by their insertion order into the header hash, and are
"stringified" in that same loop [1]. This means that even if a user
injects a symbolized header name (`:idempotency_key`), it will still
correctly overwrite the one generated by stripe-ruby despite that using
the string format (`"Idempotency-Key"`).

[1] https://github.com/rest-client/rest-client/blob/master/lib/restclient/request.rb#L603,L625
2016-08-25 11:42:44 -07:00
Kyle Conroy
732a494ac4 Add update class method to API resources (#426)
* Rename the `Update` operation to `Save`
* Add the `update` class method to all saveable resources
* Add tests for update method
* Add tests for plans, invoice items, and application fees
2016-06-29 14:13:42 -07:00
Kyle Conroy
b3610798c2 Rename test data methods 2015-07-02 11:51:38 -07:00
Brian Krausz
cedc3bbad5 Fix test 2015-02-18 12:27:47 -08:00
Brian Krausz
9a82f7d1ba Fix invoice paying/fetching upcoming
Fixes #209
2015-02-18 12:24:11 -08:00
Vladimir Andrijevik
650179b2aa Fix order of assert_equal calls that were backwards 2014-02-12 20:18:52 +01:00
surfacedamage
73919cd1d5 Allow creation of new invoice off customer 2013-10-31 22:09:30 -04:00
David Czarnecki
e593b0e0df Breakup tests into separate test files 2013-03-22 17:20:04 -04:00