Class: Youlend::ParamsGenerators::Lead
- Inherits:
-
Object
- Object
- Youlend::ParamsGenerators::Lead
- Defined in:
- lib/youlend/params_generators/lead.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#generate ⇒ Object
Mandatory fields: * CompanyName * CompanyType (ltd, plc, llp, dac, soleTrader, aps, as, ks, ivs and is) * MonthsTrading * CountryISOCode (GBR, DNK and IRE) * KeyContactName * ThirdPartyLeadId * RegisteredAddress * ContactPhoneNumber * MonthlyCardRevenue (must be greater than or equal to ‘1000’) * ContactEmailAddress * LoanCurrencyISOCode (ISO 4217 currency code. Valid codes are GBP, EUR and DKK) * ThirdPartyCustomerId.
-
#initialize ⇒ Lead
constructor
A new instance of Lead.
Constructor Details
#initialize ⇒ Lead
Returns a new instance of Lead.
12 13 14 15 16 |
# File 'lib/youlend/params_generators/lead.rb', line 12 def initialize Faker::Config.locale = 'en-GB' generate end |
Class Method Details
.generate ⇒ Object
8 9 10 |
# File 'lib/youlend/params_generators/lead.rb', line 8 def self.generate new.generate end |
Instance Method Details
#generate ⇒ Object
Mandatory fields:
-
CompanyName
-
CompanyType (ltd, plc, llp, dac, soleTrader, aps, as, ks, ivs and is)
-
MonthsTrading
-
CountryISOCode (GBR, DNK and IRE)
-
KeyContactName
-
ThirdPartyLeadId
-
RegisteredAddress
-
ContactPhoneNumber
-
MonthlyCardRevenue (must be greater than or equal to ‘1000’)
-
ContactEmailAddress
-
LoanCurrencyISOCode (ISO 4217 currency code. Valid codes are GBP, EUR and DKK)
-
ThirdPartyCustomerId
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/youlend/params_generators/lead.rb', line 31 def generate { companyName: 'HOKO LTD', companyType: 'ltd', monthsTrading: rand(3..10), countryISOCode: 'GBR', country: 'GBR', keyContactName: Faker::Name.name, thirdPartyLeadId: SecureRandom.uuid, registeredAddress: address, contactPhoneNumber: Faker::PhoneNumber.phone_number, # monthlyCardRevenue: 10_000, contactEmailAddress: Faker::Internet.email, loanCurrencyISOCode: 'GBP', thirdPartyCustomerId: SecureRandom.uuid, description: 'desc', companyNumber: '09525857', # optional notificationURL: Faker::Internet.url, # optional thirdPartyMerchantId: SecureRandom.uuid # optional } end |