Class: ThePlaidApi::DepositoryAccount
- Defined in:
- lib/the_plaid_api/models/depository_account.rb
Overview
An account type holding cash, in which funds are deposited.
Instance Attribute Summary collapse
-
#cash_management ⇒ String
A cash management account, typically a cash account at a brokerage.
-
#cd ⇒ String
Certificate of deposit account.
-
#checking ⇒ String
Checking account.
-
#ebt ⇒ String
An Electronic Benefit Transfer (EBT) account, used by certain public assistance programs to distribute funds (US only).
-
#hsa ⇒ String
Health Savings Account (US only) that can only hold cash.
-
#limited_purpose_checking ⇒ String
A checking account that is limited in its purpose or usage.
-
#money_market ⇒ String
Money market account.
-
#paypal ⇒ String
PayPal depository account.
-
#prepaid ⇒ String
Prepaid debit card.
-
#savings ⇒ String
Savings 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(cash_management:, cd:, checking:, ebt:, hsa:, limited_purpose_checking:, money_market:, paypal:, prepaid:, savings:, additional_properties: nil) ⇒ DepositoryAccount
constructor
A new instance of DepositoryAccount.
-
#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(cash_management:, cd:, checking:, ebt:, hsa:, limited_purpose_checking:, money_market:, paypal:, prepaid:, savings:, additional_properties: nil) ⇒ DepositoryAccount
Returns a new instance of DepositoryAccount.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 79 def initialize(cash_management:, cd:, checking:, ebt:, hsa:, limited_purpose_checking:, money_market:, paypal:, prepaid:, savings:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @cash_management = cash_management @cd = cd @checking = checking @ebt = ebt @hsa = hsa @limited_purpose_checking = limited_purpose_checking @money_market = money_market @paypal = paypal @prepaid = prepaid @savings = savings @additional_properties = additional_properties end |
Instance Attribute Details
#cash_management ⇒ String
A cash management account, typically a cash account at a brokerage
14 15 16 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 14 def cash_management @cash_management end |
#cd ⇒ String
Certificate of deposit account
18 19 20 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 18 def cd @cd end |
#checking ⇒ String
Checking account
22 23 24 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 22 def checking @checking end |
#ebt ⇒ String
An Electronic Benefit Transfer (EBT) account, used by certain public assistance programs to distribute funds (US only)
27 28 29 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 27 def ebt @ebt end |
#hsa ⇒ String
Health Savings Account (US only) that can only hold cash
31 32 33 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 31 def hsa @hsa end |
#limited_purpose_checking ⇒ String
A checking account that is limited in its purpose or usage
35 36 37 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 35 def limited_purpose_checking @limited_purpose_checking end |
#money_market ⇒ String
Money market account
39 40 41 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 39 def money_market @money_market end |
#paypal ⇒ String
PayPal depository account
43 44 45 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 43 def paypal @paypal end |
#prepaid ⇒ String
Prepaid debit card
47 48 49 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 47 def prepaid @prepaid end |
#savings ⇒ String
Savings account
51 52 53 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 51 def savings @savings end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 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 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cash_management = hash.key?('cash management') ? hash['cash management'] : nil cd = hash.key?('cd') ? hash['cd'] : nil checking = hash.key?('checking') ? hash['checking'] : nil ebt = hash.key?('ebt') ? hash['ebt'] : nil hsa = hash.key?('hsa') ? hash['hsa'] : nil limited_purpose_checking = hash.key?('limited purpose checking') ? hash['limited purpose checking'] : nil money_market = hash.key?('money market') ? hash['money market'] : nil paypal = hash.key?('paypal') ? hash['paypal'] : nil prepaid = hash.key?('prepaid') ? hash['prepaid'] : nil savings = hash.key?('savings') ? hash['savings'] : 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. DepositoryAccount.new(cash_management: cash_management, cd: cd, checking: checking, ebt: ebt, hsa: hsa, limited_purpose_checking: limited_purpose_checking, money_market: money_market, paypal: paypal, prepaid: prepaid, savings: savings, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['cash_management'] = 'cash management' @_hash['cd'] = 'cd' @_hash['checking'] = 'checking' @_hash['ebt'] = 'ebt' @_hash['hsa'] = 'hsa' @_hash['limited_purpose_checking'] = 'limited purpose checking' @_hash['money_market'] = 'money market' @_hash['paypal'] = 'paypal' @_hash['prepaid'] = 'prepaid' @_hash['savings'] = 'savings' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
70 71 72 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 70 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
147 148 149 150 151 152 153 154 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 147 def inspect class_name = self.class.name.split('::').last "<#{class_name} cash_management: #{@cash_management.inspect}, cd: #{@cd.inspect}, checking:"\ " #{@checking.inspect}, ebt: #{@ebt.inspect}, hsa: #{@hsa.inspect},"\ " limited_purpose_checking: #{@limited_purpose_checking.inspect}, money_market:"\ " #{@money_market.inspect}, paypal: #{@paypal.inspect}, prepaid: #{@prepaid.inspect},"\ " savings: #{@savings.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
138 139 140 141 142 143 144 |
# File 'lib/the_plaid_api/models/depository_account.rb', line 138 def to_s class_name = self.class.name.split('::').last "<#{class_name} cash_management: #{@cash_management}, cd: #{@cd}, checking: #{@checking},"\ " ebt: #{@ebt}, hsa: #{@hsa}, limited_purpose_checking: #{@limited_purpose_checking},"\ " money_market: #{@money_market}, paypal: #{@paypal}, prepaid: #{@prepaid}, savings:"\ " #{@savings}, additional_properties: #{@additional_properties}>" end |