550 Commits

Author SHA1 Message Date
kiran-b
2970a577ba removed occasionally failing test: curl args order inconsistent 2013-10-08 21:13:44 -07:00
kiran-b
1724f85e26 tests for metadata 2013-10-08 21:01:13 -07:00
Michelle Bu
f9b13dfc2a active_card is no longer a thing 2013-10-07 10:05:59 -07:00
Finbarr Taylor
0851f2a7fd Added BalanceTransaction list resource.
Added Balance singleton resource.
2013-08-13 20:53:19 +01:00
Andrew Metcalf
c0ca48f848 rename mnemonic to description 2013-08-07 09:36:54 -07:00
Andrew Metcalf
88ead09193 support unsetting parameters by passing nil and updating 2013-08-06 11:37:35 -07:00
Sheena Pakanati
87604d945e Initial support for multiple cards. 2013-07-11 16:47:58 -07:00
Tim Craft
9ae705f845 Add version specifiers for activesupport/shoulda/mocha dev dependencies 2013-07-05 17:36:36 +01:00
Evan Broder
2861964755 Fix handling of per-resource API keys (fixes #67) 2013-05-06 13:53:00 -07:00
Evan Broder
1b3dd625fd Merge remote-tracking branch 'origin/pull/60' 2013-05-01 14:43:44 -07:00
Evan Broder
91c90ff43e Merge remote-tracking branch 'origin/pull/47'
Conflicts:
	lib/stripe.rb
2013-05-01 14:37:51 -07:00
Amber Feng
a7f7df94c6 Tests for transfers and recipients. 2013-04-11 18:00:47 -07:00
David Czarnecki
e593b0e0df Breakup tests into separate test files 2013-03-22 17:20:04 -04:00
Jean Boussier
6a57264758 Allow to update a resource without retreiving it first
Rationale:

  Sometime you don't care about the current state of a resource
  you just want to update one of it's attributes.
  It should only require one request.

fixes #52

```ruby
  c = Stripe::Customer.new("cus_1EqKjPaFs4ZwDD")
  c.description = 'Ny new Description'
  c.save
```

Before:

```json
{
  error: {
    type: "invalid_request_error",
    message: "A parameter provided in the URL (id) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL.",
    param: "id",
  }
}
```

After:

Successfully update the customer and return it's whole state.
2013-03-14 11:04:18 -04:00
Amber Feng
ce34d9ef8b Use Invoice.all instead of Invoice.upcoming for base query parameter tests. 2013-03-11 18:07:45 -07:00
Amber Feng
7ddf3ea42b Fix URL building for when the base URL already has query parameters, and add test. 2013-03-11 13:19:28 -07:00
Evan Broder
0c28189194 Slightly cleaner way of getting all of activesupport 2012-12-04 16:11:34 -08:00
Alex MacCaw
d196d8a343 Throw an error if the API key contains whitespace 2012-12-04 13:38:34 -08:00
Ross Boucher
7f87b2bc4a Add support for list objects. Bumps version to 1.7.5 2012-10-25 19:42:23 -07:00
Evan Broder
f7a69489af Add a test for invoice pay 2012-10-08 16:40:39 -07:00
Evan Broder
e776c7a3cb Default the API method params to an empty dict, not nil
Fixes #42
2012-10-08 16:24:03 -07:00
Evan Broder
e8adad2c34 Encoding POST bodies ourselves, instead of letting rest-client
It's a bit unfortunate we have to do this, but this avoids an even
more unfortunate interaction between rest-client and hashery that
prevents passing a hash as the payload.

Also update the tests appropriately. This is also a bit messy, but I
didn't want to pull in Rack just for a handful of tests.

Fixes #38
2012-09-14 20:30:52 -07:00
Evan Broder
ae850157d7 Test that GET parameters are URL-encoded 2012-09-14 20:30:52 -07:00
Amber Feng
478ff80ac4 Add Account API resource. 2012-08-16 12:25:15 -07:00
Akash Manohar J
78bf6a6260 Changes order of require
Signed-off-by: Akash Manohar J <akash@akash.im>
2012-05-23 11:30:41 +05:30
Evan Broder
b905b2164c Run the test suite once with ActiveSupport loaded, once without
ActiveSupport is the source of many problems for us, so let's try to
catch them pre-emptively with testing
2012-05-07 17:24:44 -07:00
Evan Broder
5f70ea3bbd Merge branch 'signal' 2012-05-04 22:52:14 -07:00
Evan Broder
e69407fa3c Add one more assertion to delete_discount test 2012-05-04 22:52:10 -07:00
Evan Broder
065f2316c7 Don't accept params to delete_customer because Stripe accepts none 2012-05-04 22:48:08 -07:00
Evan Broder
32e619c04a Switch from deprecated MultiJson.{encode,decode} to .{dump,load}
Bump gem dependency accordingly
2012-04-23 10:18:57 -07:00
Evan Broder
2e9693eccf Merge branch 'master' into multi_json 2012-04-23 10:08:00 -07:00
Evan Broder
69a96ecc4b Parse URL query string in tests to deal with hash order differences
My rvm 1.8.7 Linux build of Ruby appears to generate query strings in
a different order than the test suite expected.
2012-04-23 10:00:29 -07:00
Brian Collins
00a4be73f9 Charge descriptions can be updated 2012-04-01 15:49:15 -07:00
Brian Collins
a6de6e3be7 Use multi_json 2012-04-01 13:44:22 -07:00
Brian Collins
97c5d77154 Fix failing tests since baking query string into to get and delete requests 2012-04-01 13:25:02 -07:00
Greg Brockman
cfef69ac06 Store the HTTP status code, HTTP body, and parsed JSON body on exceptions 2012-01-25 16:59:56 -08:00
John Wood
5921076da0 Add support for deleting the discount associated with the customer 2012-01-13 06:40:24 -06:00
Sheena Pakanati
94d8bdf681 Coupon support. 2011-10-11 22:06:51 -07:00
Greg Brockman
e81afe05a1 Only exclude nil parameters 2011-10-05 13:18:24 -07:00
Greg Brockman
1a709b6d51 Don't pass nil values to the API 2011-10-05 13:13:03 -07:00
Greg Brockman
50d562ae90 Manually symbolize_names
A user ran into an issue where names were not being symbolized
properly. I guess there's some library out that breaks
:symbolize_names => true
2011-10-03 22:10:35 -07:00
Ross Boucher
5fcaa49495 Update stripe tests for newer API format. 2011-09-15 14:09:03 -07:00
Greg Brockman
21fd38e13e Add test around customer subscription cancelation 2011-07-12 23:28:37 -07:00
Bradley Grzesiak
c065589076 Fix a require in tests 2011-07-08 17:33:19 -07:00
Bradley Grzesiak
16c3d4f3b9 Update syntax to work in ruby 1.9 2011-07-08 17:28:50 -07:00
Bradley Grzesiak
b03a4165df Remove circular dependency in gemspec 2011-07-08 17:28:50 -07:00
Greg Brockman
a981f4910c Put params for get/head/delete into query string 2011-07-04 19:23:40 -07:00
Ross Boucher
98a5766381 Fix for updating subscriptions.
Also switches tests to 'shoulda' from 'context'.
2011-06-20 11:49:15 -07:00
Greg Brockman
24dcd8707e Raise InvalidRequestError if no id provided 2011-05-30 14:35:15 -07:00
Greg Brockman
0813418b74 1.5.0 release 2011-05-26 11:47:01 -07:00