View Source Plaid.AssetReport (elixir_plaid v1.2.1)

Plaid Asset Reports API calls and schema.

Link to this section Summary

Link to this section Functions

Link to this function

create(access_tokens, days_requested, options \\ %{}, config)

View Source

Specs

create([String.t()], non_neg_integer(), options, Plaid.config()) ::
  {:ok, Plaid.AssetReport.AsyncResponse.t()} | {:error, Plaid.Error.t()}
when options: %{
       optional(:client_report_id) => String.t(),
       optional(:webhook) => String.t(),
       optional(:user) => Plaid.AssetReport.User.t()
     }

Create an Asset Report.

Does a POST /asset_report/create call to initiate the process of creating an asset report.

Params:

  • access_tokens - List of tokens coresponding to the items that will be included in the report.
  • days_requested - The days of history to include in the asset report.

Options:

  • :client_report_id - Client-generated identifier, which can be used by lenders to track loan applications.
  • :webhook - URL Plaid will use to send webhooks for when the asset report is ready.
  • :user - Information about the user to be appended to the asset report. See Plaid.AssetReport.User for available fields.

examples

Examples

AssetReport.create(["access-sandbox-123xxx"], 3, client_id: "123", secret: "abc")
{:ok, %AssetReport.AsyncResponse{}}
Link to this function

create_audit_copy(asset_report_token, auditor_id, config)

View Source

Specs

create_audit_copy(String.t(), String.t(), Plaid.config()) ::
  {:ok, Plaid.AssetReport.CreateAuditCopyResponse.t()}
  | {:error, Plaid.Error.t()}

Create an audit copy token.

Does a POST /asset_report/audit_copy/create call to create an audit copy token which can be sent to participating auditors.

Params:

  • asset_report_token - The token for which you want to create an audit copy.
  • auditor_id - The auditor_id of the third party with whom you would like to share the Asset Report.

examples

Examples

AssetReport.create_audit_copy("assets-sandbox-123xxx", "fannie_mae", client_id: "123", secret: "abc")
{:ok, %AssetReport.CreateAuditCopyResponse{}}
Link to this function

filter(asset_report_token, account_ids_to_exclude, config)

View Source

Specs

filter(String.t(), [String.t()], Plaid.config()) ::
  {:ok, Plaid.AssetReport.AsyncResponse.t()} | {:error, Plaid.Error.t()}

Create a new, filtered Asset Report.

Does a POST /asset_report/filter call to initiate the process of creating a new asset report with filtered accounts, based off of a previous one.

Params:

  • asset_report_token - The token for the asset report you want to refresh.
  • account_ids_to_exclude - The accounts to exclude from the original Asset Report.

examples

Examples

AssetReport.filter("assets-sandbox-123xxx", ["123xxx"], client_id: "123", secret: "abc")
{:ok, %AssetReport.AsyncResponse{}}
Link to this function

get(asset_report_token, options \\ %{}, config)

View Source

Specs

get(String.t(), options, Plaid.config()) ::
  {:ok, Plaid.AssetReport.GetResponse.t()} | {:error, Plaid.Error.t()}
when options: %{optional(:include_insights) => boolean()}

Get an asset report.

Does a POST /asset_report/get call to fetch an asset report.

Params:

  • asset_report_token - The asset report token from the create_report response.

Options:

  • :include_insights - Whether we should retrieve the report as an "Assets + Insights" report.

examples

Examples

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

get_pdf(asset_report_token, config)

View Source

Specs

get_pdf(String.t(), Plaid.config()) ::
  {:ok, bitstring()} | {:error, Plaid.Error.t()}

Get an asset report as a PDF.

Does a POST /asset_report/pdf/get call to fetch an asset report as a PDF.

Params:

  • asset_report_token - The asset report token from the create_report response.

examples

Examples

AssetReport.get_pdf("asset-prod-123xxx", client_id: "123", secret: "abc")
{:ok, <<0, 1, 2, 3>>}
Link to this function

refresh(asset_report_token, options \\ %{}, config)

View Source

Specs

refresh(String.t(), options, Plaid.config()) ::
  {:ok, Plaid.AssetReport.AsyncResponse.t()} | {:error, Plaid.Error.t()}
when options: %{
       optional(:client_report_id) => String.t(),
       optional(:days_requested) => non_neg_integer(),
       optional(:webhook) => String.t(),
       optional(:user) => Plaid.AssetReport.User.t()
     }

Create a new, refreshed Asset Report.

Does a POST /asset_report/refresh call to initiate the process of creating a new asset report with refreshed data, based off of a previous one.

Params:

  • asset_report_token - The token for the asset report you want to refresh.

Options:

  • :client_report_id - Client-generated identifier, which can be used by lenders to track loan applications.
  • :days_requested - The days of history to include in the asset report.
  • :webhook - URL Plaid will use to send webhooks for when the asset report is ready.
  • :user - Information about the user to be appended to the asset report. See Plaid.AssetReport.User for available fields.

Each option above acts as an "override" of the original values passed to create/4. Meaning when not specified, values from the original create/4 request will be used.

examples

Examples

AssetReport.refresh("assets-sandbox-123xxx", client_id: "123", secret: "abc")
{:ok, %AssetReport.AsyncResponse{}}
Link to this function

remove(asset_report_token, config)

View Source

Specs

Remove an Asset Report.

Does a POST /asset_report/remove call to remove an asset report and invalidate its asset_report_token.

Params:

  • asset_report_token - The token for the asset report you want to remove.

examples

Examples

AssetReport.remove("assets-sandbox-123xxx", client_id: "123", secret: "abc")
{:ok, %AssetReport.RemoveResponse{}}
Link to this function

remove_audit_copy(audit_copy_token, config)

View Source

Specs

remove_audit_copy(String.t(), Plaid.config()) ::
  {:ok, Plaid.AssetReport.RemoveAuditCopyResponse.t()}
  | {:error, Plaid.Error.t()}

Remove an Asset Report Audit Copy.

Does a POST /asset_report/audit_copy/remove call to remove an audit copy and invalidate its audit_copy_token.

Params:

  • audit_copy_token - The token for the asset report audit copy you want to remove.

examples

Examples

AssetReport.remove_audit_copy("a-sandbox-123xxx", client_id: "123", secret: "abc")
{:ok, %AssetReport.RemoveAuditCopyResponse{}}