Class: Plaid::DepositSwitchTargetAccount
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::DepositSwitchTargetAccount
- Defined in:
- lib/plaid/models/deposit_switch_target_account.rb
Overview
DepositSwitchTargetAccount Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of the deposit switch destination account, as it will be displayed to the end user in the Deposit Switch interface.
-
#account_number ⇒ String
Account number for deposit switch destination.
-
#account_subtype ⇒ AccountSubtype1
The account subtype of the account, either ‘checking` or `savings`.
-
#routing_number ⇒ String
Routing number for deposit switch destination.
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_number:, routing_number:, account_name:, account_subtype:, additional_properties: nil) ⇒ DepositSwitchTargetAccount
constructor
A new instance of DepositSwitchTargetAccount.
-
#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_number:, routing_number:, account_name:, account_subtype:, additional_properties: nil) ⇒ DepositSwitchTargetAccount
Returns a new instance of DepositSwitchTargetAccount.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 50 def initialize(account_number:, routing_number:, account_name:, account_subtype:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_number = account_number @routing_number = routing_number @account_name = account_name @account_subtype = account_subtype @additional_properties = additional_properties end |
Instance Attribute Details
#account_name ⇒ String
The name of the deposit switch destination account, as it will be displayed to the end user in the Deposit Switch interface. It is not required to match the name used in online banking.
24 25 26 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 24 def account_name @account_name end |
#account_number ⇒ String
Account number for deposit switch destination
14 15 16 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 14 def account_number @account_number end |
#account_subtype ⇒ AccountSubtype1
The account subtype of the account, either ‘checking` or `savings`.
28 29 30 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 28 def account_subtype @account_subtype end |
#routing_number ⇒ String
Routing number for deposit switch destination
18 19 20 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 18 def routing_number @routing_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('account_number') ? hash['account_number'] : nil routing_number = hash.key?('routing_number') ? hash['routing_number'] : nil account_name = hash.key?('account_name') ? hash['account_name'] : nil account_subtype = hash.key?('account_subtype') ? hash['account_subtype'] : nil # 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. DepositSwitchTargetAccount.new(account_number: account_number, routing_number: routing_number, account_name: account_name, account_subtype: account_subtype, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'account_number' @_hash['routing_number'] = 'routing_number' @_hash['account_name'] = 'account_name' @_hash['account_subtype'] = 'account_subtype' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 41 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number.inspect}, routing_number:"\ " #{@routing_number.inspect}, account_name: #{@account_name.inspect}, account_subtype:"\ " #{@account_subtype.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 96 |
# File 'lib/plaid/models/deposit_switch_target_account.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number}, routing_number: #{@routing_number},"\ " account_name: #{@account_name}, account_subtype: #{@account_subtype},"\ " additional_properties: #{@additional_properties}>" end |