Class: Plaid::AssetReportCreateRequestOptions
- Inherits:
-
Object
- Object
- Plaid::AssetReportCreateRequestOptions
- Defined in:
- lib/plaid/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
If set to false, only 1 item must be healthy at the time of report creation.
-
#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
82 83 84 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 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 82 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Plaid::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::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.
32 33 34 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 32 def add_ons @add_ons end |
#client_report_id ⇒ Object
Client-generated identifier, which can be used by lenders to track loan applications.
20 21 22 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 20 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.
26 27 28 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 26 def include_fast_report @include_fast_report end |
#products ⇒ Object
Additional information that can be included in the asset report. Possible values: ‘"investments"`
29 30 31 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 29 def products @products end |
#require_all_items ⇒ Object
If set to false, only 1 item must be healthy at the time of report creation. The default value is true, which would require all items to be healthy at the time of report creation.
37 38 39 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 37 def require_all_items @require_all_items end |
#user ⇒ Object
Returns the value of attribute user.
34 35 36 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 34 def user @user end |
#webhook ⇒ Object
URL to which Plaid will send Assets webhooks, for example when the requested Asset Report is ready.
23 24 25 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 23 def webhook @webhook end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
53 54 55 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 53 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 40 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
172 173 174 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 172 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
71 72 73 74 75 76 77 78 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 71 def self.openapi_nullable Set.new([ :'client_report_id', :'webhook', :'include_fast_report', :'require_all_items' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 58 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.
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 145 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
203 204 205 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 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 203 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.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
274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 274 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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 179 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
159 160 161 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 159 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
165 166 167 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 165 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?
132 133 134 135 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 132 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
250 251 252 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 250 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 256 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
244 245 246 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 244 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
139 140 141 |
# File 'lib/plaid/models/asset_report_create_request_options.rb', line 139 def valid? true end |