Method: Plaid::PlaidApi#accounts_get_with_http_info
- Defined in:
- lib/plaid/api/plaid_api.rb
#accounts_get_with_http_info(accounts_get_request, opts = {}) ⇒ Array<(AccountsGetResponse, Integer, Hash)>
Retrieve accounts The `/accounts/get` endpoint can be used to retrieve a list of accounts associated with any linked Item. Plaid will only return active bank accounts — that is, accounts that are not closed and are capable of carrying a balance. To return new accounts that were created after the user linked their Item, you can listen for the [`NEW_ACCOUNTS_AVAILABLE`](plaid.com/docs/api/items/#new_accounts_available) webhook and then use Link's [update mode](plaid.com/docs/link/update-mode/) to request that the user share this new account with you. `/accounts/get` is free to use and retrieves cached information, rather than extracting fresh information from the institution. The balance returned will reflect the balance at the time of the last successful Item update. If the Item is enabled for a regularly updating product, such as Transactions, Investments, or Liabilities, the balance will typically update about once a day, as long as the Item is healthy. If the Item is enabled only for products that do not frequently update, such as Auth or Identity, balance data may be much older. For realtime balance information, use the paid endpoint `/accounts/balance/get` instead.
105 106 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 |
# File 'lib/plaid/api/plaid_api.rb', line 105 def accounts_get_with_http_info(accounts_get_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PlaidApi.accounts_get ...' end # verify the required parameter 'accounts_get_request' is set if @api_client.config.client_side_validation && accounts_get_request.nil? fail ArgumentError, "Missing the required parameter 'accounts_get_request' when calling PlaidApi.accounts_get" end # resource path local_var_path = '/accounts/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' 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(accounts_get_request) # return_type return_type = opts[:debug_return_type] || 'AccountsGetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret'] = opts.merge( :operation => :"PlaidApi.accounts_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PlaidApi#accounts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |