Add account balance REPP

This commit is contained in:
Martin Lensment 2015-04-16 11:46:18 +03:00
parent 35513b83bf
commit 4a6c1f4166
17 changed files with 111 additions and 27 deletions

View file

@ -0,0 +1,16 @@
module Repp
class AccountV1 < Grape::API
version 'v1', using: :path
resource :accounts do
desc 'Return current cash account balance'
get 'balance' do
@response = {
balance: current_user.registrar.cash_account.balance,
currency: current_user.registrar.cash_account.currency
}
end
end
end
end