README.md in payu_api-0.1.0 vs README.md in payu_api-0.1.1

- old
+ new

@@ -1,7 +1,10 @@ # PayU REST API +[![Gem Version](https://badge.fury.io/rb/payu_api.svg)](https://badge.fury.io/rb/payu_api) +[![Build Status](https://travis-ci.org/busfor/payu_api.svg?branch=master)](https://travis-ci.org/busfor/payu_api) + Ruby wrapper for PayU REST API. ## Installation Add this line to your application's Gemfile: @@ -18,17 +21,28 @@ $ gem install payu_api ## Usage +Get OAuth token: + +```ruby +response = PayuAPI.authorize(pos_id: '300046', key: '098f6b...', sandbox: true) + +response.success? +# => true + +response.auth_token +# => "c8d4b7..." + +response.expires_in +# => 43199 +``` + Create client: ```ruby -client = PayuAPI::Client.new( - pos_id: '300046', - auth_token: 'c8d4b7ac61758704f38ed5564d8c0ae0', - sandbox: true -) +client = PayuAPI::Client.new(pos_id: '300046', auth_token: 'c8d4b7...', sandbox: true) ``` Creating a new order: ```ruby