Method: ONEAccess::Request::InvestorsRequestHandler#each
- Defined in:
- lib/oneaccess/request/investors_request_handler.rb
#each ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/oneaccess/request/investors_request_handler.rb', line 13 def each offset = 0 loop do http_response = Http::HttpClient.get(url, build_params(offset)) response = Response::InvestorsResponse.from_json(http_response.body) response&.data&.each do |investor| yield investor end break unless more_records?(response.) offset += 1 end end |