Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
Shorten a line for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
James Christie committed Dec 26, 2012
1 parent 2bd0714 commit 55d8d81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/netsuite-rest-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ def get_record(record_type, internal_id_list, options={})
payload = { 'operation' => 'LOAD',
'record_type' => record_type }

results = []
internal_id_list.each_slice(options[:get_record_batch_size] || @get_record_batch_size) do |id_chunk|
results = []
batch_size = options[:get_record_batch_size] || @get_record_batch_size

internal_id_list.each_slice(batch_size) do |id_chunk|
payload['internal_id_list'] = id_chunk
results += parse_json_result_from_rest(:post, params, :payload=>payload)
puts "Fetched #{results.count} records so far..." if options[:verbose]
Expand Down

0 comments on commit 55d8d81

Please sign in to comment.