Class: ThePlaidApi::BankTransferUser
- Defined in:
- lib/the_plaid_api/models/bank_transfer_user.rb
Overview
The legal name and other information for the account holder.
Instance Attribute Summary collapse
-
#email_address ⇒ String
The account holder’s email.
-
#legal_name ⇒ String
The account holder’s full legal name.
-
#routing_number ⇒ String
The account holder’s routing 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:, email_address: SKIP, routing_number: SKIP, additional_properties: nil) ⇒ BankTransferUser
constructor
A new instance of BankTransferUser.
-
#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:, email_address: SKIP, routing_number: SKIP, additional_properties: nil) ⇒ BankTransferUser
Returns a new instance of BankTransferUser.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 50 def initialize(legal_name:, email_address: SKIP, routing_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @legal_name = legal_name @email_address = email_address unless email_address == SKIP @routing_number = routing_number unless routing_number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#email_address ⇒ String
The account holder’s email.
19 20 21 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 19 def email_address @email_address end |
#legal_name ⇒ String
The account holder’s full legal name. If the transfer ‘ach_class` is `ccd`, this should be the business name of the account holder.
15 16 17 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 15 def legal_name @legal_name end |
#routing_number ⇒ String
The account holder’s routing number. This field is only used in response data. Do not provide this field when making requests.
24 25 26 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 24 def routing_number @routing_number 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 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. legal_name = hash.key?('legal_name') ? hash['legal_name'] : nil email_address = hash.key?('email_address') ? hash['email_address'] : SKIP routing_number = hash.key?('routing_number') ? hash['routing_number'] : 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. BankTransferUser.new(legal_name: legal_name, email_address: email_address, routing_number: routing_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['legal_name'] = 'legal_name' @_hash['email_address'] = 'email_address' @_hash['routing_number'] = 'routing_number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 47 48 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 44 def self.nullables %w[ email_address ] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 36 def self.optionals %w[ email_address routing_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 98 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} legal_name: #{@legal_name.inspect}, email_address:"\ " #{@email_address.inspect}, routing_number: #{@routing_number.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/the_plaid_api/models/bank_transfer_user.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} legal_name: #{@legal_name}, email_address: #{@email_address},"\ " routing_number: #{@routing_number}, additional_properties: #{@additional_properties}>" end |