View Source Plaid.Item (elixir_plaid v1.2.1)
Plaid Item API calls and schema.
Link to this section Summary
Functions
Exchange a public token for an access token.
Get information about an item.
Invalidate an access token.
Removes an item.
Update a webhook for an access_token.
Link to this section Types
Specs
Link to this section Functions
Specs
exchange_public_token(String.t(), Plaid.config()) :: {:ok, Plaid.Item.ExchangePublicTokenResponse.t()} | {:error, Plaid.Error.t()}
Exchange a public token for an access token.
Does a POST /item/public_token/exchange
call which exchanges a public token
for an access token.
params
Params
public_token
- Your public_token, obtained from the LinkonSuccess
callback orPOST /sandbox/item/public_token/create.
examples
Examples
Item.exchange_public_token(
"public-prod-123xxx",
client_id: "123",
secret: "abc"
)
{:ok, %Item.ExchangePublicTokenResponse{}}
Specs
get(String.t(), Plaid.config()) :: {:ok, Plaid.Item.GetResponse.t()} | {:error, Plaid.Error.t()}
Get information about an item.
Does a POST /item/get
call which returns information about an item and
its status.
params
Params
access_token
- The access token associated with the item.
examples
Examples
Item.get("access-prod-123xxx", client_id: "123", secret: "abc")
{:ok, %Item.GetResponse{}}
Specs
invalidate_access_token(String.t(), Plaid.config()) :: {:ok, Plaid.Item.InvalidateAccessTokenResponse.t()} | {:error, Plaid.Error.t()}
Invalidate an access token.
Does a POST /item/access_token/invalidate
call which rotates an access token
for an item. Immediately invalidating it and returning a new access token.
params
Params
access_token
- The access token associated with the Item data is being requested for.
examples
Examples
Item.invalidate_access_token(
"access-prod-123xxx",
client_id: "123",
secret: "abc"
)
{:ok, %Item.InvalidateAccessTokenResponse{}}
Specs
remove(String.t(), Plaid.config()) :: {:ok, Plaid.SimpleResponse.t()} | {:error, Plaid.Error.t()}
Removes an item.
Does a POST /item/remove
call to remove an item.
params
Params
access_token
- The access token associated with the item.
examples
Examples
Item.remove("access-prod-123xxx", client_id: "123", secret: "abc")
{:ok, %Plaid.SimpleResponse{}}
Specs
update_webhook(String.t(), String.t(), Plaid.config()) :: {:ok, Plaid.Item.UpdateWebhookResponse.t()} | {:error, Plaid.Error.t()}
Update a webhook for an access_token.
Does a POST /item/webhook/update
call which is used to update webhook
for a particular access_token.
params
Params
access_token
- The access token associated with the item.webhook
- The new webhook URL.
examples
Examples
Item.update_webhook(
"access-prod-123xxx",
"https://plaid.com/fake/webhook",
client_id: "123",
secret: "abc"
)
{:ok, %Item.UpdateWebhookResponse{}}