Class: Buildium::RentalPropertiesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RentalPropertiesApi

Returns a new instance of RentalPropertiesApi.



19
20
21
# File 'lib/buildium-ruby/api/rental_properties_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/rental_properties_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_rental_image_upload_file_request_async(property_id, create_rental_image_upload_file_request_async_request, opts = {}) ⇒ FileUploadTicketMessage

Upload a rental image Uploads an image and associates it to the specified rental record. <br /><br />Uploading a file requires making two API requests. Each step is outlined below. <br /><br /><strong>Step 1 - Save file metadata</strong><br /> The first step in the file upload process is to submit the file metadata to ‘/v1/rentals/rentalId/images/uploadrequests`. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. <br /><br /><strong>NOTE:</strong> The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. <br /><br /><strong>Step 2 - Upload the file binary</strong><br /> Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: <br /> 1. Form a POST request using the value of the `BucketUrl` property as the URL. <br /><br /> 2. Set the `Content-Type` header to `multipart/form-data`. <br /><br /> 3. Copy the fields from the `FormData` property to this request as form-data key/value pairs. <br /><strong>NOTE:</strong> These values must added to the request form-data in the order they were received in the response. <br /><br /> 4. Lastly create a form-data key named `file` and set the value to the file binary. <br /><strong>NOTE:</strong> This must be the last field in the form-data list. <br /><br />This image shows what the POST request should look like if you’re using Postman: <img src="file-upload-example.png" /><br /><br /> 5. Send the POST request! A successful request will return with a ‘204 - NO CONTENT` HTTP response code. For any failure responses, please refer to <a target="_blank" href="docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses">AWS documentation</a> on REST error responses. <br /><br /><strong>NOTE:</strong> The file identifier is not generated in this response. To retrieve the file identifier, call `/v1/files` and pass the `PhysicalFileName` value received from the response of this endpoint into the `physicalfilenames` query parameter. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - `View` `Edit`

Parameters:

Returns:



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

def create_rental_image_upload_file_request_async(property_id, create_rental_image_upload_file_request_async_request, opts = {})
  data, _status_code, _headers = create_rental_image_upload_file_request_async_with_http_info(property_id, create_rental_image_upload_file_request_async_request, opts)
  data
end

#create_rental_image_upload_file_request_async_with_http_info(property_id, create_rental_image_upload_file_request_async_request, opts = {}) ⇒ Array<(FileUploadTicketMessage, Integer, Hash)>

Upload a rental image Uploads an image and associates it to the specified rental record. &lt;br /&gt;&lt;br /&gt;Uploading a file requires making two API requests. Each step is outlined below. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1 - Save file metadata&lt;/strong&gt;&lt;br /&gt; The first step in the file upload process is to submit the file metadata to &#x60;/v1/rentals/rentalId/images/uploadrequests&#x60;. The response of this call will contain a URL and a collection of form data that will be used in step 2 to generate the request for the file binary upload. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The response data will expire after 5 minutes. The file metadata will not be saved in the Buildium system if step 2 of this process is not completed successfully. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2 - Upload the file binary&lt;/strong&gt;&lt;br /&gt; Uploading the file binary will require using the response from step 1 to form a POST request to the Buildium file provider. Follow these steps to create the request: &lt;br /&gt; 1. Form a POST request using the value of the &#x60;BucketUrl&#x60; property as the URL. &lt;br /&gt;&lt;br /&gt; 2. Set the &#x60;Content-Type&#x60; header to &#x60;multipart/form-data&#x60;. &lt;br /&gt;&lt;br /&gt; 3. Copy the fields from the &#x60;FormData&#x60; property to this request as form-data key/value pairs. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; These values must added to the request form-data in the order they were received in the response. &lt;br /&gt;&lt;br /&gt; 4. Lastly create a form-data key named &#x60;file&#x60; and set the value to the file binary. &lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This must be the last field in the form-data list. &lt;br /&gt;&lt;br /&gt;This image shows what the POST request should look like if you&#39;re using Postman: &lt;img src&#x3D;&quot;file-upload-example.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt; 5. Send the POST request! A successful request will return with a &#x60;204 - NO CONTENT&#x60; HTTP response code. For any failure responses, please refer to &lt;a target&#x3D;&quot;_blank&quot; href&#x3D;&quot;docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses&quot;&gt;AWS documentation&lt;/a&gt; on REST error responses. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The file identifier is not generated in this response. To retrieve the file identifier, call &#x60;/v1/files&#x60; and pass the &#x60;PhysicalFileName&#x60; value received from the response of this endpoint into the &#x60;physicalfilenames&#x60; query parameter. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    FileUploadTicketMessage data, response status code and response headers



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
89
90
91
92
93
94
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 39

def create_rental_image_upload_file_request_async_with_http_info(property_id, create_rental_image_upload_file_request_async_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.create_rental_image_upload_file_request_async ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.create_rental_image_upload_file_request_async"
  end
  # verify the required parameter 'create_rental_image_upload_file_request_async_request' is set
  if @api_client.config.client_side_validation && create_rental_image_upload_file_request_async_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_rental_image_upload_file_request_async_request' when calling RentalPropertiesApi.create_rental_image_upload_file_request_async"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/uploadrequests'.sub('{' + 'propertyId' + '}', CGI.escape(property_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_rental_image_upload_file_request_async_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.create_rental_image_upload_file_request_async",
    :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: RentalPropertiesApi#create_rental_image_upload_file_request_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rental_property(create_rental_property_request, opts = {}) ⇒ RentalMessage

Create a property Creates a new rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

Returns:



101
102
103
104
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 101

def create_rental_property(create_rental_property_request, opts = {})
  data, _status_code, _headers = create_rental_property_with_http_info(create_rental_property_request, opts)
  data
end

#create_rental_property_note(property_id, create_lease_note_request, opts = {}) ⇒ NoteMessage

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

Parameters:

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

    the optional parameters

Returns:



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

def create_rental_property_note(property_id, create_lease_note_request, opts = {})
  data, _status_code, _headers = create_rental_property_note_with_http_info(property_id, create_lease_note_request, opts)
  data
end

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

Create a note Creates a 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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_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



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/rental_properties_api.rb', line 181

def create_rental_property_note_with_http_info(property_id, create_lease_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.create_rental_property_note ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.create_rental_property_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 RentalPropertiesApi.create_rental_property_note"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/notes'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.create_rental_property_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: RentalPropertiesApi#create_rental_property_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rental_property_with_http_info(create_rental_property_request, opts = {}) ⇒ Array<(RentalMessage, Integer, Hash)>

Create a property Creates a new rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    RentalMessage data, response status code and response headers



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/rental_properties_api.rb', line 111

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

  # 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_rental_property_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.create_rental_property",
    :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: RentalPropertiesApi#create_rental_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_rental_unit(create_rental_unit_request, opts = {}) ⇒ RentalUnitMessage

Create a unit Creates a rental unit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

Returns:



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

def create_rental_unit(create_rental_unit_request, opts = {})
  data, _status_code, _headers = create_rental_unit_with_http_info(create_rental_unit_request, opts)
  data
end

#create_rental_unit_with_http_info(create_rental_unit_request, opts = {}) ⇒ Array<(RentalUnitMessage, Integer, Hash)>

Create a unit Creates a rental unit. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    RentalUnitMessage data, response status code and response headers



253
254
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 253

def create_rental_unit_with_http_info(create_rental_unit_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.create_rental_unit ...'
  end
  # verify the required parameter 'create_rental_unit_request' is set
  if @api_client.config.client_side_validation && create_rental_unit_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_rental_unit_request' when calling RentalPropertiesApi.create_rental_unit"
  end
  # resource path
  local_var_path = '/v1/rentals/units'

  # 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_rental_unit_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.create_rental_unit",
    :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: RentalPropertiesApi#create_rental_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Create an image for a rental using a video link Creates an image for a rental using a video link. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • property_id (Integer)
  • create_video_link_request_request (CreateVideoLinkRequestRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



312
313
314
315
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 312

def create_video_link_request(property_id, create_video_link_request_request, opts = {})
  data, _status_code, _headers = create_video_link_request_with_http_info(property_id, create_video_link_request_request, opts)
  data
end

Create an image for a rental using a video link Creates an image for a rental using a video link. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • create_video_link_request_request (CreateVideoLinkRequestRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    RentalImageMessage data, response status code and response headers



323
324
325
326
327
328
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 323

def create_video_link_request_with_http_info(property_id, create_video_link_request_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.create_video_link_request ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.create_video_link_request"
  end
  # verify the required parameter 'create_video_link_request_request' is set
  if @api_client.config.client_side_validation && create_video_link_request_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_video_link_request_request' when calling RentalPropertiesApi.create_video_link_request"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/videolinkrequests'.sub('{' + 'propertyId' + '}', CGI.escape(property_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_video_link_request_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.create_video_link_request",
    :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: RentalPropertiesApi#create_video_link_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_rental_image(property_id, image_id, opts = {}) ⇒ nil

Delete a property image Deletes a rental property image. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit` `Delete`

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


386
387
388
389
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 386

def delete_rental_image(property_id, image_id, opts = {})
  delete_rental_image_with_http_info(property_id, image_id, opts)
  nil
end

#delete_rental_image_with_http_info(property_id, image_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a property image Deletes a rental property image. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &#x60;Delete&#x60;

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



397
398
399
400
401
402
403
404
405
406
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 397

def delete_rental_image_with_http_info(property_id, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.delete_rental_image ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.delete_rental_image"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling RentalPropertiesApi.delete_rental_image"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/{imageId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s)).sub('{' + 'imageId' + '}', CGI.escape(image_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 => :"RentalPropertiesApi.delete_rental_image",
    :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: RentalPropertiesApi#delete_rental_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_rental_units(opts = {}) ⇒ Array<RentalUnitMessage>

Retrieve all units Retrieves a list of rental property units. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to rental units that belong to the specified set of property ids.

  • :lastupdatedfrom (Time)

    Filters results to any rental units 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 rental units 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:



459
460
461
462
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 459

def get_all_rental_units(opts = {})
  data, _status_code, _headers = get_all_rental_units_with_http_info(opts)
  data
end

#get_all_rental_units_with_http_info(opts = {}) ⇒ Array<(Array<RentalUnitMessage>, Integer, Hash)>

Retrieve all units Retrieves a list of rental property units. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :propertyids (Array<Integer>)

    Filters results to rental units that belong to the specified set of property ids.

  • :lastupdatedfrom (Time)

    Filters results to any rental units 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 rental units 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<RentalUnitMessage>, Integer, Hash)>)

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



474
475
476
477
478
479
480
481
482
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 474

def get_all_rental_units_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_all_rental_units ...'
  end
  # resource path
  local_var_path = '/v1/rentals/units'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'propertyids'] = @api_client.build_collection_param(opts[:'propertyids'], :multi) if !opts[:'propertyids'].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<RentalUnitMessage>'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_all_rental_units",
    :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: RentalPropertiesApi#get_all_rental_units\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_all_rentals(opts = {}) ⇒ Array<RentalMessage>

Retrieve all properties Retrieves a list of rental properties. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :location (String)

    Filters results to only rental properties whose city or state contains the specified value.

  • :types (Array<String>)

    Filters results by the rental type. If no type is provided all types will be returned.

  • :subtypes (Array<String>)

    Filters results by the sub type of the rental property. If no sub type is specified all sub types will be returned.

  • :status (String)

    Filters results by the status of the rental property. If no status is specified both &#x60;active&#x60; and &#x60;inactive&#x60; rental properties will be returned.

  • :rentalownerids (Array<Integer>)

    Filters results to only rental properties whose RentalOwnerId matches the specified Id.

  • :propertyids (Array<Integer>)

    Filters results to only rental properties units whose Rental matches the specified Id.

  • :lastupdatedfrom (Time)

    Filters results to any rental properties 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 rental properties 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:



539
540
541
542
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 539

def get_all_rentals(opts = {})
  data, _status_code, _headers = get_all_rentals_with_http_info(opts)
  data
end

#get_all_rentals_with_http_info(opts = {}) ⇒ Array<(Array<RentalMessage>, Integer, Hash)>

Retrieve all properties Retrieves a list of 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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :location (String)

    Filters results to only rental properties whose city or state contains the specified value.

  • :types (Array<String>)

    Filters results by the rental type. If no type is provided all types will be returned.

  • :subtypes (Array<String>)

    Filters results by the sub type of the rental property. If no sub type is specified all sub types will be returned.

  • :status (String)

    Filters results by the status of the rental property. If no status is specified both &#x60;active&#x60; and &#x60;inactive&#x60; rental properties will be returned.

  • :rentalownerids (Array<Integer>)

    Filters results to only rental properties whose RentalOwnerId matches the specified Id.

  • :propertyids (Array<Integer>)

    Filters results to only rental properties units whose Rental matches the specified Id.

  • :lastupdatedfrom (Time)

    Filters results to any rental properties 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 rental properties 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<RentalMessage>, Integer, Hash)>)

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



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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 559

def get_all_rentals_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_all_rentals ...'
  end
  allowable_values = ["Residential", "Commercial"]
  if @api_client.config.client_side_validation && opts[:'types'] && !opts[:'types'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"types\", must include one of #{allowable_values}"
  end
  allowable_values = ["CondoTownhome", "MultiFamily", "SingleFamily", "Industrial", "Office", "Retail", "ShoppingCenter", "Storage", "ParkingSpace"]
  if @api_client.config.client_side_validation && opts[:'subtypes'] && !opts[:'subtypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"subtypes\", must include one of #{allowable_values}"
  end
  allowable_values = ["Active", "InActive"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/rentals'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
  query_params[:'types'] = @api_client.build_collection_param(opts[:'types'], :multi) if !opts[:'types'].nil?
  query_params[:'subtypes'] = @api_client.build_collection_param(opts[:'subtypes'], :multi) if !opts[:'subtypes'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'rentalownerids'] = @api_client.build_collection_param(opts[:'rentalownerids'], :multi) if !opts[:'rentalownerids'].nil?
  query_params[:'propertyids'] = @api_client.build_collection_param(opts[:'propertyids'], :multi) if !opts[:'propertyids'].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<RentalMessage>'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_all_rentals",
    :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: RentalPropertiesApi#get_all_rentals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_e_pay_settings_for_rental_property(property_id, opts = {}) ⇒ EPaySettingsMessage

Retrieve ePay settings Retrieves ePay settings for a rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



631
632
633
634
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 631

def get_e_pay_settings_for_rental_property(property_id, opts = {})
  data, _status_code, _headers = get_e_pay_settings_for_rental_property_with_http_info(property_id, opts)
  data
end

#get_e_pay_settings_for_rental_property_with_http_info(property_id, opts = {}) ⇒ Array<(EPaySettingsMessage, Integer, Hash)>

Retrieve ePay settings Retrieves ePay settings for a rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    EPaySettingsMessage data, response status code and response headers



641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 641

def get_e_pay_settings_for_rental_property_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_e_pay_settings_for_rental_property ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_e_pay_settings_for_rental_property"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/epaysettings'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.get_e_pay_settings_for_rental_property",
    :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: RentalPropertiesApi#get_e_pay_settings_for_rental_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_features_by_rental_property_id(property_id, opts = {}) ⇒ RentalFeaturesMessage

Retrieve all amenities Retrieve all the amenities for a rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



694
695
696
697
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 694

def get_features_by_rental_property_id(property_id, opts = {})
  data, _status_code, _headers = get_features_by_rental_property_id_with_http_info(property_id, opts)
  data
end

#get_features_by_rental_property_id_with_http_info(property_id, opts = {}) ⇒ Array<(RentalFeaturesMessage, Integer, Hash)>

Retrieve all amenities Retrieve all the amenities for a rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    RentalFeaturesMessage data, response status code and response headers



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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 704

def get_features_by_rental_property_id_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_features_by_rental_property_id ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_features_by_rental_property_id"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/amenities'.sub('{' + 'propertyId' + '}', CGI.escape(property_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] || 'RentalFeaturesMessage'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_features_by_rental_property_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: RentalPropertiesApi#get_features_by_rental_property_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_by_id(property_id, opts = {}) ⇒ RentalMessage

Retrieve a property Retrieve a specific rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

  • property_id (Integer)

    The rental property identifier.

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

    the optional parameters

Returns:



757
758
759
760
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 757

def get_rental_by_id(property_id, opts = {})
  data, _status_code, _headers = get_rental_by_id_with_http_info(property_id, opts)
  data
end

#get_rental_by_id_with_http_info(property_id, opts = {}) ⇒ Array<(RentalMessage, Integer, Hash)>

Retrieve a property Retrieve a specific rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_id (Integer)

    The rental property identifier.

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

    the optional parameters

Returns:

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

    RentalMessage data, response status code and response headers



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
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 767

def get_rental_by_id_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_by_id ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_by_id"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_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] || 'RentalMessage'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_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: RentalPropertiesApi#get_rental_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_image_by_id(property_id, image_id, opts = {}) ⇒ RentalImageMessage

Retrieve a property image Retrieves a rental property image. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



821
822
823
824
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 821

def get_rental_image_by_id(property_id, image_id, opts = {})
  data, _status_code, _headers = get_rental_image_by_id_with_http_info(property_id, image_id, opts)
  data
end

#get_rental_image_by_id_with_http_info(property_id, image_id, opts = {}) ⇒ Array<(RentalImageMessage, Integer, Hash)>

Retrieve a property image Retrieves a rental property image. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    RentalImageMessage data, response status code and response headers



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
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 832

def get_rental_image_by_id_with_http_info(property_id, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_image_by_id ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_image_by_id"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling RentalPropertiesApi.get_rental_image_by_id"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/{imageId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s)).sub('{' + 'imageId' + '}', CGI.escape(image_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] || 'RentalImageMessage'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_image_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: RentalPropertiesApi#get_rental_image_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_image_download_url_by_id(property_id, image_id, opts = {}) ⇒ FileDownloadMessage

Download a property image Use this endpoint to create a temporary URL that can be used to download a property image. This URL expires after 5 minutes. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



890
891
892
893
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 890

def get_rental_image_download_url_by_id(property_id, image_id, opts = {})
  data, _status_code, _headers = get_rental_image_download_url_by_id_with_http_info(property_id, image_id, opts)
  data
end

#get_rental_image_download_url_by_id_with_http_info(property_id, image_id, opts = {}) ⇒ Array<(FileDownloadMessage, Integer, Hash)>

Download a property image Use this endpoint to create a temporary URL that can be used to download a property image. This URL expires after 5 minutes. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    FileDownloadMessage data, response status code and response headers



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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 901

def get_rental_image_download_url_by_id_with_http_info(property_id, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_image_download_url_by_id ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_image_download_url_by_id"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling RentalPropertiesApi.get_rental_image_download_url_by_id"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/{imageId}/downloadrequests'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s)).sub('{' + 'imageId' + '}', CGI.escape(image_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] || 'FileDownloadMessage'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_image_download_url_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RentalPropertiesApi#get_rental_image_download_url_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_images(property_id, opts = {}) ⇒ Array<RentalImageMessage>

Retrieve all property images Retrieves all images for a rental property. Note this endpoint will only return file metadata such as file names and descriptions. To download files make requests to the [Download File](#tag/Rental-Properties/operation/GetRentalImageDownloadUrlById) endpoint. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

  • property_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:



961
962
963
964
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 961

def get_rental_images(property_id, opts = {})
  data, _status_code, _headers = get_rental_images_with_http_info(property_id, opts)
  data
end

#get_rental_images_with_http_info(property_id, opts = {}) ⇒ Array<(Array<RentalImageMessage>, Integer, Hash)>

Retrieve all property images Retrieves all images for a rental property. Note this endpoint will only return file metadata such as file names and descriptions. To download files make requests to the [Download File](#tag/Rental-Properties/operation/GetRentalImageDownloadUrlById) endpoint. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_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<RentalImageMessage>, Integer, Hash)>)

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



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
1016
1017
1018
1019
1020
1021
1022
1023
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 974

def get_rental_images_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_images ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_images"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images'.sub('{' + 'propertyId' + '}', CGI.escape(property_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<RentalImageMessage>'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_images",
    :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: RentalPropertiesApi#get_rental_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_note_by_note_id(property_id, note_id, opts = {}) ⇒ NoteMessage

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

Parameters:

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

    the optional parameters

Returns:



1031
1032
1033
1034
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1031

def get_rental_note_by_note_id(property_id, note_id, opts = {})
  data, _status_code, _headers = get_rental_note_by_note_id_with_http_info(property_id, note_id, opts)
  data
end

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

Retrieve a note Retrieves a 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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_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



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
1085
1086
1087
1088
1089
1090
1091
1092
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1042

def get_rental_note_by_note_id_with_http_info(property_id, note_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_note_by_note_id ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_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 RentalPropertiesApi.get_rental_note_by_note_id"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/notes/{noteId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.get_rental_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: RentalPropertiesApi#get_rental_note_by_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_notes(property_id, opts = {}) ⇒ Array<NoteMessage>

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

Parameters:

  • property_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:



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

def get_rental_notes(property_id, opts = {})
  data, _status_code, _headers = get_rental_notes_with_http_info(property_id, opts)
  data
end

#get_rental_notes_with_http_info(property_id, opts = {}) ⇒ Array<(Array<NoteMessage>, Integer, Hash)>

Retrieve all notes Retrieves all 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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_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



1121
1122
1123
1124
1125
1126
1127
1128
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1121

def get_rental_notes_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_notes ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_notes"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/notes'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.get_rental_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: RentalPropertiesApi#get_rental_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_preferred_vendors(property_id, opts = {}) ⇒ Array<RentalPreferredVendorMessage>

Retrieve all preferred vendors Retrieves all preferred vendors. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` <br /><span class="permissionBlock">Maintenance > Vendors</span> - `View`

Parameters:

  • property_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:



1183
1184
1185
1186
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1183

def get_rental_preferred_vendors(property_id, opts = {})
  data, _status_code, _headers = get_rental_preferred_vendors_with_http_info(property_id, opts)
  data
end

#get_rental_preferred_vendors_with_http_info(property_id, opts = {}) ⇒ Array<(Array<RentalPreferredVendorMessage>, Integer, Hash)>

Retrieve all preferred vendors Retrieves all preferred vendors. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &gt; Vendors&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • property_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<RentalPreferredVendorMessage>, Integer, Hash)>)

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



1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1196

def get_rental_preferred_vendors_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_preferred_vendors ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.get_rental_preferred_vendors"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/vendors'.sub('{' + 'propertyId' + '}', CGI.escape(property_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<RentalPreferredVendorMessage>'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_preferred_vendors",
    :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: RentalPropertiesApi#get_rental_preferred_vendors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_rental_unit_by_id(unit_id, opts = {}) ⇒ RentalUnitMessage

Retrieve a unit Retrieves a specific rental property unit. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View`

Parameters:

  • unit_id (Integer)

    The rental unit identifier.

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

    the optional parameters

Returns:



1252
1253
1254
1255
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1252

def get_rental_unit_by_id(unit_id, opts = {})
  data, _status_code, _headers = get_rental_unit_by_id_with_http_info(unit_id, opts)
  data
end

#get_rental_unit_by_id_with_http_info(unit_id, opts = {}) ⇒ Array<(RentalUnitMessage, Integer, Hash)>

Retrieve a unit Retrieves a specific rental property unit. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60;

Parameters:

  • unit_id (Integer)

    The rental unit identifier.

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

    the optional parameters

Returns:

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

    RentalUnitMessage data, response status code and response headers



1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1262

def get_rental_unit_by_id_with_http_info(unit_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.get_rental_unit_by_id ...'
  end
  # verify the required parameter 'unit_id' is set
  if @api_client.config.client_side_validation && unit_id.nil?
    fail ArgumentError, "Missing the required parameter 'unit_id' when calling RentalPropertiesApi.get_rental_unit_by_id"
  end
  # resource path
  local_var_path = '/v1/rentals/units/{unitId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_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] || 'RentalUnitMessage'

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.get_rental_unit_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: RentalPropertiesApi#get_rental_unit_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#inactivate_rental_property(property_id, opts = {}) ⇒ nil

Inactivate a property Inactivates a rental property and all associated units. Any associated property’s owners that have no remaining active properties will be inactivated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1315
1316
1317
1318
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1315

def inactivate_rental_property(property_id, opts = {})
  inactivate_rental_property_with_http_info(property_id, opts)
  nil
end

#inactivate_rental_property_with_http_info(property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Inactivate a property Inactivates a rental property and all associated units. Any associated property&#39;s owners that have no remaining active properties will be inactivated. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1325

def inactivate_rental_property_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.inactivate_rental_property ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.inactivate_rental_property"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/inactivationrequest'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.inactivate_rental_property",
    :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: RentalPropertiesApi#inactivate_rental_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reactivate_rental_property(property_id, opts = {}) ⇒ nil

Reactivate a property Reactivates a rental property and all associated units. Any inactive rental owners assigned to this property will also be reactivated. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1378
1379
1380
1381
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1378

def reactivate_rental_property(property_id, opts = {})
  reactivate_rental_property_with_http_info(property_id, opts)
  nil
end

#reactivate_rental_property_with_http_info(property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Reactivate a property Reactivates a rental property and all associated units. Any inactive rental owners assigned to this property will also be reactivated. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1388

def reactivate_rental_property_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.reactivate_rental_property ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.reactivate_rental_property"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/reactivationrequest'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.reactivate_rental_property",
    :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: RentalPropertiesApi#reactivate_rental_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reorder_rental_images(property_id, reorder_rental_images_request, opts = {}) ⇒ Array<RentalImageMessage>

Update property image order Updates the image display order within the Buildium web application and in any associated rental listings. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • property_id (Integer)
  • reorder_rental_images_request (ReorderRentalImagesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1442
1443
1444
1445
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1442

def reorder_rental_images(property_id, reorder_rental_images_request, opts = {})
  data, _status_code, _headers = reorder_rental_images_with_http_info(property_id, reorder_rental_images_request, opts)
  data
end

#reorder_rental_images_with_http_info(property_id, reorder_rental_images_request, opts = {}) ⇒ Array<(Array<RentalImageMessage>, Integer, Hash)>

Update property image order Updates the image display order within the Buildium web application and in any associated rental listings. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • reorder_rental_images_request (ReorderRentalImagesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

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



1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1453

def reorder_rental_images_with_http_info(property_id, reorder_rental_images_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.reorder_rental_images ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.reorder_rental_images"
  end
  # verify the required parameter 'reorder_rental_images_request' is set
  if @api_client.config.client_side_validation && reorder_rental_images_request.nil?
    fail ArgumentError, "Missing the required parameter 'reorder_rental_images_request' when calling RentalPropertiesApi.reorder_rental_images"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/order'.sub('{' + 'propertyId' + '}', CGI.escape(property_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(reorder_rental_images_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.reorder_rental_images",
    :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: RentalPropertiesApi#reorder_rental_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_e_pay_settings_for_rental(property_id, update_e_pay_settings_for_association_request, opts = {}) ⇒ EPaySettingsMessage

Update ePay settings Updates ePay settings for a rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

Returns:



1516
1517
1518
1519
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1516

def update_e_pay_settings_for_rental(property_id, update_e_pay_settings_for_association_request, opts = {})
  data, _status_code, _headers = update_e_pay_settings_for_rental_with_http_info(property_id, update_e_pay_settings_for_association_request, opts)
  data
end

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

Update ePay settings Updates ePay settings for a rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

    EPaySettingsMessage data, response status code and response headers



1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1527

def update_e_pay_settings_for_rental_with_http_info(property_id, update_e_pay_settings_for_association_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_e_pay_settings_for_rental ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_e_pay_settings_for_rental"
  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 RentalPropertiesApi.update_e_pay_settings_for_rental"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/epaysettings'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.update_e_pay_settings_for_rental",
    :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: RentalPropertiesApi#update_e_pay_settings_for_rental\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_features(property_id, update_rental_features_request, opts = {}) ⇒ RentalFeaturesMessage

Update amenities Updates the amenities for a rental property. <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 > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • property_id (Integer)
  • update_rental_features_request (UpdateRentalFeaturesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1590
1591
1592
1593
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1590

def update_rental_features(property_id, update_rental_features_request, opts = {})
  data, _status_code, _headers = update_rental_features_with_http_info(property_id, update_rental_features_request, opts)
  data
end

#update_rental_features_with_http_info(property_id, update_rental_features_request, opts = {}) ⇒ Array<(RentalFeaturesMessage, Integer, Hash)>

Update amenities Updates the amenities for a rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • update_rental_features_request (UpdateRentalFeaturesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    RentalFeaturesMessage data, response status code and response headers



1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1601

def update_rental_features_with_http_info(property_id, update_rental_features_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_features ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_rental_features"
  end
  # verify the required parameter 'update_rental_features_request' is set
  if @api_client.config.client_side_validation && update_rental_features_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rental_features_request' when calling RentalPropertiesApi.update_rental_features"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/amenities'.sub('{' + 'propertyId' + '}', CGI.escape(property_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_rental_features_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.update_rental_features",
    :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: RentalPropertiesApi#update_rental_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_image(property_id, image_id, update_rental_image_request, opts = {}) ⇒ RentalImageMessage

Update a property image Updates a rental property image. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • update_rental_image_request (UpdateRentalImageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1665
1666
1667
1668
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1665

def update_rental_image(property_id, image_id, update_rental_image_request, opts = {})
  data, _status_code, _headers = update_rental_image_with_http_info(property_id, image_id, update_rental_image_request, opts)
  data
end

#update_rental_image_with_http_info(property_id, image_id, update_rental_image_request, opts = {}) ⇒ Array<(RentalImageMessage, Integer, Hash)>

Update a property image Updates a rental property image. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • image_id (Integer)
  • update_rental_image_request (UpdateRentalImageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    RentalImageMessage data, response status code and response headers



1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1677

def update_rental_image_with_http_info(property_id, image_id, update_rental_image_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_image ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_rental_image"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling RentalPropertiesApi.update_rental_image"
  end
  # verify the required parameter 'update_rental_image_request' is set
  if @api_client.config.client_side_validation && update_rental_image_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rental_image_request' when calling RentalPropertiesApi.update_rental_image"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/images/{imageId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s)).sub('{' + 'imageId' + '}', CGI.escape(image_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_rental_image_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.update_rental_image",
    :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: RentalPropertiesApi#update_rental_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_preferred_vendors(property_id, update_rental_preferred_vendors_request, opts = {}) ⇒ Array<RentalPreferredVendorMessage>

Update preferred vendors Updates preferred vendors. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Rental properties and units</span> - ‘View` `Edit` <br /><span class="permissionBlock">Maintenance > Vendors</span> - `View` `Edit`

Parameters:

Returns:



1744
1745
1746
1747
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1744

def update_rental_preferred_vendors(property_id, update_rental_preferred_vendors_request, opts = {})
  data, _status_code, _headers = update_rental_preferred_vendors_with_http_info(property_id, update_rental_preferred_vendors_request, opts)
  data
end

#update_rental_preferred_vendors_with_http_info(property_id, update_rental_preferred_vendors_request, opts = {}) ⇒ Array<(Array<RentalPreferredVendorMessage>, Integer, Hash)>

Update preferred vendors Updates preferred vendors. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &gt; Vendors&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

Returns:

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

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



1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1755

def update_rental_preferred_vendors_with_http_info(property_id, update_rental_preferred_vendors_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_preferred_vendors ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_rental_preferred_vendors"
  end
  # verify the required parameter 'update_rental_preferred_vendors_request' is set
  if @api_client.config.client_side_validation && update_rental_preferred_vendors_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rental_preferred_vendors_request' when calling RentalPropertiesApi.update_rental_preferred_vendors"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/vendors'.sub('{' + 'propertyId' + '}', CGI.escape(property_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_rental_preferred_vendors_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.update_rental_preferred_vendors",
    :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: RentalPropertiesApi#update_rental_preferred_vendors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_property(property_id, update_rental_property_request, opts = {}) ⇒ RentalMessage

Update a property Updates a rental property. <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 > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • property_id (Integer)
  • update_rental_property_request (UpdateRentalPropertyRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1818
1819
1820
1821
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1818

def update_rental_property(property_id, update_rental_property_request, opts = {})
  data, _status_code, _headers = update_rental_property_with_http_info(property_id, update_rental_property_request, opts)
  data
end

#update_rental_property_note(property_id, note_id, update_lease_note_request, opts = {}) ⇒ NoteMessage

Update a note Updates a 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 > Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



1893
1894
1895
1896
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1893

def update_rental_property_note(property_id, note_id, update_lease_note_request, opts = {})
  data, _status_code, _headers = update_rental_property_note_with_http_info(property_id, note_id, update_lease_note_request, opts)
  data
end

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

Update a note Updates a 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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_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



1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1905

def update_rental_property_note_with_http_info(property_id, note_id, update_lease_note_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_property_note ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_rental_property_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 RentalPropertiesApi.update_rental_property_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 RentalPropertiesApi.update_rental_property_note"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/notes/{noteId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_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 => :"RentalPropertiesApi.update_rental_property_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: RentalPropertiesApi#update_rental_property_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_property_with_http_info(property_id, update_rental_property_request, opts = {}) ⇒ Array<(RentalMessage, Integer, Hash)>

Update a property Updates a rental property. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • update_rental_property_request (UpdateRentalPropertyRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    RentalMessage data, response status code and response headers



1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1829

def update_rental_property_with_http_info(property_id, update_rental_property_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_property ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling RentalPropertiesApi.update_rental_property"
  end
  # verify the required parameter 'update_rental_property_request' is set
  if @api_client.config.client_side_validation && update_rental_property_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rental_property_request' when calling RentalPropertiesApi.update_rental_property"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}'.sub('{' + 'propertyId' + '}', CGI.escape(property_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_rental_property_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.update_rental_property",
    :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: RentalPropertiesApi#update_rental_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_rental_unit(unit_id, update_rental_unit_request, opts = {}) ⇒ RentalUnitMessage

Update a unit Updates a rental unit. <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 > Rental properties and units</span> - ‘View` `Edit`

Parameters:

  • unit_id (Integer)

    The identifier of the unit to update.

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

    the optional parameters

Returns:



1972
1973
1974
1975
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1972

def update_rental_unit(unit_id, update_rental_unit_request, opts = {})
  data, _status_code, _headers = update_rental_unit_with_http_info(unit_id, update_rental_unit_request, opts)
  data
end

#update_rental_unit_with_http_info(unit_id, update_rental_unit_request, opts = {}) ⇒ Array<(RentalUnitMessage, Integer, Hash)>

Update a unit Updates a rental unit. &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; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • unit_id (Integer)

    The identifier of the unit to update.

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

    the optional parameters

Returns:

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

    RentalUnitMessage data, response status code and response headers



1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1983

def update_rental_unit_with_http_info(unit_id, update_rental_unit_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.update_rental_unit ...'
  end
  # verify the required parameter 'unit_id' is set
  if @api_client.config.client_side_validation && unit_id.nil?
    fail ArgumentError, "Missing the required parameter 'unit_id' when calling RentalPropertiesApi.update_rental_unit"
  end
  # verify the required parameter 'update_rental_unit_request' is set
  if @api_client.config.client_side_validation && update_rental_unit_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_rental_unit_request' when calling RentalPropertiesApi.update_rental_unit"
  end
  # resource path
  local_var_path = '/v1/rentals/units/{unitId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_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_rental_unit_request)

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

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

  new_options = opts.merge(
    :operation => :"RentalPropertiesApi.update_rental_unit",
    :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: RentalPropertiesApi#update_rental_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end