README.md in stripe-4.24.0 vs README.md in stripe-5.0.0

- old
+ new

@@ -37,11 +37,11 @@ gem build stripe.gemspec ``` ### Requirements -- Ruby 2.1+. +- Ruby 2.3+. ### Bundler If you are installing via bundler, you should be sure to use the https rubygems source in your Gemfile, as any gems fetched over http could potentially be @@ -110,19 +110,17 @@ api_key: "sk_test_...", } ) ``` -### Configuring a Client +### Accessing a response object -While a default HTTP client is used by default, it's also possible to have the -library use any client supported by [Faraday][faraday] by initializing a -`Stripe::StripeClient` object and giving it a connection: +Get access to response objects by initializing a client and using its `request` +method: ```ruby -conn = Faraday.new -client = Stripe::StripeClient.new(conn) +client = Stripe::StripeClient.new charge, resp = client.request do Stripe::Charge.retrieve( "ch_18atAXCdGbJFKhCuBAa4532Z", ) end @@ -157,17 +155,20 @@ Stripe.ca_bundle_path = "path/to/ca/bundle" ``` ### Configuring Automatic Retries -The library can be configured to automatically retry requests that fail due to -an intermittent network problem: +You can enable automatic retries on requests that fail due to a transient +problem by configuring the maximum number of retries: ```ruby Stripe.max_network_retries = 2 ``` +Various errors can trigger a retry, like a connection error or a timeout, and +also certain API responses like HTTP status `409 Conflict`. + [Idempotency keys][idempotency-keys] are added to requests to guarantee that retries are safe. ### Configuring Timeouts @@ -270,10 +271,9 @@ `.travis.yml`. [api-keys]: https://dashboard.stripe.com/account/apikeys [connect]: https://stripe.com/connect [curl]: http://curl.haxx.se/docs/caextract.html -[faraday]: https://github.com/lostisland/faraday [idempotency-keys]: https://stripe.com/docs/api/ruby#idempotent_requests [stripe-mock]: https://github.com/stripe/stripe-mock [versioning]: https://stripe.com/docs/api/ruby#versioning <!--