Files
Paul NicolasandGitHub d66040c0eb feat(*): add plaid bank bridge connector and boilerplate (#499)
* feat(models): add bank bridge models

* feat(storage): add bank bridge migrations and functions

* feat(engine): add bank bridge workflows

* feat(connectors): add plaid bank bridge connector

* feat(events): add bank bridge events

* feat(api): add bank bridge router

* feat(*): bank bridge boilerplate

* fix nil pointer crash

* add more check when getting link attempts + change enum

* fix tests

* remove print

* fixes after reviews

* add specific table for access tokens

* fixes after reviews

* fix go mod tidy

* remove indexes + null default

* plaid: add tests

* *: add more tests

* fix after rebase
2025-07-30 13:44:31 +00:00

22 lines
574 B
Go

package client
import (
"context"
"github.com/formancehq/payments/internal/connectors/metrics"
"github.com/plaid/plaid-go/v34/plaid"
)
func (c *client) ListAccounts(ctx context.Context, accessToken string) (plaid.AccountsGetResponse, error) {
ctx = context.WithValue(ctx, metrics.MetricOperationContextKey, "list_accounts")
request := plaid.NewAccountsGetRequest(accessToken)
resp, _, err := c.client.PlaidApi.AccountsGet(ctx).AccountsGetRequest(*request).Execute()
if err != nil {
return plaid.AccountsGetResponse{}, wrapSDKError(err)
}
return resp, nil
}