Class: Mpayer::Client

Inherits:
Base
  • Object
show all
Defined in:
lib/mpayer/client.rb

Instance Attribute Summary

Attributes inherited from Base

#base_url, #mpayer_token, #user_no

Instance Method Summary collapse

Methods inherited from Base

#auth, #delete, #get, #initialize, #parse_api_response, #post, #put

Constructor Details

This class inherits a constructor from Mpayer::Base

Instance Method Details

#allObject

GET /clients/all_clients.json



5
6
7
# File 'lib/mpayer/client.rb', line 5

def all
	get('/clients/all_clients.json')
end

#create_client_account(id, json_body) ⇒ Object

POST /clients/:client_id/accounts/new.json



41
42
43
# File 'lib/mpayer/client.rb', line 41

def (id, json_body)
	post("/clients/#{id}/accounts/new.json", body: json_body)
end

#create_on_mpayer(json_body) ⇒ Object

POST /clients.json



11
12
13
# File 'lib/mpayer/client.rb', line 11

def create_on_mpayer(json_body)
	post("/clients.json", body: json_body)
end

#fetch_account(id) ⇒ Object

/clients/:client_id/accounts.json“ GET



29
30
31
# File 'lib/mpayer/client.rb', line 29

def (id)
	get("/clients/#{id}/accounts.json")
end

#fetch_accounts(id) ⇒ Object

/clients/:id/accounts.json“ GET



23
24
25
# File 'lib/mpayer/client.rb', line 23

def fetch_accounts(id)
	get("/clients/#{id}/accounts.json")
end

#fetch_client(id) ⇒ Object

GET /clients/:id #id: 21556



17
18
19
# File 'lib/mpayer/client.rb', line 17

def fetch_client(id)
	get("/clients/#{id}.json")
end

#fetch_transactions(client_id, ac_id) ⇒ Object

GET /clients/:client_id/accounts/:ac_id/transactions“



35
36
37
# File 'lib/mpayer/client.rb', line 35

def fetch_transactions(client_id, ac_id)
	get("/clients/#{client_id}/accounts/#{ac_id}/transactions.json")
end