rebelidealist/stripe-ruby-mock — pull request #119 by pjambet (2014-08-12 14:05:37+00:00)
Title: Add refunds

This pull request adds support for refunds, as of API version 2014-06-17[1]

In order to keep backward compatibility I added a version to api handler.
The idea is that all new backward incompatible handlers, such as `klass.add_handler 'post /v1/charges/(.*)/refunds', :create_refund, '2014-06-17'` should have a version defined.

The version should either be defined through `--api-version` when running the server through the binstub or if you're not running the server, simply by doing `StripeMock.version = '2014-06-14'`.

The pull request is not 100% ready yet, as you can see the Refund handler class is not finished yet. So let me know if you're ok with my implementation, and if so, I'll wrap up everything so we can merge this.

Again, thanks for this project, it is really helpful for us!

PS: I realize that I should add specs for the `handler_for_method_url` method. I'll try to do that as soon as I can.

[1] https://stripe.com/docs/upgrades#2014-06-17