Class: BridgeBankin::Stock
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Stock
- Extended by:
- API::Resource
- Defined in:
- lib/bridge_bankin/stock.rb
Overview
Stock resource
Constant Summary collapse
- RESOURCE_TYPE =
"stock"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.find(id:, access_token:, **params) ⇒ Account
Retrieve a single stock for logged in user.
-
.list(access_token:, **params) ⇒ Array<Stock>
List all logged in user stocks.
-
.list_updated(access_token:, **params) ⇒ Array<Stock>
List all logged in user updated stocks.
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
.find(id:, access_token:, **params) ⇒ Account
Retrieve a single stock for logged in user
52 53 54 55 56 57 |
# 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) ⇒ Array<Stock>
List all logged in user stocks
21 22 23 24 25 26 |
# 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) ⇒ Array<Stock>
List all logged in user updated stocks
36 37 38 39 40 41 |
# 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 |