Class: Youlend::ParamsGenerators::Prequalification

Inherits:
Object
  • Object
show all
Defined in:
lib/youlend/params_generators/prequalification.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePrequalification

Returns a new instance of Prequalification.



12
13
14
15
16
# File 'lib/youlend/params_generators/prequalification.rb', line 12

def initialize
  Faker::Config.locale = 'en-GB'

  generate
end

Class Method Details

.generateObject



8
9
10
# File 'lib/youlend/params_generators/prequalification.rb', line 8

def self.generate
  new.generate
end

Instance Method Details

#generateObject

Mandatory fields:

  • CompanyType (ltd, plc, llp, dac, partnership, soleTrader, aps, as, ks, ivs and is)

  • FinancialData

  • CountryISOCode (GBR, DNK and IRE)

  • LoanCurrencyISOCode (ISO 4217 currency code. Valid codes are GBP, EUR and DKK)

  • ThirdPartyMerchantId

The only mandatory field should be the financial data. You SHOULD NOT provide company number, otherwise Youlend needs to ask for permission on credit checks.



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/youlend/params_generators/prequalification.rb', line 27

def generate
  {
    companyType: 'ltd',
    financialData: financial_data,
    countryISOCode: 'GBR',
    loanCurrencyISOCode: 'GBP',
    thirdPartyMerchantId: SecureRandom.uuid,
    companyName: 'HOKO LTD', # optional
    companyNumber: '09525857', # optional
    significantPersons: [significant_person],     # optional
    contactEmailAddress: '[email protected]'  # optional
  }
end