youlend 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/youlend/configuration.rb +10 -1
- data/lib/youlend/connection.rb +8 -0
- data/lib/youlend/lead.rb +8 -1
- data/lib/youlend/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c272f6f9bceb7ac698b4244aba6ff5b74718fa740e0d761f47b029c6862b34f
|
4
|
+
data.tar.gz: b161a2c0d8603d525176b433fd32f9c64656ad3d778a81c1445c2a8ccf807bdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f8ea959082e0510b50235dfd2dc5e4037d600b330153a75e7ba66e60193d826a7acb162697683050235d8ffcabd75f70496190b1e21a24331ac4c5180d622b3
|
7
|
+
data.tar.gz: 2b89bc6e6e7823b6d3ed5931038b32294f5827fb4adaee262d1f743bfd24c8bf8da4d1a062f6807503638cab3ae4029778edebf186b5d707a89fac14d6bbb5d3
|
data/Gemfile.lock
CHANGED
@@ -5,6 +5,11 @@ module Youlend
|
|
5
5
|
attr_accessor :tokens, :client_id, :client_secret, :env
|
6
6
|
attr_writer :debug
|
7
7
|
|
8
|
+
DOMAINS = {
|
9
|
+
production: 'https://youlend.com',
|
10
|
+
development: 'https://staging.youlend.com'
|
11
|
+
}.freeze
|
12
|
+
|
8
13
|
API_DOMAINS = {
|
9
14
|
production: 'https://youlendapi.com',
|
10
15
|
development: 'https://staging.youlendapi.com'
|
@@ -13,7 +18,7 @@ module Youlend
|
|
13
18
|
def initialize
|
14
19
|
@tokens = { onboarding: '', prequalification: '' }
|
15
20
|
@webhook_signature = ''
|
16
|
-
@env = defined?(::Rails) ? ::Rails.env : :development
|
21
|
+
@env = defined?(::Rails) ? ::Rails.env.to_sym : :development
|
17
22
|
@debug = false
|
18
23
|
end
|
19
24
|
|
@@ -24,5 +29,9 @@ module Youlend
|
|
24
29
|
def api_domain
|
25
30
|
API_DOMAINS[@env.to_sym] || API_DOMAINS[:development]
|
26
31
|
end
|
32
|
+
|
33
|
+
def domain
|
34
|
+
DOMAINS[@env.to_sym] || DOMAINS[:development]
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
data/lib/youlend/connection.rb
CHANGED
@@ -40,6 +40,14 @@ module Youlend
|
|
40
40
|
Response.new(http_response)
|
41
41
|
end
|
42
42
|
|
43
|
+
def get(path, audience)
|
44
|
+
http_response = with_token_refresh(audience) do
|
45
|
+
adapter(audience).get(PathSanitizer.sanitize(path))
|
46
|
+
end
|
47
|
+
|
48
|
+
Response.new(http_response)
|
49
|
+
end
|
50
|
+
|
43
51
|
private
|
44
52
|
|
45
53
|
def log(text)
|
data/lib/youlend/lead.rb
CHANGED
@@ -17,7 +17,14 @@ module Youlend
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.details(lead_id)
|
20
|
-
Youlend.connection.get("/onboarding/Leads/#{lead_id}
|
20
|
+
Youlend.connection.get("/onboarding/Leads/#{lead_id}", :onboarding)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.onboard_link(lead_id, email_address)
|
24
|
+
domain = Youlend.configuration.domain
|
25
|
+
|
26
|
+
url = Addressable::Template.new("#{domain}/dashboard/youlendapisignup{?query*}")
|
27
|
+
url.expand(query: { emailAddress: email_address, leadId: lead_id}).to_s
|
21
28
|
end
|
22
29
|
end
|
23
30
|
end
|
data/lib/youlend/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youlend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|