Module: Lenddo::ServiceClient

Defined in:
lib/lenddo/service_client.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.score_serviceObject

Returns the value of attribute score_service.



11
12
13
# File 'lib/lenddo/service_client.rb', line 11

def score_service
  @score_service
end

Class Method Details

.application_decision(application_id, partnerscript_id) ⇒ Object

Calls the Lenddo Service with the provided application_id and partner_script_id to return a application decision result.

Parameters:

  • string

    application_id

  • string

    partnerscript_id



36
37
38
39
# File 'lib/lenddo/service_client.rb', line 36

def application_decision(application_id, partnerscript_id)
  @score_service ||= ScoreService.new
  Response.new @score_service.application_decision(application_id, partnerscript_id)
end

.application_multiple_scores(application_id, partnerscript_id) ⇒ Object

Calls the Lenddo Service with the provided application_id and partner_script_id to return an array of LenddoScore records

Parameters:

  • string

    application_id

  • string

    partnerscript_id



22
23
24
25
# File 'lib/lenddo/service_client.rb', line 22

def application_multiple_scores(application_id, partnerscript_id)
  @score_service ||= ScoreService.new
  Response.new @score_service.application_multiple_scores(application_id, partnerscript_id)
end

.application_score(application_id, partnerscript_id) ⇒ Object

Calls the Lenddo Service with the provided application_id and partner_script_id to return a application score result.

Parameters:

  • string

    application_id

  • string

    partnerscript_id



15
16
17
18
# File 'lib/lenddo/service_client.rb', line 15

def application_score(application_id, partnerscript_id)
  @score_service ||= ScoreService.new
  Response.new @score_service.application_score(application_id, partnerscript_id)
end

.application_verification(application_id, partnerscript_id) ⇒ Object

Calls the Lenddo Service with the provided application_id and partner_script_idto return a application verification result.

Parameters:

  • string

    application_id

  • string

    partnerscript_id



29
30
31
32
# File 'lib/lenddo/service_client.rb', line 29

def application_verification(application_id, partnerscript_id)
  @score_service ||= ScoreService.new
  Response.new @score_service.application_verification(application_id, partnerscript_id)
end

.mobile_data(partnerscript_id) ⇒ Object

Get mobile data using the partner_script_id

Parameters:

  • string

    partnerscript_id



43
44
45
46
# File 'lib/lenddo/service_client.rb', line 43

def mobile_data(partnerscript_id)
  @network_service ||= NetworkService.new
  Response.new @network_service.mobile_data(partnerscript_id)
end