Class: Plaid::Legacy::AssetReportCreateRequestOptions
- Inherits:
-
Object
- Object
- Plaid::Legacy::AssetReportCreateRequestOptions
- Defined in:
- lib/plaid/legacy/models/asset_report_create_request_options.rb
Overview
An optional object to filter /asset_report/create results. If provided, must be non-null. The optional user object is required for the report to be eligible for Fannie Mae's Day 1 Certainty program.
Instance Attribute Summary collapse
-
#add_ons ⇒ Object
A list of add-ons that should be included in the Asset Report.
-
#client_report_id ⇒ Object
Client-generated identifier, which can be used by lenders to track loan applications.
-
#include_fast_report ⇒ Object
true to return balance and identity earlier as a fast report.
-
#products ⇒ Object
Additional information that can be included in the asset report.
-
#require_all_items ⇒ Object
By default (
true), the asynchronous report generation fails unless all Items extract successfully. -
#user ⇒ Object
Returns the value of attribute user.
-
#webhook ⇒ Object
URL to which Plaid will send Assets webhooks, for example when the requested Asset Report is ready.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AssetReportCreateRequestOptions
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ AssetReportCreateRequestOptions
Initializes the object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 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 129 130 131 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 85 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::Legacy::AssetReportCreateRequestOptions` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Plaid::Legacy::AssetReportCreateRequestOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'client_report_id') self.client_report_id = attributes[:'client_report_id'] end if attributes.key?(:'webhook') self.webhook = attributes[:'webhook'] end if attributes.key?(:'include_fast_report') self.include_fast_report = attributes[:'include_fast_report'] end if attributes.key?(:'products') if (value = attributes[:'products']).is_a?(Array) self.products = value end end if attributes.key?(:'add_ons') if (value = attributes[:'add_ons']).is_a?(Array) self.add_ons = value end end if attributes.key?(:'user') self.user = attributes[:'user'] end if attributes.key?(:'require_all_items') self.require_all_items = attributes[:'require_all_items'] else self.require_all_items = true end end |
Instance Attribute Details
#add_ons ⇒ Object
A list of add-ons that should be included in the Asset Report. When Fast Assets is requested, Plaid will create two versions of the Asset Report: the Fast Asset Report, which will contain only Identity and Balance information, and the Full Asset Report, which will also contain Transactions information. A PRODUCT_READY webhook will be fired for each Asset Report when it is ready, and the report_type field will indicate whether the webhook is firing for the FULL or FAST Asset Report. To retrieve the Fast Asset Report, call /asset_report/get with fast_report set to true. There is no additional charge for using Fast Assets. To create a Fast Asset Report, Plaid must successfully retrieve both Identity and Balance data; if Plaid encounters an error obtaining this data, the Fast Asset Report will not be created. However, as long as Plaid can obtain Transactions data, the Full Asset Report will still be available. When Investments is requested, investments must be specified in the optional_products array when initializing Link.
35 36 37 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 35 def add_ons @add_ons end |
#client_report_id ⇒ Object
Client-generated identifier, which can be used by lenders to track loan applications.
23 24 25 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 23 def client_report_id @client_report_id end |
#include_fast_report ⇒ Object
true to return balance and identity earlier as a fast report. Defaults to false if omitted.
29 30 31 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 29 def include_fast_report @include_fast_report end |
#products ⇒ Object
Additional information that can be included in the asset report. Possible values: \"investments\"
32 33 34 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 32 def products @products end |
#require_all_items ⇒ Object
By default (true), the asynchronous report generation fails unless all Items extract successfully. If set to false, the report will still be generated as long as at least one Item extracts successfully; extraction failures on the remaining Items are tolerated. This setting applies only to failures that occur during asynchronous extraction. It does not relax the synchronous check at call time: if any Item is already unhealthy when /asset_report/create is invoked, the request fails immediately regardless of this value.
40 41 42 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 40 def require_all_items @require_all_items end |
#user ⇒ Object
Returns the value of attribute user.
37 38 39 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 37 def user @user end |
#webhook ⇒ Object
URL to which Plaid will send Assets webhooks, for example when the requested Asset Report is ready.
26 27 28 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 26 def webhook @webhook end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
56 57 58 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 56 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 43 def self.attribute_map { :'client_report_id' => :'client_report_id', :'webhook' => :'webhook', :'include_fast_report' => :'include_fast_report', :'products' => :'products', :'add_ons' => :'add_ons', :'user' => :'user', :'require_all_items' => :'require_all_items' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
175 176 177 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 175 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
74 75 76 77 78 79 80 81 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 74 def self.openapi_nullable Set.new([ :'client_report_id', :'webhook', :'include_fast_report', :'require_all_items' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 61 def self.openapi_types { :'client_report_id' => :'String', :'webhook' => :'String', :'include_fast_report' => :'Boolean', :'products' => :'Array<String>', :'add_ons' => :'Array<AssetReportAddOns>', :'user' => :'AssetReportUser', :'require_all_items' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 148 def ==(o) return true if self.equal?(o) self.class == o.class && client_report_id == o.client_report_id && webhook == o.webhook && include_fast_report == o.include_fast_report && products == o.products && add_ons == o.add_ons && user == o.user && require_all_items == o.require_all_items end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 206 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Plaid::Legacy.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 277 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 182 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
162 163 164 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 162 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 168 def hash [client_report_id, webhook, include_fast_report, products, add_ons, user, require_all_items].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
135 136 137 138 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 135 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
253 254 255 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 253 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 259 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
247 248 249 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 247 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
142 143 144 |
# File 'lib/plaid/legacy/models/asset_report_create_request_options.rb', line 142 def valid? true end |