Module: Rentvine::Client::Applications

Included in:
Rentvine::Client
Defined in:
lib/rentvine/client/applications.rb

Instance Method Summary collapse

Instance Method Details

#export_applications(args = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rentvine/client/applications.rb', line 4

def export_applications(args = {})
  results = process_request(:get, 'screening/applications/export', params: args)
  return results if results.is_a?(RentvineError)

  results.map do |result|
    rvobj = Rentvine::Portfolio.new(result[:application])
    rvobj.unit = Rentvine::Unit.new(result[:unit])
    rvobj.lease = Rentvine::Lease.new(result[:lease])
    rvobj.meta = { appends: [:unit, :lease] }
    rvobj
  end
end