Class: ThePlaidApi::CreditFreddieMacParty
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CreditFreddieMacParty
- Defined in:
- lib/the_plaid_api/models/credit_freddie_mac_party.rb
Overview
A collection of information about a single party to a transaction. Included direct participants like the borrower and seller as well as indirect participants such as the flood certificate provider.
Instance Attribute Summary collapse
-
#individual ⇒ CreditFreddieMacPartyIndividual
Documentation not found in the MISMO model viewer and not provided by Freddie Mac.
-
#roles ⇒ Roles
Documentation not found in the MISMO model viewer and not provided by Freddie Mac.
-
#taxpayer_identifiers ⇒ TaxpayerIdentifiers
The collection of ‘TAXPAYER_IDENTIFICATION` elements.
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(individual:, roles:, taxpayer_identifiers:, additional_properties: nil) ⇒ CreditFreddieMacParty
constructor
A new instance of CreditFreddieMacParty.
-
#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(individual:, roles:, taxpayer_identifiers:, additional_properties: nil) ⇒ CreditFreddieMacParty
Returns a new instance of CreditFreddieMacParty.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 47 def initialize(individual:, roles:, taxpayer_identifiers:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @individual = individual @roles = roles @taxpayer_identifiers = taxpayer_identifiers @additional_properties = additional_properties end |
Instance Attribute Details
#individual ⇒ CreditFreddieMacPartyIndividual
Documentation not found in the MISMO model viewer and not provided by Freddie Mac.
17 18 19 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 17 def individual @individual end |
#roles ⇒ Roles
Documentation not found in the MISMO model viewer and not provided by Freddie Mac.
22 23 24 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 22 def roles @roles end |
#taxpayer_identifiers ⇒ TaxpayerIdentifiers
The collection of ‘TAXPAYER_IDENTIFICATION` elements
26 27 28 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 26 def taxpayer_identifiers @taxpayer_identifiers end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. individual = CreditFreddieMacPartyIndividual.from_hash(hash['INDIVIDUAL']) if hash['INDIVIDUAL'] roles = Roles.from_hash(hash['ROLES']) if hash['ROLES'] taxpayer_identifiers = TaxpayerIdentifiers.from_hash(hash['TAXPAYER_IDENTIFIERS']) if hash['TAXPAYER_IDENTIFIERS'] # 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. CreditFreddieMacParty.new(individual: individual, roles: roles, taxpayer_identifiers: taxpayer_identifiers, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['individual'] = 'INDIVIDUAL' @_hash['roles'] = 'ROLES' @_hash['taxpayer_identifiers'] = 'TAXPAYER_IDENTIFIERS' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 38 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} individual: #{@individual.inspect}, roles: #{@roles.inspect},"\ " taxpayer_identifiers: #{@taxpayer_identifiers.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/the_plaid_api/models/credit_freddie_mac_party.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} individual: #{@individual}, roles: #{@roles}, taxpayer_identifiers:"\ " #{@taxpayer_identifiers}, additional_properties: #{@additional_properties}>" end |