Class: ThePlaidApi::NumbersAchNullable
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::NumbersAchNullable
- Defined in:
- lib/the_plaid_api/models/numbers_ach_nullable.rb
Overview
Identifying information for transferring money to or from a US account via ACH or wire transfer.
Instance Attribute Summary collapse
-
#account ⇒ String
The ACH account number for the account.
-
#account_id ⇒ String
The Plaid account ID associated with the account numbers.
-
#can_transfer_in ⇒ TrueClass | FalseClass
Whether the account supports ACH transfers into the account.
-
#can_transfer_out ⇒ TrueClass | FalseClass
Whether the account supports ACH transfers out of the account.
-
#is_tokenized_account_number ⇒ TrueClass | FalseClass
Indicates whether the account number is tokenized by the institution.
-
#routing ⇒ String
The ACH routing number for the account.
-
#wire_routing ⇒ String
The wire transfer routing number for the 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:, account:, routing:, wire_routing:, is_tokenized_account_number: SKIP, can_transfer_in: SKIP, can_transfer_out: SKIP, additional_properties: nil) ⇒ NumbersAchNullable
constructor
A new instance of NumbersAchNullable.
-
#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:, account:, routing:, wire_routing:, is_tokenized_account_number: SKIP, can_transfer_in: SKIP, can_transfer_out: SKIP, additional_properties: nil) ⇒ NumbersAchNullable
Returns a new instance of NumbersAchNullable.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 88 def initialize(account_id:, account:, routing:, wire_routing:, is_tokenized_account_number: SKIP, can_transfer_in: SKIP, can_transfer_out: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_id = account_id @account = account unless is_tokenized_account_number == SKIP @is_tokenized_account_number = is_tokenized_account_number end @routing = routing @wire_routing = wire_routing @can_transfer_in = can_transfer_in unless can_transfer_in == SKIP @can_transfer_out = can_transfer_out unless can_transfer_out == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account ⇒ String
The ACH account number for the account. At certain institutions, including Chase, PNC, and (coming May 2025) US Bank, you will receive “tokenized” routing and account numbers, which are not the user’s actual account and routing numbers. For important details on how this may impact your integration and on how to avoid fraud, user confusion, and ACH returns, see [Tokenized account numbers](plaid.com/docs/auth/#tokenized-account-numbers).
25 26 27 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 25 def account @account end |
#account_id ⇒ String
The Plaid account ID associated with the account numbers
15 16 17 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 15 def account_id @account_id end |
#can_transfer_in ⇒ TrueClass | FalseClass
Whether the account supports ACH transfers into the account
51 52 53 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 51 def can_transfer_in @can_transfer_in end |
#can_transfer_out ⇒ TrueClass | FalseClass
Whether the account supports ACH transfers out of the account
55 56 57 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 55 def can_transfer_out @can_transfer_out end |
#is_tokenized_account_number ⇒ TrueClass | FalseClass
Indicates whether the account number is tokenized by the institution. For important details on how tokenized account numbers may impact your integration, see [Tokenized account numbers](plaid.com/docs/auth/#tokenized-account-numbers).
32 33 34 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 32 def is_tokenized_account_number @is_tokenized_account_number end |
#routing ⇒ String
The ACH routing number for the account. This may be a tokenized routing number. For more information, see [Tokenized account numbers](plaid.com/docs/auth/#tokenized-account-numbers).
38 39 40 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 38 def routing @routing end |
#wire_routing ⇒ String
The wire transfer routing number for the account. This field is only populated if the institution is known to use a separate wire transfer routing number. Many institutions do not have a separate wire routing number and use the ACH routing number for wires instead. It is recommended to have the end user manually confirm their wire routing number before sending any wires to their account, especially if this field is ‘null`.
47 48 49 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 47 def wire_routing @wire_routing end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 108 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('account_id') ? hash['account_id'] : nil account = hash.key?('account') ? hash['account'] : nil routing = hash.key?('routing') ? hash['routing'] : nil wire_routing = hash.key?('wire_routing') ? hash['wire_routing'] : nil is_tokenized_account_number = hash.key?('is_tokenized_account_number') ? hash['is_tokenized_account_number'] : SKIP can_transfer_in = hash.key?('can_transfer_in') ? hash['can_transfer_in'] : SKIP can_transfer_out = hash.key?('can_transfer_out') ? hash['can_transfer_out'] : 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. NumbersAchNullable.new(account_id: account_id, account: account, routing: routing, wire_routing: wire_routing, is_tokenized_account_number: is_tokenized_account_number, can_transfer_in: can_transfer_in, can_transfer_out: can_transfer_out, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 58 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'account_id' @_hash['account'] = 'account' @_hash['is_tokenized_account_number'] = 'is_tokenized_account_number' @_hash['routing'] = 'routing' @_hash['wire_routing'] = 'wire_routing' @_hash['can_transfer_in'] = 'can_transfer_in' @_hash['can_transfer_out'] = 'can_transfer_out' @_hash end |
.nullables ⇒ Object
An array for nullable fields
80 81 82 83 84 85 86 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 80 def self.nullables %w[ wire_routing can_transfer_in can_transfer_out ] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 71 def self.optionals %w[ is_tokenized_account_number can_transfer_in can_transfer_out ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
151 152 153 154 155 156 157 158 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 151 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id.inspect}, account: #{@account.inspect},"\ " is_tokenized_account_number: #{@is_tokenized_account_number.inspect}, routing:"\ " #{@routing.inspect}, wire_routing: #{@wire_routing.inspect}, can_transfer_in:"\ " #{@can_transfer_in.inspect}, can_transfer_out: #{@can_transfer_out.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
142 143 144 145 146 147 148 |
# File 'lib/the_plaid_api/models/numbers_ach_nullable.rb', line 142 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_id: #{@account_id}, account: #{@account},"\ " is_tokenized_account_number: #{@is_tokenized_account_number}, routing: #{@routing},"\ " wire_routing: #{@wire_routing}, can_transfer_in: #{@can_transfer_in}, can_transfer_out:"\ " #{@can_transfer_out}, additional_properties: #{@additional_properties}>" end |