View Source Plaid.AssetReport (elixir_plaid v1.2.1)
Plaid Asset Reports API calls and schema.
Link to this section Summary
Functions
Create an Asset Report.
Create an audit copy token.
Create a new, filtered Asset Report.
Get an asset report.
Get an asset report as a PDF.
Create a new, refreshed Asset Report.
Remove an Asset Report.
Remove an Asset Report Audit Copy.
Link to this section Functions
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. SeePlaid.AssetReport.User
for available fields.
examples
Examples
AssetReport.create(["access-sandbox-123xxx"], 3, client_id: "123", secret: "abc")
{:ok, %AssetReport.AsyncResponse{}}
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{}}
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{}}
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 thecreate_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{}}
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 thecreate_report
response.
examples
Examples
AssetReport.get_pdf("asset-prod-123xxx", client_id: "123", secret: "abc")
{:ok, <<0, 1, 2, 3>>}
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. SeePlaid.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{}}
Specs
remove(String.t(), Plaid.config()) :: {:ok, Plaid.AssetReport.RemoveResponse.t()} | {:error, Plaid.Error.t()}
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{}}
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{}}