README.md in lenddo-1.1.2 vs README.md in lenddo-1.1.3
- old
+ new
@@ -34,37 +34,41 @@
## Service Client
The `ServiceClient` allows the client to send extra information or retrieve the scoring, verification, and decision results from Lenddo.
-To use run:
-
- require 'lenddo/service_client'
-
### Get a Score
To retrieve the score you'll need the application ID and the partner script ID that you used to create the application.
- Lenddo::ServiceClient.application_score(@application_id, @partnerscript_id)
+ require 'lenddo/service_client'
+
+ Lenddo::ServiceClient.application_score(@application_id, @partnerscript_id)
### Get Multiple scores
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.
- Lenddo::ServiceClient.application_multiple_scores(@application_id, @partnerscript_id)
+ require 'lenddo/service_client'
+
+ Lenddo::ServiceClient.application_multiple_scores(@application_id, @partnerscript_id)
### Get a Verification
To retrieve the verification you'll need the application ID and the partner script ID that you used to create the application.
- Lenddo::ServiceClient.application_verification(@application_id, @partnerscript_id)
+ require 'lenddo/service_client'
+
+ Lenddo::ServiceClient.application_verification(@application_id, @partnerscript_id)
### Get an Application Decision
To retrieve the decision you'll need the application ID and the partner script ID that you used to create the application.
- Lenddo::ServiceClient.application_decision(@application_id, @partnerscript_id)
+ require 'lenddo/service_client'
+
+ Lenddo::ServiceClient.application_decision(@application_id, @partnerscript_id)
### Send Extra Application Data
If you're sending extra information with your application you can use this method to submit it. Extra Application Data may be used to enhance the model performance based on data you may already have about a user.
@@ -83,14 +87,10 @@
*Use Lenddo services while keeping your own branding*
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.
-To use run:
-
- require 'lenddo/white_label_client'
-
### PartnerToken
**Note**: All token providers must be OAuth 2.0
PartnerToken has the following arguments:
@@ -104,11 +104,18 @@
note: The key and secret are not your application key and secret. They're the values which are returned after a user successfully authenticates with the social network's OAuth.
OAuth secret - optional, leave null if not applicable. Some OAuth providers may return a secret when this is returned Lenddo will require the secret to using the token.
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.
- `Lenddo::WhiteLabelClient.partner_token(application_id, provider, oauth_key, oauth_secret, token_data)`
+ require 'lenddo/white_label_client'
+
+ application_id = "GENERATED_UNIQUE_ID"
+ oauth_key = "USER_ACCESS_TOKEN"
+
+ Lenddo::WhiteLabelClient.partner_token(@application_id, provider = "Facebook", @oauth_key, oauth_secret = nil, token_data = {})
+ # response example - {"profile_id"=>"100000000000000FB"}
+
#### Errors
* **BAD_REQUEST** *HTTP Status Code: 400* Request was malformed, or missing required data.
@@ -128,10 +135,17 @@
3. **profile ids** - This is an array of ID's composed from the results of the `Lenddo::WhiteLabelClient.partner_token` service call.
4. **verification** - This is an optional argument which will allow you to send probe data with the verification object.
- `Lenddo::WhiteLabelClient.commit_partner_job(partnerscript_id, application_id, profile_ids, verification)`
+ require 'lenddo/white_label_client'
+
+ partnerscript_id = "YOUR_PARTNERSCRIPT_ID"
+ application_id = "GENERATED_UNIQUE_ID"
+ profile_ids = ["100000000000000FB"]
+
+ Lenddo::WhiteLabelClient.commit_partner_job(@partnerscript_id, @application_id, @profile_ids, verification = nil)
+ # response example - {"success": true}
### Errors
* **ACCEPTED** *HTTP Status Code: 202* Strictly speaking, not an error. This status code indicates that not enough data has been gathered to compute the applicant's scores, but data will be available in the future.
\ No newline at end of file