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, listing_entity_file_post_message, 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 &gt; Rental properties and units</span> - `View` `Edit`

Parameters:

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

    the optional 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, listing_entity_file_post_message, opts = {})
  data, _status_code, _headers = create_rental_image_upload_file_request_async_with_http_info(property_id, listing_entity_file_post_message, opts)
  data
end

#create_rental_image_upload_file_request_async_with_http_info(property_id, listing_entity_file_post_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional 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, listing_entity_file_post_message, 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 'listing_entity_file_post_message' is set
  if @api_client.config.client_side_validation && listing_entity_file_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'listing_entity_file_post_message' 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(listing_entity_file_post_message)

  # 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(rental_property_post_message, opts = {}) ⇒ RentalMessage

Create a property Creates a new rental property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; 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(rental_property_post_message, opts = {})
  data, _status_code, _headers = create_rental_property_with_http_info(rental_property_post_message, opts)
  data
end

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

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

Parameters:

  • property_id (Integer)
  • note_post_message (NotePostMessage)
  • 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, note_post_message, opts = {})
  data, _status_code, _headers = create_rental_property_note_with_http_info(property_id, note_post_message, opts)
  data
end

#create_rental_property_note_with_http_info(property_id, note_post_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

  • property_id (Integer)
  • note_post_message (NotePostMessage)
  • 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, note_post_message, 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 'note_post_message' is set
  if @api_client.config.client_side_validation && note_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'note_post_message' 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(note_post_message)

  # 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(rental_property_post_message, 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 &amp;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(rental_property_post_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalPropertiesApi.create_rental_property ...'
  end
  # verify the required parameter 'rental_property_post_message' is set
  if @api_client.config.client_side_validation && rental_property_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_property_post_message' 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(rental_property_post_message)

  # 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 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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



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

def create_video_link_request(property_id, video_link_request_post_message, opts = {})
  data, _status_code, _headers = create_video_link_request_with_http_info(property_id, video_link_request_post_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    RentalImageMessage data, response status code and response headers



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

def create_video_link_request_with_http_info(property_id, video_link_request_post_message, 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 'video_link_request_post_message' is set
  if @api_client.config.client_side_validation && video_link_request_post_message.nil?
    fail ArgumentError, "Missing the required parameter 'video_link_request_post_message' 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(video_link_request_post_message)

  # 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 &gt; Rental properties and units</span> - ‘View` `Edit` `Delete`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

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 &amp;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



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

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_rentals(opts = {}) ⇒ Array<RentalMessage>

Retrieve all properties Retrieves a list of rental properties. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; 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:



396
397
398
399
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 396

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 &amp;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



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 416

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



488
489
490
491
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 488

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 &amp;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



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 498

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



551
552
553
554
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 551

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 &amp;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



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

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

  • property_id (Integer)

    The rental property identifier.

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

    the optional parameters

Returns:



614
615
616
617
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 614

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 &amp;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



624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 624

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



678
679
680
681
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 678

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 &amp;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



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 689

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



747
748
749
750
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 747

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 &amp;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



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

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 &gt; 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:



818
819
820
821
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 818

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 &amp;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



831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 831

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 &gt; Rental properties and units</span> - ‘View`

Parameters:

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

    the optional parameters

Returns:



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

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 &amp;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



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

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 &gt; 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:



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

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 &amp;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



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
1024
1025
1026
1027
1028
1029
1030
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 978

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 &gt; Rental properties and units</span> - ‘View` <br /><span class="permissionBlock">Maintenance &gt; 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:



1040
1041
1042
1043
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1040

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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &lt;br /&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;Maintenance &amp;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



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
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1053

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

#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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1109
1110
1111
1112
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1109

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 &amp;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



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

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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1172
1173
1174
1175
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1172

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 &amp;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



1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1182

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, image_reorder_request_put_message, 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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



1236
1237
1238
1239
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1236

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

#reorder_rental_images_with_http_info(property_id, image_reorder_request_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

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



1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
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
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1247

def reorder_rental_images_with_http_info(property_id, image_reorder_request_put_message, 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 'image_reorder_request_put_message' is set
  if @api_client.config.client_side_validation && image_reorder_request_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'image_reorder_request_put_message' 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(image_reorder_request_put_message)

  # 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, e_pay_settings_put_message, opts = {}) ⇒ EPaySettingsMessage

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

Parameters:

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

    the optional parameters

Returns:



1310
1311
1312
1313
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1310

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

#update_e_pay_settings_for_rental_with_http_info(property_id, e_pay_settings_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    EPaySettingsMessage data, response status code and response headers



1321
1322
1323
1324
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
1372
1373
1374
1375
1376
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1321

def update_e_pay_settings_for_rental_with_http_info(property_id, e_pay_settings_put_message, 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 'e_pay_settings_put_message' is set
  if @api_client.config.client_side_validation && e_pay_settings_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'e_pay_settings_put_message' 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(e_pay_settings_put_message)

  # 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, rental_features_put_message, 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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



1384
1385
1386
1387
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1384

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

#update_rental_features_with_http_info(property_id, rental_features_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    RentalFeaturesMessage data, response status code and response headers



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
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1395

def update_rental_features_with_http_info(property_id, rental_features_put_message, 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 'rental_features_put_message' is set
  if @api_client.config.client_side_validation && rental_features_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_features_put_message' 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(rental_features_put_message)

  # 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, rental_image_put_message, opts = {}) ⇒ RentalImageMessage

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

Parameters:

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

    the optional parameters

Returns:



1459
1460
1461
1462
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1459

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

#update_rental_image_with_http_info(property_id, image_id, rental_image_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    RentalImageMessage data, response status code and response headers



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
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1471

def update_rental_image_with_http_info(property_id, image_id, rental_image_put_message, 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 'rental_image_put_message' is set
  if @api_client.config.client_side_validation && rental_image_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_image_put_message' 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(rental_image_put_message)

  # 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, rental_preferred_vendor_put_message, opts = {}) ⇒ Array<RentalPreferredVendorMessage>

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

Parameters:

Returns:



1538
1539
1540
1541
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1538

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

#update_rental_preferred_vendors_with_http_info(property_id, rental_preferred_vendor_put_message, 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 &amp;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 &amp;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



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
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1549

def update_rental_preferred_vendors_with_http_info(property_id, rental_preferred_vendor_put_message, 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 'rental_preferred_vendor_put_message' is set
  if @api_client.config.client_side_validation && rental_preferred_vendor_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_preferred_vendor_put_message' 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(rental_preferred_vendor_put_message)

  # 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, rental_property_put_message, 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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



1612
1613
1614
1615
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1612

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

#update_rental_property_note(property_id, note_id, note_put_message, 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 &gt; Rental properties and units</span> - ‘View` `Edit`

Parameters:

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

    the optional parameters

Returns:



1687
1688
1689
1690
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1687

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

#update_rental_property_note_with_http_info(property_id, note_id, note_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    NoteMessage data, response status code and response headers



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
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1699

def update_rental_property_note_with_http_info(property_id, note_id, note_put_message, 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 'note_put_message' is set
  if @api_client.config.client_side_validation && note_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'note_put_message' 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(note_put_message)

  # 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, rental_property_put_message, 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 &amp;gt; Rental properties and units&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    RentalMessage data, response status code and response headers



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
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
# File 'lib/buildium-ruby/api/rental_properties_api.rb', line 1623

def update_rental_property_with_http_info(property_id, rental_property_put_message, 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 'rental_property_put_message' is set
  if @api_client.config.client_side_validation && rental_property_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'rental_property_put_message' 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(rental_property_put_message)

  # 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