Method: Propertyware::AccountingApi#delete_gl_account_with_http_info

Defined in:
lib/propertyware/api/accounting_api.rb

#delete_gl_account_with_http_info(gl_account, opts = {}) ⇒ Array<(ResponseEntity, Integer, Hash)>

Delete a general ledger account (BETA) &lt;p class&#x3D;&quot;betaError&quot;&gt;&lt;b&gt;Note: &lt;/b&gt;Write access is only available to customers who have opted in to our beta program. Please reach out to support if you&#39;d like to be included.&lt;/p&gt; Delete a general ledger account.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Required permission:&lt;/b&gt;&lt;br/&gt;&lt;span class&#x3D;&quot;permissionBlock&quot;&gt;GL ACCOUNTS&lt;/span&gt; - &lt;code&gt;Delete&lt;/code&gt;

Parameters:

  • gl_account (Integer)

    GL Account ID

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

    the optional parameters

Returns:

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

    ResponseEntity data, response status code and response headers



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
482
483
484
485
486
# File 'lib/propertyware/api/accounting_api.rb', line 440

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountingApi.delete_gl_account ...'
  end
  # verify the required parameter 'gl_account' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'gl_account' when calling AccountingApi.delete_gl_account"
  end
  # resource path
  local_var_path = '/accounting/glaccounts/{glAccount}'.sub('{' + 'glAccount' + '}', CGI.escape(.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(['*/*'])

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

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

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

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

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