Class: Plaid::AssetReportApi
- Defined in:
- lib/plaid/apis/asset_report_api.rb
Overview
AssetReportApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#asset_report_audit_copy_create(body) ⇒ ApiResponse
Plaid can provide an Audit Copy of any Asset Report directly to a participating third party on your behalf.
-
#asset_report_audit_copy_get(body) ⇒ ApiResponse
‘/asset_report/audit_copy/get` allows auditors to get a copy of an Asset Report that was previously shared via the `/asset_report/audit_copy/create` endpoint.
-
#asset_report_audit_copy_remove(body) ⇒ ApiResponse
The ‘/asset_report/audit_copy/remove` endpoint allows you to remove an Audit Copy.
-
#asset_report_create(body) ⇒ ApiResponse
The ‘/asset_report/create` endpoint initiates the process of creating an Asset Report, which can then be retrieved by passing the `asset_report_token` return value to the `/asset_report/get` or `/asset_report/pdf/get` endpoints.
-
#asset_report_filter(body) ⇒ ApiResponse
By default, an Asset Report will contain all of the accounts on a given Item.
-
#asset_report_get(body) ⇒ ApiResponse
The ‘/asset_report/get` endpoint retrieves the Asset Report in JSON format.
-
#asset_report_pdf_get(body) ⇒ ApiResponse
The ‘/asset_report/pdf/get` endpoint retrieves the Asset Report in PDF format.
-
#asset_report_refresh(body) ⇒ ApiResponse
An Asset Report is an immutable snapshot of a user’s assets.
-
#asset_report_remove(body) ⇒ ApiResponse
The ‘/item/remove` endpoint allows you to invalidate an `access_token`, meaning you will not be able to create new Asset Reports with it.
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from Plaid::BaseApi
Instance Method Details
#asset_report_audit_copy_create(body) ⇒ ApiResponse
Plaid can provide an Audit Copy of any Asset Report directly to a participating third party on your behalf. For example, Plaid can supply an Audit Copy directly to Fannie Mae on your behalf if you participate in the Day 1 Certainty™ program. An Audit Copy contains the same underlying data as the Asset Report. To grant access to an Audit Copy, use the ‘/asset_report/audit_copy/create` endpoint to create an `audit_copy_token` and then pass that token to the third party who needs access. Each third party has its own `auditor_id`, for example `fannie_mae`. You’ll need to create a separate Audit Copy for each third party to whom you want to grant access to the Report. type description here
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/plaid/apis/asset_report_api.rb', line 23 def asset_report_audit_copy_create(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/audit_copy/create', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportAuditCopyCreateResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_audit_copy_get(body) ⇒ ApiResponse
‘/asset_report/audit_copy/get` allows auditors to get a copy of an Asset Report that was previously shared via the `/asset_report/audit_copy/create` endpoint. The caller of `/asset_report/audit_copy/create` must provide the `audit_copy_token` to the auditor. This token can then be used to call `/asset_report/audit_copy/create`. type description here
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/plaid/apis/asset_report_api.rb', line 283 def asset_report_audit_copy_get(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/audit_copy/get', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportGetResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_audit_copy_remove(body) ⇒ ApiResponse
The ‘/asset_report/audit_copy/remove` endpoint allows you to remove an Audit Copy. Removing an Audit Copy invalidates the `audit_copy_token` associated with it, meaning both you and any third parties holding the token will no longer be able to use it to access Report data. Items associated with the Asset Report, the Asset Report itself and other Audit Copies of it are not affected and will remain accessible after removing the given Audit Copy. type description here
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/plaid/apis/asset_report_api.rb', line 256 def asset_report_audit_copy_remove(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/audit_copy/remove', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportAuditCopyRemoveResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_create(body) ⇒ ApiResponse
The ‘/asset_report/create` endpoint initiates the process of creating an Asset Report, which can then be retrieved by passing the `asset_report_token` return value to the `/asset_report/get` or `/asset_report/pdf/get` endpoints. The Asset Report takes some time to be created and is not available immediately after calling `/asset_report/create`. When the Asset Report is ready to be retrieved using `/asset_report/get` or `/asset_report/pdf/get`, Plaid will fire a `PRODUCT_READY` webhook. For full details of the webhook schema, see [Asset Report webhooks](plaid.com/docs/api/webhooks/#Assets-webhooks). The `/asset_report/create` endpoint creates an Asset Report at a moment in time. Asset Reports are immutable. To get an updated Asset Report, use the `/asset_report/refresh` endpoint. description here
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/plaid/apis/asset_report_api.rb', line 132 def asset_report_create(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/create', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportCreateResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_filter(body) ⇒ ApiResponse
By default, an Asset Report will contain all of the accounts on a given Item. In some cases, you may not want the Asset Report to contain all accounts. For example, you might have the end user choose which accounts are relevant in Link using the Account Select view, which you can enable in the dashboard. Or, you might always exclude certain account types or subtypes, which you can identify by using the ‘/accounts/get` endpoint. To narrow an Asset Report to only a subset of accounts, use the `/asset_report/filter` endpoint. To exclude certain Accounts from an Asset Report, first use the `/asset_report/create` endpoint to create the report, then send the `asset_report_token` along with a list of `account_ids` to exclude to the `/asset_report/filter` endpoint, to create a new Asset Report which contains only a subset of the original Asset Report’s data. Because Asset Reports are immutable, calling ‘/asset_report/filter` does not alter the original Asset Report in any way; rather, `/asset_report/filter` creates a new Asset Report with a new token and id. Asset Reports created via `/asset_report/filter` do not contain new Asset data, and are not billed. Plaid will fire a [`PRODUCT_READY`](plaid.com/docs/api/webhooks) webhook once generation of the filtered Asset Report has completed. description here
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/plaid/apis/asset_report_api.rb', line 98 def asset_report_filter(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/filter', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportFilterResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_get(body) ⇒ ApiResponse
The ‘/asset_report/get` endpoint retrieves the Asset Report in JSON format. Before calling `/asset_report/get`, you must first create the Asset Report using `/asset_report/create` (or filter an Asset Report using `/asset_report/filter`) and then wait for the [`PRODUCT_READY`](plaid.com/docs/api/webhooks) webhook to fire, indicating that the Report is ready to be retrieved. By default, an Asset Report includes transaction descriptions as returned by the bank, as opposed to parsed and categorized by Plaid. You can also receive cleaned and categorized transactions, as well as additional insights like merchant name or location information. We call this an Asset Report with Insights. An Asset Report with Insights provides transaction category, location, and merchant information in addition to the transaction strings provided in a standard Asset Report. To retrieve an Asset Report with Insights, call the `/asset_report/get` endpoint with `include_insights` set to `true`. description here
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/plaid/apis/asset_report_api.rb', line 228 def asset_report_get(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/get', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportGetResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_pdf_get(body) ⇒ ApiResponse
The ‘/asset_report/pdf/get` endpoint retrieves the Asset Report in PDF format. Before calling `/asset_report/pdf/get`, you must first create the Asset Report using `/asset_report/create` (or filter an Asset Report using `/asset_report/filter`) and then wait for the [`PRODUCT_READY`](plaid.com/docs/api/webhooks) webhook to fire, indicating that the Report is ready to be retrieved. The response to `/asset_report/pdf/get` is the PDF binary data. The `request_id` is returned in the `Plaid-Request-ID` header. [View a sample PDF Asset Report](plaid.com/documents/sample-asset-report.pdf). description here
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/plaid/apis/asset_report_api.rb', line 193 def asset_report_pdf_get(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/pdf/get', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:dynamic_deserializer)) .is_api_response(true)) .execute end |
#asset_report_refresh(body) ⇒ ApiResponse
An Asset Report is an immutable snapshot of a user’s assets. In order to “refresh” an Asset Report you created previously, you can use the ‘/asset_report/refresh` endpoint to create a new Asset Report based on the old one, but with the most recent data available. The new Asset Report will contain the same Items as the original Report, as well as the same filters applied by any call to `/asset_report/filter`. By default, the new Asset Report will also use the same parameters you submitted with your original `/asset_report/create` request, but the original `days_requested` value and the values of any parameters in the `options` object can be overridden with new values. To change these arguments, simply supply new values for them in your request to `/asset_report/refresh`. Submit an empty string (“”) for any previously-populated fields you would like set as empty. description here
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/plaid/apis/asset_report_api.rb', line 57 def asset_report_refresh(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/refresh', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportRefreshResponse.method(:from_hash)) .is_api_response(true)) .execute end |
#asset_report_remove(body) ⇒ ApiResponse
The ‘/item/remove` endpoint allows you to invalidate an `access_token`, meaning you will not be able to create new Asset Reports with it. Removing an Item does not affect any Asset Reports or Audit Copies you have already created, which will remain accessible until you remove them specifically. The `/asset_report/remove` endpoint allows you to remove an Asset Report. Removing an Asset Report invalidates its `asset_report_token`, meaning you will no longer be able to use it to access Report data or create new Audit Copies. Removing an Asset Report does not affect the underlying Items, but does invalidate any `audit_copy_tokens` associated with the Asset Report. description here
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/plaid/apis/asset_report_api.rb', line 162 def asset_report_remove(body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/asset_report/remove', Server::DEFAULT) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body) .is_required(true)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(And.new('PLAID-CLIENT-ID', 'PLAID-SECRET', 'Plaid-Version'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AssetReportRemoveResponse.method(:from_hash)) .is_api_response(true)) .execute end |