Class: Buildium::RentalMeterReadingsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RentalMeterReadingsApi

Returns a new instance of RentalMeterReadingsApi.



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

def api_client
  @api_client
end

Instance Method Details

#delete_meter_reading_details_for_rental(property_id, readingdate, metertype, opts = {}) ⇒ nil

Delete meter reading details for a given date Delete meter reading details for a property for a given date. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Lease Transactions</span> - ‘View` `Edit` `Delete`

Parameters:

  • property_id (Integer)
  • readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • metertype (String)

    Filters results to the specified meter type.

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

    the optional parameters

Returns:

  • (nil)


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

def delete_meter_reading_details_for_rental(property_id, readingdate, metertype, opts = {})
  delete_meter_reading_details_for_rental_with_http_info(property_id, readingdate, metertype, opts)
  nil
end

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

Delete meter reading details for a given date Delete meter reading details for a property for a given date. &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; Lease Transactions&lt;/span&gt; - &#x60;View&#x60; &#x60;Edit&#x60; &#x60;Delete&#x60;

Parameters:

  • property_id (Integer)
  • readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • metertype (String)

    Filters results to the specified meter type.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
95
96
97
98
99
100
101
102
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 41

def delete_meter_reading_details_for_rental_with_http_info(property_id, readingdate, metertype, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalMeterReadingsApi.delete_meter_reading_details_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 RentalMeterReadingsApi.delete_meter_reading_details_for_rental"
  end
  # verify the required parameter 'readingdate' is set
  if @api_client.config.client_side_validation && readingdate.nil?
    fail ArgumentError, "Missing the required parameter 'readingdate' when calling RentalMeterReadingsApi.delete_meter_reading_details_for_rental"
  end
  # verify the required parameter 'metertype' is set
  if @api_client.config.client_side_validation && metertype.nil?
    fail ArgumentError, "Missing the required parameter 'metertype' when calling RentalMeterReadingsApi.delete_meter_reading_details_for_rental"
  end
  # verify enum value
  allowable_values = ["Electric", "Gas", "Oil", "Water", "Sewer"]
  if @api_client.config.client_side_validation && !allowable_values.include?(metertype)
    fail ArgumentError, "invalid value for \"metertype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/meterreadings/summary'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s))

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

  # 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 => :"RentalMeterReadingsApi.delete_meter_reading_details_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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RentalMeterReadingsApi#delete_meter_reading_details_for_rental\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_meter_reading_details_for_rental_async(property_id, readingdate, metertype, opts = {}) ⇒ MeterReadingDetailsMessage

Retrieve all meter reading details Retrieves all meter reading details for a property. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Rental properties and units</span> - ‘View`

Parameters:

  • property_id (Integer)
  • readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • metertype (String)

    Filters results to the specified meter type.

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

    the optional parameters

Returns:



111
112
113
114
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 111

def get_meter_reading_details_for_rental_async(property_id, readingdate, metertype, opts = {})
  data, _status_code, _headers = get_meter_reading_details_for_rental_async_with_http_info(property_id, readingdate, metertype, opts)
  data
end

#get_meter_reading_details_for_rental_async_with_http_info(property_id, readingdate, metertype, opts = {}) ⇒ Array<(MeterReadingDetailsMessage, Integer, Hash)>

Retrieve all meter reading details Retrieves all meter reading details for a 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)
  • readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • metertype (String)

    Filters results to the specified meter type.

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

    the optional parameters

Returns:

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

    MeterReadingDetailsMessage data, response status code and response headers



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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 123

def get_meter_reading_details_for_rental_async_with_http_info(property_id, readingdate, metertype, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalMeterReadingsApi.get_meter_reading_details_for_rental_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 RentalMeterReadingsApi.get_meter_reading_details_for_rental_async"
  end
  # verify the required parameter 'readingdate' is set
  if @api_client.config.client_side_validation && readingdate.nil?
    fail ArgumentError, "Missing the required parameter 'readingdate' when calling RentalMeterReadingsApi.get_meter_reading_details_for_rental_async"
  end
  # verify the required parameter 'metertype' is set
  if @api_client.config.client_side_validation && metertype.nil?
    fail ArgumentError, "Missing the required parameter 'metertype' when calling RentalMeterReadingsApi.get_meter_reading_details_for_rental_async"
  end
  # verify enum value
  allowable_values = ["Electric", "Gas", "Oil", "Water", "Sewer"]
  if @api_client.config.client_side_validation && !allowable_values.include?(metertype)
    fail ArgumentError, "invalid value for \"metertype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/meterreadings/summary'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s))

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

  # 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] || 'MeterReadingDetailsMessage'

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

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

#get_meter_readings_for_rental(property_id, readingdatefrom, readingdateto, opts = {}) ⇒ Array<MeterReadingMessage>

Retrieve all meter readings Retrieves all meter readings 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)
  • readingdatefrom (Date)

    Filters results to any meter readings whose entry date that is greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD. The maximum date range is 365 days.

  • readingdateto (Date)

    Filters results to any meter readings whose entry date is less than or equal to the specified value. The value must be formatted as YYYY-MM-DD. The maximum date range is 365 days.

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

    the optional parameters

Options Hash (opts):

  • :metertypes (Array<String>)

    Filters results to the specified meter types.

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



197
198
199
200
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 197

def get_meter_readings_for_rental(property_id, readingdatefrom, readingdateto, opts = {})
  data, _status_code, _headers = get_meter_readings_for_rental_with_http_info(property_id, readingdatefrom, readingdateto, opts)
  data
end

#get_meter_readings_for_rental_with_http_info(property_id, readingdatefrom, readingdateto, opts = {}) ⇒ Array<(Array<MeterReadingMessage>, Integer, Hash)>

Retrieve all meter readings Retrieves all meter readings 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)
  • readingdatefrom (Date)

    Filters results to any meter readings whose entry date that is greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD. The maximum date range is 365 days.

  • readingdateto (Date)

    Filters results to any meter readings whose entry date is less than or equal to the specified value. The value must be formatted as YYYY-MM-DD. The maximum date range is 365 days.

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

    the optional parameters

Options Hash (opts):

  • :metertypes (Array<String>)

    Filters results to the specified meter types.

  • :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<MeterReadingMessage>, Integer, Hash)>)

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



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 213

def get_meter_readings_for_rental_with_http_info(property_id, readingdatefrom, readingdateto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalMeterReadingsApi.get_meter_readings_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 RentalMeterReadingsApi.get_meter_readings_for_rental"
  end
  # verify the required parameter 'readingdatefrom' is set
  if @api_client.config.client_side_validation && readingdatefrom.nil?
    fail ArgumentError, "Missing the required parameter 'readingdatefrom' when calling RentalMeterReadingsApi.get_meter_readings_for_rental"
  end
  # verify the required parameter 'readingdateto' is set
  if @api_client.config.client_side_validation && readingdateto.nil?
    fail ArgumentError, "Missing the required parameter 'readingdateto' when calling RentalMeterReadingsApi.get_meter_readings_for_rental"
  end
  allowable_values = ["Electric", "Gas", "Oil", "Water", "Sewer"]
  if @api_client.config.client_side_validation && opts[:'metertypes'] && !opts[:'metertypes'].all? { |item| allowable_values.include?(item) }
    fail ArgumentError, "invalid value for \"metertypes\", must include one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/meterreadings'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s))

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

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

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

#upsert_meter_reading_details_for_rental_async(property_id, meter_reading_details_put_message, opts = {}) ⇒ MeterReadingDetailsMessage

Create/Update meter reading details This endpoint can be used to both create and update a meter reading detail for a property. <ul><li>There can only be one meter reading detail for a given combination of MeterType and ReadingDate for a property.</li><li>If you are updating an existing meter reading detail, use the query parameters to specify the existing meter reading detail to update.</li><li>If you are creating a new meter reading detail, do not pass any query parameters.</li><li>When adding a new item to the Details array, leave out the ‘Id` field.</li><li>When updating an existing item in the Details array, the `Id` field of the existing item must be included.</li></ul><br /><br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Rental properties and units</span> - `View` `Edit`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • :metertype (String)

    Filters results to the specified meter type.

Returns:



287
288
289
290
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 287

def upsert_meter_reading_details_for_rental_async(property_id, meter_reading_details_put_message, opts = {})
  data, _status_code, _headers = upsert_meter_reading_details_for_rental_async_with_http_info(property_id, meter_reading_details_put_message, opts)
  data
end

#upsert_meter_reading_details_for_rental_async_with_http_info(property_id, meter_reading_details_put_message, opts = {}) ⇒ Array<(MeterReadingDetailsMessage, Integer, Hash)>

Create/Update meter reading details This endpoint can be used to both create and update a meter reading detail for a property. &lt;ul&gt;&lt;li&gt;There can only be one meter reading detail for a given combination of MeterType and ReadingDate for a property.&lt;/li&gt;&lt;li&gt;If you are updating an existing meter reading detail, use the query parameters to specify the existing meter reading detail to update.&lt;/li&gt;&lt;li&gt;If you are creating a new meter reading detail, do not pass any query parameters.&lt;/li&gt;&lt;li&gt;When adding a new item to the Details array, leave out the &#x60;Id&#x60; field.&lt;/li&gt;&lt;li&gt;When updating an existing item in the Details array, the &#x60;Id&#x60; field of the existing item must be included.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&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)
  • meter_reading_details_put_message (MeterReadingDetailsPutMessage)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :readingdate (Date)

    Filters results to any meter readings whose entry date is equal to the specified value. The value must be formatted as YYYY-MM-DD.

  • :metertype (String)

    Filters results to the specified meter type.

Returns:

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

    MeterReadingDetailsMessage data, response status code and response headers



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/buildium-ruby/api/rental_meter_readings_api.rb', line 300

def upsert_meter_reading_details_for_rental_async_with_http_info(property_id, meter_reading_details_put_message, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RentalMeterReadingsApi.upsert_meter_reading_details_for_rental_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 RentalMeterReadingsApi.upsert_meter_reading_details_for_rental_async"
  end
  # verify the required parameter 'meter_reading_details_put_message' is set
  if @api_client.config.client_side_validation && meter_reading_details_put_message.nil?
    fail ArgumentError, "Missing the required parameter 'meter_reading_details_put_message' when calling RentalMeterReadingsApi.upsert_meter_reading_details_for_rental_async"
  end
  allowable_values = ["Electric", "Gas", "Oil", "Water", "Sewer"]
  if @api_client.config.client_side_validation && opts[:'metertype'] && !allowable_values.include?(opts[:'metertype'])
    fail ArgumentError, "invalid value for \"metertype\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/rentals/{propertyId}/meterreadings/summary'.sub('{' + 'propertyId' + '}', CGI.escape(property_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'readingdate'] = opts[:'readingdate'] if !opts[:'readingdate'].nil?
  query_params[:'metertype'] = opts[:'metertype'] if !opts[:'metertype'].nil?

  # 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(meter_reading_details_put_message)

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

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

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