lenddo 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +28 -14
- data/lib/lenddo/version.rb +1 -1
- data/lib/lenddo/white_label_client.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53a8fa67f549872fde38091a5553585e3740db1a
|
4
|
+
data.tar.gz: 318f18a7060190cdd3ad8e5212ff8efbaab41907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2afab5758c917506e1db8a749c7c396433918b846e41a5e3730502183d8fcb63a8cbe0055c229493951a2674b7bdca4204abaeffa0d2fc7b69ebf8bc8dffd03e
|
7
|
+
data.tar.gz: 523539827e2a35fd1ef8e90a14bacfe0ad4955305e5ec8186baf393074b960cff7221ba4a0f2aa035b7e2e011392f149ba5757599cd6a08d1655673fa27e9e50
|
data/README.md
CHANGED
@@ -36,33 +36,37 @@ Note: To get your `@access_key` and `@secret_key` go to https://dashboard.lenddo
|
|
36
36
|
|
37
37
|
The `ServiceClient` allows the client to send extra information or retrieve the scoring, verification, and decision results from Lenddo.
|
38
38
|
|
39
|
-
To use run:
|
40
|
-
|
41
|
-
require 'lenddo/service_client'
|
42
|
-
|
43
39
|
### Get a Score
|
44
40
|
|
45
41
|
To retrieve the score you'll need the application ID and the partner script ID that you used to create the application.
|
46
42
|
|
47
|
-
|
43
|
+
require 'lenddo/service_client'
|
44
|
+
|
45
|
+
Lenddo::ServiceClient.application_score(@application_id, @partnerscript_id)
|
48
46
|
|
49
47
|
### Get Multiple scores
|
50
48
|
|
51
49
|
Return an array of LenddoScore records for the supplied application id using models specifically tuned to the applicant pool of the partner associated with the current API user. LenddoScore is a measure of the expected creditworthiness of a Lenddo user. It ranges is from 0 (the highest risk) to 1000 (the lowest risk). Lenddo's scoring algorithms consider over 300 features per user when generating a score. These features are calculated from Lenddo's proprietary social graph as well as from any data specifically shared by the partner. In the event that a score cannot be correctly calculated, the LenddoScore will be returned as -1 along with an array of flag codes.
|
52
50
|
|
53
|
-
|
51
|
+
require 'lenddo/service_client'
|
52
|
+
|
53
|
+
Lenddo::ServiceClient.application_multiple_scores(@application_id, @partnerscript_id)
|
54
54
|
|
55
55
|
### Get a Verification
|
56
56
|
|
57
57
|
To retrieve the verification you'll need the application ID and the partner script ID that you used to create the application.
|
58
58
|
|
59
|
-
|
59
|
+
require 'lenddo/service_client'
|
60
|
+
|
61
|
+
Lenddo::ServiceClient.application_verification(@application_id, @partnerscript_id)
|
60
62
|
|
61
63
|
### Get an Application Decision
|
62
64
|
|
63
65
|
To retrieve the decision you'll need the application ID and the partner script ID that you used to create the application.
|
64
66
|
|
65
|
-
|
67
|
+
require 'lenddo/service_client'
|
68
|
+
|
69
|
+
Lenddo::ServiceClient.application_decision(@application_id, @partnerscript_id)
|
66
70
|
|
67
71
|
### Send Extra Application Data
|
68
72
|
|
@@ -85,10 +89,6 @@ If you're sending extra information with your application you can use this metho
|
|
85
89
|
|
86
90
|
The white label package comes in two service calls made to Lenddo which are meant to allow you to utilize Lenddo services without having the user leave your own ecosystem.
|
87
91
|
|
88
|
-
To use run:
|
89
|
-
|
90
|
-
require 'lenddo/white_label_client'
|
91
|
-
|
92
92
|
### PartnerToken
|
93
93
|
|
94
94
|
**Note**: All token providers must be OAuth 2.0
|
@@ -106,7 +106,14 @@ OAuth secret - optional, leave null if not applicable. Some OAuth providers may
|
|
106
106
|
|
107
107
|
4. **token data** - This is the raw token as it was received from the provider in an Hash format. This may include a **extra_data** key.
|
108
108
|
|
109
|
-
|
109
|
+
require 'lenddo/white_label_client'
|
110
|
+
|
111
|
+
application_id = "GENERATED_UNIQUE_ID"
|
112
|
+
oauth_key = "USER_ACCESS_TOKEN"
|
113
|
+
|
114
|
+
Lenddo::WhiteLabelClient.partner_token(@application_id, provider = "Facebook", @oauth_key, oauth_secret = nil, token_data = {})
|
115
|
+
# response example - {"profile_id"=>"100000000000000FB"}
|
116
|
+
|
110
117
|
|
111
118
|
#### Errors
|
112
119
|
|
@@ -130,7 +137,14 @@ CommitPartnerJob has the following arguments:
|
|
130
137
|
|
131
138
|
4. **verification** - This is an optional argument which will allow you to send probe data with the verification object.
|
132
139
|
|
133
|
-
|
140
|
+
require 'lenddo/white_label_client'
|
141
|
+
|
142
|
+
partnerscript_id = "YOUR_PARTNERSCRIPT_ID"
|
143
|
+
application_id = "GENERATED_UNIQUE_ID"
|
144
|
+
profile_ids = ["100000000000000FB"]
|
145
|
+
|
146
|
+
Lenddo::WhiteLabelClient.commit_partner_job(@partnerscript_id, @application_id, @profile_ids, verification = nil)
|
147
|
+
# response example - {"success": true}
|
134
148
|
|
135
149
|
### Errors
|
136
150
|
|
data/lib/lenddo/version.rb
CHANGED
@@ -32,7 +32,7 @@ module Lenddo
|
|
32
32
|
|
33
33
|
if !valid_token_providers.include?(provider)
|
34
34
|
raise ArgumentError.new("@provider must be one of the following: #{valid_token_providers.join(", ")}")
|
35
|
-
elsif token_data.
|
35
|
+
elsif !token_data.is_a?(Hash)
|
36
36
|
raise ArgumentError.new("@token_data must be a Hash.")
|
37
37
|
else
|
38
38
|
@network_service.partner_token(application_id, provider, token_data, oauth_key, oauth_secret)
|
@@ -47,10 +47,10 @@ module Lenddo
|
|
47
47
|
def commit_partner_job(partnerscript_id, application_id, profile_ids, verification = nil)
|
48
48
|
@network_service ||= NetworkService.new
|
49
49
|
|
50
|
-
if profile_ids.
|
51
|
-
raise ArgumentError.new("@profile_ids must contain at least one entry.")
|
52
|
-
elsif profile_ids.class != Array
|
50
|
+
if !profile_ids.is_a?(Array)
|
53
51
|
raise ArgumentError.new("@profile_ids must be an array.")
|
52
|
+
elsif profile_ids.empty?
|
53
|
+
raise ArgumentError.new("@profile_ids must contain at least one entry.")
|
54
54
|
else
|
55
55
|
@network_service.commit_partner_job(partnerscript_id, application_id, profile_ids, verification)
|
56
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lenddo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arjay salvadora
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|