Class: Plaid::LinkTokenCreateRequestIncomeVerification
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::LinkTokenCreateRequestIncomeVerification
- Defined in:
- lib/plaid/models/link_token_create_request_income_verification.rb
Overview
Specifies options for initializing Link for use with the Income (beta) product. This field is required if ‘income_verification` is included in the `products` array.
Instance Attribute Summary collapse
-
#asset_report_id ⇒ String
The ‘asset_report_id` of an asset report associated with the user, as provided by `/asset_report/create`.
-
#income_verification_id ⇒ String
The ‘income_verification_id` of the verification instance, as provided by `/income/verification/create`.
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(income_verification_id:, asset_report_id: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestIncomeVerification
constructor
A new instance of LinkTokenCreateRequestIncomeVerification.
-
#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(income_verification_id:, asset_report_id: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestIncomeVerification
Returns a new instance of LinkTokenCreateRequestIncomeVerification.
46 47 48 49 50 51 52 53 54 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 46 def initialize(income_verification_id:, asset_report_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @income_verification_id = income_verification_id @asset_report_id = asset_report_id unless asset_report_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#asset_report_id ⇒ String
The ‘asset_report_id` of an asset report associated with the user, as provided by `/asset_report/create`. Providing an `asset_report_id` is optional and can be used to verify the user through a streamlined flow. If provided, the bank linking flow will be skipped.
24 25 26 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 24 def asset_report_id @asset_report_id end |
#income_verification_id ⇒ String
The ‘income_verification_id` of the verification instance, as provided by `/income/verification/create`.
17 18 19 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 17 def income_verification_id @income_verification_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. income_verification_id = hash.key?('income_verification_id') ? hash['income_verification_id'] : nil asset_report_id = hash.key?('asset_report_id') ? hash['asset_report_id'] : SKIP # 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. LinkTokenCreateRequestIncomeVerification.new(income_verification_id: income_verification_id, asset_report_id: asset_report_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['income_verification_id'] = 'income_verification_id' @_hash['asset_report_id'] = 'asset_report_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
42 43 44 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 35 def self.optionals %w[ asset_report_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
87 88 89 90 91 92 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 87 def inspect class_name = self.class.name.split('::').last "<#{class_name} income_verification_id: #{@income_verification_id.inspect},"\ " asset_report_id: #{@asset_report_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
80 81 82 83 84 |
# File 'lib/plaid/models/link_token_create_request_income_verification.rb', line 80 def to_s class_name = self.class.name.split('::').last "<#{class_name} income_verification_id: #{@income_verification_id}, asset_report_id:"\ " #{@asset_report_id}, additional_properties: #{@additional_properties}>" end |