Class: ThePlaidApi::TransferFundingAccount1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferFundingAccount1
- Defined in:
- lib/the_plaid_api/models/transfer_funding_account1.rb
Overview
The originator’s funding account, linked with Plaid Link or ‘/transfer/migrate_account`.
Instance Attribute Summary collapse
-
#access_token ⇒ String
The access token associated with the Item data is being requested for.
-
#account_id ⇒ String
The Plaid ‘account_id` for the newly created Item.
-
#display_name ⇒ String
The name for the funding account that is displayed in the Plaid dashboard.
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(access_token:, account_id:, display_name: SKIP, additional_properties: nil) ⇒ TransferFundingAccount1
constructor
A new instance of TransferFundingAccount1.
-
#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(access_token:, account_id:, display_name: SKIP, additional_properties: nil) ⇒ TransferFundingAccount1
Returns a new instance of TransferFundingAccount1.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 46 def initialize(access_token:, account_id:, display_name: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @access_token = access_token @account_id = account_id @display_name = display_name unless display_name == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#access_token ⇒ String
The access token associated with the Item data is being requested for.
15 16 17 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 15 def access_token @access_token end |
#account_id ⇒ String
The Plaid ‘account_id` for the newly created Item.
19 20 21 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 19 def account_id @account_id end |
#display_name ⇒ String
The name for the funding account that is displayed in the Plaid dashboard.
23 24 25 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 23 def display_name @display_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_token = hash.key?('access_token') ? hash['access_token'] : nil account_id = hash.key?('account_id') ? hash['account_id'] : nil display_name = hash.key?('display_name') ? hash['display_name'] : 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. TransferFundingAccount1.new(access_token: access_token, account_id: account_id, display_name: display_name, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['access_token'] = 'access_token' @_hash['account_id'] = 'account_id' @_hash['display_name'] = 'display_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
42 43 44 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 35 def self.optionals %w[ display_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
88 89 90 91 92 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 88 def inspect class_name = self.class.name.split('::').last "<#{class_name} access_token: #{@access_token.inspect}, account_id: #{@account_id.inspect},"\ " display_name: #{@display_name.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
81 82 83 84 85 |
# File 'lib/the_plaid_api/models/transfer_funding_account1.rb', line 81 def to_s class_name = self.class.name.split('::').last "<#{class_name} access_token: #{@access_token}, account_id: #{@account_id}, display_name:"\ " #{@display_name}, additional_properties: #{@additional_properties}>" end |