550 Commits

Author SHA1 Message Date
Brandur
34ae473d6e Merge pull request #304 from stripe/brandur-enumerable-list-object
Mix `Enumerable` into `ListObject`
2015-09-30 12:59:14 -07:00
Brandur
add851006d Fix fixture data for invoices (and specifically invoice items)
Fixes #228.
2015-09-30 12:02:53 -07:00
Brandur
5515824fe2 Mix Enumerable into ListObject
This pulls the `Enumerable` mixin into `ListObject`. There is some
question in pulls like #167 as to the future of `ListObject` and how it
might change when pagination is introduced, but because we're unlikely
to make any backward incompatible changes to the API, it's likely that
`ListObject` will continue to represent a page of data that's been
extracted from the API. Given that assumption, pulling `Enumerable` in
should be relatively safe.

Fixes #227.
2015-09-29 22:26:00 -07:00
Brandur
f31eaa6b1e Perform deep name symbolization from .construct_from
When constructing an object using .construct_from treat keys that are
strings the same as keys which are symbols by calling Util's
symbolize_names on an input hash. This makes guarantees around
consistency a little better.

Fixes #151.
2015-09-29 17:52:16 -07:00
Brandur
ac7d050ecf Create if #save is called on a new object
Modifies the behavior of an update so that it can create an object if it
was new. This allows an "upsert"-like functionality where the SDK will
tend to do the right/expected thing.

This is a tad janky in that it checks for the existence of a class-level
`.create` method which is expected to come from a different module, but
most modules in the project are already fairly deeply intertwined and
co-dependent.

Fixes #165.
2015-09-29 17:39:43 -07:00
Brandur
fef7f8c641 Add a make_account to test data + charge_enabled -> charges_enabled 2015-09-29 15:46:43 -07:00
Brandur
30688422c4 Merge pull request #251 from godfat/to_hash-with-array
to_hash should also walk into arrays to make recursive call.
2015-09-28 15:31:54 -07:00
Brandur
be8108143b Assert on entire test URL for a slightly better guarantee 2015-09-23 12:04:12 -07:00
Brandur
1a49af7f94 Correct list + retrieval of Bitcoin transactions
Corrects the paths at which the client looks for Bitcoin transactions
and adds a small test suite to check these results.

Fixes stripe/stripe-ruby#236.
2015-09-22 18:23:57 -07:00
Rasmus Rygaard
333613fca2 Fix hash literal for compatibility. 2015-09-19 17:10:54 -07:00
Russell Davis
7a0ead3fac Merge pull request #291 from stripe/handle-non-hash-error-responses
Handle error responses that are not hashes more gracefully
2015-09-14 21:34:37 -07:00
Rasmus Rygaard
51b0bff8e9 Merge pull request #292 from stripe/rasmus-orders_bindings
Add Relay bindings
2015-09-14 16:36:37 -07:00
Russell Davis
70ae271c9e Handle error responses that are not hashes more gracefully 2015-09-14 15:13:30 -07:00
Rasmus Rygaard
6e14ca9b2a Add SKU metadata tests. 2015-09-13 21:12:48 -07:00
Rasmus Rygaard
747dac6ea0 Add Orders. 2015-09-13 20:43:36 -07:00
Rasmus Rygaard
690fd18cb3 Add SKUs, Products 2015-09-13 18:10:47 -07:00
Jacqueline Xu
a705799a2c add 429 rate limit error 2015-09-10 15:31:51 -07:00
Kyle Conroy
13979ce5be Add retrieve and all methods to refunds 2015-08-17 16:15:34 -07:00
Caitlin
eb75ccd7fa Merge pull request #269 from stripe/disputes
Add top level dispute methods.
2015-08-03 11:32:37 -07:00
Andy Cohen
2d28ab642d add api_resource_test for ListObject expand support 2015-07-27 17:40:58 -05:00
Russell Davis
bae4fc2fdf Merge pull request #267 from andyt/add_configurable_timeouts
Add configurable timeouts. [#265]
2015-07-27 13:20:45 -07:00
Chase Lambert
801dd99318 Get requests with arrays of dictionaries to work 2015-07-23 15:03:48 -07:00
Kyle Conroy
34010d7a99 Add evidence tests 2015-07-17 17:20:08 -07:00
Caitlin Johnson
a37912f122 Add top level dispute methods. 2015-07-16 14:19:41 -07:00
Andy Triggs
6be76b9754 Add configurable timeouts. [#265] 2015-07-15 16:57:58 +01:00
Kyle Conroy
8b0a074cbf Merge pull request #262 from stripe/request-ids
Add request IDs to all API errors
2015-07-02 14:33:12 -07:00
Kyle Conroy
053c44f35c Add request IDs and HTTP headers to errors
The request ID, if it exists, is now added to the output for the error
2015-07-02 13:54:02 -07:00
Kyle Conroy
b3610798c2 Rename test data methods 2015-07-02 11:51:38 -07:00
Brian Krausz
a86bd06484 Rename fake tok ID 2015-06-10 17:26:11 -07:00
Brian Krausz
5883e421c1 Add support for account bank accounts 2015-06-06 12:52:34 -07:00
Lin Jen-Shin
abbe72f5ff to_hash should also walk into arrays to make recursive call. 2015-05-21 02:00:34 +08:00
Russell Davis
fd9e8dd313 Merge pull request #226 from dylanjha/master
Fix incorrect error message- Stripe::Card.retrieve
2015-04-23 14:14:04 -07:00
Andy Brody
ede362588c Remove SSL certificate blacklist checks. 2015-04-09 16:10:32 -07:00
Russell Davis
bc3f514c5c Merge pull request #221 from bobjflong/BL/nilkey2
Safer argument parsing
2015-03-25 15:38:59 -07:00
Bob Long
c269e9bd9b Safer argument parsing (attempt 2) 2015-03-25 15:15:02 +00:00
Russell Davis
52fc50797f Add a test for retrieving accounts using an API key as the only param 2015-03-24 16:48:22 -07:00
Dylan Jhaveri
16dd5856c4 Fix incorrect error message- Stripe::Card.retrieve
* This error message said "Cards cannot be retrieved without a customer
ID. Retrieve a card using customer.cards.retrieve('card_id')"

This is incorrect. `customer.cards` throws a `NoMethodError: undefined
method `cards' for #<Stripe::Customer:0x0000010c8bdca8>`.

* The correct method is `Stripe::Customer#sources`, and this fixes the
error message.
2015-03-18 01:20:21 -07:00
Brian Krausz
37494242f5 Don't recurse into APIResources when updating
Fixes #224

CC @russelldavis
2015-03-13 10:31:55 -07:00
Brian Krausz
0df1c9b176 Fix updates on objs with arrays of strings 2015-03-09 12:08:59 -07:00
Brian Krausz
6976393e9e Fix singleton retrieval
Minor fix so just pushing to master

Fixes #214

CC @russelldavis
2015-03-05 12:27:45 -08:00
Brian Krausz
f8d5687040 Fixes as requested 2015-03-05 00:07:13 -08:00
Brian Krausz
a47a754795 Support arrays & add more nested tests 2015-03-03 14:25:10 -08:00
Brian Krausz
03abd88f0c Fix updating for nested hashes 2015-03-02 18:29:59 -08:00
Max Lahey
d1a50a8918 customer card management should use the customer sources endpoint 2015-02-26 17:32:33 -08:00
Max Lahey
c1d5c94864 version bump to 1.20.0
added structure to support for unified customer sources api
2015-02-19 17:01:39 -08: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
Brian Krausz
98e7a5ad62 Merge pull request #205 from stripe/bk-accounts
Add backwards compat for Accounts & Transfer Reversals
2015-02-15 21:09:48 -08:00
Brian Krausz
8dab401efe Test naming fix 2015-02-15 21:09:34 -08:00
Brian Krausz
9659b403c9 Fix object expansion
Fixes #206
2015-02-15 20:34:16 -08:00