Class: ThePlaidApi::InvestmentsAuthAccountDetails401K
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::InvestmentsAuthAccountDetails401K
- Defined in:
- lib/the_plaid_api/models/investments_auth_account_details401_k.rb
Overview
Additional account fee and contribution information for 401k type accounts.
Instance Attribute Summary collapse
-
#account_id ⇒ String
The ID of the 401k account.
-
#contribution_details ⇒ InvestmentsAuth401KContributionDetails
Object containing information on contribution transactions for the 401k account.
-
#fee_details ⇒ InvestmentsAuth401KFeeDetails
Object containing information on account fee transactions for the 401k account.
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(account_id: SKIP, fee_details: SKIP, contribution_details: SKIP, additional_properties: nil) ⇒ InvestmentsAuthAccountDetails401K
constructor
A new instance of InvestmentsAuthAccountDetails401K.
-
#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(account_id: SKIP, fee_details: SKIP, contribution_details: SKIP, additional_properties: nil) ⇒ InvestmentsAuthAccountDetails401K
Returns a new instance of InvestmentsAuthAccountDetails401K.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 50 def initialize(account_id: SKIP, fee_details: SKIP, contribution_details: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id unless account_id == SKIP @fee_details = fee_details unless fee_details == SKIP @contribution_details = contribution_details unless contribution_details == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_id ⇒ String
The ID of the 401k account.
14 15 16 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 14 def account_id @account_id end |
#contribution_details ⇒ InvestmentsAuth401KContributionDetails
Object containing information on contribution transactions for the 401k account. Note that the sum fields in this object represent the total of absolute contribution values.
25 26 27 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 25 def contribution_details @contribution_details end |
#fee_details ⇒ InvestmentsAuth401KFeeDetails
Object containing information on account fee transactions for the 401k account.
19 20 21 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 19 def fee_details @fee_details end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('account_id') ? hash['account_id'] : SKIP fee_details = InvestmentsAuth401KFeeDetails.from_hash(hash['fee_details']) if hash['fee_details'] if hash['contribution_details'] contribution_details = InvestmentsAuth401KContributionDetails.from_hash(hash['contribution_details']) end # 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. InvestmentsAuthAccountDetails401K.new(account_id: account_id, fee_details: fee_details, contribution_details: contribution_details, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['fee_details'] = 'fee_details' @_hash['contribution_details'] = 'contribution_details' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 37 def self.optionals %w[ account_id fee_details contribution_details ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
96 97 98 99 100 101 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 96 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, fee_details: #{@fee_details.inspect},"\ " contribution_details: #{@contribution_details.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
88 89 90 91 92 93 |
# File 'lib/the_plaid_api/models/investments_auth_account_details401_k.rb', line 88 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, fee_details: #{@fee_details},"\ " contribution_details: #{@contribution_details}, additional_properties:"\ " #{@additional_properties}>" end |