Mangopay / mangopay2-ruby-sdk

Ruby Gem for MANGOPAY
https://rubygems.org/gems/mangopay
MIT License
42 stars 38 forks source link

Idempotency support missing #35

Closed rarruda closed 8 years ago

rarruda commented 8 years ago

The latest version of the v2 API supports idempotency-key being set in the request header to avoid operations happening twice:

https://docs.mangopay.com/api-references/idempotency-support/

However there is currently no way trivial way to set that request header on a per request basis on this gem: https://github.com/Mangopay/mangopay2-ruby-sdk/blob/master/lib/mangopay.rb#L82 (or globally not overriding the default values).

Adding support for it in the library would be highly appreciated.

Also having support for fetching results from requests with the idempotency-key set would be nice to have.

hobailey commented 8 years ago

Hi @rarruda, thanks for bringing this up - we're already working on adding idempotency support to our SDKs and we're hoping to update them asap.

hobailey commented 8 years ago

Hi @rarruda, just to confirm, we'll be updating the SDK with idempotency support within the next week :-)

rarruda commented 8 years ago

:+1: Awesome!

ghost commented 8 years ago

Hi, it's done and released: https://github.com/Mangopay/mangopay2-ruby-sdk/releases/tag/v3.0.20

laurynas commented 8 years ago

:+1:

rarruda commented 8 years ago

:+1: