Skip to content

Commit

Permalink
BOAPI-418 fix(app): change url for request balances
Browse files Browse the repository at this point in the history
zhabinka committed Nov 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 537a1d7 commit e8eecaf
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/boapi/client.rb
Original file line number Diff line number Diff line change
@@ -37,11 +37,11 @@ def transactions_deep_search(params)
end

def merchant_balances_for_psp(merchant_id, params)
send_request(:get, "/api/v2/psp/balances/merchants/#{merchant_id}", params)
send_request(:get, "/api/v2/psp/merchants/#{merchant_id}/balances", params)
end

def merchant_balances(merchant_id, params)
send_request(:get, "/api/v2/balances/merchants/#{merchant_id}", params)
send_request(:get, "/api/v2/merchants/#{merchant_id}/balances", params)
end

def create_balance_record(params)
4 changes: 2 additions & 2 deletions spec/boapi/client_spec.rb
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@
let(:http_status) { 200 }

let(:merchant_id) { '47' }
let(:url) { "#{Boapi.configuration.api_host}/api/v2/psp/balances/merchants/#{merchant_id}" }
let(:url) { "#{Boapi.configuration.api_host}/api/v2/psp/merchants/#{merchant_id}/balances" }

context 'when valid params given' do
let(:params) { { currency: 'BYN', as_of_date: '2024-09-13T00:00:00.145823Z' } }
@@ -231,7 +231,7 @@
let(:http_status) { 200 }

let(:merchant_id) { '47' }
let(:url) { "#{Boapi.configuration.api_host}/api/v2/balances/merchants/#{merchant_id}" }
let(:url) { "#{Boapi.configuration.api_host}/api/v2/merchants/#{merchant_id}/balances" }

context 'when valid params given' do
let(:params) { { currency: 'BYN', as_of_date: '2024-09-13T00:00:00.145823Z' } }

0 comments on commit e8eecaf

Please sign in to comment.