lenddo 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76cff5cf1115df38b405f3bf2bb86f195b660d58
4
- data.tar.gz: e85834fdd8e08c082fcebee4855036225c697318
3
+ metadata.gz: 4e5687182bd5e04951ee3a08620a47b6d9db451b
4
+ data.tar.gz: 5c6f2fbdaeeaedc704294413613c88800b2da56d
5
5
  SHA512:
6
- metadata.gz: 15493d308e7ac75b721af028829bd308be4b69021591d0d935f9f82470129d841b17583328f0969d3ffd5a324b494b5a6f7701a22669f08cd4a3fde7d0436ebe
7
- data.tar.gz: 1aba3e001826c7f9204a06a91a5184306d16da68ab82143d62b5f8cdd66e5fe9b79164e9bc23401aa7db2ccc5aa0b96623e052693ca2c0f9ecffda466d80f92d
6
+ metadata.gz: cd22b4e251c6bd19b9682884190e312bdf8c848fa3580d75cd218ea824c267892eb27ec5a71cbb872037c482d8bb4b685e725d7194b4fba116e18e7d1d565b7c
7
+ data.tar.gz: f7d94f18ac14e0903725aa4b8350d9eca1abc9fb78ee1e7f83675317bb4478a1d2e6dde404b65fdeb7e3c614490cb1d1c00915d65e2035754fe2ab2ddc2d172b
data/README.md CHANGED
@@ -11,7 +11,7 @@ gem 'lenddo'
11
11
 
12
12
  And then execute:
13
13
 
14
- $ bundle
14
+ $ bundle install
15
15
 
16
16
  Or install it yourself as:
17
17
 
@@ -34,7 +34,11 @@ Note: To get your `@access_key` and `@secret_key` go to https://dashboard.lenddo
34
34
 
35
35
  ## Service Client
36
36
 
37
- 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'`
37
+ The `ServiceClient` allows the client to send extra information or retrieve the scoring, verification, and decision results from Lenddo.
38
+
39
+ To use run:
40
+
41
+ require 'lenddo/service_client'
38
42
 
39
43
  ### Get a Score
40
44
 
@@ -81,6 +85,10 @@ If you're sending extra information with your application you can use this metho
81
85
 
82
86
  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.
83
87
 
88
+ To use run:
89
+
90
+ require 'lenddo/white_label_client'
91
+
84
92
  ### PartnerToken
85
93
 
86
94
  **Note**: All token providers must be OAuth 2.0
@@ -1,3 +1,4 @@
1
+ require "lenddo"
1
2
  require "lenddo/authentication"
2
3
  require "lenddo/service_client/score_service"
3
4
 
@@ -6,7 +6,9 @@ module Lenddo
6
6
  method: "GET",
7
7
  host: Lenddo.configuration.score_service,
8
8
  path: "/ClientScore/#{application_id}",
9
- params: { "partner_script_id" => partnerscript_id }
9
+ params: {
10
+ partner_script_id: partnerscript_id
11
+ }
10
12
  )
11
13
  JSON.parse(response.body)
12
14
  end
@@ -16,7 +18,9 @@ module Lenddo
16
18
  method: "GET",
17
19
  host: Lenddo.configuration.score_service,
18
20
  path: "/ApplicationMultipleScores/#{application_id}",
19
- params: { "partner_script_id" => partnerscript_id }
21
+ params: {
22
+ partner_script_id: partnerscript_id
23
+ }
20
24
  )
21
25
  JSON.parse(response.body)
22
26
  end
@@ -26,7 +30,9 @@ module Lenddo
26
30
  method: "GET",
27
31
  host: Lenddo.configuration.score_service,
28
32
  path: "/ClientVerification/#{application_id}",
29
- params: { "partner_script_id" => partnerscript_id }
33
+ params: {
34
+ partner_script_id: partnerscript_id
35
+ }
30
36
  )
31
37
  JSON.parse(response.body)
32
38
  end
@@ -36,7 +42,9 @@ module Lenddo
36
42
  method: "GET",
37
43
  host: Lenddo.configuration.score_service,
38
44
  path: "/ApplicationDecision/#{application_id}",
39
- params: { "partner_script_id" => partnerscript_id }
45
+ params: {
46
+ partner_script_id: partnerscript_id
47
+ }
40
48
  )
41
49
  JSON.parse(response.body)
42
50
  end
@@ -1,5 +1,5 @@
1
1
  module Lenddo
2
2
  def self.version
3
- "1.1.0"
3
+ "1.1.1"
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require "lenddo"
1
2
  require "lenddo/authentication"
2
3
  require "lenddo/white_label_client/network_service"
3
4
 
@@ -31,6 +32,8 @@ module Lenddo
31
32
 
32
33
  if !valid_token_providers.include?(provider)
33
34
  raise ArgumentError.new("@provider must be one of the following: #{valid_token_providers.join(", ")}")
35
+ elsif token_data.class != Hash
36
+ raise ArgumentError.new("@token_data must be a Hash.")
34
37
  else
35
38
  @network_service.partner_token(application_id, provider, token_data, oauth_key, oauth_secret)
36
39
  end
@@ -6,19 +6,28 @@ module Lenddo
6
6
  method: "POST",
7
7
  host: Lenddo.configuration.network_service,
8
8
  path: "/ExtraApplicationData",
9
- params: { "application_id" => application_id, "partner_script_id" => partnerscript_id, "extra_data" => extra_data }
9
+ params: {
10
+ application_id: application_id,
11
+ partner_script_id: partnerscript_id,
12
+ extra_data: extra_data
13
+ }
10
14
  )
11
15
  JSON.parse(response.body)
12
16
  end
13
17
 
14
18
  def partner_token(application_id, provider, token_data, oauth_key, oauth_secret)
15
- body = { "token_data" => { "key" => oauth_key, "secret" => oauth_secret }, "provider" => provider, "client_id" => application_id }
16
- body['token_data'].merge!(token_data)
17
19
  response = signed_request(
18
20
  method: "POST",
19
21
  host: Lenddo.configuration.network_service,
20
22
  path: "/PartnerToken",
21
- params: body
23
+ params: {
24
+ token_data: {
25
+ key: oauth_key,
26
+ secret: oauth_secret
27
+ }.merge!(token_data),
28
+ provider: provider,
29
+ client_id: application_id
30
+ }
22
31
  )
23
32
  JSON.parse(response.body)
24
33
  end
@@ -28,7 +37,12 @@ module Lenddo
28
37
  method: "POST",
29
38
  host: Lenddo.configuration.network_service,
30
39
  path: "/CommitPartnerJob",
31
- params: { "client_id" => application_id, "profile_ids" => profile_ids, "partner_script_id" => partnerscript_id, "verification_data" => verification }
40
+ params: {
41
+ client_id: application_id,
42
+ profile_ids: profile_ids,
43
+ partner_script_id: partnerscript_id,
44
+ verification_data: verification
45
+ }
32
46
  )
33
47
  JSON.parse(response.body)
34
48
  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.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - arjay salvadora
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-29 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler