Class: DotloopApi::EndPoints::Batch
- Defined in:
- lib/dotloop_api/end_points/batch.rb
Constant Summary collapse
- MAX_LOOPS =
500
Instance Method Summary collapse
Methods inherited from Base
#create, #delete, #find, #save, #single_path
Methods included from ModelBuilder
#build_details, #build_documents, #build_model
Instance Method Details
#all(options = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/dotloop_api/end_points/batch.rb', line 5 def all( = {}) () return batch() if [:batch_number] loop_over_all_batches end |
#batch(options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/dotloop_api/end_points/batch.rb', line 11 def batch( = {}) () @client.get(path, @param_helper.params)[:data].map { |attrs| build_model(attrs) } end |