Plaid.Item (elixir_plaid v0.1.1) View Source

Plaid Item API calls and schema.

Link to this section Summary

Functions

Get information about an item.

Removes an item.

Update a webhook for an access_token.

Link to this section Types

Specs

t() :: %Plaid.Item{
  available_products: [String.t()],
  billed_products: [String.t()],
  consent_expiration_time: String.t() | nil,
  error: Plaid.Error.t() | nil,
  has_perpetual_otp: boolean(),
  institution_id: String.t() | nil,
  item_id: String.t(),
  update_type: String.t(),
  webhook: String.t() | nil
}

Link to this section Functions

Link to this function

get(access_token, config)

View Source

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

  • access_token - The access token associated with the item.

Examples

Item.get("access-prod-123xxx", client_id: "123", secret: "abc")
{:ok, %Item.GetResponse{}}
Link to this function

remove(access_token, config)

View Source

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

  • access_token - The access token associated with the item.

Examples

Item.remove("access-prod-123xxx", client_id: "123", secret: "abc")
{:ok, %Plaid.SimpleResponse{}}
Link to this function

update_webhook(access_token, webhook, config)

View Source

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

  • access_token - The access token associated with the item.
  • webhook - The new webhook URL.

Examples

Item.update_webhook(
  "access-prod-123xxx",
  "https://plaid.com/fake/webhook",
  client_id: "123",
  secret: "abc"
)
{:ok, %Plaid.UpdateWebhookResponse{}}