Class: Pluggy::Services::AccountService
- Inherits:
-
BaseService
- Object
- BaseService
- Pluggy::Services::AccountService
- Defined in:
- lib/pluggy/services/other_services.rb
Instance Method Summary collapse
-
#balance(id) ⇒ Object
Live balance, read from the institution rather than the last sync.
-
#list(item_id:, type: nil) ⇒ Object
GET /accounts.
- #retrieve(id) ⇒ Object
-
#statements(id) ⇒ Object
Monthly statement documents.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Pluggy::Services::BaseService
Instance Method Details
#balance(id) ⇒ Object
Live balance, read from the institution rather than the last sync. Slower than Account#balance and the one endpoint in scope that documents a 429 (institution rate limit) and a 502 (institution unavailable).
23 24 25 26 |
# File 'lib/pluggy/services/other_services.rb', line 23 def balance(id) require_args!(id: id) object_request(:get, "/accounts/#{id}/balance", klass: Resources::Balance) end |
#list(item_id:, type: nil) ⇒ Object
GET /accounts. type filters between "BANK" and "CREDIT".
paginated: false -- the endpoint returns a page envelope but documents no page/pageSize parameters, so there is no way to request page 2.
10 11 12 13 |
# File 'lib/pluggy/services/other_services.rb', line 10 def list(item_id:, type: nil) require_args!(item_id: item_id) list_request("/accounts", klass: Resources::Account, itemId: item_id, type: type) end |