Class: LendingClub::Loan

Inherits:
Object
  • Object
show all
Defined in:
lib/lending_club/client/loan.rb

Constant Summary collapse

ATTRIBUTES =
[
  :as_of_date,
  :id,
  :member_id,
  :term,
  :int_rate,
  :exp_default_rate,
  :service_fee_rate,
  :installment,
  :grade,
  :sub_grade,
  :emp_length,
  :home_ownership,
  :annual_inc,
  :is_inc_v,
  :accept_d,
  :exp_d,
  :list_d,
  :credit_pull_d,
  :review_status_d,
  :review_status,
  :desc,
  :purpose,
  :addr_zip,
  :addr_state,
  :investor_count,
  :ils_exp_d,
  :initial_list_status,
  :emp_title,
  :acc_now_delinq,
  :acc_open_past24_mths,
  :bc_open_to_buy,
  :percent_bc_gt75,
  :bc_util,
  :dti,
  :delinq2_yrs,
  :delinq_amnt,
  :earliest_cr_line,
  :fico_range_low,
  :fico_range_high,
  :inq_last6_mths,
  :mths_since_last_delinq,
  :mths_since_last_record,
  :mths_since_recent_inq,
  :mths_since_recent_revol_delinq,
  :mths_since_recent_bc,
  :mort_acc,
  :open_acc,
  :pub_rec,
  :total_bal_ex_mort,
  :revol_bal,
  :revol_util,
  :total_bc_limit,
  :total_acc,
  :total_il_high_credit_limit,
  :num_rev_accts,
  :mths_since_recent_bc_dlq,
  :pub_rec_bankruptcies,
  :num_accts_ever120_ppd,
  :chargeoff_within12_mths,
  :collections12_mths_ex_med,
  :tax_liens,
  :mths_since_last_major_derog,
  :num_sats,
  :num_tl_op_past12m,
  :mo_sin_rcnt_tl,
  :tot_hi_cred_lim,
  :tot_cur_bal,
  :avg_cur_bal,
  :num_bc_tl,
  :num_actv_bc_tl,
  :num_bc_sats,
  :pct_tl_nvr_dlq,
  :num_tl90g_dpd24m,
  :num_tl30dpd,
  :num_tl120dpd2m,
  :num_il_tl,
  :mo_sin_old_il_acct,
  :num_actv_rev_tl,
  :mo_sin_old_rev_tl_op,
  :mo_sin_rcnt_rev_tl_op,
  :total_rev_hi_lim,
  :num_rev_tl_bal_gt0,
  :num_op_rev_tl,
  :tot_coll_amt,
  :funded_amount,
  :loan_amount
]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_hash) ⇒ Loan

Returns a new instance of Loan.



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
# File 'lib/lending_club/client/loan.rb', line 314

def initialize(data_hash)
  @as_of_date = data_hash['asOfDate'].to_s
  @id = Integer(data_hash['id'])
  @member_id = Integer(data_hash['memberId'])
  @term = Integer(data_hash['term'])
  @int_rate = Float(data_hash['intRate'])
  @exp_default_rate = Float(data_hash['expDefaultRate'])
  @service_fee_rate = Float(data_hash['serviceFeeRate'])
  @installment = Float(data_hash['installment'])
  @grade = data_hash['grade'].to_s
  @sub_grade = data_hash['subGrade'].to_s
  if data_hash['empLength']
    @emp_length = Integer(data_hash['empLength'])
  end
  if data_hash['homeOwnership']
    @home_ownership = data_hash['homeOwnership'].to_s
  end
  if data_hash['annualInc']
    @annual_inc = Float(data_hash['annualInc'])
  end
  if data_hash['isIncV']
    @is_inc_v = data_hash['isIncV'].to_s
  end
  @accept_d = data_hash['acceptD'].to_s
  @exp_d = data_hash['expD'].to_s
  @list_d = data_hash['listD'].to_s
  @credit_pull_d = data_hash['creditPullD'].to_s
  if data_hash['reviewStatusD']
    @review_status_d = data_hash['reviewStatusD'].to_s
  end
  @review_status = data_hash['reviewStatus'].to_s
  if data_hash['desc']
    @desc = data_hash['desc'].to_s
  end
  @purpose = data_hash['purpose'].to_s
  if data_hash['addrZip']
    @addr_zip = data_hash['addrZip'].to_s
  end
  if data_hash['addrState']
    @addr_state = data_hash['addrState'].to_s
  end
  if data_hash['investorCount']
    @investor_count = Integer(data_hash['investorCount'])
  end
  @ils_exp_d = data_hash['ilsExpD'].to_s
  @initial_list_status = data_hash['initialListStatus'].to_s
  if data_hash['empTitle']
    @emp_title = data_hash['empTitle'].to_s
  end
  if data_hash['accNowDelinq']
    @acc_now_delinq = Integer(data_hash['accNowDelinq'])
  end
  if data_hash['accOpenPast24Mths']
    @acc_open_past24_mths = Integer(data_hash['accOpenPast24Mths'])
  end
  if data_hash['bcOpenToBuy']
    @bc_open_to_buy = Integer(data_hash['bcOpenToBuy'])
  end
  if data_hash['percentBcGt75']
    @percent_bc_gt75 = Float(data_hash['percentBcGt75'])
  end
  if data_hash['bcUtil']
    @bc_util = Float(data_hash['bcUtil'])
  end
  if data_hash['dti']
    @dti = Float(data_hash['dti'])
  end
  if data_hash['delinq2Yrs']
    @delinq2_yrs = Integer(data_hash['delinq2Yrs'])
  end
  if data_hash['delinqAmnt']
    @delinq_amnt = Float(data_hash['delinqAmnt'])
  end
  if data_hash['earliestCrLine']
    @earliest_cr_line = data_hash['earliestCrLine'].to_s
  end
  if data_hash['ficoRangeLow']
    @fico_range_low = Integer(data_hash['ficoRangeLow'])
  end
  if data_hash['ficoRangeHigh']
    @fico_range_high = Integer(data_hash['ficoRangeHigh'])
  end
  if data_hash['inqLast6Mths']
    @inq_last6_mths = Integer(data_hash['inqLast6Mths'])
  end
  if data_hash['mthsSinceLastDelinq']
    @mths_since_last_delinq = Integer(data_hash['mthsSinceLastDelinq'])
  end
  if data_hash['mthsSinceLastRecord']
    @mths_since_last_record = Integer(data_hash['mthsSinceLastRecord'])
  end
  if data_hash['mthsSinceRecentInq']
    @mths_since_recent_inq = Integer(data_hash['mthsSinceRecentInq'])
  end
  if data_hash['mthsSinceRecentRevolDelinq']
    @mths_since_recent_revol_delinq = Integer(data_hash['mthsSinceRecentRevolDelinq'])
  end
  if data_hash['mthsSinceRecentBc']
    @mths_since_recent_bc = Integer(data_hash['mthsSinceRecentBc'])
  end
  if data_hash['mortAcc']
    @mort_acc = Integer(data_hash['mortAcc'])
  end
  if data_hash['openAcc']
    @open_acc = Integer(data_hash['openAcc'])
  end
  if data_hash['pubRec']
    @pub_rec = Integer(data_hash['pubRec'])
  end
  if data_hash['totalBalExMort']
    @total_bal_ex_mort = Integer(data_hash['totalBalExMort'])
  end
  if data_hash['revolBal']
    @revol_bal = Float(data_hash['revolBal'])
  end
  if data_hash['revolUtil']
    @revol_util = Float(data_hash['revolUtil'])
  end
  if data_hash['totalBcLimit']
    @total_bc_limit = Integer(data_hash['totalBcLimit'])
  end
  if data_hash['totalAcc']
    @total_acc = Integer(data_hash['totalAcc'])
  end
  if data_hash['totalIlHighCreditLimit']
    @total_il_high_credit_limit = Integer(data_hash['totalIlHighCreditLimit'])
  end
  if data_hash['numRevAccts']
    @num_rev_accts = Integer(data_hash['numRevAccts'])
  end
  if data_hash['mthsSinceRecentBcDlq']
    @mths_since_recent_bc_dlq = Integer(data_hash['mthsSinceRecentBcDlq'])
  end
  if data_hash['pubRecBankruptcies']
    @pub_rec_bankruptcies = Integer(data_hash['pubRecBankruptcies'])
  end
  if data_hash['numAcctsEver120Ppd']
    @num_accts_ever120_ppd = Integer(data_hash['numAcctsEver120Ppd'])
  end
  if data_hash['chargeoffWithin12Mths']
    @chargeoff_within12_mths = Integer(data_hash['chargeoffWithin12Mths'])
  end
  if data_hash['collections12MthsExMed']
    @collections12_mths_ex_med = Integer(data_hash['collections12MthsExMed'])
  end
  if data_hash['taxLiens']
    @tax_liens = Integer(data_hash['taxLiens'])
  end
  if data_hash['mthsSinceLastMajorDerog']
    @mths_since_last_major_derog = Integer(data_hash['mthsSinceLastMajorDerog'])
  end
  if data_hash['numSats']
    @num_sats = Integer(data_hash['numSats'])
  end
  if data_hash['numTlOpPast12m']
    @num_tl_op_past12m = Integer(data_hash['numTlOpPast12m'])
  end
  if data_hash['moSinRcntTl']
    @mo_sin_rcnt_tl = Integer(data_hash['moSinRcntTl'])
  end
  if data_hash['totHiCredLim']
    @tot_hi_cred_lim = Integer(data_hash['totHiCredLim'])
  end
  if data_hash['totCurBal']
    @tot_cur_bal = Integer(data_hash['totCurBal'])
  end
  if data_hash['avgCurBal']
    @avg_cur_bal = Integer(data_hash['avgCurBal'])
  end
  if data_hash['numBcTl']
    @num_bc_tl = Integer(data_hash['numBcTl'])
  end
  if data_hash['numActvBcTl']
    @num_actv_bc_tl = Integer(data_hash['numActvBcTl'])
  end
  if data_hash['numBcSats']
    @num_bc_sats = Integer(data_hash['numBcSats'])
  end
  if data_hash['pctTlNvrDlq']
    @pct_tl_nvr_dlq = Integer(data_hash['pctTlNvrDlq'])
  end
  if data_hash['numTl90gDpd24m']
    @num_tl90g_dpd24m = Integer(data_hash['numTl90gDpd24m'])
  end
  if data_hash['numTl30dpd']
    @num_tl30dpd = Integer(data_hash['numTl30dpd'])
  end
  if data_hash['numTl120dpd2m']
    @num_tl120dpd2m = Integer(data_hash['numTl120dpd2m'])
  end
  if data_hash['numIlTl']
    @num_il_tl = Integer(data_hash['numIlTl'])
  end
  if data_hash['moSinOldIlAcct']
    @mo_sin_old_il_acct = Integer(data_hash['moSinOldIlAcct'])
  end
  if data_hash['numActvRevTl']
    @num_actv_rev_tl = Integer(data_hash['numActvRevTl'])
  end
  if data_hash['moSinOldRevTlOp']
    @mo_sin_old_rev_tl_op = Integer(data_hash['moSinOldRevTlOp'])
  end
  if data_hash['moSinRcntRevTlOp']
    @mo_sin_rcnt_rev_tl_op = Integer(data_hash['moSinRcntRevTlOp'])
  end
  if data_hash['totalRevHiLim']
    @total_rev_hi_lim = Integer(data_hash['totalRevHiLim'])
  end
  if data_hash['numRevTlBalGt0']
    @num_rev_tl_bal_gt0 = Integer(data_hash['numRevTlBalGt0'])
  end
  if data_hash['numOpRevTl']
    @num_op_rev_tl = Integer(data_hash['numOpRevTl'])
  end
  if data_hash['totCollAmt']
    @tot_coll_amt = Integer(data_hash['totCollAmt'])
  end
  @funded_amount = Float(data_hash['fundedAmount'])
  @loan_amount = Float(data_hash['loanAmount'])
end

Instance Attribute Details

#acc_now_delinqInteger? (readonly)

is now delinquent.

Returns:

  • (Integer, nil)

    The Number of accounts on which the borrower



172
173
174
# File 'lib/lending_club/client/loan.rb', line 172

def acc_now_delinq
  @acc_now_delinq
end

#acc_open_past24_mthsInteger? (readonly)

Returns Number of trades opened in past 24 months.

Returns:

  • (Integer, nil)

    Number of trades opened in past 24 months.



174
175
176
# File 'lib/lending_club/client/loan.rb', line 174

def acc_open_past24_mths
  @acc_open_past24_mths
end

#accept_dString (readonly)

Returns The date which the borrower accepted the offer.

Returns:

  • (String)

    The date which the borrower accepted the offer



130
131
132
# File 'lib/lending_club/client/loan.rb', line 130

def accept_d
  @accept_d
end

#addr_stateString? (readonly)

during loan application

Returns:

  • (String, nil)

    The address state provided by the borrower



155
156
157
# File 'lib/lending_club/client/loan.rb', line 155

def addr_state
  @addr_state
end

#addr_zipString? (readonly)

by the borrower in the loan application.

Returns:

  • (String, nil)

    The first 3 numbers of the ZIP code provided



152
153
154
# File 'lib/lending_club/client/loan.rb', line 152

def addr_zip
  @addr_zip
end

#annual_incNumber? (readonly)

registration.

Returns:

  • (Number, nil)

    The annual income provided by the borrower during



126
127
128
# File 'lib/lending_club/client/loan.rb', line 126

def annual_inc
  @annual_inc
end

#as_of_dateString (readonly)

Returns As of date.

Returns:

  • (String)

    As of date



96
97
98
# File 'lib/lending_club/client/loan.rb', line 96

def as_of_date
  @as_of_date
end

#avg_cur_balInteger? (readonly)

Returns Average current balance of all accounts.

Returns:

  • (Integer, nil)

    Average current balance of all accounts



270
271
272
# File 'lib/lending_club/client/loan.rb', line 270

def avg_cur_bal
  @avg_cur_bal
end

#bc_open_to_buyInteger? (readonly)

Returns Total open to buy on revolving bankcards.

Returns:

  • (Integer, nil)

    Total open to buy on revolving bankcards.



176
177
178
# File 'lib/lending_club/client/loan.rb', line 176

def bc_open_to_buy
  @bc_open_to_buy
end

#bc_utilNumber? (readonly)

high credit/credit limit for all bankcard accounts.

Returns:

  • (Number, nil)

    Ratio of total current balance to



182
183
184
# File 'lib/lending_club/client/loan.rb', line 182

def bc_util
  @bc_util
end

#chargeoff_within12_mthsInteger? (readonly)

Returns Number of charge-offs within 12 months.

Returns:

  • (Integer, nil)

    Number of charge-offs within 12 months.



250
251
252
# File 'lib/lending_club/client/loan.rb', line 250

def chargeoff_within12_mths
  @chargeoff_within12_mths
end

#collections12_mths_ex_medInteger? (readonly)

Returns Number of collections in 12 months excluding medical collections.

Returns:

  • (Integer, nil)

    Number of collections in 12 months excluding medical collections.



253
254
255
# File 'lib/lending_club/client/loan.rb', line 253

def collections12_mths_ex_med
  @collections12_mths_ex_med
end

#credit_pull_dString (readonly)

Returns The date LC pulled credit for this loan.

Returns:

  • (String)

    The date LC pulled credit for this loan



137
138
139
# File 'lib/lending_club/client/loan.rb', line 137

def credit_pull_d
  @credit_pull_d
end

#delinq2_yrsInteger? (readonly)

delinquency in the borrower’s credit file for the past 2 years.

Returns:

  • (Integer, nil)

    The Number of 30+ days past-due incidences of



189
190
191
# File 'lib/lending_club/client/loan.rb', line 189

def delinq2_yrs
  @delinq2_yrs
end

#delinq_amntNumber? (readonly)

which the borrower is now delinquent.

Returns:

  • (Number, nil)

    The past-due amount owed for the accounts on



192
193
194
# File 'lib/lending_club/client/loan.rb', line 192

def delinq_amnt
  @delinq_amnt
end

#descString? (readonly)

Returns Loan description provided by the borrower.

Returns:

  • (String, nil)

    Loan description provided by the borrower



144
145
146
# File 'lib/lending_club/client/loan.rb', line 144

def desc
  @desc
end

#dtiNumber? (readonly)

using the monthly payments on the total debt obligations, excluding mortgage, divided by self-reported monthly income.

Returns:

  • (Number, nil)

    The borrower’s debt to income ratio, calculated



186
187
188
# File 'lib/lending_club/client/loan.rb', line 186

def dti
  @dti
end

#earliest_cr_lineString? (readonly)

credit line was opened

Returns:

  • (String, nil)

    The date the borrower’s earliest reported



195
196
197
# File 'lib/lending_club/client/loan.rb', line 195

def earliest_cr_line
  @earliest_cr_line
end

#emp_lengthInteger? (readonly)

between 0 and 10 where 0 means less than one year and 10 means ten or more years.

Returns:

  • (Integer, nil)

    Employment length in years. Possible values are



120
121
122
# File 'lib/lending_club/client/loan.rb', line 120

def emp_length
  @emp_length
end

#emp_titleString? (readonly)

Returns Employment title.

Returns:

  • (String, nil)

    Employment title



169
170
171
# File 'lib/lending_club/client/loan.rb', line 169

def emp_title
  @emp_title
end

#exp_dString (readonly)

Returns The date the listing will expire.

Returns:

  • (String)

    The date the listing will expire



132
133
134
# File 'lib/lending_club/client/loan.rb', line 132

def exp_d
  @exp_d
end

#exp_default_rateNumber (readonly)

Returns The expected default rate of the loan.

Returns:

  • (Number)

    The expected default rate of the loan.



107
108
109
# File 'lib/lending_club/client/loan.rb', line 107

def exp_default_rate
  @exp_default_rate
end

#fico_range_highInteger? (readonly)

FICO belongs to.

Returns:

  • (Integer, nil)

    The upper boundary of range the borrower’s



201
202
203
# File 'lib/lending_club/client/loan.rb', line 201

def fico_range_high
  @fico_range_high
end

#fico_range_lowInteger? (readonly)

FICO belongs to.

Returns:

  • (Integer, nil)

    The lower boundary of range the borrower’s



198
199
200
# File 'lib/lending_club/client/loan.rb', line 198

def fico_range_low
  @fico_range_low
end

#funded_amountNumber (readonly)

that point in time.

Returns:

  • (Number)

    The total amount funded by investors for that loan at



308
309
310
# File 'lib/lending_club/client/loan.rb', line 308

def funded_amount
  @funded_amount
end

#gradeString (readonly)

Returns LC assigned loan grade.

Returns:

  • (String)

    LC assigned loan grade



114
115
116
# File 'lib/lending_club/client/loan.rb', line 114

def grade
  @grade
end

#home_ownershipString? (readonly)

borrower during registration. Our values are: RENT, OWN, MORTGAGE, OTHER

Returns:

  • (String, nil)

    The home ownership status provided by the



123
124
125
# File 'lib/lending_club/client/loan.rb', line 123

def home_ownership
  @home_ownership
end

#idInteger (readonly)

Returns A unique LC assigned ID for the loan listing.

Returns:

  • (Integer)

    A unique LC assigned ID for the loan listing.



98
99
100
# File 'lib/lending_club/client/loan.rb', line 98

def id
  @id
end

#ils_exp_dString (readonly)

in the initial listing status. After this date is past, the initialListStatus below will not have any effect and the loan will be treated as a FRACTIONAL loan.

Returns:

  • (String)

    The date and time when the loan will no longer be



163
164
165
# File 'lib/lending_club/client/loan.rb', line 163

def ils_exp_d
  @ils_exp_d
end

#initial_list_statusString (readonly)

values are W, F. For more information please read Loan Listing and Whole Loans section.

Returns:

  • (String)

    The initial listing status of the loan. Possible



167
168
169
# File 'lib/lending_club/client/loan.rb', line 167

def initial_list_status
  @initial_list_status
end

#inq_last6_mthsInteger? (readonly)

the past 6 months.

Returns:

  • (Integer, nil)

    The Number of inquiries by creditors during



204
205
206
# File 'lib/lending_club/client/loan.rb', line 204

def inq_last6_mths
  @inq_last6_mths
end

#installmentNumber (readonly)

originates.

Returns:

  • (Number)

    The monthly payment owed by the borrower if the loan



112
113
114
# File 'lib/lending_club/client/loan.rb', line 112

def installment
  @installment
end

#int_rateNumber (readonly)

Returns Interest Rate on the loan.

Returns:

  • (Number)

    Interest Rate on the loan



105
106
107
# File 'lib/lending_club/client/loan.rb', line 105

def int_rate
  @int_rate
end

#investor_countInteger? (readonly)

purchased notes from this loan

Returns:

  • (Integer, nil)

    The Number of investor members who have



158
159
160
# File 'lib/lending_club/client/loan.rb', line 158

def investor_count
  @investor_count
end

#is_inc_vString? (readonly)

Returns Indicates if income is verified by LC.

Returns:

  • (String, nil)

    Indicates if income is verified by LC



128
129
130
# File 'lib/lending_club/client/loan.rb', line 128

def is_inc_v
  @is_inc_v
end

#list_dString (readonly)

on the platform.

Returns:

  • (String)

    The date which the borrower’s application was listed



135
136
137
# File 'lib/lending_club/client/loan.rb', line 135

def list_d
  @list_d
end

#loan_amountNumber (readonly)

borrower. If at some point in time, the credit department reduces the loan amount, then it will be reflected in this value.

Returns:

  • (Number)

    The listed amount of the loan applied for by the



312
313
314
# File 'lib/lending_club/client/loan.rb', line 312

def loan_amount
  @loan_amount
end

#member_idInteger (readonly)

Returns A unique LC assigned Id for the borrower member.

Returns:

  • (Integer)

    A unique LC assigned Id for the borrower member.



100
101
102
# File 'lib/lending_club/client/loan.rb', line 100

def member_id
  @member_id
end

#mo_sin_old_il_acctInteger? (readonly)

Returns Months since oldest installment account opened.

Returns:

  • (Integer, nil)

    Months since oldest installment account opened



291
292
293
# File 'lib/lending_club/client/loan.rb', line 291

def mo_sin_old_il_acct
  @mo_sin_old_il_acct
end

#mo_sin_old_rev_tl_opInteger? (readonly)

Returns Months since oldest revolving account opened.

Returns:

  • (Integer, nil)

    Months since oldest revolving account opened



295
296
297
# File 'lib/lending_club/client/loan.rb', line 295

def mo_sin_old_rev_tl_op
  @mo_sin_old_rev_tl_op
end

#mo_sin_rcnt_rev_tl_opInteger? (readonly)

Returns Months since most recent revolving account opened.

Returns:

  • (Integer, nil)

    Months since most recent revolving account opened



297
298
299
# File 'lib/lending_club/client/loan.rb', line 297

def mo_sin_rcnt_rev_tl_op
  @mo_sin_rcnt_rev_tl_op
end

#mo_sin_rcnt_tlInteger? (readonly)

Returns Months since most recent account opened.

Returns:

  • (Integer, nil)

    Months since most recent account opened



264
265
266
# File 'lib/lending_club/client/loan.rb', line 264

def mo_sin_rcnt_tl
  @mo_sin_rcnt_tl
end

#mort_accInteger? (readonly)

Returns Number of mortgage accounts.

Returns:

  • (Integer, nil)

    Number of mortgage accounts.



219
220
221
# File 'lib/lending_club/client/loan.rb', line 219

def mort_acc
  @mort_acc
end

#mths_since_last_delinqInteger? (readonly)

last delinquency.

Returns:

  • (Integer, nil)

    The Number of months since the borrower’s



207
208
209
# File 'lib/lending_club/client/loan.rb', line 207

def mths_since_last_delinq
  @mths_since_last_delinq
end

#mths_since_last_major_derogInteger? (readonly)

Returns Months since most recent 90-day or worse rating.

Returns:

  • (Integer, nil)

    Months since most recent 90-day or worse rating.



258
259
260
# File 'lib/lending_club/client/loan.rb', line 258

def mths_since_last_major_derog
  @mths_since_last_major_derog
end

#mths_since_last_recordInteger? (readonly)

record.

Returns:

  • (Integer, nil)

    The Number of months since the last public



210
211
212
# File 'lib/lending_club/client/loan.rb', line 210

def mths_since_last_record
  @mths_since_last_record
end

#mths_since_recent_bcInteger? (readonly)

opened.

Returns:

  • (Integer, nil)

    Months since most recent bankcard account



217
218
219
# File 'lib/lending_club/client/loan.rb', line 217

def mths_since_recent_bc
  @mths_since_recent_bc
end

#mths_since_recent_bc_dlqInteger? (readonly)

Returns Months since most recent bankcard delinquency.

Returns:

  • (Integer, nil)

    Months since most recent bankcard delinquency.



243
244
245
# File 'lib/lending_club/client/loan.rb', line 243

def mths_since_recent_bc_dlq
  @mths_since_recent_bc_dlq
end

#mths_since_recent_inqInteger? (readonly)

Returns Months since most recent inquiry.

Returns:

  • (Integer, nil)

    Months since most recent inquiry.



212
213
214
# File 'lib/lending_club/client/loan.rb', line 212

def mths_since_recent_inq
  @mths_since_recent_inq
end

#mths_since_recent_revol_delinqInteger? (readonly)

Returns Months since most recent revolving delinquency.

Returns:

  • (Integer, nil)

    Months since most recent revolving delinquency.



214
215
216
# File 'lib/lending_club/client/loan.rb', line 214

def mths_since_recent_revol_delinq
  @mths_since_recent_revol_delinq
end

#num_accts_ever120_ppdInteger? (readonly)

Returns Number of accounts ever 120 or more days past due.

Returns:

  • (Integer, nil)

    Number of accounts ever 120 or more days past due.



248
249
250
# File 'lib/lending_club/client/loan.rb', line 248

def num_accts_ever120_ppd
  @num_accts_ever120_ppd
end

#num_actv_bc_tlInteger? (readonly)

Returns Number of currently active bankcard accounts.

Returns:

  • (Integer, nil)

    Number of currently active bankcard accounts



274
275
276
# File 'lib/lending_club/client/loan.rb', line 274

def num_actv_bc_tl
  @num_actv_bc_tl
end

#num_actv_rev_tlInteger? (readonly)

Returns Number of currently active revolving trades.

Returns:

  • (Integer, nil)

    Number of currently active revolving trades



293
294
295
# File 'lib/lending_club/client/loan.rb', line 293

def num_actv_rev_tl
  @num_actv_rev_tl
end

#num_bc_satsInteger? (readonly)

Returns Number of satisfactory bankcard accounts.

Returns:

  • (Integer, nil)

    Number of satisfactory bankcard accounts



276
277
278
# File 'lib/lending_club/client/loan.rb', line 276

def num_bc_sats
  @num_bc_sats
end

#num_bc_tlInteger? (readonly)

Returns Number of bankcard accounts.

Returns:

  • (Integer, nil)

    Number of bankcard accounts



272
273
274
# File 'lib/lending_club/client/loan.rb', line 272

def num_bc_tl
  @num_bc_tl
end

#num_il_tlInteger? (readonly)

Returns Number of installment accounts.

Returns:

  • (Integer, nil)

    Number of installment accounts



289
290
291
# File 'lib/lending_club/client/loan.rb', line 289

def num_il_tl
  @num_il_tl
end

#num_op_rev_tlInteger? (readonly)

Returns Number of open revolving accounts.

Returns:

  • (Integer, nil)

    Number of open revolving accounts



303
304
305
# File 'lib/lending_club/client/loan.rb', line 303

def num_op_rev_tl
  @num_op_rev_tl
end

#num_rev_acctsInteger? (readonly)

Returns Number of revolving accounts.

Returns:

  • (Integer, nil)

    Number of revolving accounts



241
242
243
# File 'lib/lending_club/client/loan.rb', line 241

def num_rev_accts
  @num_rev_accts
end

#num_rev_tl_bal_gt0Integer? (readonly)

Returns Number of revolving trades with balance > 0.

Returns:

  • (Integer, nil)

    Number of revolving trades with balance > 0



301
302
303
# File 'lib/lending_club/client/loan.rb', line 301

def num_rev_tl_bal_gt0
  @num_rev_tl_bal_gt0
end

#num_satsInteger? (readonly)

Returns Number of satisfactory accounts.

Returns:

  • (Integer, nil)

    Number of satisfactory accounts



260
261
262
# File 'lib/lending_club/client/loan.rb', line 260

def num_sats
  @num_sats
end

#num_tl120dpd2mInteger? (readonly)

due (updated in past 2 months)

Returns:

  • (Integer, nil)

    Number of accounts currently 120 days past



287
288
289
# File 'lib/lending_club/client/loan.rb', line 287

def num_tl120dpd2m
  @num_tl120dpd2m
end

#num_tl30dpdInteger? (readonly)

due (updated in past 2 months)

Returns:

  • (Integer, nil)

    Number of accounts currently 30 days past



284
285
286
# File 'lib/lending_club/client/loan.rb', line 284

def num_tl30dpd
  @num_tl30dpd
end

#num_tl90g_dpd24mInteger? (readonly)

in last 24 months

Returns:

  • (Integer, nil)

    Number of accounts 90 or more days past due



281
282
283
# File 'lib/lending_club/client/loan.rb', line 281

def num_tl90g_dpd24m
  @num_tl90g_dpd24m
end

#num_tl_op_past12mInteger? (readonly)

Returns Number of accounts opened in past 12 months.

Returns:

  • (Integer, nil)

    Number of accounts opened in past 12 months



262
263
264
# File 'lib/lending_club/client/loan.rb', line 262

def num_tl_op_past12m
  @num_tl_op_past12m
end

#open_accInteger? (readonly)

borrower’s credit file.

Returns:

  • (Integer, nil)

    The Number of open credit lines in the



222
223
224
# File 'lib/lending_club/client/loan.rb', line 222

def open_acc
  @open_acc
end

#pct_tl_nvr_dlqInteger? (readonly)

Returns Percent of trades never delinquent.

Returns:

  • (Integer, nil)

    Percent of trades never delinquent



278
279
280
# File 'lib/lending_club/client/loan.rb', line 278

def pct_tl_nvr_dlq
  @pct_tl_nvr_dlq
end

#percent_bc_gt75Number? (readonly)

limit.

Returns:

  • (Number, nil)

    Percentage of all bankcard accounts > 75% of



179
180
181
# File 'lib/lending_club/client/loan.rb', line 179

def percent_bc_gt75
  @percent_bc_gt75
end

#pub_recInteger? (readonly)

Returns Number of derogatory public records.

Returns:

  • (Integer, nil)

    Number of derogatory public records.



224
225
226
# File 'lib/lending_club/client/loan.rb', line 224

def pub_rec
  @pub_rec
end

#pub_rec_bankruptciesInteger? (readonly)

Returns Number of public record bankruptcies.

Returns:

  • (Integer, nil)

    Number of public record bankruptcies.



245
246
247
# File 'lib/lending_club/client/loan.rb', line 245

def pub_rec_bankruptcies
  @pub_rec_bankruptcies
end

#purposeString (readonly)

request. Values are: DEBT_CONSOLIDATION, MEDICAL, HOME_IMPROVEMENT, RENEWABLE_ENERGY, SMALL_BUSINESS, WEDDING, VACATION, MOVING, HOUSE, CAR, MAJOR_PURCHASE, OTHER

Returns:

  • (String)

    A category provided by the borrower for the loan



149
150
151
# File 'lib/lending_club/client/loan.rb', line 149

def purpose
  @purpose
end

#review_statusString (readonly)

Values: APPROVED, NOT_APPROVED.

Returns:

  • (String)

    The status of the loan during the listing period.



142
143
144
# File 'lib/lending_club/client/loan.rb', line 142

def review_status
  @review_status
end

#review_status_dString? (readonly)

Returns The date the loan application was reviewed by LC.

Returns:

  • (String, nil)

    The date the loan application was reviewed by LC



139
140
141
# File 'lib/lending_club/client/loan.rb', line 139

def review_status_d
  @review_status_d
end

#revol_balNumber? (readonly)

Returns Total credit revolving balance.

Returns:

  • (Number, nil)

    Total credit revolving balance.



228
229
230
# File 'lib/lending_club/client/loan.rb', line 228

def revol_bal
  @revol_bal
end

#revol_utilNumber? (readonly)

amount of credit the borrower is using relative to all available revolving credit.

Returns:

  • (Number, nil)

    Revolving line utilization rate, or the



232
233
234
# File 'lib/lending_club/client/loan.rb', line 232

def revol_util
  @revol_util
end

#service_fee_rateNumber (readonly)

Returns Service fee rate paid by the investor for this loan.

Returns:

  • (Number)

    Service fee rate paid by the investor for this loan.



109
110
111
# File 'lib/lending_club/client/loan.rb', line 109

def service_fee_rate
  @service_fee_rate
end

#sub_gradeString (readonly)

Returns LC assigned loan subgrade.

Returns:

  • (String)

    LC assigned loan subgrade



116
117
118
# File 'lib/lending_club/client/loan.rb', line 116

def sub_grade
  @sub_grade
end

#tax_liensInteger? (readonly)

Returns Number of tax liens.

Returns:

  • (Integer, nil)

    Number of tax liens



255
256
257
# File 'lib/lending_club/client/loan.rb', line 255

def tax_liens
  @tax_liens
end

#termInteger (readonly)

months and can be either 36 or 60.

Returns:

  • (Integer)

    The Number of payments on the loan. Values are in



103
104
105
# File 'lib/lending_club/client/loan.rb', line 103

def term
  @term
end

#tot_coll_amtInteger? (readonly)

Returns Total collection amounts ever owed.

Returns:

  • (Integer, nil)

    Total collection amounts ever owed



305
306
307
# File 'lib/lending_club/client/loan.rb', line 305

def tot_coll_amt
  @tot_coll_amt
end

#tot_cur_balInteger? (readonly)

Returns Total current balance of all accounts.

Returns:

  • (Integer, nil)

    Total current balance of all accounts



268
269
270
# File 'lib/lending_club/client/loan.rb', line 268

def tot_cur_bal
  @tot_cur_bal
end

#tot_hi_cred_limInteger? (readonly)

Returns Total high credit/credit limit.

Returns:

  • (Integer, nil)

    Total high credit/credit limit



266
267
268
# File 'lib/lending_club/client/loan.rb', line 266

def tot_hi_cred_lim
  @tot_hi_cred_lim
end

#total_accInteger? (readonly)

in the borrower’s credit file

Returns:

  • (Integer, nil)

    The total Number of credit lines currently



237
238
239
# File 'lib/lending_club/client/loan.rb', line 237

def total_acc
  @total_acc
end

#total_bal_ex_mortInteger? (readonly)

Returns Total credit balance excluding mortgage.

Returns:

  • (Integer, nil)

    Total credit balance excluding mortgage.



226
227
228
# File 'lib/lending_club/client/loan.rb', line 226

def total_bal_ex_mort
  @total_bal_ex_mort
end

#total_bc_limitInteger? (readonly)

Returns Total bankcard high credit/credit limit.

Returns:

  • (Integer, nil)

    Total bankcard high credit/credit limit.



234
235
236
# File 'lib/lending_club/client/loan.rb', line 234

def total_bc_limit
  @total_bc_limit
end

#total_il_high_credit_limitInteger? (readonly)

Returns Total installment high credit/credit limit.

Returns:

  • (Integer, nil)

    Total installment high credit/credit limit



239
240
241
# File 'lib/lending_club/client/loan.rb', line 239

def total_il_high_credit_limit
  @total_il_high_credit_limit
end

#total_rev_hi_limInteger? (readonly)

Returns Total revolving high credit/credit limit.

Returns:

  • (Integer, nil)

    Total revolving high credit/credit limit



299
300
301
# File 'lib/lending_club/client/loan.rb', line 299

def total_rev_hi_lim
  @total_rev_hi_lim
end

Class Method Details

.collection(response) ⇒ Object



535
536
537
538
539
# File 'lib/lending_club/client/loan.rb', line 535

def self.collection(response)
  response['loans'].map do |loan|
    new(loan.merge('asOfDate' => response['asOfDate']))
  end
end

Instance Method Details

#to_hObject



541
542
543
544
545
546
# File 'lib/lending_club/client/loan.rb', line 541

def to_h
  ATTRIBUTES.reduce({}) do |h, attribute|
    h[attribute.to_s] = send(attribute)
    h
  end
end