Class: ThePlaidApi::TransferUserInResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferUserInResponse
- Defined in:
- lib/the_plaid_api/models/transfer_user_in_response.rb
Overview
The legal name and other information for the account holder.
Instance Attribute Summary collapse
-
#address ⇒ TransferUserAddressInResponse
The address associated with the account holder.
-
#email_address ⇒ String
The user’s email address.
-
#legal_name ⇒ String
The user’s legal name.
-
#phone_number ⇒ String
The user’s phone number.
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(legal_name:, phone_number:, email_address:, address:, additional_properties: nil) ⇒ TransferUserInResponse
constructor
A new instance of TransferUserInResponse.
-
#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(legal_name:, phone_number:, email_address:, address:, additional_properties: nil) ⇒ TransferUserInResponse
Returns a new instance of TransferUserInResponse.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 52 def initialize(legal_name:, phone_number:, email_address:, address:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @legal_name = legal_name @phone_number = phone_number @email_address = email_address @address = address @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ TransferUserAddressInResponse
The address associated with the account holder.
26 27 28 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 26 def address @address end |
#email_address ⇒ String
The user’s email address.
22 23 24 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 22 def email_address @email_address end |
#legal_name ⇒ String
The user’s legal name.
14 15 16 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 14 def legal_name @legal_name end |
#phone_number ⇒ String
The user’s phone number.
18 19 20 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 18 def phone_number @phone_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. legal_name = hash.key?('legal_name') ? hash['legal_name'] : nil phone_number = hash.key?('phone_number') ? hash['phone_number'] : nil email_address = hash.key?('email_address') ? hash['email_address'] : nil address = TransferUserAddressInResponse.from_hash(hash['address']) if hash['address'] # 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. TransferUserInResponse.new(legal_name: legal_name, phone_number: phone_number, email_address: email_address, address: address, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['legal_name'] = 'legal_name' @_hash['phone_number'] = 'phone_number' @_hash['email_address'] = 'email_address' @_hash['address'] = 'address' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 44 def self.nullables %w[ phone_number email_address address ] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 39 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
98 99 100 101 102 103 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 98 def inspect class_name = self.class.name.split('::').last "<#{class_name} legal_name: #{@legal_name.inspect}, phone_number: #{@phone_number.inspect},"\ " email_address: #{@email_address.inspect}, address: #{@address.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
90 91 92 93 94 95 |
# File 'lib/the_plaid_api/models/transfer_user_in_response.rb', line 90 def to_s class_name = self.class.name.split('::').last "<#{class_name} legal_name: #{@legal_name}, phone_number: #{@phone_number}, email_address:"\ " #{@email_address}, address: #{@address}, additional_properties:"\ " #{@additional_properties}>" end |