Class: Tazapay::Bank
Overview
Instance Method Summary
collapse
Methods inherited from Client
#handle_error, #interpret_response, #send_request
Instance Method Details
#add(account_id:, bank_data:) ⇒ Object
9
10
11
12
13
|
# File 'lib/tazapay/bank.rb', line 9
def add(account_id:, bank_data:)
path = "v1/bank"
data = bank_data.merge(account_id: account_id)
send_request(method: :post, path: path, body: data)
end
|
#list(account_id) ⇒ Object
15
16
17
18
|
# File 'lib/tazapay/bank.rb', line 15
def list(account_id)
path = "v1/bank/#{account_id}"
send_request(method: :get, path: path)
end
|
#make_primary(account_id:, bank_id:) ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/tazapay/bank.rb', line 20
def make_primary(account_id:, bank_id:)
path = "v1/bank/primary"
send_request(method: :put, path: path, body: {
account_id: account_id,
bank_id: bank_id
})
end
|