Class: BridgeBankin::Item
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Item
- Extended by:
- API::Resource
- Defined in:
- lib/bridge_bankin/item.rb
Overview
Item resource (bank connector)
Constant Summary collapse
- RESOURCE_TYPE =
"item"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.delete(id:, access_token:, **params) ⇒ Boolean
Delete a specific item.
-
.find(id:, access_token:, **params) ⇒ Account
Retrieve a single item for logged in user.
-
.list(access_token:, **params) ⇒ Array<Item>
List all logged in user items.
-
.refresh(id:, access_token:, **params) ⇒ BridgeObject
Trigger a refresh for a specific item.
-
.refresh_status(id:, access_token:, **params) ⇒ BridgeObject
Request the refresh status of a specific item.
Methods inherited from BridgeObject
#==, convert_to_bridge_object, #initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from BridgeBankin::BridgeObject
Class Method Details
.delete(id:, access_token:, **params) ⇒ Boolean
Delete a specific item
87 88 89 90 91 92 |
# 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) ⇒ Account
Retrieve a single item for logged in user
39 40 41 42 43 44 |
# 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) ⇒ Array<Item>
List all logged in user items
23 24 25 26 27 28 |
# 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) ⇒ BridgeObject
Trigger a refresh for a specific item
55 56 57 58 59 60 |
# 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) ⇒ BridgeObject
Request the refresh status of a specific item
71 72 73 74 75 76 |
# 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 |