Class: Buildium::BillsApi
- Inherits:
-
Object
- Object
- Buildium::BillsApi
- Defined in:
- lib/buildium-ruby/api/bills_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_bill(bill_post_message, opts = {}) ⇒ BillMessage
Create a bill Creates a bill.
-
#create_bill_payment(bill_id, bill_payment_post_message, opts = {}) ⇒ BillPaymentMessage
Create a bill payment Creates a bill payment.
-
#create_bill_payment_with_http_info(bill_id, bill_payment_post_message, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Create a bill payment Creates a bill payment.
-
#create_bill_with_http_info(bill_post_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Create a bill Creates a bill.
-
#create_multiple_bill_payments(multiple_bill_payments_post_message, opts = {}) ⇒ BillPaymentMessage
Create a payment for multiple bills with one check Creates a payment for multiple bills with one check.
-
#create_multiple_bill_payments_with_http_info(multiple_bill_payments_post_message, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Create a payment for multiple bills with one check Creates a payment for multiple bills with one check.
-
#create_upload_file_request(bill_id, file_name_post_message, opts = {}) ⇒ FileUploadTicketMessage
Upload a bill file Uploads a file and associates it to the specified bill record.
-
#create_upload_file_request_with_http_info(bill_id, file_name_post_message, opts = {}) ⇒ Array<(FileUploadTicketMessage, Integer, Hash)>
Upload a bill file Uploads a file and associates it to the specified bill record.
-
#delete_bill_file(bill_id, file_id, opts = {}) ⇒ nil
Delete a bill file Deletes the specified file from a bill.
-
#delete_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a bill file Deletes the specified file from a bill.
-
#download_bill_file(bill_id, file_id, opts = {}) ⇒ FileDownloadMessage
Download a bill file Downloads a specific file associated to the bill.
-
#download_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(FileDownloadMessage, Integer, Hash)>
Download a bill file Downloads a specific file associated to the bill.
-
#get_all_files_for_bill(bill_id, opts = {}) ⇒ Array<BillFileMessage>
Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill.
-
#get_all_files_for_bill_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillFileMessage>, Integer, Hash)>
Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill.
-
#get_bill_by_id(bill_id, opts = {}) ⇒ BillMessage
Retrieve a bill Retrieves a single bill.
-
#get_bill_by_id_with_http_info(bill_id, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Retrieve a bill Retrieves a single bill.
-
#get_bill_file_by_id(bill_id, file_id, opts = {}) ⇒ BillFileMessage
Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill.
-
#get_bill_file_by_id_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(BillFileMessage, Integer, Hash)>
Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill.
-
#get_bill_payment_by_id(bill_id, payment_id, opts = {}) ⇒ BillPaymentMessage
Retrieve a bill payment Retrieves specific bill payment.
-
#get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Retrieve a bill payment Retrieves specific bill payment.
-
#get_bill_payments(bill_id, opts = {}) ⇒ Array<BillPaymentMessage>
Retrieve all bill payments Retrieves a list of bill payments for a specific bill.
-
#get_bill_payments_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillPaymentMessage>, Integer, Hash)>
Retrieve all bill payments Retrieves a list of bill payments for a specific bill.
-
#get_bills_async(opts = {}) ⇒ Array<BillMessage>
Retrieve all bills Retrieves a list of bills.
-
#get_bills_async_with_http_info(opts = {}) ⇒ Array<(Array<BillMessage>, Integer, Hash)>
Retrieve all bills Retrieves a list of bills.
-
#initialize(api_client = ApiClient.default) ⇒ BillsApi
constructor
A new instance of BillsApi.
-
#update_bill(bill_id, bill_put_message, opts = {}) ⇒ BillMessage
Update a bill Use this operation to update any of the writable fields of an existing bill resource.
-
#update_bill_with_http_info(bill_id, bill_put_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Update a bill Use this operation to update any of the writable fields of an existing bill resource.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_bill(bill_post_message, opts = {}) ⇒ BillMessage
Create a bill Creates a bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View` `Edit`
27 28 29 30 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 27 def create_bill(, opts = {}) data, _status_code, _headers = create_bill_with_http_info(, opts) data end |
#create_bill_payment(bill_id, bill_payment_post_message, opts = {}) ⇒ BillPaymentMessage
Create a bill payment Creates a bill payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View` `Edit` <span class="permissionBlock">Accounting > Bank Accounts</span> - `View` `Edit`
96 97 98 99 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 96 def create_bill_payment(bill_id, , opts = {}) data, _status_code, _headers = create_bill_payment_with_http_info(bill_id, , opts) data end |
#create_bill_payment_with_http_info(bill_id, bill_payment_post_message, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Create a bill payment Creates a bill payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit` <span class="permissionBlock">Accounting &gt; Bank Accounts</span> - `View` `Edit`
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 107 def create_bill_payment_with_http_info(bill_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.create_bill_payment ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.create_bill_payment" end # verify the required parameter 'bill_payment_post_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'bill_payment_post_message' when calling BillsApi.create_bill_payment" end # resource path local_var_path = '/v1/bills/{billId}/payments'.sub('{' + 'billId' + '}', CGI.escape(bill_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() # return_type return_type = opts[:debug_return_type] || 'BillPaymentMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.create_bill_payment", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#create_bill_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_bill_with_http_info(bill_post_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Create a bill Creates a bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 37 def create_bill_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.create_bill ...' end # verify the required parameter 'bill_post_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'bill_post_message' when calling BillsApi.create_bill" end # resource path local_var_path = '/v1/bills' # 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() # return_type return_type = opts[:debug_return_type] || 'BillMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.create_bill", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#create_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_multiple_bill_payments(multiple_bill_payments_post_message, opts = {}) ⇒ BillPaymentMessage
Create a payment for multiple bills with one check Creates a payment for multiple bills with one check. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View` `Edit` <span class="permissionBlock">Accounting > Bank Accounts</span> - `View` `Edit`
169 170 171 172 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 169 def create_multiple_bill_payments(, opts = {}) data, _status_code, _headers = create_multiple_bill_payments_with_http_info(, opts) data end |
#create_multiple_bill_payments_with_http_info(multiple_bill_payments_post_message, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Create a payment for multiple bills with one check Creates a payment for multiple bills with one check. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit` <span class="permissionBlock">Accounting &gt; Bank Accounts</span> - `View` `Edit`
179 180 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 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 179 def create_multiple_bill_payments_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.create_multiple_bill_payments ...' end # verify the required parameter 'multiple_bill_payments_post_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'multiple_bill_payments_post_message' when calling BillsApi.create_multiple_bill_payments" end # resource path local_var_path = '/v1/bills/payments' # 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() # return_type return_type = opts[:debug_return_type] || 'BillPaymentMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.create_multiple_bill_payments", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#create_multiple_bill_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_upload_file_request(bill_id, file_name_post_message, opts = {}) ⇒ FileUploadTicketMessage
Upload a bill file Uploads a file and associates it to the specified bill 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/bills/billId:int/files/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">Accounting > Bills</span> - `View` `Edit`
238 239 240 241 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 238 def create_upload_file_request(bill_id, , opts = {}) data, _status_code, _headers = create_upload_file_request_with_http_info(bill_id, , opts) data end |
#create_upload_file_request_with_http_info(bill_id, file_name_post_message, opts = {}) ⇒ Array<(FileUploadTicketMessage, Integer, Hash)>
Upload a bill file Uploads a file and associates it to the specified bill 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/bills/billId:int/files/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">Accounting &gt; Bills</span> - `View` `Edit`
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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 249 def create_upload_file_request_with_http_info(bill_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.create_upload_file_request ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.create_upload_file_request" end # verify the required parameter 'file_name_post_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'file_name_post_message' when calling BillsApi.create_upload_file_request" end # resource path local_var_path = '/v1/bills/{billId}/files/uploadrequests'.sub('{' + 'billId' + '}', CGI.escape(bill_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() # return_type return_type = opts[:debug_return_type] || 'FileUploadTicketMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.create_upload_file_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#create_upload_file_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_bill_file(bill_id, file_id, opts = {}) ⇒ nil
Delete a bill file Deletes the specified file from a bill. The file will be permanently deleted from the Buildium platform and can not be recovered. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View` `Edit` `Delete`
312 313 314 315 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 312 def delete_bill_file(bill_id, file_id, opts = {}) delete_bill_file_with_http_info(bill_id, file_id, opts) nil end |
#delete_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a bill file Deletes the specified file from a bill. The file will be permanently deleted from the Buildium platform and can not be recovered. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit` `Delete`
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 323 def delete_bill_file_with_http_info(bill_id, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.delete_bill_file ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.delete_bill_file" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling BillsApi.delete_bill_file" end # resource path local_var_path = '/v1/bills/{billId}/files/{fileId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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'] = opts.merge( :operation => :"BillsApi.delete_bill_file", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#delete_bill_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_bill_file(bill_id, file_id, opts = {}) ⇒ FileDownloadMessage
Download a bill file Downloads a specific file associated to the bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
381 382 383 384 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 381 def download_bill_file(bill_id, file_id, opts = {}) data, _status_code, _headers = download_bill_file_with_http_info(bill_id, file_id, opts) data end |
#download_bill_file_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(FileDownloadMessage, Integer, Hash)>
Download a bill file Downloads a specific file associated to the bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 392 def download_bill_file_with_http_info(bill_id, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.download_bill_file ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.download_bill_file" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling BillsApi.download_bill_file" end # resource path local_var_path = '/v1/bills/{billId}/files/{fileId}/downloadrequest'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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'] = opts.merge( :operation => :"BillsApi.download_bill_file", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#download_bill_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_files_for_bill(bill_id, opts = {}) ⇒ Array<BillFileMessage>
Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill. To download the actual file view the [Download a bill file](#tag/Bills/operation/DownloadBillFile). <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
452 453 454 455 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 452 def get_all_files_for_bill(bill_id, opts = {}) data, _status_code, _headers = get_all_files_for_bill_with_http_info(bill_id, opts) data end |
#get_all_files_for_bill_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillFileMessage>, Integer, Hash)>
Retrieve all files for a bill Retrieves the metadata for all files associated to the specified bill. To download the actual file view the [Download a bill file](#tag/Bills/operation/DownloadBillFile). <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 465 def get_all_files_for_bill_with_http_info(bill_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_all_files_for_bill ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.get_all_files_for_bill" end # resource path local_var_path = '/v1/bills/{billId}/files'.sub('{' + 'billId' + '}', CGI.escape(bill_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<BillFileMessage>' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_all_files_for_bill", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_all_files_for_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bill_by_id(bill_id, opts = {}) ⇒ BillMessage
Retrieve a bill Retrieves a single bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
521 522 523 524 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 521 def get_bill_by_id(bill_id, opts = {}) data, _status_code, _headers = get_bill_by_id_with_http_info(bill_id, opts) data end |
#get_bill_by_id_with_http_info(bill_id, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Retrieve a bill Retrieves a single bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 531 def get_bill_by_id_with_http_info(bill_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_bill_by_id ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.get_bill_by_id" end # resource path local_var_path = '/v1/bills/{billId}'.sub('{' + 'billId' + '}', CGI.escape(bill_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] || 'BillMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_bill_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_bill_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bill_file_by_id(bill_id, file_id, opts = {}) ⇒ BillFileMessage
Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
585 586 587 588 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 585 def get_bill_file_by_id(bill_id, file_id, opts = {}) data, _status_code, _headers = get_bill_file_by_id_with_http_info(bill_id, file_id, opts) data end |
#get_bill_file_by_id_with_http_info(bill_id, file_id, opts = {}) ⇒ Array<(BillFileMessage, Integer, Hash)>
Retrieve a file for a bill Retrieves the metadata for a specific file associated with the specified bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 596 def get_bill_file_by_id_with_http_info(bill_id, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_bill_file_by_id ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.get_bill_file_by_id" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling BillsApi.get_bill_file_by_id" end # resource path local_var_path = '/v1/bills/{billId}/files/{fileId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_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] || 'BillFileMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_bill_file_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_bill_file_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bill_payment_by_id(bill_id, payment_id, opts = {}) ⇒ BillPaymentMessage
Retrieve a bill payment Retrieves specific bill payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
654 655 656 657 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 654 def get_bill_payment_by_id(bill_id, payment_id, opts = {}) data, _status_code, _headers = get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts) data end |
#get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts = {}) ⇒ Array<(BillPaymentMessage, Integer, Hash)>
Retrieve a bill payment Retrieves specific bill payment. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 665 def get_bill_payment_by_id_with_http_info(bill_id, payment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_bill_payment_by_id ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.get_bill_payment_by_id" end # verify the required parameter 'payment_id' is set if @api_client.config.client_side_validation && payment_id.nil? fail ArgumentError, "Missing the required parameter 'payment_id' when calling BillsApi.get_bill_payment_by_id" end # resource path local_var_path = '/v1/bills/{billId}/payments/{paymentId}'.sub('{' + 'billId' + '}', CGI.escape(bill_id.to_s)).sub('{' + 'paymentId' + '}', CGI.escape(payment_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] || 'BillPaymentMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_bill_payment_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_bill_payment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bill_payments(bill_id, opts = {}) ⇒ Array<BillPaymentMessage>
Retrieve all bill payments Retrieves a list of bill payments for a specific bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
725 726 727 728 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 725 def get_bill_payments(bill_id, opts = {}) data, _status_code, _headers = get_bill_payments_with_http_info(bill_id, opts) data end |
#get_bill_payments_with_http_info(bill_id, opts = {}) ⇒ Array<(Array<BillPaymentMessage>, Integer, Hash)>
Retrieve all bill payments Retrieves a list of bill payments for a specific bill. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 738 def get_bill_payments_with_http_info(bill_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_bill_payments ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.get_bill_payments" end # resource path local_var_path = '/v1/bills/{billId}/payments'.sub('{' + 'billId' + '}', CGI.escape(bill_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<BillPaymentMessage>' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_bill_payments", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_bill_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_bills_async(opts = {}) ⇒ Array<BillMessage>
Retrieve all bills Retrieves a list of bills. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - ‘View`
804 805 806 807 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 804 def get_bills_async(opts = {}) data, _status_code, _headers = get_bills_async_with_http_info(opts) data end |
#get_bills_async_with_http_info(opts = {}) ⇒ Array<(Array<BillMessage>, Integer, Hash)>
Retrieve all bills Retrieves a list of bills. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View`
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 824 def get_bills_async_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.get_bills_async ...' end allowable_values = ["Rental", "RentalOwner", "Association"] if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype']) fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}" end allowable_values = ["Paid", "Unpaid", "UncollectedMarkups"] if @api_client.config.client_side_validation && opts[:'paidstatus'] && !allowable_values.include?(opts[:'paidstatus']) fail ArgumentError, "invalid value for \"paidstatus\", must be one of #{allowable_values}" end allowable_values = ["NotNeeded", "ApprovalRequired", "Approved", "Pending", "Rejected"] if @api_client.config.client_side_validation && opts[:'approvalstatuses'] && !opts[:'approvalstatuses'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"approvalstatuses\", must include one of #{allowable_values}" end # resource path local_var_path = '/v1/bills' # query parameters query_params = opts[:query_params] || {} query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil? query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil? query_params[:'vendorid'] = opts[:'vendorid'] if !opts[:'vendorid'].nil? query_params[:'referencenumber'] = opts[:'referencenumber'] if !opts[:'referencenumber'].nil? query_params[:'paidstatus'] = opts[:'paidstatus'] if !opts[:'paidstatus'].nil? query_params[:'frompaiddate'] = opts[:'frompaiddate'] if !opts[:'frompaiddate'].nil? query_params[:'topaiddate'] = opts[:'topaiddate'] if !opts[:'topaiddate'].nil? query_params[:'approvalstatuses'] = @api_client.build_collection_param(opts[:'approvalstatuses'], :multi) if !opts[:'approvalstatuses'].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<BillMessage>' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.get_bills_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#get_bills_async\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_bill(bill_id, bill_put_message, opts = {}) ⇒ BillMessage
Update a bill Use this operation to update any of the writable fields of an existing bill resource. When updating this resource keep the following in mind: <br /><ul><li>Writable fields omitted from the request or that do not have a value in the request message are set to ‘NULL`. If you do not want to update the field, submit the original field value.</li><li>When a bill has an existing payment any edits to the line items that change the total bill amount must result in the new total bill amount being equal to or greater than the amount paid.</li><li>When adding a new line item leave the `LineItem.Id` field empty.</li></ul><br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting > Bills</span> - `View` `Edit`
897 898 899 900 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 897 def update_bill(bill_id, , opts = {}) data, _status_code, _headers = update_bill_with_http_info(bill_id, , opts) data end |
#update_bill_with_http_info(bill_id, bill_put_message, opts = {}) ⇒ Array<(BillMessage, Integer, Hash)>
Update a bill Use this operation to update any of the writable fields of an existing bill resource. When updating this resource keep the following in mind: <br /><ul><li>Writable fields omitted from the request or that do not have a value in the request message are set to `NULL`. If you do not want to update the field, submit the original field value.</li><li>When a bill has an existing payment any edits to the line items that change the total bill amount must result in the new total bill amount being equal to or greater than the amount paid.</li><li>When adding a new line item leave the `LineItem.Id` field empty.</li></ul><br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Accounting &gt; Bills</span> - `View` `Edit`
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/buildium-ruby/api/bills_api.rb', line 908 def update_bill_with_http_info(bill_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BillsApi.update_bill ...' end # verify the required parameter 'bill_id' is set if @api_client.config.client_side_validation && bill_id.nil? fail ArgumentError, "Missing the required parameter 'bill_id' when calling BillsApi.update_bill" end # verify the required parameter 'bill_put_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'bill_put_message' when calling BillsApi.update_bill" end # resource path local_var_path = '/v1/bills/{billId}'.sub('{' + 'billId' + '}', CGI.escape(bill_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() # return_type return_type = opts[:debug_return_type] || 'BillMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"BillsApi.update_bill", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BillsApi#update_bill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |