Class: FdxV660Api::InvestmentAccountEntity

Inherits:
AccountEntity show all
Defined in:
lib/fdx_v660_api/models/investment_account_entity.rb

Overview

An investment account type and information such as balances, transactions, holdings and privileges

Instance Attribute Summary collapse

Attributes inherited from AccountEntity

#balance_type, #bank_institution_id, #bank_transit_id, #bill_pay_status, #contact, #early_penalty_flag, #interest_rate, #interest_rate_as_of, #interest_rate_index, #interest_rate_type, #last_activity_date, #line_of_business, #line_of_business_type, #micr_number, #prior_interest_rate, #reward_balances, #reward_program_id, #routing_transit_number, #transactions_included, #transfer_in, #transfer_out

Attributes inherited from AccountDescriptorEntity

#account_category, #account_close_date, #account_id, #account_number, #account_number_display, #account_open_date, #account_type, #currency, #data_clusters, #description, #domicile, #error, #fi_attributes, #links, #nickname, #parent_account_id, #product_id, #product_name, #status, #transfer_out_use_cases

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AccountEntity

discriminators, #to_custom_interest_rate_as_of

Methods inherited from AccountDescriptorEntity

discriminators

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(earned_interest: SKIP, balance_as_of: SKIP, allowed_check_writing: SKIP, allowed_option_trade: SKIP, current_value: SKIP, holdings: SKIP, open_orders: SKIP, contribution: SKIP, vesting: SKIP, investment_loans: SKIP, available_cash_balance: SKIP, margin: SKIP, margin_balance: SKIP, short_balance: SKIP, rollover_amount: SKIP, employer_name: SKIP, broker_id: SKIP, plan_id: SKIP, calendar_year_for401_k: SKIP, balance_list: SKIP, daily_change: SKIP, percentage_change: SKIP, transactions: SKIP, pension_source: SKIP, line_of_business: SKIP, line_of_business_type: SKIP, routing_transit_number: SKIP, balance_type: SKIP, contact: SKIP, interest_rate: SKIP, interest_rate_type: SKIP, interest_rate_as_of: SKIP, prior_interest_rate: SKIP, interest_rate_index: SKIP, early_penalty_flag: SKIP, transfer_in: SKIP, transfer_out: SKIP, bill_pay_status: SKIP, micr_number: SKIP, last_activity_date: SKIP, reward_program_id: SKIP, reward_balances: SKIP, transactions_included: SKIP, bank_institution_id: SKIP, bank_transit_id: SKIP, account_category: 'Investment Account entity', account_id: SKIP, parent_account_id: SKIP, error: SKIP, account_type: SKIP, domicile: SKIP, account_number: SKIP, account_number_display: SKIP, product_id: SKIP, product_name: SKIP, nickname: SKIP, status: SKIP, description: SKIP, account_open_date: SKIP, account_close_date: SKIP, currency: SKIP, data_clusters: SKIP, transfer_out_use_cases: SKIP, fi_attributes: SKIP, links: SKIP, additional_properties: nil) ⇒ InvestmentAccountEntity

Returns a new instance of InvestmentAccountEntity.



181
182
183
184
185
186
187
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 181

def initialize(earned_interest: SKIP, balance_as_of: SKIP,
               allowed_check_writing: SKIP, allowed_option_trade: SKIP,
               current_value: SKIP, holdings: SKIP, open_orders: SKIP,
               contribution: SKIP, vesting: SKIP, investment_loans: SKIP,
               available_cash_balance: SKIP, margin: SKIP,
               margin_balance: SKIP, short_balance: SKIP,
               rollover_amount: SKIP, employer_name: SKIP, broker_id: SKIP,
               plan_id: SKIP, calendar_year_for401_k: SKIP,
               balance_list: SKIP, daily_change: SKIP,
               percentage_change: SKIP, transactions: SKIP,
               pension_source: SKIP, line_of_business: SKIP,
               line_of_business_type: SKIP, routing_transit_number: SKIP,
               balance_type: SKIP, contact: SKIP, interest_rate: SKIP,
               interest_rate_type: SKIP, interest_rate_as_of: SKIP,
               prior_interest_rate: SKIP, interest_rate_index: SKIP,
               early_penalty_flag: SKIP, transfer_in: SKIP,
               transfer_out: SKIP, bill_pay_status: SKIP, micr_number: SKIP,
               last_activity_date: SKIP, reward_program_id: SKIP,
               reward_balances: SKIP, transactions_included: SKIP,
               bank_institution_id: SKIP, bank_transit_id: SKIP,
               account_category: 'Investment Account entity',
               account_id: SKIP, parent_account_id: SKIP, error: SKIP,
               account_type: SKIP, domicile: SKIP, account_number: SKIP,
               account_number_display: SKIP, product_id: SKIP,
               product_name: SKIP, nickname: SKIP, status: SKIP,
               description: SKIP, account_open_date: SKIP,
               account_close_date: SKIP, currency: SKIP,
               data_clusters: SKIP, transfer_out_use_cases: SKIP,
               fi_attributes: SKIP, links: SKIP, additional_properties: nil)
  @earned_interest = earned_interest unless earned_interest == SKIP
  @balance_as_of = balance_as_of unless balance_as_of == SKIP
  @allowed_check_writing = allowed_check_writing unless allowed_check_writing == SKIP
  @allowed_option_trade = allowed_option_trade unless allowed_option_trade == SKIP
  @current_value = current_value unless current_value == SKIP
  @holdings = holdings unless holdings == SKIP
  @open_orders = open_orders unless open_orders == SKIP
  @contribution = contribution unless contribution == SKIP
  @vesting = vesting unless vesting == SKIP
  @investment_loans = investment_loans unless investment_loans == SKIP
  @available_cash_balance = available_cash_balance unless available_cash_balance == SKIP
  @margin = margin unless margin == SKIP
  @margin_balance = margin_balance unless margin_balance == SKIP
  @short_balance = short_balance unless short_balance == SKIP
  @rollover_amount = rollover_amount unless rollover_amount == SKIP
  @employer_name = employer_name unless employer_name == SKIP
  @broker_id = broker_id unless broker_id == SKIP
  @plan_id = plan_id unless plan_id == SKIP
  @calendar_year_for401_k = calendar_year_for401_k unless calendar_year_for401_k == SKIP
  @balance_list = balance_list unless balance_list == SKIP
  @daily_change = daily_change unless daily_change == SKIP
  @percentage_change = percentage_change unless percentage_change == SKIP
  @transactions = transactions unless transactions == SKIP
  @pension_source = pension_source unless pension_source == SKIP
  @additional_properties = additional_properties

  # Call the constructor of the base class
  super(line_of_business: line_of_business,
        line_of_business_type: line_of_business_type,
        routing_transit_number: routing_transit_number,
        balance_type: balance_type,
        contact: contact,
        interest_rate: interest_rate,
        interest_rate_type: interest_rate_type,
        interest_rate_as_of: interest_rate_as_of,
        prior_interest_rate: prior_interest_rate,
        interest_rate_index: interest_rate_index,
        early_penalty_flag: early_penalty_flag,
        transfer_in: transfer_in,
        transfer_out: transfer_out,
        bill_pay_status: bill_pay_status,
        micr_number: micr_number,
        last_activity_date: last_activity_date,
        reward_program_id: reward_program_id,
        reward_balances: reward_balances,
        transactions_included: transactions_included,
        bank_institution_id: bank_institution_id,
        bank_transit_id: bank_transit_id,
        account_category: ,
        account_id: ,
        parent_account_id: ,
        error: error,
        account_type: ,
        domicile: domicile,
        account_number: ,
        account_number_display: ,
        product_id: product_id,
        product_name: product_name,
        nickname: nickname,
        status: status,
        description: description,
        account_open_date: ,
        account_close_date: ,
        currency: currency,
        data_clusters: data_clusters,
        transfer_out_use_cases: transfer_out_use_cases,
        fi_attributes: fi_attributes,
        links: links,
        additional_properties: additional_properties)
end

Instance Attribute Details

#allowed_check_writingTrueClass | FalseClass

Check writing privileges

Returns:

  • (TrueClass | FalseClass)


24
25
26
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 24

def allowed_check_writing
  @allowed_check_writing
end

#allowed_option_tradeTrueClass | FalseClass

Allowed to trade options

Returns:

  • (TrueClass | FalseClass)


28
29
30
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 28

def allowed_option_trade
  @allowed_option_trade
end

#available_cash_balanceFloat

Cash balance across all sub-accounts. Should include sweep funds

Returns:

  • (Float)


57
58
59
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 57

def available_cash_balance
  @available_cash_balance
end

#balance_as_ofDateTime

As-of date for balances

Returns:

  • (DateTime)


20
21
22
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 20

def balance_as_of
  @balance_as_of
end

#balance_listArray[InvestmentBalanceEntity]

List of balances. Aggregate of name value pairs

Returns:



93
94
95
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 93

def balance_list
  @balance_list
end

#broker_idString

Unique identifier FI

Returns:

  • (String)


81
82
83
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 81

def broker_id
  @broker_id
end

#calendar_year_for401_kInteger

The calendar year for this 401k account

Returns:

  • (Integer)


89
90
91
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 89

def calendar_year_for401_k
  @calendar_year_for401_k
end

#contributionArray[ContributionEntity]

Describes how new contributions are distributed among the available securities

Returns:



45
46
47
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 45

def contribution
  @contribution
end

#current_valueFloat

Total current value of all investments

Returns:

  • (Float)


32
33
34
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 32

def current_value
  @current_value
end

#daily_changeFloat

Daily change

Returns:

  • (Float)


97
98
99
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 97

def daily_change
  @daily_change
end

#earned_interestInterestRateEntity3

The periodic (usually monthly) interest rate earned on account cash balances

Returns:



16
17
18
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 16

def earned_interest
  @earned_interest
end

#employer_nameString

Name of the employer in investment 401k Plan

Returns:

  • (String)


77
78
79
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 77

def employer_name
  @employer_name
end

#holdingsArray[HoldingEntity]

Holdings in the investment account

Returns:



36
37
38
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 36

def holdings
  @holdings
end

#investment_loansArray[InvestmentLoanEntity]

Investment loans in the account

Returns:



53
54
55
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 53

def investment_loans
  @investment_loans
end

#marginTrueClass | FalseClass

Margin trading is allowed

Returns:

  • (TrueClass | FalseClass)


61
62
63
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 61

def margin
  @margin
end

#margin_balanceFloat

Margin balance

Returns:

  • (Float)


65
66
67
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 65

def margin_balance
  @margin_balance
end

#open_ordersArray[OpenOrderEntity]

Open orders in the investment account

Returns:



40
41
42
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 40

def open_orders
  @open_orders
end

#pension_sourceArray[PensionSourceEntity]

Pension sources in the investment account

Returns:



111
112
113
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 111

def pension_source
  @pension_source
end

#percentage_changeFloat

Percentage change

Returns:

  • (Float)


101
102
103
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 101

def percentage_change
  @percentage_change
end

#plan_idString

Plan number for Investment 401k plan

Returns:

  • (String)


85
86
87
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 85

def plan_id
  @plan_id
end

#rollover_amountFloat

Rollover amount

Returns:

  • (Float)


73
74
75
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 73

def rollover_amount
  @rollover_amount
end

#short_balanceFloat

Short balance

Returns:

  • (Float)


69
70
71
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 69

def short_balance
  @short_balance
end

#transactionsArray[InvestmentTransactionEntity]

Transactions on the investment account. Deprecated in release V6.3.1 and will be removed in next major release. Transactions are returned in the searchForAccountTransactions operation response.

Returns:



107
108
109
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 107

def transactions
  @transactions
end

#vestingArray[VestingEntity]

Provides the past, present, and future vesting schedule and percentages

Returns:



49
50
51
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 49

def vesting
  @vesting
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 282

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  earned_interest = InterestRateEntity3.from_hash(hash['earnedInterest']) if
    hash['earnedInterest']
  balance_as_of = if hash.key?('balanceAsOf')
                    (DateTimeHelper.from_rfc3339(hash['balanceAsOf']) if hash['balanceAsOf'])
                  else
                    SKIP
                  end
  allowed_check_writing =
    hash.key?('allowedCheckWriting') ? hash['allowedCheckWriting'] : SKIP
  allowed_option_trade =
    hash.key?('allowedOptionTrade') ? hash['allowedOptionTrade'] : SKIP
  current_value = hash.key?('currentValue') ? hash['currentValue'] : SKIP
  # Parameter is an array, so we need to iterate through it
  holdings = nil
  unless hash['holdings'].nil?
    holdings = []
    hash['holdings'].each do |structure|
      holdings << (HoldingEntity.from_hash(structure) if structure)
    end
  end

  holdings = SKIP unless hash.key?('holdings')
  # Parameter is an array, so we need to iterate through it
  open_orders = nil
  unless hash['openOrders'].nil?
    open_orders = []
    hash['openOrders'].each do |structure|
      open_orders << (OpenOrderEntity.from_hash(structure) if structure)
    end
  end

  open_orders = SKIP unless hash.key?('openOrders')
  # Parameter is an array, so we need to iterate through it
  contribution = nil
  unless hash['contribution'].nil?
    contribution = []
    hash['contribution'].each do |structure|
      contribution << (ContributionEntity.from_hash(structure) if structure)
    end
  end

  contribution = SKIP unless hash.key?('contribution')
  # Parameter is an array, so we need to iterate through it
  vesting = nil
  unless hash['vesting'].nil?
    vesting = []
    hash['vesting'].each do |structure|
      vesting << (VestingEntity.from_hash(structure) if structure)
    end
  end

  vesting = SKIP unless hash.key?('vesting')
  # Parameter is an array, so we need to iterate through it
  investment_loans = nil
  unless hash['investmentLoans'].nil?
    investment_loans = []
    hash['investmentLoans'].each do |structure|
      investment_loans << (InvestmentLoanEntity.from_hash(structure) if structure)
    end
  end

  investment_loans = SKIP unless hash.key?('investmentLoans')
  available_cash_balance =
    hash.key?('availableCashBalance') ? hash['availableCashBalance'] : SKIP
  margin = hash.key?('margin') ? hash['margin'] : SKIP
  margin_balance = hash.key?('marginBalance') ? hash['marginBalance'] : SKIP
  short_balance = hash.key?('shortBalance') ? hash['shortBalance'] : SKIP
  rollover_amount =
    hash.key?('rolloverAmount') ? hash['rolloverAmount'] : SKIP
  employer_name = hash.key?('employerName') ? hash['employerName'] : SKIP
  broker_id = hash.key?('brokerId') ? hash['brokerId'] : SKIP
  plan_id = hash.key?('planId') ? hash['planId'] : SKIP
  calendar_year_for401_k =
    hash.key?('calendarYearFor401K') ? hash['calendarYearFor401K'] : SKIP
  # Parameter is an array, so we need to iterate through it
  balance_list = nil
  unless hash['balanceList'].nil?
    balance_list = []
    hash['balanceList'].each do |structure|
      balance_list << (InvestmentBalanceEntity.from_hash(structure) if structure)
    end
  end

  balance_list = SKIP unless hash.key?('balanceList')
  daily_change = hash.key?('dailyChange') ? hash['dailyChange'] : SKIP
  percentage_change =
    hash.key?('percentageChange') ? hash['percentageChange'] : SKIP
  # Parameter is an array, so we need to iterate through it
  transactions = nil
  unless hash['transactions'].nil?
    transactions = []
    hash['transactions'].each do |structure|
      transactions << (InvestmentTransactionEntity.from_hash(structure) if structure)
    end
  end

  transactions = SKIP unless hash.key?('transactions')
  # Parameter is an array, so we need to iterate through it
  pension_source = nil
  unless hash['pensionSource'].nil?
    pension_source = []
    hash['pensionSource'].each do |structure|
      pension_source << (PensionSourceEntity.from_hash(structure) if structure)
    end
  end

  pension_source = SKIP unless hash.key?('pensionSource')
  line_of_business =
    hash.key?('lineOfBusiness') ? hash['lineOfBusiness'] : SKIP
  line_of_business_type =
    hash.key?('lineOfBusinessType') ? hash['lineOfBusinessType'] : SKIP
  routing_transit_number =
    hash.key?('routingTransitNumber') ? hash['routingTransitNumber'] : SKIP
  balance_type = hash.key?('balanceType') ? hash['balanceType'] : SKIP
  contact = AccountContactEntity.from_hash(hash['contact']) if hash['contact']
  interest_rate = hash.key?('interestRate') ? hash['interestRate'] : SKIP
  interest_rate_type =
    hash.key?('interestRateType') ? hash['interestRateType'] : SKIP
  interest_rate_as_of = if hash.key?('interestRateAsOf')
                          (DateTimeHelper.from_rfc3339(hash['interestRateAsOf']) if hash['interestRateAsOf'])
                        else
                          SKIP
                        end
  prior_interest_rate =
    hash.key?('priorInterestRate') ? hash['priorInterestRate'] : SKIP
  interest_rate_index =
    hash.key?('interestRateIndex') ? hash['interestRateIndex'] : SKIP
  early_penalty_flag =
    hash.key?('earlyPenaltyFlag') ? hash['earlyPenaltyFlag'] : SKIP
  transfer_in = hash.key?('transferIn') ? hash['transferIn'] : SKIP
  transfer_out = hash.key?('transferOut') ? hash['transferOut'] : SKIP
  bill_pay_status =
    hash.key?('billPayStatus') ? hash['billPayStatus'] : SKIP
  micr_number = hash.key?('micrNumber') ? hash['micrNumber'] : SKIP
  last_activity_date =
    hash.key?('lastActivityDate') ? hash['lastActivityDate'] : SKIP
  reward_program_id =
    hash.key?('rewardProgramId') ? hash['rewardProgramId'] : SKIP
  # Parameter is an array, so we need to iterate through it
  reward_balances = nil
  unless hash['rewardBalances'].nil?
    reward_balances = []
    hash['rewardBalances'].each do |structure|
      reward_balances << (RewardBalanceEntity.from_hash(structure) if structure)
    end
  end

  reward_balances = SKIP unless hash.key?('rewardBalances')
  transactions_included =
    hash.key?('transactionsIncluded') ? hash['transactionsIncluded'] : SKIP
  bank_institution_id =
    hash.key?('bankInstitutionId') ? hash['bankInstitutionId'] : SKIP
  bank_transit_id =
    hash.key?('bankTransitId') ? hash['bankTransitId'] : SKIP
   = hash['accountCategory'] ||= 'Investment Account entity'
   = hash.key?('accountId') ? hash['accountId'] : SKIP
   =
    hash.key?('parentAccountId') ? hash['parentAccountId'] : SKIP
  error = Error3.from_hash(hash['error']) if hash['error']
   = hash.key?('accountType') ? hash['accountType'] : SKIP
  domicile = DomicileEntity3.from_hash(hash['domicile']) if hash['domicile']
   = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP
   =
    hash.key?('accountNumberDisplay') ? hash['accountNumberDisplay'] : SKIP
  product_id = hash.key?('productId') ? hash['productId'] : SKIP
  product_name = hash.key?('productName') ? hash['productName'] : SKIP
  nickname = hash.key?('nickname') ? hash['nickname'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
   =
    hash.key?('accountOpenDate') ? hash['accountOpenDate'] : SKIP
   =
    hash.key?('accountCloseDate') ? hash['accountCloseDate'] : SKIP
  currency = CurrencyEntity4.from_hash(hash['currency']) if hash['currency']
  data_clusters = hash.key?('dataClusters') ? hash['dataClusters'] : SKIP
  transfer_out_use_cases =
    hash.key?('transferOutUseCases') ? hash['transferOutUseCases'] : SKIP
  # Parameter is an array, so we need to iterate through it
  fi_attributes = nil
  unless hash['fiAttributes'].nil?
    fi_attributes = []
    hash['fiAttributes'].each do |structure|
      fi_attributes << (FiAttributeEntity.from_hash(structure) if structure)
    end
  end

  fi_attributes = SKIP unless hash.key?('fiAttributes')
  # Parameter is an array, so we need to iterate through it
  links = nil
  unless hash['links'].nil?
    links = []
    hash['links'].each do |structure|
      links << (HateoasLink.from_hash(structure) if structure)
    end
  end

  links = SKIP unless hash.key?('links')

  # 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.
  InvestmentAccountEntity.new(earned_interest: earned_interest,
                              balance_as_of: balance_as_of,
                              allowed_check_writing: allowed_check_writing,
                              allowed_option_trade: allowed_option_trade,
                              current_value: current_value,
                              holdings: holdings,
                              open_orders: open_orders,
                              contribution: contribution,
                              vesting: vesting,
                              investment_loans: investment_loans,
                              available_cash_balance: available_cash_balance,
                              margin: margin,
                              margin_balance: margin_balance,
                              short_balance: short_balance,
                              rollover_amount: rollover_amount,
                              employer_name: employer_name,
                              broker_id: broker_id,
                              plan_id: plan_id,
                              calendar_year_for401_k: calendar_year_for401_k,
                              balance_list: balance_list,
                              daily_change: daily_change,
                              percentage_change: percentage_change,
                              transactions: transactions,
                              pension_source: pension_source,
                              line_of_business: line_of_business,
                              line_of_business_type: line_of_business_type,
                              routing_transit_number: routing_transit_number,
                              balance_type: balance_type,
                              contact: contact,
                              interest_rate: interest_rate,
                              interest_rate_type: interest_rate_type,
                              interest_rate_as_of: interest_rate_as_of,
                              prior_interest_rate: prior_interest_rate,
                              interest_rate_index: interest_rate_index,
                              early_penalty_flag: early_penalty_flag,
                              transfer_in: transfer_in,
                              transfer_out: transfer_out,
                              bill_pay_status: bill_pay_status,
                              micr_number: micr_number,
                              last_activity_date: last_activity_date,
                              reward_program_id: reward_program_id,
                              reward_balances: reward_balances,
                              transactions_included: transactions_included,
                              bank_institution_id: bank_institution_id,
                              bank_transit_id: bank_transit_id,
                              account_category: ,
                              account_id: ,
                              parent_account_id: ,
                              error: error,
                              account_type: ,
                              domicile: domicile,
                              account_number: ,
                              account_number_display: ,
                              product_id: product_id,
                              product_name: product_name,
                              nickname: nickname,
                              status: status,
                              description: description,
                              account_open_date: ,
                              account_close_date: ,
                              currency: currency,
                              data_clusters: data_clusters,
                              transfer_out_use_cases: transfer_out_use_cases,
                              fi_attributes: fi_attributes,
                              links: links,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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
140
141
142
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 114

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['earned_interest'] = 'earnedInterest'
  @_hash['balance_as_of'] = 'balanceAsOf'
  @_hash['allowed_check_writing'] = 'allowedCheckWriting'
  @_hash['allowed_option_trade'] = 'allowedOptionTrade'
  @_hash['current_value'] = 'currentValue'
  @_hash['holdings'] = 'holdings'
  @_hash['open_orders'] = 'openOrders'
  @_hash['contribution'] = 'contribution'
  @_hash['vesting'] = 'vesting'
  @_hash['investment_loans'] = 'investmentLoans'
  @_hash['available_cash_balance'] = 'availableCashBalance'
  @_hash['margin'] = 'margin'
  @_hash['margin_balance'] = 'marginBalance'
  @_hash['short_balance'] = 'shortBalance'
  @_hash['rollover_amount'] = 'rolloverAmount'
  @_hash['employer_name'] = 'employerName'
  @_hash['broker_id'] = 'brokerId'
  @_hash['plan_id'] = 'planId'
  @_hash['calendar_year_for401_k'] = 'calendarYearFor401K'
  @_hash['balance_list'] = 'balanceList'
  @_hash['daily_change'] = 'dailyChange'
  @_hash['percentage_change'] = 'percentageChange'
  @_hash['transactions'] = 'transactions'
  @_hash['pension_source'] = 'pensionSource'
  @_hash = super().merge(@_hash)
  @_hash
end

.nullablesObject

An array for nullable fields



176
177
178
179
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 176

def self.nullables
  _arr = []
  (_arr << super()).flatten!
end

.optionalsObject

An array for optional fields



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 145

def self.optionals
  _arr = %w[
    earned_interest
    balance_as_of
    allowed_check_writing
    allowed_option_trade
    current_value
    holdings
    open_orders
    contribution
    vesting
    investment_loans
    available_cash_balance
    margin
    margin_balance
    short_balance
    rollover_amount
    employer_name
    broker_id
    plan_id
    calendar_year_for401_k
    balance_list
    daily_change
    percentage_change
    transactions
    pension_source
  ]
  (_arr << super()).flatten!
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



566
567
568
569
570
571
572
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 566

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 592

def inspect
  class_name = self.class.name.split('::').last
  super_string = super().inspect.sub(/^<[^ ]+ /, '').sub(/>$/, '')
  "<#{class_name} #{super_string}, earned_interest: #{@earned_interest.inspect},"\
  " balance_as_of: #{@balance_as_of.inspect}, allowed_check_writing:"\
  " #{@allowed_check_writing.inspect}, allowed_option_trade: #{@allowed_option_trade.inspect},"\
  " current_value: #{@current_value.inspect}, holdings: #{@holdings.inspect}, open_orders:"\
  " #{@open_orders.inspect}, contribution: #{@contribution.inspect}, vesting:"\
  " #{@vesting.inspect}, investment_loans: #{@investment_loans.inspect},"\
  " available_cash_balance: #{@available_cash_balance.inspect}, margin: #{@margin.inspect},"\
  " margin_balance: #{@margin_balance.inspect}, short_balance: #{@short_balance.inspect},"\
  " rollover_amount: #{@rollover_amount.inspect}, employer_name: #{@employer_name.inspect},"\
  " broker_id: #{@broker_id.inspect}, plan_id: #{@plan_id.inspect}, calendar_year_for401_k:"\
  " #{@calendar_year_for401_k.inspect}, balance_list: #{@balance_list.inspect}, daily_change:"\
  " #{@daily_change.inspect}, percentage_change: #{@percentage_change.inspect}, transactions:"\
  " #{@transactions.inspect}, pension_source: #{@pension_source.inspect}>"
end

#to_custom_balance_as_ofObject



560
561
562
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 560

def to_custom_balance_as_of
  DateTimeHelper.to_rfc3339(balance_as_of)
end

#to_sObject

Provides a human-readable string representation of the object.



575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/fdx_v660_api/models/investment_account_entity.rb', line 575

def to_s
  class_name = self.class.name.split('::').last
  super_string = super().sub(/^<[^ ]+ /, '').sub(/>$/, '')
  "<#{class_name} #{super_string}, earned_interest: #{@earned_interest}, balance_as_of:"\
  " #{@balance_as_of}, allowed_check_writing: #{@allowed_check_writing}, allowed_option_trade:"\
  " #{@allowed_option_trade}, current_value: #{@current_value}, holdings: #{@holdings},"\
  " open_orders: #{@open_orders}, contribution: #{@contribution}, vesting: #{@vesting},"\
  " investment_loans: #{@investment_loans}, available_cash_balance:"\
  " #{@available_cash_balance}, margin: #{@margin}, margin_balance: #{@margin_balance},"\
  " short_balance: #{@short_balance}, rollover_amount: #{@rollover_amount}, employer_name:"\
  " #{@employer_name}, broker_id: #{@broker_id}, plan_id: #{@plan_id}, calendar_year_for401_k:"\
  " #{@calendar_year_for401_k}, balance_list: #{@balance_list}, daily_change:"\
  " #{@daily_change}, percentage_change: #{@percentage_change}, transactions:"\
  " #{@transactions}, pension_source: #{@pension_source}>"
end