class BridgeBankin::Stock

Stock resource

Constants

RESOURCE_TYPE

Public Class Methods

find(id:, access_token:, **params) click to toggle source

Retrieve a single stock for logged in user

@param [Integer] id the id of the requested resource @param [String] access_token the access token provided during the user authentication @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Account] the user accounts

# File lib/bridge_bankin/stock.rb, line 52
def find(id:, access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/stocks/#{id}", **params)
    convert_to_bridge_object(**data)
  end
end
list(access_token:, **params) click to toggle source

List all logged in user stocks

@param [String] access_token the access token provided during the user authentication @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Array<Stock>] the user accounts

# File lib/bridge_bankin/stock.rb, line 21
def list(access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/stocks", **params)
    convert_to_bridge_object(**data)
  end
end
list_updated(access_token:, **params) click to toggle source

List all logged in user updated stocks

@param [String] access_token the access token provided during the user authentication @param [Hash] params any params that might be required (or optional) to communicate with the API

@return [Array<Stock>] the user accounts

# File lib/bridge_bankin/stock.rb, line 36
def list_updated(access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/stocks/updated", **params)
    convert_to_bridge_object(**data)
  end
end