Class: ThePlaidApi::AssetReportGetRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::AssetReportGetRequest
- Defined in:
- lib/the_plaid_api/models/asset_report_get_request.rb
Overview
AssetReportGetRequest defines the request schema for ‘/asset_report/get`
Instance Attribute Summary collapse
-
#asset_report_token ⇒ String
A token that can be provided to endpoints such as ‘/asset_report/get` or `/asset_report/pdf/get` to fetch or update an Asset Report.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#fast_report ⇒ TrueClass | FalseClass
‘true` to fetch “fast” version of asset report.
-
#include_insights ⇒ TrueClass | FalseClass
‘true` if you would like to retrieve the Asset Report with Insights, `false` otherwise.
-
#options ⇒ AssetReportGetRequestOptions
An optional object to filter or add data to ‘/asset_report/get` results.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#user_token ⇒ String
The user token associated with the User for which to create an asset report for.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(client_id: SKIP, secret: SKIP, asset_report_token: SKIP, user_token: SKIP, include_insights: false, fast_report: false, options: SKIP, additional_properties: nil) ⇒ AssetReportGetRequest
constructor
A new instance of AssetReportGetRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(client_id: SKIP, secret: SKIP, asset_report_token: SKIP, user_token: SKIP, include_insights: false, fast_report: false, options: SKIP, additional_properties: nil) ⇒ AssetReportGetRequest
Returns a new instance of AssetReportGetRequest.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 81 def initialize(client_id: SKIP, secret: SKIP, asset_report_token: SKIP, user_token: SKIP, include_insights: false, fast_report: false, options: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @asset_report_token = asset_report_token unless asset_report_token == SKIP @user_token = user_token unless user_token == SKIP @include_insights = include_insights unless include_insights == SKIP @fast_report = fast_report unless fast_report == SKIP @options = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#asset_report_token ⇒ String
A token that can be provided to endpoints such as ‘/asset_report/get` or `/asset_report/pdf/get` to fetch or update an Asset Report.
26 27 28 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 26 def asset_report_token @asset_report_token end |
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
16 17 18 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 16 def client_id @client_id end |
#fast_report ⇒ TrueClass | FalseClass
‘true` to fetch “fast” version of asset report. Defaults to false if omitted. Can only be used if `/asset_report/create` was called with `options.add_ons` set to `[“fast_assets”]`.
43 44 45 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 43 def fast_report @fast_report end |
#include_insights ⇒ TrueClass | FalseClass
‘true` if you would like to retrieve the Asset Report with Insights, `false` otherwise. This field defaults to `false` if omitted.
37 38 39 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 37 def include_insights @include_insights end |
#options ⇒ AssetReportGetRequestOptions
An optional object to filter or add data to ‘/asset_report/get` results. If provided, must be non-`null`.
48 49 50 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 48 def @options end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
21 22 23 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 21 def secret @secret end |
#user_token ⇒ String
The user token associated with the User for which to create an asset report for. The latest asset report associated with the User will be returned
32 33 34 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 32 def user_token @user_token end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP asset_report_token = hash.key?('asset_report_token') ? hash['asset_report_token'] : SKIP user_token = hash.key?('user_token') ? hash['user_token'] : SKIP include_insights = hash['include_insights'] ||= false fast_report = hash['fast_report'] ||= false = AssetReportGetRequestOptions.from_hash(hash['options']) if hash['options'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. AssetReportGetRequest.new(client_id: client_id, secret: secret, asset_report_token: asset_report_token, user_token: user_token, include_insights: include_insights, fast_report: fast_report, options: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 51 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['asset_report_token'] = 'asset_report_token' @_hash['user_token'] = 'user_token' @_hash['include_insights'] = 'include_insights' @_hash['fast_report'] = 'fast_report' @_hash['options'] = 'options' @_hash end |
.nullables ⇒ Object
An array for nullable fields
77 78 79 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 77 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 64 def self.optionals %w[ client_id secret asset_report_token user_token include_insights fast_report options ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
140 141 142 143 144 145 146 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 140 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " asset_report_token: #{@asset_report_token.inspect}, user_token: #{@user_token.inspect},"\ " include_insights: #{@include_insights.inspect}, fast_report: #{@fast_report.inspect},"\ " options: #{@options.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
131 132 133 134 135 136 137 |
# File 'lib/the_plaid_api/models/asset_report_get_request.rb', line 131 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, asset_report_token:"\ " #{@asset_report_token}, user_token: #{@user_token}, include_insights:"\ " #{@include_insights}, fast_report: #{@fast_report}, options: #{@options},"\ " additional_properties: #{@additional_properties}>" end |