Class: BridgeBankin::Account
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Account
- Extended by:
- BridgeBankin::API::Resource
- Defined in:
- lib/bridge_bankin/account.rb
Overview
Account resource
Constant Summary collapse
- RESOURCE_TYPE =
"account"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.find(id:, access_token:, **params) ⇒ Account
Retrieve a single account for logged in user.
-
.list(access_token:, **params) ⇒ Array<Account>
List all logged in user accounts.
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 account for logged in user
38 39 40 41 42 43 |
# File 'lib/bridge_bankin/account.rb', line 38 def find(id:, access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/accounts/#{id}", **params) convert_to_bridge_object(**data) end end |
.list(access_token:, **params) ⇒ Array<Account>
List all logged in user accounts
21 22 23 24 25 26 27 |
# File 'lib/bridge_bankin/account.rb', line 21 def list(access_token:, **params) protected_resource(access_token) do data = api_client.get("/v2/accounts", **params) # binding.pry convert_to_bridge_object(**data) end end |