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

Commit

Permalink
Add ability to adjust get batch size aside from instance var
Browse files Browse the repository at this point in the history
  • Loading branch information
James Christie committed Dec 26, 2012
1 parent eaf19e8 commit 2bd0714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netsuite-rest-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_record(record_type, internal_id_list, options={})
'record_type' => record_type }

results = []
internal_id_list.each_slice(@get_record_batch_size) do |id_chunk|
internal_id_list.each_slice(options[:get_record_batch_size] || @get_record_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 2bd0714

Please sign in to comment.