Class: ThePlaidApi::CashType
- Defined in:
- lib/the_plaid_api/models/cash_type.rb
Overview
Activity that modifies a cash position
Instance Attribute Summary collapse
-
#account_fee ⇒ String
Fees paid for account maintenance.
-
#contribution ⇒ String
Inflow of assets into a tax-advantaged account.
-
#deposit ⇒ String
Inflow of cash into an account.
-
#dividend ⇒ String
Inflow of cash from a dividend.
-
#interest ⇒ String
Inflow of cash from interest.
-
#legal_fee ⇒ String
Fees paid for legal charges or services.
-
#long_term_capital_gain ⇒ String
Long-term capital gain received as cash.
-
#management_fee ⇒ String
Fees paid for investment management of a mutual fund or other pooled investment vehicle.
-
#margin_expense ⇒ String
Fees paid for maintaining margin debt.
-
#non_qualified_dividend ⇒ String
Inflow of cash from a non-qualified dividend.
-
#non_resident_tax ⇒ String
Taxes paid on behalf of the investor for non-residency in investment jurisdiction.
-
#pending_credit ⇒ String
Pending inflow of cash.
-
#pending_debit ⇒ String
Pending outflow of cash.
-
#qualified_dividend ⇒ String
Inflow of cash from a qualified dividend.
-
#short_term_capital_gain ⇒ String
Short-term capital gain received as cash.
-
#stock_distribution ⇒ String
Inflow of stock from a distribution.
-
#tax ⇒ String
Taxes paid on behalf of the investor.
-
#tax_withheld ⇒ String
Taxes withheld on behalf of the customer.
-
#transfer_fee ⇒ String
Fees incurred for transfer of a holding or account.
-
#trust_fee ⇒ String
Fees related to administration of a trust account.
-
#unqualified_gain ⇒ String
Unqualified capital gain received as cash.
-
#withdrawal ⇒ String
Outflow of cash from an 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_fee: SKIP, contribution: SKIP, deposit: SKIP, dividend: SKIP, stock_distribution: SKIP, interest: SKIP, legal_fee: SKIP, long_term_capital_gain: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, pending_credit: SKIP, pending_debit: SKIP, qualified_dividend: SKIP, short_term_capital_gain: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: SKIP, withdrawal: SKIP, additional_properties: nil) ⇒ CashType
constructor
A new instance of CashType.
-
#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_fee: SKIP, contribution: SKIP, deposit: SKIP, dividend: SKIP, stock_distribution: SKIP, interest: SKIP, legal_fee: SKIP, long_term_capital_gain: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, pending_credit: SKIP, pending_debit: SKIP, qualified_dividend: SKIP, short_term_capital_gain: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: SKIP, withdrawal: SKIP, additional_properties: nil) ⇒ CashType
Returns a new instance of CashType.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 163 def initialize(account_fee: SKIP, contribution: SKIP, deposit: SKIP, dividend: SKIP, stock_distribution: SKIP, interest: SKIP, legal_fee: SKIP, long_term_capital_gain: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, pending_credit: SKIP, pending_debit: SKIP, qualified_dividend: SKIP, short_term_capital_gain: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: SKIP, withdrawal: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_fee = account_fee unless account_fee == SKIP @contribution = contribution unless contribution == SKIP @deposit = deposit unless deposit == SKIP @dividend = dividend unless dividend == SKIP @stock_distribution = stock_distribution unless stock_distribution == SKIP @interest = interest unless interest == SKIP @legal_fee = legal_fee unless legal_fee == SKIP @long_term_capital_gain = long_term_capital_gain unless long_term_capital_gain == SKIP @management_fee = management_fee unless management_fee == SKIP @margin_expense = margin_expense unless margin_expense == SKIP @non_qualified_dividend = non_qualified_dividend unless non_qualified_dividend == SKIP @non_resident_tax = non_resident_tax unless non_resident_tax == SKIP @pending_credit = pending_credit unless pending_credit == SKIP @pending_debit = pending_debit unless pending_debit == SKIP @qualified_dividend = qualified_dividend unless qualified_dividend == SKIP @short_term_capital_gain = short_term_capital_gain unless short_term_capital_gain == SKIP @tax = tax unless tax == SKIP @tax_withheld = tax_withheld unless tax_withheld == SKIP @transfer_fee = transfer_fee unless transfer_fee == SKIP @trust_fee = trust_fee unless trust_fee == SKIP @unqualified_gain = unqualified_gain unless unqualified_gain == SKIP @withdrawal = withdrawal unless withdrawal == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_fee ⇒ String
Fees paid for account maintenance
14 15 16 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 14 def account_fee @account_fee end |
#contribution ⇒ String
Inflow of assets into a tax-advantaged account
18 19 20 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 18 def contribution @contribution end |
#deposit ⇒ String
Inflow of cash into an account
22 23 24 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 22 def deposit @deposit end |
#dividend ⇒ String
Inflow of cash from a dividend
26 27 28 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 26 def dividend @dividend end |
#interest ⇒ String
Inflow of cash from interest
34 35 36 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 34 def interest @interest end |
#legal_fee ⇒ String
Fees paid for legal charges or services
38 39 40 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 38 def legal_fee @legal_fee end |
#long_term_capital_gain ⇒ String
Long-term capital gain received as cash
42 43 44 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 42 def long_term_capital_gain @long_term_capital_gain end |
#management_fee ⇒ String
Fees paid for investment management of a mutual fund or other pooled investment vehicle
47 48 49 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 47 def management_fee @management_fee end |
#margin_expense ⇒ String
Fees paid for maintaining margin debt
51 52 53 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 51 def margin_expense @margin_expense end |
#non_qualified_dividend ⇒ String
Inflow of cash from a non-qualified dividend
55 56 57 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 55 def non_qualified_dividend @non_qualified_dividend end |
#non_resident_tax ⇒ String
Taxes paid on behalf of the investor for non-residency in investment jurisdiction
60 61 62 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 60 def non_resident_tax @non_resident_tax end |
#pending_credit ⇒ String
Pending inflow of cash
64 65 66 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 64 def pending_credit @pending_credit end |
#pending_debit ⇒ String
Pending outflow of cash
68 69 70 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 68 def pending_debit @pending_debit end |
#qualified_dividend ⇒ String
Inflow of cash from a qualified dividend
72 73 74 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 72 def qualified_dividend @qualified_dividend end |
#short_term_capital_gain ⇒ String
Short-term capital gain received as cash
76 77 78 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 76 def short_term_capital_gain @short_term_capital_gain end |
#stock_distribution ⇒ String
Inflow of stock from a distribution
30 31 32 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 30 def stock_distribution @stock_distribution end |
#tax ⇒ String
Taxes paid on behalf of the investor
80 81 82 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 80 def tax @tax end |
#tax_withheld ⇒ String
Taxes withheld on behalf of the customer
84 85 86 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 84 def tax_withheld @tax_withheld end |
#transfer_fee ⇒ String
Fees incurred for transfer of a holding or account
88 89 90 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 88 def transfer_fee @transfer_fee end |
#trust_fee ⇒ String
Fees related to administration of a trust account
92 93 94 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 92 def trust_fee @trust_fee end |
#unqualified_gain ⇒ String
Unqualified capital gain received as cash
96 97 98 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 96 def unqualified_gain @unqualified_gain end |
#withdrawal ⇒ String
Outflow of cash from an account
100 101 102 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 100 def withdrawal @withdrawal end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 202 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_fee = hash.key?('account fee') ? hash['account fee'] : SKIP contribution = hash.key?('contribution') ? hash['contribution'] : SKIP deposit = hash.key?('deposit') ? hash['deposit'] : SKIP dividend = hash.key?('dividend') ? hash['dividend'] : SKIP stock_distribution = hash.key?('stock distribution') ? hash['stock distribution'] : SKIP interest = hash.key?('interest') ? hash['interest'] : SKIP legal_fee = hash.key?('legal fee') ? hash['legal fee'] : SKIP long_term_capital_gain = hash.key?('long-term capital gain') ? hash['long-term capital gain'] : SKIP management_fee = hash.key?('management fee') ? hash['management fee'] : SKIP margin_expense = hash.key?('margin expense') ? hash['margin expense'] : SKIP non_qualified_dividend = hash.key?('non-qualified dividend') ? hash['non-qualified dividend'] : SKIP non_resident_tax = hash.key?('non-resident tax') ? hash['non-resident tax'] : SKIP pending_credit = hash.key?('pending credit') ? hash['pending credit'] : SKIP pending_debit = hash.key?('pending debit') ? hash['pending debit'] : SKIP qualified_dividend = hash.key?('qualified dividend') ? hash['qualified dividend'] : SKIP short_term_capital_gain = hash.key?('short-term capital gain') ? hash['short-term capital gain'] : SKIP tax = hash.key?('tax') ? hash['tax'] : SKIP tax_withheld = hash.key?('tax withheld') ? hash['tax withheld'] : SKIP transfer_fee = hash.key?('transfer fee') ? hash['transfer fee'] : SKIP trust_fee = hash.key?('trust fee') ? hash['trust fee'] : SKIP unqualified_gain = hash.key?('unqualified gain') ? hash['unqualified gain'] : SKIP withdrawal = hash.key?('withdrawal') ? hash['withdrawal'] : 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. CashType.new(account_fee: account_fee, contribution: contribution, deposit: deposit, dividend: dividend, stock_distribution: stock_distribution, interest: interest, legal_fee: legal_fee, long_term_capital_gain: long_term_capital_gain, management_fee: management_fee, margin_expense: margin_expense, non_qualified_dividend: non_qualified_dividend, non_resident_tax: non_resident_tax, pending_credit: pending_credit, pending_debit: pending_debit, qualified_dividend: qualified_dividend, short_term_capital_gain: short_term_capital_gain, tax: tax, tax_withheld: tax_withheld, transfer_fee: transfer_fee, trust_fee: trust_fee, unqualified_gain: unqualified_gain, withdrawal: withdrawal, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
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 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 103 def self.names @_hash = {} if @_hash.nil? @_hash['account_fee'] = 'account fee' @_hash['contribution'] = 'contribution' @_hash['deposit'] = 'deposit' @_hash['dividend'] = 'dividend' @_hash['stock_distribution'] = 'stock distribution' @_hash['interest'] = 'interest' @_hash['legal_fee'] = 'legal fee' @_hash['long_term_capital_gain'] = 'long-term capital gain' @_hash['management_fee'] = 'management fee' @_hash['margin_expense'] = 'margin expense' @_hash['non_qualified_dividend'] = 'non-qualified dividend' @_hash['non_resident_tax'] = 'non-resident tax' @_hash['pending_credit'] = 'pending credit' @_hash['pending_debit'] = 'pending debit' @_hash['qualified_dividend'] = 'qualified dividend' @_hash['short_term_capital_gain'] = 'short-term capital gain' @_hash['tax'] = 'tax' @_hash['tax_withheld'] = 'tax withheld' @_hash['transfer_fee'] = 'transfer fee' @_hash['trust_fee'] = 'trust fee' @_hash['unqualified_gain'] = 'unqualified gain' @_hash['withdrawal'] = 'withdrawal' @_hash end |
.nullables ⇒ Object
An array for nullable fields
159 160 161 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 159 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 131 def self.optionals %w[ account_fee contribution deposit dividend stock_distribution interest legal_fee long_term_capital_gain management_fee margin_expense non_qualified_dividend non_resident_tax pending_credit pending_debit qualified_dividend short_term_capital_gain tax tax_withheld transfer_fee trust_fee unqualified_gain withdrawal ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 288 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_fee: #{@account_fee.inspect}, contribution:"\ " #{@contribution.inspect}, deposit: #{@deposit.inspect}, dividend: #{@dividend.inspect},"\ " stock_distribution: #{@stock_distribution.inspect}, interest: #{@interest.inspect},"\ " legal_fee: #{@legal_fee.inspect}, long_term_capital_gain:"\ " #{@long_term_capital_gain.inspect}, management_fee: #{@management_fee.inspect},"\ " margin_expense: #{@margin_expense.inspect}, non_qualified_dividend:"\ " #{@non_qualified_dividend.inspect}, non_resident_tax: #{@non_resident_tax.inspect},"\ " pending_credit: #{@pending_credit.inspect}, pending_debit: #{@pending_debit.inspect},"\ " qualified_dividend: #{@qualified_dividend.inspect}, short_term_capital_gain:"\ " #{@short_term_capital_gain.inspect}, tax: #{@tax.inspect}, tax_withheld:"\ " #{@tax_withheld.inspect}, transfer_fee: #{@transfer_fee.inspect}, trust_fee:"\ " #{@trust_fee.inspect}, unqualified_gain: #{@unqualified_gain.inspect}, withdrawal:"\ " #{@withdrawal.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/the_plaid_api/models/cash_type.rb', line 273 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_fee: #{@account_fee}, contribution: #{@contribution}, deposit:"\ " #{@deposit}, dividend: #{@dividend}, stock_distribution: #{@stock_distribution}, interest:"\ " #{@interest}, legal_fee: #{@legal_fee}, long_term_capital_gain:"\ " #{@long_term_capital_gain}, management_fee: #{@management_fee}, margin_expense:"\ " #{@margin_expense}, non_qualified_dividend: #{@non_qualified_dividend}, non_resident_tax:"\ " #{@non_resident_tax}, pending_credit: #{@pending_credit}, pending_debit:"\ " #{@pending_debit}, qualified_dividend: #{@qualified_dividend}, short_term_capital_gain:"\ " #{@short_term_capital_gain}, tax: #{@tax}, tax_withheld: #{@tax_withheld}, transfer_fee:"\ " #{@transfer_fee}, trust_fee: #{@trust_fee}, unqualified_gain: #{@unqualified_gain},"\ " withdrawal: #{@withdrawal}, additional_properties: #{@additional_properties}>" end |