bitpagos ruby gem

11
Bitpagos Gem OmbuLabs, January 2016

Upload: ombu-labs-the-lean-software-boutique

Post on 17-Feb-2017

353 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Bitpagos Ruby Gem

Bitpagos GemOmbuLabs, January 2016

Page 2: Bitpagos Ruby Gem

Bitpagos API docsBitpagos offers *some* documentation for their API:

http://docs.bitpagos.net/en/transaction-status/

Page 3: Bitpagos Ruby Gem

API Endpoints3 main endpoints:

- Authentication (already tackled by github.com/etagwerker/omniauth-bitpagos)

- Checkout- Transaction

Page 4: Bitpagos Ruby Gem

API Endpoints3 main endpoints:

- GET /oauth2/authorize- POST /oauth2/access_token- POST /checkout- GET /transaction

Page 5: Bitpagos Ruby Gem

API EndpointsOnly the Transaction endpoint has been covered by the gem so far, which allows you to grab (GET) the transactions in your Bitpagos account.

Page 6: Bitpagos Ruby Gem

Where’s the gem?github.com/ombulabs/bitpagos

rubygems.org/gems/bitpagos

Page 7: Bitpagos Ruby Gem

Problems while implementing the gem

Poor API documentation:

- Undocumented parameters (transaction status, limit, offset)

- Not so accurate return values in the documentation examples

Page 8: Bitpagos Ruby Gem

Problems while implementing the gem

RestClient was chosen after looking up a few other payment APIs done using Ruby.

It’s not very intuitive to send both params and headers in a GET request [1]

RestClient.get(url, headers: {myheader: 'bar', params: {foo: 'bar'}})➔ GET http://example.com/resource?foo=bar

[1] github.com/rest-client/rest-client#passing-advanced-options

Page 9: Bitpagos Ruby Gem

What’s the gem missing?

- Pagination feature- Usage instructions- Checkout endpoint implementation- Better separation, it’s mostly one big

Bitpagos::Client class

Page 10: Bitpagos Ruby Gem

Is it production ready?

NO. Only after the pagination feature is developed and merged to master. Then it should be good to go!

Page 11: Bitpagos Ruby Gem

THANK YOU!questions?