class BridgeBankin::Item

Item resource (bank connector)

Constants

RESOURCE_TYPE

Public Class Methods

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

Delete a specific item

@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 [Boolean] the request success status

# File lib/bridge_bankin/item.rb, line 87
def delete(id:, access_token:, **params)
  protected_resource(access_token) do
    api_client.delete("/v2/items/#{id}", **params)
    true
  end
end
find(id:, access_token:, **params) click to toggle source

Retrieve a single item 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 requested user item

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

List all logged in user items

@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<Item>] the user items

# File lib/bridge_bankin/item.rb, line 23
def list(access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/items", **params)
    convert_to_bridge_object(**data)
  end
end
refresh(id:, access_token:, **params) click to toggle source

Trigger a refresh for a specific item

@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 [BridgeObject] the item refresh status path

# File lib/bridge_bankin/item.rb, line 55
def refresh(id:, access_token:, **params)
  protected_resource(access_token) do
    data = api_client.post("/v2/items/#{id}/refresh", **params)
    convert_to_bridge_object(**data)
  end
end
refresh_status(id:, access_token:, **params) click to toggle source

Request the refresh status of a specific item

@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 [BridgeObject] the user item refresh status

# File lib/bridge_bankin/item.rb, line 71
def refresh_status(id:, access_token:, **params)
  protected_resource(access_token) do
    data = api_client.get("/v2/items/#{id}/refresh/status", **params)
    convert_to_bridge_object(**data)
  end
end