class BridgeBankin::Item
Item
resource (bank connector)
Constants
- RESOURCE_TYPE
Public Class Methods
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
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 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
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
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