Class: Buildium::LeasesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/buildium-ruby/api/leases_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ LeasesApi

Returns a new instance of LeasesApi.



19
20
21
# File 'lib/buildium-ruby/api/leases_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/buildium-ruby/api/leases_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_lease(create_lease_request, opts = {}) ⇒ LeaseMessage

Create a lease Creates a signed lease. <br /><br /><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View` `Edit` <br /><span class="permissionBlock">Rentals > Lease transactions</span> - `View` `Edit` <br /><h4>Optional Permissions:</h4><br /><span class="permissionBlock">Rentals > Applicants</span> - `View` In order to add tenants to the lease using the ApplicantIds property, you must have this permission.

Parameters:

  • create_lease_request (CreateLeaseRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/buildium-ruby/api/leases_api.rb', line 27

def create_lease(create_lease_request, opts = {})
  data, _status_code, _headers = create_lease_with_http_info(create_lease_request, opts)
  data
end

#create_lease_note(lease_id, create_lease_note_request, opts = {}) ⇒ NoteMessage

Create a note Creates a lease note. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • create_lease_note_request (CreateLeaseNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



96
97
98
99
# File 'lib/buildium-ruby/api/leases_api.rb', line 96

def create_lease_note(lease_id, create_lease_note_request, opts = {})
  data, _status_code, _headers = create_lease_note_with_http_info(lease_id, create_lease_note_request, opts)
  data
end

#create_lease_note_with_http_info(lease_id, create_lease_note_request, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Create a note Creates a lease note. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • create_lease_note_request (CreateLeaseNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(NoteMessage, Integer, Hash)>)

    NoteMessage data, response status code and response headers



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/buildium-ruby/api/leases_api.rb', line 107

def create_lease_note_with_http_info(lease_id, create_lease_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_note ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.create_lease_note"
  end
  # verify the required parameter 'create_lease_note_request' is set
  if @api_client.config.client_side_validation && create_lease_note_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_note_request' when calling LeasesApi.create_lease_note"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/notes'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_lease_note_request)

  # return_type
  return_type = opts[:debug_return_type] || 'NoteMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.create_lease_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#create_lease_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_lease_renewal(lease_id, create_lease_renewal_request, opts = {}) ⇒ LeaseRenewalMessage

Create a lease renewal Creates a lease renewal. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • create_lease_renewal_request (CreateLeaseRenewalRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



170
171
172
173
# File 'lib/buildium-ruby/api/leases_api.rb', line 170

def create_lease_renewal(lease_id, create_lease_renewal_request, opts = {})
  data, _status_code, _headers = create_lease_renewal_with_http_info(lease_id, create_lease_renewal_request, opts)
  data
end

#create_lease_renewal_with_http_info(lease_id, create_lease_renewal_request, opts = {}) ⇒ Array<(LeaseRenewalMessage, Integer, Hash)>

Create a lease renewal Creates a lease renewal. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • create_lease_renewal_request (CreateLeaseRenewalRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseRenewalMessage, Integer, Hash)>)

    LeaseRenewalMessage data, response status code and response headers



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/buildium-ruby/api/leases_api.rb', line 181

def create_lease_renewal_with_http_info(lease_id, create_lease_renewal_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease_renewal ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.create_lease_renewal"
  end
  # verify the required parameter 'create_lease_renewal_request' is set
  if @api_client.config.client_side_validation && create_lease_renewal_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_renewal_request' when calling LeasesApi.create_lease_renewal"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/renewals'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_lease_renewal_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseRenewalMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.create_lease_renewal",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#create_lease_renewal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_lease_with_http_info(create_lease_request, opts = {}) ⇒ Array<(LeaseMessage, Integer, Hash)>

Create a lease Creates a signed lease. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Tenants&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;h4&gt;Optional Permissions:&lt;/h4&gt;&lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Applicants&lt;/span&gt; - &#x60;View&#x60; In order to add tenants to the lease using the ApplicantIds property, you must have this permission.

Parameters:

  • create_lease_request (CreateLeaseRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseMessage, Integer, Hash)>)

    LeaseMessage data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/buildium-ruby/api/leases_api.rb', line 37

def create_lease_with_http_info(create_lease_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.create_lease ...'
  end
  # verify the required parameter 'create_lease_request' is set
  if @api_client.config.client_side_validation && create_lease_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_lease_request' when calling LeasesApi.create_lease"
  end
  # resource path
  local_var_path = '/v1/leases'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_lease_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.create_lease",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#create_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_move_out_data(lease_id, create_move_out_data_request, opts = {}) ⇒ LeaseMoveOutDataMessage

Create a move out Creates move out data for a single tenant on a given lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View` `Edit`

Parameters:

  • lease_id (Integer)
  • create_move_out_data_request (CreateMoveOutDataRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



244
245
246
247
# File 'lib/buildium-ruby/api/leases_api.rb', line 244

def create_move_out_data(lease_id, create_move_out_data_request, opts = {})
  data, _status_code, _headers = create_move_out_data_with_http_info(lease_id, create_move_out_data_request, opts)
  data
end

#create_move_out_data_with_http_info(lease_id, create_move_out_data_request, opts = {}) ⇒ Array<(LeaseMoveOutDataMessage, Integer, Hash)>

Create a move out Creates move out data for a single tenant on a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Tenants&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • create_move_out_data_request (CreateMoveOutDataRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseMoveOutDataMessage, Integer, Hash)>)

    LeaseMoveOutDataMessage data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/buildium-ruby/api/leases_api.rb', line 255

def create_move_out_data_with_http_info(lease_id, create_move_out_data_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.create_move_out_data ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.create_move_out_data"
  end
  # verify the required parameter 'create_move_out_data_request' is set
  if @api_client.config.client_side_validation && create_move_out_data_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_move_out_data_request' when calling LeasesApi.create_move_out_data"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/moveouts'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_move_out_data_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseMoveOutDataMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.create_move_out_data",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#create_move_out_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rent_schedule(lease_id, create_rent_schedule_request, opts = {}) ⇒ LeaseRentMessage

Create a rent schedule Creates a rent schedule. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Transactions</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • create_rent_schedule_request (CreateRentScheduleRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



318
319
320
321
# File 'lib/buildium-ruby/api/leases_api.rb', line 318

def create_rent_schedule(lease_id, create_rent_schedule_request, opts = {})
  data, _status_code, _headers = create_rent_schedule_with_http_info(lease_id, create_rent_schedule_request, opts)
  data
end

#create_rent_schedule_with_http_info(lease_id, create_rent_schedule_request, opts = {}) ⇒ Array<(LeaseRentMessage, Integer, Hash)>

Create a rent schedule Creates a rent schedule. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • create_rent_schedule_request (CreateRentScheduleRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseRentMessage, Integer, Hash)>)

    LeaseRentMessage data, response status code and response headers



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/buildium-ruby/api/leases_api.rb', line 329

def create_rent_schedule_with_http_info(lease_id, create_rent_schedule_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.create_rent_schedule ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.create_rent_schedule"
  end
  # verify the required parameter 'create_rent_schedule_request' is set
  if @api_client.config.client_side_validation && create_rent_schedule_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_rent_schedule_request' when calling LeasesApi.create_rent_schedule"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rent'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_rent_schedule_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseRentMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.create_rent_schedule",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#create_rent_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_lease_renewals(lease_id, opts = {}) ⇒ Array<LeaseRenewalMessage>

Retrieve all renewals Retrieves all renewals for a specific a lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



394
395
396
397
# File 'lib/buildium-ruby/api/leases_api.rb', line 394

def get_all_lease_renewals(lease_id, opts = {})
  data, _status_code, _headers = get_all_lease_renewals_with_http_info(lease_id, opts)
  data
end

#get_all_lease_renewals_for_all_properties(esignaturestatuses, opts = {}) ⇒ Array<LeaseRenewalMessage>

Retrieve all upcoming renewals Retrieves all upcoming lease renewals across all rental properties. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • esignaturestatuses (Array<String>)

    Filters result to any lease renewal with an esignature status that matches the given statuses.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to only include leases whose unit belongs to the specified set of property ids.

  • :rentalownerids (Array<Integer>)

    Filters results to any lease whose unit belongs to a property with rental owner in the specified set of rental owner ids.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



468
469
470
471
# File 'lib/buildium-ruby/api/leases_api.rb', line 468

def get_all_lease_renewals_for_all_properties(esignaturestatuses, opts = {})
  data, _status_code, _headers = get_all_lease_renewals_for_all_properties_with_http_info(esignaturestatuses, opts)
  data
end

#get_all_lease_renewals_for_all_properties_with_http_info(esignaturestatuses, opts = {}) ⇒ Array<(Array<LeaseRenewalMessage>, Integer, Hash)>

Retrieve all upcoming renewals Retrieves all upcoming lease renewals across all rental properties. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • esignaturestatuses (Array<String>)

    Filters result to any lease renewal with an esignature status that matches the given statuses.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to only include leases whose unit belongs to the specified set of property ids.

  • :rentalownerids (Array<Integer>)

    Filters results to any lease whose unit belongs to a property with rental owner in the specified set of rental owner ids.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<LeaseRenewalMessage>, Integer, Hash)>)

    Array<LeaseRenewalMessage> data, response status code and response headers



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/buildium-ruby/api/leases_api.rb', line 483

def get_all_lease_renewals_for_all_properties_with_http_info(esignaturestatuses, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_all_lease_renewals_for_all_properties ...'
  end
  # verify the required parameter 'esignaturestatuses' is set
  if @api_client.config.client_side_validation && esignaturestatuses.nil?
    fail ArgumentError, "Missing the required parameter 'esignaturestatuses' when calling LeasesApi.get_all_lease_renewals_for_all_properties"
  end
  # resource path
  local_var_path = '/v1/leases/renewals'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'esignaturestatuses'] = @api_client.build_collection_param(esignaturestatuses, :multi)
  query_params[:'propertyids'] = @api_client.build_collection_param(opts[:'propertyids'], :multi) if !opts[:'propertyids'].nil?
  query_params[:'rentalownerids'] = @api_client.build_collection_param(opts[:'rentalownerids'], :multi) if !opts[:'rentalownerids'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LeaseRenewalMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_all_lease_renewals_for_all_properties",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_all_lease_renewals_for_all_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_lease_renewals_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<LeaseRenewalMessage>, Integer, Hash)>

Retrieve all renewals Retrieves all renewals for a specific a lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<LeaseRenewalMessage>, Integer, Hash)>)

    Array<LeaseRenewalMessage> data, response status code and response headers



407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/buildium-ruby/api/leases_api.rb', line 407

def get_all_lease_renewals_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_all_lease_renewals ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_all_lease_renewals"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/renewals'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LeaseRenewalMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_all_lease_renewals",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_all_lease_renewals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_by_id(lease_id, opts = {}) ⇒ LeaseMessage

Retrieve a lease Retrieves a specific lease. <br /><br /><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)

    The lease identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



542
543
544
545
# File 'lib/buildium-ruby/api/leases_api.rb', line 542

def get_lease_by_id(lease_id, opts = {})
  data, _status_code, _headers = get_lease_by_id_with_http_info(lease_id, opts)
  data
end

#get_lease_by_id_with_http_info(lease_id, opts = {}) ⇒ Array<(LeaseMessage, Integer, Hash)>

Retrieve a lease Retrieves a specific lease. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)

    The lease identifier.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseMessage, Integer, Hash)>)

    LeaseMessage data, response status code and response headers



552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/buildium-ruby/api/leases_api.rb', line 552

def get_lease_by_id_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_epay_settings_by_id(lease_id, opts = {}) ⇒ EPaySettingsMessage

Retrieve ePay settings Retrieves ePay settings for a lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



605
606
607
608
# File 'lib/buildium-ruby/api/leases_api.rb', line 605

def get_lease_epay_settings_by_id(lease_id, opts = {})
  data, _status_code, _headers = get_lease_epay_settings_by_id_with_http_info(lease_id, opts)
  data
end

#get_lease_epay_settings_by_id_with_http_info(lease_id, opts = {}) ⇒ Array<(EPaySettingsMessage, Integer, Hash)>

Retrieve ePay settings Retrieves ePay settings for a lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EPaySettingsMessage, Integer, Hash)>)

    EPaySettingsMessage data, response status code and response headers



615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/buildium-ruby/api/leases_api.rb', line 615

def get_lease_epay_settings_by_id_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_epay_settings_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_epay_settings_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/epaysettings'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'EPaySettingsMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_epay_settings_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_epay_settings_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_move_out_data_by_tenant_id(lease_id, tenant_id, opts = {}) ⇒ LeaseMoveOutDataMessage

Retrieve a move out Retrieves move out data for a single tenant on a given lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View`

Parameters:

  • lease_id (Integer)
  • tenant_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



669
670
671
672
# File 'lib/buildium-ruby/api/leases_api.rb', line 669

def get_lease_move_out_data_by_tenant_id(lease_id, tenant_id, opts = {})
  data, _status_code, _headers = get_lease_move_out_data_by_tenant_id_with_http_info(lease_id, tenant_id, opts)
  data
end

#get_lease_move_out_data_by_tenant_id_with_http_info(lease_id, tenant_id, opts = {}) ⇒ Array<(LeaseMoveOutDataMessage, Integer, Hash)>

Retrieve a move out Retrieves move out data for a single tenant on a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Tenants&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • tenant_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseMoveOutDataMessage, Integer, Hash)>)

    LeaseMoveOutDataMessage data, response status code and response headers



680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/buildium-ruby/api/leases_api.rb', line 680

def get_lease_move_out_data_by_tenant_id_with_http_info(lease_id, tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_move_out_data_by_tenant_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_move_out_data_by_tenant_id"
  end
  # verify the required parameter 'tenant_id' is set
  if @api_client.config.client_side_validation && tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'tenant_id' when calling LeasesApi.get_lease_move_out_data_by_tenant_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/moveouts/{tenantId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseMoveOutDataMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_move_out_data_by_tenant_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_move_out_data_by_tenant_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_move_out_information_by_id(lease_id, opts = {}) ⇒ Array<LeaseMoveOutDataMessage>

Retrieve all move outs Retrieves a list of move out dates for a given lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



740
741
742
743
# File 'lib/buildium-ruby/api/leases_api.rb', line 740

def get_lease_move_out_information_by_id(lease_id, opts = {})
  data, _status_code, _headers = get_lease_move_out_information_by_id_with_http_info(lease_id, opts)
  data
end

#get_lease_move_out_information_by_id_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<LeaseMoveOutDataMessage>, Integer, Hash)>

Retrieve all move outs Retrieves a list of move out dates for a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Tenants&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<LeaseMoveOutDataMessage>, Integer, Hash)>)

    Array<LeaseMoveOutDataMessage> data, response status code and response headers



753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'lib/buildium-ruby/api/leases_api.rb', line 753

def get_lease_move_out_information_by_id_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_move_out_information_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_move_out_information_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/moveouts'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LeaseMoveOutDataMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_move_out_information_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_move_out_information_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_note_by_note_id(lease_id, note_id, opts = {}) ⇒ NoteMessage

Retrieve a note Retrieves a lease note. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • note_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



810
811
812
813
# File 'lib/buildium-ruby/api/leases_api.rb', line 810

def get_lease_note_by_note_id(lease_id, note_id, opts = {})
  data, _status_code, _headers = get_lease_note_by_note_id_with_http_info(lease_id, note_id, opts)
  data
end

#get_lease_note_by_note_id_with_http_info(lease_id, note_id, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Retrieve a note Retrieves a lease note. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • note_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(NoteMessage, Integer, Hash)>)

    NoteMessage data, response status code and response headers



821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/buildium-ruby/api/leases_api.rb', line 821

def get_lease_note_by_note_id_with_http_info(lease_id, note_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_note_by_note_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_note_by_note_id"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling LeasesApi.get_lease_note_by_note_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/notes/{noteId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'NoteMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_note_by_note_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_note_by_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_notes(lease_id, opts = {}) ⇒ Array<NoteMessage>

Retrieve all notes Retrieves all lease notes. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :updateddatetimefrom (Time)

    Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :updateddatetimeto (Time)

    Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedbyuserid (Integer)

    Filters results to only notes that were last updated by the specified user identifier.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



884
885
886
887
# File 'lib/buildium-ruby/api/leases_api.rb', line 884

def get_lease_notes(lease_id, opts = {})
  data, _status_code, _headers = get_lease_notes_with_http_info(lease_id, opts)
  data
end

#get_lease_notes_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<NoteMessage>, Integer, Hash)>

Retrieve all notes Retrieves all lease notes. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :updateddatetimefrom (Time)

    Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :updateddatetimeto (Time)

    Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedbyuserid (Integer)

    Filters results to only notes that were last updated by the specified user identifier.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<NoteMessage>, Integer, Hash)>)

    Array<NoteMessage> data, response status code and response headers



900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'lib/buildium-ruby/api/leases_api.rb', line 900

def get_lease_notes_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_notes ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_notes"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/notes'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'updateddatetimefrom'] = opts[:'updateddatetimefrom'] if !opts[:'updateddatetimefrom'].nil?
  query_params[:'updateddatetimeto'] = opts[:'updateddatetimeto'] if !opts[:'updateddatetimeto'].nil?
  query_params[:'lastupdatedbyuserid'] = opts[:'lastupdatedbyuserid'] if !opts[:'lastupdatedbyuserid'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<NoteMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_notes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_partial_payment_settings(lease_id, opts = {}) ⇒ PartialPaymentSettingsMessage

Retrieve all partial payment settings for a lease Retrieves partial payment settings for a lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



959
960
961
962
# File 'lib/buildium-ruby/api/leases_api.rb', line 959

def get_lease_partial_payment_settings(lease_id, opts = {})
  data, _status_code, _headers = get_lease_partial_payment_settings_with_http_info(lease_id, opts)
  data
end

#get_lease_partial_payment_settings_with_http_info(lease_id, opts = {}) ⇒ Array<(PartialPaymentSettingsMessage, Integer, Hash)>

Retrieve all partial payment settings for a lease Retrieves partial payment settings for a lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/buildium-ruby/api/leases_api.rb', line 969

def get_lease_partial_payment_settings_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_partial_payment_settings ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_partial_payment_settings"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/partialpaymentsettings'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PartialPaymentSettingsMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_partial_payment_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_partial_payment_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lease_renewal_by_id(lease_id, renewal_id, opts = {}) ⇒ LeaseRenewalMessage

Retrieve a renewal Retrieves a specific renewal for a given lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • renewal_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1023
1024
1025
1026
# File 'lib/buildium-ruby/api/leases_api.rb', line 1023

def get_lease_renewal_by_id(lease_id, renewal_id, opts = {})
  data, _status_code, _headers = get_lease_renewal_by_id_with_http_info(lease_id, renewal_id, opts)
  data
end

#get_lease_renewal_by_id_with_http_info(lease_id, renewal_id, opts = {}) ⇒ Array<(LeaseRenewalMessage, Integer, Hash)>

Retrieve a renewal Retrieves a specific renewal for a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • renewal_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseRenewalMessage, Integer, Hash)>)

    LeaseRenewalMessage data, response status code and response headers



1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
# File 'lib/buildium-ruby/api/leases_api.rb', line 1034

def get_lease_renewal_by_id_with_http_info(lease_id, renewal_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_lease_renewal_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_lease_renewal_by_id"
  end
  # verify the required parameter 'renewal_id' is set
  if @api_client.config.client_side_validation && renewal_id.nil?
    fail ArgumentError, "Missing the required parameter 'renewal_id' when calling LeasesApi.get_lease_renewal_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/renewals/{renewalId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'renewalId' + '}', CGI.escape(renewal_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseRenewalMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_lease_renewal_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_lease_renewal_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_leases(opts = {}) ⇒ Array<LeaseMessage>

Retrieve all leases Retrieves a list of leases. <br /><br /><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to any lease whose unit belongs to the specified set of property ids.

  • :rentalownerids (Array<Integer>)

    Filters results to any lease whose unit belongs to a property with a rental owner in the specified set of rental owner ids.

  • :unitnumber (String)

    Filters results to any lease whose unit number contains the specified value.

  • :tenantname (String)

    Filters results to any lease whose current tenants&#39; names contain the specified value.

  • :leasedatefrom (Date)

    Filters results to any lease whose start date is greater than or equal to the specified value.

  • :leasedateto (Date)

    Filters results to any lease whose end date is less than or equal to the specified value.

  • :leasetypes (Array<String>)

    Filters results to any lease whose lease type matches the specified status. If no type is specified, leases with any type will be returned.

  • :leasestatuses (Array<String>)

    Filters results to any lease whose lease term matches the specified status. If no status is specified, leases with any lease term status will be returned.

  • :createddatetimefrom (Time)

    Filters results to any lease whose created date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :createddatetimeto (Time)

    Filters results to any lease whose created date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedfrom (Time)

    Filters results to any leases that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :lastupdatedto (Time)

    Filters results to any leases that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1105
1106
1107
1108
# File 'lib/buildium-ruby/api/leases_api.rb', line 1105

def get_leases(opts = {})
  data, _status_code, _headers = get_leases_with_http_info(opts)
  data
end

#get_leases_with_http_info(opts = {}) ⇒ Array<(Array<LeaseMessage>, Integer, Hash)>

Retrieve all leases Retrieves a list of leases. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to any lease whose unit belongs to the specified set of property ids.

  • :rentalownerids (Array<Integer>)

    Filters results to any lease whose unit belongs to a property with a rental owner in the specified set of rental owner ids.

  • :unitnumber (String)

    Filters results to any lease whose unit number contains the specified value.

  • :tenantname (String)

    Filters results to any lease whose current tenants&#39; names contain the specified value.

  • :leasedatefrom (Date)

    Filters results to any lease whose start date is greater than or equal to the specified value.

  • :leasedateto (Date)

    Filters results to any lease whose end date is less than or equal to the specified value.

  • :leasetypes (Array<String>)

    Filters results to any lease whose lease type matches the specified status. If no type is specified, leases with any type will be returned.

  • :leasestatuses (Array<String>)

    Filters results to any lease whose lease term matches the specified status. If no status is specified, leases with any lease term status will be returned.

  • :createddatetimefrom (Time)

    Filters results to any lease whose created date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :createddatetimeto (Time)

    Filters results to any lease whose created date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS.

  • :lastupdatedfrom (Time)

    Filters results to any leases that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :lastupdatedto (Time)

    Filters results to any leases that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ.

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<LeaseMessage>, Integer, Hash)>)

    Array<LeaseMessage> data, response status code and response headers



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
# File 'lib/buildium-ruby/api/leases_api.rb', line 1129

def get_leases_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_leases ...'
  end
  allowable_values = ["None", "Fixed", "FixedWithRollover", "AtWill"]
  if @api_client.config.client_side_validation && opts[:'leasetypes'] && !opts[:'leasetypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"leasetypes\", must include one of #{allowable_values}"
  end
  allowable_values = ["Active", "Past", "Future"]
  if @api_client.config.client_side_validation && opts[:'leasestatuses'] && !opts[:'leasestatuses'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"leasestatuses\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/leases'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'propertyids'] = @api_client.build_collection_param(opts[:'propertyids'], :multi) if !opts[:'propertyids'].nil?
  query_params[:'rentalownerids'] = @api_client.build_collection_param(opts[:'rentalownerids'], :multi) if !opts[:'rentalownerids'].nil?
  query_params[:'unitnumber'] = opts[:'unitnumber'] if !opts[:'unitnumber'].nil?
  query_params[:'tenantname'] = opts[:'tenantname'] if !opts[:'tenantname'].nil?
  query_params[:'leasedatefrom'] = opts[:'leasedatefrom'] if !opts[:'leasedatefrom'].nil?
  query_params[:'leasedateto'] = opts[:'leasedateto'] if !opts[:'leasedateto'].nil?
  query_params[:'leasetypes'] = @api_client.build_collection_param(opts[:'leasetypes'], :multi) if !opts[:'leasetypes'].nil?
  query_params[:'leasestatuses'] = @api_client.build_collection_param(opts[:'leasestatuses'], :multi) if !opts[:'leasestatuses'].nil?
  query_params[:'createddatetimefrom'] = opts[:'createddatetimefrom'] if !opts[:'createddatetimefrom'].nil?
  query_params[:'createddatetimeto'] = opts[:'createddatetimeto'] if !opts[:'createddatetimeto'].nil?
  query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil?
  query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil?
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LeaseMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_leases",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_leases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rent(lease_id, opts = {}) ⇒ Array<LeaseRentMessage>

Retrieve all rent schedules The rent schedule provides details (dollar amount, day of the month, etc) of the recurring charges that are applied to the lease ledger each rent cycle. A lease may have more than one rent schedule associated with it if the rent terms change within the duration of the lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1204
1205
1206
1207
# File 'lib/buildium-ruby/api/leases_api.rb', line 1204

def get_rent(lease_id, opts = {})
  data, _status_code, _headers = get_rent_with_http_info(lease_id, opts)
  data
end

#get_rent_by_id(lease_id, rent_id, opts = {}) ⇒ LeaseRentMessage

Retrieve a rent schedule Retrieves a specific rent schedule for a lease. The rent schedule provides details (dollar amount, day of the month, etc) of the recurring charges that are applied to the lease ledger each rent cycle. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease transactions</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • rent_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1274
1275
1276
1277
# File 'lib/buildium-ruby/api/leases_api.rb', line 1274

def get_rent_by_id(lease_id, rent_id, opts = {})
  data, _status_code, _headers = get_rent_by_id_with_http_info(lease_id, rent_id, opts)
  data
end

#get_rent_by_id_with_http_info(lease_id, rent_id, opts = {}) ⇒ Array<(LeaseRentMessage, Integer, Hash)>

Retrieve a rent schedule Retrieves a specific rent schedule for a lease. The rent schedule provides details (dollar amount, day of the month, etc) of the recurring charges that are applied to the lease ledger each rent cycle. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • rent_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseRentMessage, Integer, Hash)>)

    LeaseRentMessage data, response status code and response headers



1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
# File 'lib/buildium-ruby/api/leases_api.rb', line 1285

def get_rent_by_id_with_http_info(lease_id, rent_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_rent_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_rent_by_id"
  end
  # verify the required parameter 'rent_id' is set
  if @api_client.config.client_side_validation && rent_id.nil?
    fail ArgumentError, "Missing the required parameter 'rent_id' when calling LeasesApi.get_rent_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rent/{rentId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'rentId' + '}', CGI.escape(rent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseRentMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_rent_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_rent_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rent_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<LeaseRentMessage>, Integer, Hash)>

Retrieve all rent schedules The rent schedule provides details (dollar amount, day of the month, etc) of the recurring charges that are applied to the lease ledger each rent cycle. A lease may have more than one rent schedule associated with it if the rent terms change within the duration of the lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease transactions&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<LeaseRentMessage>, Integer, Hash)>)

    Array<LeaseRentMessage> data, response status code and response headers



1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
# File 'lib/buildium-ruby/api/leases_api.rb', line 1217

def get_rent_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_rent ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_rent"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rent'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<LeaseRentMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_rent",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_rent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_renters_insurance_policies(lease_id, opts = {}) ⇒ Array<RentersInsurancePolicyMessage>

Retrieve all insurance policies Retrieves all renters insurance policies for a lease. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:



1345
1346
1347
1348
# File 'lib/buildium-ruby/api/leases_api.rb', line 1345

def get_renters_insurance_policies(lease_id, opts = {})
  data, _status_code, _headers = get_renters_insurance_policies_with_http_info(lease_id, opts)
  data
end

#get_renters_insurance_policies_with_http_info(lease_id, opts = {}) ⇒ Array<(Array<RentersInsurancePolicyMessage>, Integer, Hash)>

Retrieve all insurance policies Retrieves all renters insurance policies for a lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :orderby (String)

    &#x60;orderby&#x60; indicates the field(s) and direction to sort the results in the response. See &lt;a href&#x3D;&quot;#section/API-Overview/Bulk-Request-Options&quot;&gt;Bulk Request Options&lt;/a&gt; for more information.

  • :offset (Integer)

    &#x60;offset&#x60; indicates the position of the first record to return. The &#x60;offset&#x60; is zero-based and the default is 0.

  • :limit (Integer)

    &#x60;limit&#x60; indicates the maximum number of results to be returned in the response. &#x60;limit&#x60; can range between 1 and 1000 and the default is 50.

Returns:

  • (Array<(Array<RentersInsurancePolicyMessage>, Integer, Hash)>)

    Array<RentersInsurancePolicyMessage> data, response status code and response headers



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/buildium-ruby/api/leases_api.rb', line 1358

def get_renters_insurance_policies_with_http_info(lease_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_renters_insurance_policies ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_renters_insurance_policies"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rentersinsurance'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RentersInsurancePolicyMessage>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_renters_insurance_policies",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_renters_insurance_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_renters_insurance_policy_by_id(lease_id, policy_id, opts = {}) ⇒ RentersInsurancePolicyMessage

Retrieve an insurance policy Retrieves a renters insurance policy. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View`

Parameters:

  • lease_id (Integer)
  • policy_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1415
1416
1417
1418
# File 'lib/buildium-ruby/api/leases_api.rb', line 1415

def get_renters_insurance_policy_by_id(lease_id, policy_id, opts = {})
  data, _status_code, _headers = get_renters_insurance_policy_by_id_with_http_info(lease_id, policy_id, opts)
  data
end

#get_renters_insurance_policy_by_id_with_http_info(lease_id, policy_id, opts = {}) ⇒ Array<(RentersInsurancePolicyMessage, Integer, Hash)>

Retrieve an insurance policy Retrieves a renters insurance policy. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • policy_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
# File 'lib/buildium-ruby/api/leases_api.rb', line 1426

def get_renters_insurance_policy_by_id_with_http_info(lease_id, policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.get_renters_insurance_policy_by_id ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.get_renters_insurance_policy_by_id"
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling LeasesApi.get_renters_insurance_policy_by_id"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rentersinsurance/{policyId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'policyId' + '}', CGI.escape(policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'RentersInsurancePolicyMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.get_renters_insurance_policy_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#get_renters_insurance_policy_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_lease_partial_payment_settings(lease_id, patch_global_partial_payment_settings_request, opts = {}) ⇒ PartialPaymentSettingsMessage

Update partial payment settings for a lease Updates partial payment settings for a lease. <br /><br /><h4>Required Permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit` <span class="permissionBlock">Administration > Application Settings</span> - `View` `Edit`

Parameters:

Returns:



1484
1485
1486
1487
# File 'lib/buildium-ruby/api/leases_api.rb', line 1484

def patch_lease_partial_payment_settings(lease_id, patch_global_partial_payment_settings_request, opts = {})
  data, _status_code, _headers = patch_lease_partial_payment_settings_with_http_info(lease_id, patch_global_partial_payment_settings_request, opts)
  data
end

#patch_lease_partial_payment_settings_with_http_info(lease_id, patch_global_partial_payment_settings_request, opts = {}) ⇒ Array<(PartialPaymentSettingsMessage, Integer, Hash)>

Update partial payment settings for a lease Updates partial payment settings for a lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required Permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Administration &gt; Application Settings&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:



1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
# File 'lib/buildium-ruby/api/leases_api.rb', line 1495

def patch_lease_partial_payment_settings_with_http_info(lease_id, patch_global_partial_payment_settings_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.patch_lease_partial_payment_settings ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.patch_lease_partial_payment_settings"
  end
  # verify the required parameter 'patch_global_partial_payment_settings_request' is set
  if @api_client.config.client_side_validation && patch_global_partial_payment_settings_request.nil?
    fail ArgumentError, "Missing the required parameter 'patch_global_partial_payment_settings_request' when calling LeasesApi.patch_lease_partial_payment_settings"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/partialpaymentsettings'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/json-patch+json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_global_partial_payment_settings_request)

  # return_type
  return_type = opts[:debug_return_type] || 'PartialPaymentSettingsMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.patch_lease_partial_payment_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#patch_lease_partial_payment_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#undo_tenant_moveout(lease_id, tenant_id, opts = {}) ⇒ nil

Delete a move out Deletes move out data for a tenant on a given lease. <br /><br /><h4>Required Permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View`

Parameters:

  • lease_id (Integer)
  • tenant_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1558
1559
1560
1561
# File 'lib/buildium-ruby/api/leases_api.rb', line 1558

def undo_tenant_moveout(lease_id, tenant_id, opts = {})
  undo_tenant_moveout_with_http_info(lease_id, tenant_id, opts)
  nil
end

#undo_tenant_moveout_with_http_info(lease_id, tenant_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a move out Deletes move out data for a tenant on a given lease. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required Permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Tenants&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • lease_id (Integer)
  • tenant_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
# File 'lib/buildium-ruby/api/leases_api.rb', line 1569

def undo_tenant_moveout_with_http_info(lease_id, tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.undo_tenant_moveout ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.undo_tenant_moveout"
  end
  # verify the required parameter 'tenant_id' is set
  if @api_client.config.client_side_validation && tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'tenant_id' when calling LeasesApi.undo_tenant_moveout"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/moveouts/{tenantId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.undo_tenant_moveout",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#undo_tenant_moveout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_lease(lease_id, update_lease_request, opts = {}) ⇒ LeaseMessage

Update a lease Update a signed lease. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • update_lease_request (UpdateLeaseRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1627
1628
1629
1630
# File 'lib/buildium-ruby/api/leases_api.rb', line 1627

def update_lease(lease_id, update_lease_request, opts = {})
  data, _status_code, _headers = update_lease_with_http_info(lease_id, update_lease_request, opts)
  data
end

#update_lease_epay_settings(lease_id, update_e_pay_settings_for_association_request, opts = {}) ⇒ EPaySettingsMessage

Update ePay settings Updates ePay settings for a lease <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit`

Parameters:

Returns:



1701
1702
1703
1704
# File 'lib/buildium-ruby/api/leases_api.rb', line 1701

def update_lease_epay_settings(lease_id, update_e_pay_settings_for_association_request, opts = {})
  data, _status_code, _headers = update_lease_epay_settings_with_http_info(lease_id, update_e_pay_settings_for_association_request, opts)
  data
end

#update_lease_epay_settings_with_http_info(lease_id, update_e_pay_settings_for_association_request, opts = {}) ⇒ Array<(EPaySettingsMessage, Integer, Hash)>

Update ePay settings Updates ePay settings for a lease &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

  • (Array<(EPaySettingsMessage, Integer, Hash)>)

    EPaySettingsMessage data, response status code and response headers



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
# File 'lib/buildium-ruby/api/leases_api.rb', line 1712

def update_lease_epay_settings_with_http_info(lease_id, update_e_pay_settings_for_association_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_epay_settings ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.update_lease_epay_settings"
  end
  # verify the required parameter 'update_e_pay_settings_for_association_request' is set
  if @api_client.config.client_side_validation && update_e_pay_settings_for_association_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_e_pay_settings_for_association_request' when calling LeasesApi.update_lease_epay_settings"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/epaysettings'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_e_pay_settings_for_association_request)

  # return_type
  return_type = opts[:debug_return_type] || 'EPaySettingsMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.update_lease_epay_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#update_lease_epay_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_lease_note(lease_id, note_id, update_lease_note_request, opts = {}) ⇒ NoteMessage

Update a note Updates a lease note. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or ‘null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you’re about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Leases</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • note_id (Integer)
  • update_lease_note_request (UpdateLeaseNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1776
1777
1778
1779
# File 'lib/buildium-ruby/api/leases_api.rb', line 1776

def update_lease_note(lease_id, note_id, update_lease_note_request, opts = {})
  data, _status_code, _headers = update_lease_note_with_http_info(lease_id, note_id, update_lease_note_request, opts)
  data
end

#update_lease_note_with_http_info(lease_id, note_id, update_lease_note_request, opts = {}) ⇒ Array<(NoteMessage, Integer, Hash)>

Update a note Updates a lease note. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • note_id (Integer)
  • update_lease_note_request (UpdateLeaseNoteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(NoteMessage, Integer, Hash)>)

    NoteMessage data, response status code and response headers



1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
# File 'lib/buildium-ruby/api/leases_api.rb', line 1788

def update_lease_note_with_http_info(lease_id, note_id, update_lease_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease_note ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.update_lease_note"
  end
  # verify the required parameter 'note_id' is set
  if @api_client.config.client_side_validation && note_id.nil?
    fail ArgumentError, "Missing the required parameter 'note_id' when calling LeasesApi.update_lease_note"
  end
  # verify the required parameter 'update_lease_note_request' is set
  if @api_client.config.client_side_validation && update_lease_note_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_lease_note_request' when calling LeasesApi.update_lease_note"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/notes/{noteId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_lease_note_request)

  # return_type
  return_type = opts[:debug_return_type] || 'NoteMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.update_lease_note",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#update_lease_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_lease_with_http_info(lease_id, update_lease_request, opts = {}) ⇒ Array<(LeaseMessage, Integer, Hash)>

Update a lease Update a signed lease. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Any field not included in the update request will be set to either an empty string or &#x60;null&#x60; in the database depending on the field definition. &lt;br /&gt;The recommended workflow to ensure no data is inadvertently overwritten is to execute a &#x60;GET&#x60; request for the resource you&#39;re about to update and then use this response to fill any of the fields that are not being updated. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Leases&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • update_lease_request (UpdateLeaseRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseMessage, Integer, Hash)>)

    LeaseMessage data, response status code and response headers



1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
# File 'lib/buildium-ruby/api/leases_api.rb', line 1638

def update_lease_with_http_info(lease_id, update_lease_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.update_lease ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.update_lease"
  end
  # verify the required parameter 'update_lease_request' is set
  if @api_client.config.client_side_validation && update_lease_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_lease_request' when calling LeasesApi.update_lease"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_lease_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.update_lease",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#update_lease\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rent_schedule(lease_id, rent_id, update_rent_schedule_request, opts = {}) ⇒ LeaseRentMessage

Update a rent schedule Updates a rent schedule. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Lease Transactions</span> - ‘View` `Edit`

Parameters:

  • lease_id (Integer)
  • rent_id (Integer)
  • update_rent_schedule_request (UpdateRentScheduleRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1856
1857
1858
1859
# File 'lib/buildium-ruby/api/leases_api.rb', line 1856

def update_rent_schedule(lease_id, rent_id, update_rent_schedule_request, opts = {})
  data, _status_code, _headers = update_rent_schedule_with_http_info(lease_id, rent_id, update_rent_schedule_request, opts)
  data
end

#update_rent_schedule_with_http_info(lease_id, rent_id, update_rent_schedule_request, opts = {}) ⇒ Array<(LeaseRentMessage, Integer, Hash)>

Update a rent schedule Updates a rent schedule. &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Required permission(s):&lt;/h4&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Rentals &gt; Lease Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • lease_id (Integer)
  • rent_id (Integer)
  • update_rent_schedule_request (UpdateRentScheduleRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LeaseRentMessage, Integer, Hash)>)

    LeaseRentMessage data, response status code and response headers



1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
# File 'lib/buildium-ruby/api/leases_api.rb', line 1868

def update_rent_schedule_with_http_info(lease_id, rent_id, update_rent_schedule_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LeasesApi.update_rent_schedule ...'
  end
  # verify the required parameter 'lease_id' is set
  if @api_client.config.client_side_validation && lease_id.nil?
    fail ArgumentError, "Missing the required parameter 'lease_id' when calling LeasesApi.update_rent_schedule"
  end
  # verify the required parameter 'rent_id' is set
  if @api_client.config.client_side_validation && rent_id.nil?
    fail ArgumentError, "Missing the required parameter 'rent_id' when calling LeasesApi.update_rent_schedule"
  end
  # verify the required parameter 'update_rent_schedule_request' is set
  if @api_client.config.client_side_validation && update_rent_schedule_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rent_schedule_request' when calling LeasesApi.update_rent_schedule"
  end
  # resource path
  local_var_path = '/v1/leases/{leaseId}/rent/{rentId}'.sub('{' + 'leaseId' + '}', CGI.escape(lease_id.to_s)).sub('{' + 'rentId' + '}', CGI.escape(rent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_rent_schedule_request)

  # return_type
  return_type = opts[:debug_return_type] || 'LeaseRentMessage'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret']

  new_options = opts.merge(
    :operation => :"LeasesApi.update_rent_schedule",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LeasesApi#update_rent_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end