Class: ThePlaidApi::FeeType
- Defined in:
- lib/the_plaid_api/models/fee_type.rb
Overview
Fees on the account, e.g. commission, bookkeeping, options-related.
Instance Attribute Summary collapse
-
#account_fee ⇒ String
Fees paid for account maintenance.
-
#adjustment ⇒ String
Increase or decrease in quantity of item.
-
#dividend ⇒ String
Inflow of cash from a dividend.
-
#interest ⇒ String
Inflow of cash from interest.
-
#interest_receivable ⇒ String
Inflow of cash from interest receivable.
-
#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.
-
#qualified_dividend ⇒ String
Inflow of cash from a qualified dividend.
-
#return_of_principal ⇒ String
Repayment of loan principal.
-
#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.
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, adjustment: SKIP, dividend: SKIP, interest: SKIP, interest_receivable: SKIP, long_term_capital_gain: SKIP, legal_fee: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, qualified_dividend: SKIP, return_of_principal: SKIP, short_term_capital_gain: SKIP, stock_distribution: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: SKIP, additional_properties: nil) ⇒ FeeType
constructor
A new instance of FeeType.
-
#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, adjustment: SKIP, dividend: SKIP, interest: SKIP, interest_receivable: SKIP, long_term_capital_gain: SKIP, legal_fee: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, qualified_dividend: SKIP, return_of_principal: SKIP, short_term_capital_gain: SKIP, stock_distribution: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: SKIP, additional_properties: nil) ⇒ FeeType
Returns a new instance of FeeType.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 151 def initialize(account_fee: SKIP, adjustment: SKIP, dividend: SKIP, interest: SKIP, interest_receivable: SKIP, long_term_capital_gain: SKIP, legal_fee: SKIP, management_fee: SKIP, margin_expense: SKIP, non_qualified_dividend: SKIP, non_resident_tax: SKIP, qualified_dividend: SKIP, return_of_principal: SKIP, short_term_capital_gain: SKIP, stock_distribution: SKIP, tax: SKIP, tax_withheld: SKIP, transfer_fee: SKIP, trust_fee: SKIP, unqualified_gain: 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 @adjustment = adjustment unless adjustment == SKIP @dividend = dividend unless dividend == SKIP @interest = interest unless interest == SKIP @interest_receivable = interest_receivable unless interest_receivable == SKIP @long_term_capital_gain = long_term_capital_gain unless long_term_capital_gain == SKIP @legal_fee = legal_fee unless legal_fee == 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 @qualified_dividend = qualified_dividend unless qualified_dividend == SKIP @return_of_principal = return_of_principal unless return_of_principal == SKIP @short_term_capital_gain = short_term_capital_gain unless short_term_capital_gain == SKIP @stock_distribution = stock_distribution unless stock_distribution == 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 @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/fee_type.rb', line 14 def account_fee @account_fee end |
#adjustment ⇒ String
Increase or decrease in quantity of item
18 19 20 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 18 def adjustment @adjustment end |
#dividend ⇒ String
Inflow of cash from a dividend
22 23 24 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 22 def dividend @dividend end |
#interest ⇒ String
Inflow of cash from interest
26 27 28 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 26 def interest @interest end |
#interest_receivable ⇒ String
Inflow of cash from interest receivable
30 31 32 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 30 def interest_receivable @interest_receivable end |
#legal_fee ⇒ String
Fees paid for legal charges or services
38 39 40 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 38 def legal_fee @legal_fee end |
#long_term_capital_gain ⇒ String
Long-term capital gain received as cash
34 35 36 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 34 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
43 44 45 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 43 def management_fee @management_fee end |
#margin_expense ⇒ String
Fees paid for maintaining margin debt
47 48 49 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 47 def margin_expense @margin_expense end |
#non_qualified_dividend ⇒ String
Inflow of cash from a non-qualified dividend
51 52 53 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 51 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
56 57 58 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 56 def non_resident_tax @non_resident_tax end |
#qualified_dividend ⇒ String
Inflow of cash from a qualified dividend
60 61 62 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 60 def qualified_dividend @qualified_dividend end |
#return_of_principal ⇒ String
Repayment of loan principal
64 65 66 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 64 def return_of_principal @return_of_principal end |
#short_term_capital_gain ⇒ String
Short-term capital gain received as cash
68 69 70 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 68 def short_term_capital_gain @short_term_capital_gain end |
#stock_distribution ⇒ String
Inflow of stock from a distribution
72 73 74 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 72 def stock_distribution @stock_distribution end |
#tax ⇒ String
Taxes paid on behalf of the investor
76 77 78 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 76 def tax @tax end |
#tax_withheld ⇒ String
Taxes withheld on behalf of the customer
80 81 82 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 80 def tax_withheld @tax_withheld end |
#transfer_fee ⇒ String
Fees incurred for transfer of a holding or account
84 85 86 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 84 def transfer_fee @transfer_fee end |
#trust_fee ⇒ String
Fees related to administration of a trust account
88 89 90 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 88 def trust_fee @trust_fee end |
#unqualified_gain ⇒ String
Unqualified capital gain received as cash
92 93 94 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 92 def unqualified_gain @unqualified_gain end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 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 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 188 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_fee = hash.key?('account fee') ? hash['account fee'] : SKIP adjustment = hash.key?('adjustment') ? hash['adjustment'] : SKIP dividend = hash.key?('dividend') ? hash['dividend'] : SKIP interest = hash.key?('interest') ? hash['interest'] : SKIP interest_receivable = hash.key?('interest receivable') ? hash['interest receivable'] : SKIP long_term_capital_gain = hash.key?('long-term capital gain') ? hash['long-term capital gain'] : SKIP legal_fee = hash.key?('legal fee') ? hash['legal fee'] : 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 qualified_dividend = hash.key?('qualified dividend') ? hash['qualified dividend'] : SKIP return_of_principal = hash.key?('return of principal') ? hash['return of principal'] : SKIP short_term_capital_gain = hash.key?('short-term capital gain') ? hash['short-term capital gain'] : SKIP stock_distribution = hash.key?('stock distribution') ? hash['stock distribution'] : 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 # 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. FeeType.new(account_fee: account_fee, adjustment: adjustment, dividend: dividend, interest: interest, interest_receivable: interest_receivable, long_term_capital_gain: long_term_capital_gain, legal_fee: legal_fee, management_fee: management_fee, margin_expense: margin_expense, non_qualified_dividend: non_qualified_dividend, non_resident_tax: non_resident_tax, qualified_dividend: qualified_dividend, return_of_principal: return_of_principal, short_term_capital_gain: short_term_capital_gain, stock_distribution: stock_distribution, tax: tax, tax_withheld: tax_withheld, transfer_fee: transfer_fee, trust_fee: trust_fee, unqualified_gain: unqualified_gain, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 95 def self.names @_hash = {} if @_hash.nil? @_hash['account_fee'] = 'account fee' @_hash['adjustment'] = 'adjustment' @_hash['dividend'] = 'dividend' @_hash['interest'] = 'interest' @_hash['interest_receivable'] = 'interest receivable' @_hash['long_term_capital_gain'] = 'long-term capital gain' @_hash['legal_fee'] = 'legal fee' @_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['qualified_dividend'] = 'qualified dividend' @_hash['return_of_principal'] = 'return of principal' @_hash['short_term_capital_gain'] = 'short-term capital gain' @_hash['stock_distribution'] = 'stock distribution' @_hash['tax'] = 'tax' @_hash['tax_withheld'] = 'tax withheld' @_hash['transfer_fee'] = 'transfer fee' @_hash['trust_fee'] = 'trust fee' @_hash['unqualified_gain'] = 'unqualified gain' @_hash end |
.nullables ⇒ Object
An array for nullable fields
147 148 149 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 147 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 121 def self.optionals %w[ account_fee adjustment dividend interest interest_receivable long_term_capital_gain legal_fee management_fee margin_expense non_qualified_dividend non_resident_tax qualified_dividend return_of_principal short_term_capital_gain stock_distribution tax tax_withheld transfer_fee trust_fee unqualified_gain ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 271 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_fee: #{@account_fee.inspect}, adjustment: #{@adjustment.inspect},"\ " dividend: #{@dividend.inspect}, interest: #{@interest.inspect}, interest_receivable:"\ " #{@interest_receivable.inspect}, long_term_capital_gain:"\ " #{@long_term_capital_gain.inspect}, legal_fee: #{@legal_fee.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}, qualified_dividend: #{@qualified_dividend.inspect},"\ " return_of_principal: #{@return_of_principal.inspect}, short_term_capital_gain:"\ " #{@short_term_capital_gain.inspect}, stock_distribution: #{@stock_distribution.inspect},"\ " tax: #{@tax.inspect}, tax_withheld: #{@tax_withheld.inspect}, transfer_fee:"\ " #{@transfer_fee.inspect}, trust_fee: #{@trust_fee.inspect}, unqualified_gain:"\ " #{@unqualified_gain.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/the_plaid_api/models/fee_type.rb', line 256 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_fee: #{@account_fee}, adjustment: #{@adjustment}, dividend:"\ " #{@dividend}, interest: #{@interest}, interest_receivable: #{@interest_receivable},"\ " long_term_capital_gain: #{@long_term_capital_gain}, legal_fee: #{@legal_fee},"\ " management_fee: #{@management_fee}, margin_expense: #{@margin_expense},"\ " non_qualified_dividend: #{@non_qualified_dividend}, non_resident_tax:"\ " #{@non_resident_tax}, qualified_dividend: #{@qualified_dividend}, return_of_principal:"\ " #{@return_of_principal}, short_term_capital_gain: #{@short_term_capital_gain},"\ " stock_distribution: #{@stock_distribution}, tax: #{@tax}, tax_withheld: #{@tax_withheld},"\ " transfer_fee: #{@transfer_fee}, trust_fee: #{@trust_fee}, unqualified_gain:"\ " #{@unqualified_gain}, additional_properties: #{@additional_properties}>" end |