lib/revo/loans_api/client.rb in revo-loans_api-0.0.16 vs lib/revo/loans_api/client.rb in revo-loans_api-0.0.17

- old
+ new

@@ -93,9 +93,18 @@ } make_request(:post, "loan_requests/#{token}/loan/finalization", loan: loan_params) end + def confirm_loan(token:, bill:) + params = { loan: { bill: bill } } + response = make_request(:put, "loan_requests/#{token}/loan/bill", params) + + return response unless response.success? + + Result.new(success?: true, response: response.response) + end + # returns def orders(store_id:, filters: {}) make_request(:get, 'orders', store_id: store_id, filters: filters) end