Skip to content

Commit

Permalink
Mpayer_ruby v 0.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kgathi2 committed Oct 23, 2015
1 parent d18af93 commit cff8a0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ client = Mpayer::Client.find(id, fetch:false) #Instantiates only
client_attributes = {client: { client_name: "Kiki Lolo", client_birthday: Time.zone.now.iso8601, client_type: "ext", ac_type: "cu",client_mobile: '0733222222', client_email: 'lolo@kiki.com',currency: "kes", mandate:"s", sub_type: "od" }}
client = Mpayer::Client.create(client_attributes)

client = Mpayer::Client.find(id:20284,fetch:false).account(account_id) # Get clients account with id
client = Mpayer::Client.find(id:20284,fetch:false)
client = Mpayer::Client.find(20284,fetch:false).account(account_id) # Get clients account with id
client = Mpayer::Client.find(20284,fetch:false)
account = client.account(account_id) # Get clients account with id

client_accounts = Mpayer::Client.find(id:20284,fetch:false).accounts(page:1,per_page:100)
client_payables = Mpayer::Client.find(id:20284,fetch:false).payables(page:1,per_page:100)
client_transactions = Mpayer::Client.find(id:20284,fetch:false).transactions(account_id, page:1,per_page:100)
client_accounts = Mpayer::Client.find(20284,fetch:false).accounts(page:1,per_page:100)
client_payables = Mpayer::Client.find(20284,fetch:false).payables(page:1,per_page:100)
client_transactions = Mpayer::Client.find(20284,fetch:false).transactions(account_id, page:1,per_page:100)

```

Expand Down
2 changes: 1 addition & 1 deletion lib/mpayer_ruby/fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Mpayer
class Fetch
include HTTParty

base_uri "https://app.mpayer.co.ke/api/"
base_uri Mpayer.configuration.base_url
parser proc {|data| Hashie::Mash.new(response: (JSON.parse(data) rescue {data:data}.to_json) ).response}
format :json
headers
Expand Down
2 changes: 1 addition & 1 deletion lib/mpayer_ruby/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Mpayer
VERSION = "0.0.15"
VERSION = "0.0.16"
end

0 comments on commit cff8a0a

Please sign in to comment.