Method: DocuSign_eSign::BillingApi#list_invoices_with_http_info

Defined in:
lib/docusign_esign/api/billing_api.rb

#list_invoices_with_http_info(account_id, options = DocuSign_eSign::ListInvoicesOptions.default) ⇒ Array<(BillingInvoicesResponse, Fixnum, Hash)>

Get a List of Billing Invoices Retrieves a list of invoices for the account. If the from date or to date queries are not specified, the response returns invoices for the last 365 days. Privileges required: account administrator

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListInvoicesOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BillingInvoicesResponse, Fixnum, Hash)>)

    BillingInvoicesResponse data, response status code and response headers



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
# File 'lib/docusign_esign/api/billing_api.rb', line 447

def list_invoices_with_http_info(, options = DocuSign_eSign::ListInvoicesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: BillingApi.list_invoices ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling BillingApi.list_invoices" if .nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/billing_invoices".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BillingInvoicesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BillingApi#list_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end