Class used to call the Assets product. Documentation available at plaid.com/docs/api/#assets.

Sections
Methods
C
F
G
R
Public
Instance Public methods
create(access_tokens, days_requested, options = {})

Create an asset report.

access_tokens

An array of access tokens, one token for each Item to be included in the Asset Report.

days_requested

Days of transaction history requested to be included in the Asset Report. Plaid will return as much data as possible within the implied date range, up to a maximum of 730 days (2 years) of history.

options

An optional object containing client-provided user information, a client-provided report ID, and a webhook. For more information, see the website listed above.

Returns

Returns a AssetReportCreateResponse object.

# File lib/plaid/products/asset_report.rb, line 18
def create(access_tokens, days_requested, options = {})
  post_with_auth 'asset_report/create',
                 AssetReportCreateResponse,
                 access_tokens: access_tokens,
                 days_requested: days_requested,
                 options: options
end
create_audit_copy(asset_report_token, auditor_id)

Create an audit copy token.

asset_report_token

The asset report token from the `create` response.

auditor_id

The ID of the third party with which you would like to share the asset report.

Returns

Returns a AuditCopyCreateResponse object.

# File lib/plaid/products/asset_report.rb, line 107
def create_audit_copy(asset_report_token, auditor_id)
  post_with_auth 'asset_report/audit_copy/create',
                 AuditCopyCreateResponse,
                 asset_report_token: asset_report_token,
                 auditor_id: auditor_id
end
filter(asset_report_token, account_ids_to_exclude)

Create a new, filtered asset report.

asset_report_token

The asset report token for the asset report you want to filter.

account_ids_to_exclude

The list of account IDs to exclude from the original asset report.

Returns

Returns a AssetReportFilterResponse object.

# File lib/plaid/products/asset_report.rb, line 34
def filter(asset_report_token, account_ids_to_exclude)
  post_with_auth 'asset_report/filter',
                 AssetReportFilterResponse,
                 asset_report_token: asset_report_token,
                 account_ids_to_exclude: account_ids_to_exclude
end
get(asset_report_token, include_insights: false)

Retrieve an asset report.

asset_report_token

The asset report token from the `create` response.

include_insights

An optional boolean specifying whether we should retrieve the report as an “Assets + Insights” report. For information about Assets + Insights reports, see plaid.com/docs/#assets.

Returns

Returns a AssetReportGetResponse object.

# File lib/plaid/products/asset_report.rb, line 72
def get(asset_report_token, include_insights: false)
  post_with_auth 'asset_report/get',
                 AssetReportGetResponse,
                 asset_report_token: asset_report_token,
                 include_insights: include_insights
end
get_audit_copy(audit_copy_token)

Retrieve an audit copy.

audit_copy_token

The audit copy token from the `create_audit_copy` response.

Returns

Returns a AuditCopyGetResponse object.

# File lib/plaid/products/asset_report.rb, line 120
def get_audit_copy(audit_copy_token)
  post_with_auth 'asset_report/audit_copy/get',
                 AuditCopyGetResponse,
                 audit_copy_token: audit_copy_token
end
get_pdf(asset_report_token)

Retrieve an asset report as a PDF.

asset_report_token

The asset report token from the `create` response.

Returns

Returns the PDF.

# File lib/plaid/products/asset_report.rb, line 84
def get_pdf(asset_report_token)
  client.post_with_auth 'asset_report/pdf/get',
                        asset_report_token: asset_report_token
end
refresh(asset_report_token, days_requested, options = {})

Create a new, refreshed asset report.

asset_report_token

The asset report token for the asset report you want to refresh.

days_requested

Days of transaction history requested to be included in the Asset Report. Plaid will return as much data as possible within the implied date range, up to a maximum of 730 days (2 years) of history.

options

An optional object containing client-provided user information, a client-provided report ID, and a webhook. For more information, see the website listed above.

Returns

Returns a AssetReportRefreshResponse object.

# File lib/plaid/products/asset_report.rb, line 55
def refresh(asset_report_token, days_requested, options = {})
  post_with_auth 'asset_report/refresh',
                 AssetReportRefreshResponse,
                 asset_report_token: asset_report_token,
                 days_requested: days_requested,
                 options: options
end
remove(asset_report_token)

Remove an asset report.

asset_report_token

The asset report token from the `create` response.

Returns

Returns a AssetReportRemoveResponse object.

# File lib/plaid/products/asset_report.rb, line 94
def remove(asset_report_token)
  post_with_auth 'asset_report/remove',
                 AssetReportRemoveResponse,
                 asset_report_token: asset_report_token
end
remove_audit_copy(audit_copy_token)

Remove an audit copy token.

audit_copy_token

The audit copy token from the `create` response.

Returns

Returns a AuditCopyRemoveResponse object.

# File lib/plaid/products/asset_report.rb, line 131
def remove_audit_copy(audit_copy_token)
  post_with_auth 'asset_report/audit_copy/remove',
                 AuditCopyRemoveResponse,
                 audit_copy_token: audit_copy_token
end