Class: LemonWay::Wallet

Inherits:
Object
  • Object
show all
Defined in:
lib/lemon_way/wallet.rb

Class Method Summary collapse

Class Method Details

.get(params = {}) ⇒ Object



9
10
11
12
# File 'lib/lemon_way/wallet.rb', line 9

def get(params = {})
  params[:wallet] = params.delete(:id)
  LemonWay.client.send_request('GetWalletDetails', '2.0', params)
end

.register(params = {}) ⇒ Object



14
15
16
17
# File 'lib/lemon_way/wallet.rb', line 14

def register(params = {})
  params[:wallet] = params.delete(:id) || LemonWay::Generators::Id.generate
  LemonWay.client.send_request('RegisterWallet', '1.1', params)
end

.transactions_history(params = {}) ⇒ Object



34
35
36
37
# File 'lib/lemon_way/wallet.rb', line 34

def transactions_history(params = {})
  params[:wallet] = params.delete(:id)
  LemonWay.client.send_request('GetWalletTransHistory', '2.1', params)
end

.update(params = {}) ⇒ Object



19
20
21
22
# File 'lib/lemon_way/wallet.rb', line 19

def update(params = {})
  params[:wallet] = params.delete(:id)
  LemonWay.client.send_request('UpdateWalletDetails', '1.0', params)
end

.update_status(params = {}) ⇒ Object



24
25
26
27
# File 'lib/lemon_way/wallet.rb', line 24

def update_status(params = {})
  params[:wallet] = params.delete(:id)
  LemonWay.client.send_request('UpdateWalletStatus', '1.0', params)
end

.upload_file(params = {}) ⇒ Object



29
30
31
32
# File 'lib/lemon_way/wallet.rb', line 29

def upload_file(params = {})
  params[:wallet] = params.delete(:id)
  LemonWay.client.send_request('UploadFile', '1.1', params)
end