Method: Plaid::PlaidApi#liabilities_get_with_http_info

Defined in:
lib/plaid/api/plaid_api.rb

#liabilities_get_with_http_info(liabilities_get_request, opts = {}) ⇒ Array<(LiabilitiesGetResponse, Integer, Hash)>

Retrieve Liabilities data The &#x60;/liabilities/get&#x60; endpoint returns various details about an Item with loan or credit accounts. Liabilities data is available primarily for US financial institutions, with some limited coverage of Canadian institutions. Currently supported account types are account type &#x60;credit&#x60; with account subtype &#x60;credit card&#x60; or &#x60;paypal&#x60;, and account type &#x60;loan&#x60; with account subtype &#x60;student&#x60; or &#x60;mortgage&#x60;. To limit accounts listed in Link to types and subtypes supported by Liabilities, you can use the &#x60;account_filters&#x60; parameter when [creating a Link token](plaid.com/docs/api/tokens/#linktokencreate). The types of information returned by Liabilities can include balances and due dates, loan terms, and account details such as original loan amount and guarantor. Data is refreshed approximately once per day; the latest data can be retrieved by calling &#x60;/liabilities/get&#x60;. Note: This request may take some time to complete if &#x60;liabilities&#x60; was not specified as an initial product when creating the Item. This is because Plaid must communicate directly with the institution to retrieve the additional data.

Parameters:

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

    the optional parameters

Returns:

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

    LiabilitiesGetResponse data, response status code and response headers



3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
# File 'lib/plaid/api/plaid_api.rb', line 3742

def liabilities_get_with_http_info(liabilities_get_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PlaidApi.liabilities_get ...'
  end
  # verify the required parameter 'liabilities_get_request' is set
  if @api_client.config.client_side_validation && liabilities_get_request.nil?
    fail ArgumentError, "Missing the required parameter 'liabilities_get_request' when calling PlaidApi.liabilities_get"
  end
  # resource path
  local_var_path = '/liabilities/get'

  # 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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(liabilities_get_request)

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

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

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