youlend 1.0.0 → 1.0.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
  SHA256:
3
- metadata.gz: 2354061ae0d7285b3e71cdc4755a8d2f471d4ad0790baa4a1cb2656bbafdf796
4
- data.tar.gz: d59850f7a58272e68184c0a27f6b22ad138648cfcadb3361256a3e3855dfb2d3
3
+ metadata.gz: 18d857527219678077de7bbf3ef9c0b6b02e6c02d5e5282cbadc1d2e7faf7477
4
+ data.tar.gz: 24fd7fee73efd1b9e26640f08d0c7637b385a1ceff8af0bcb0dd1ccf5b9332ea
5
5
  SHA512:
6
- metadata.gz: 506fdac262543c0e1350810ed47ba72f4b814329aaab06cfbc4adf4089bd943db26ba1af53e9418c6f7d7147548cc9397569949c57a3bfec807ec4d55772bd22
7
- data.tar.gz: 8bca12acbdd170f27821f81499c3f254872c0b87d6c82f62ee05dda3af6c7fe26507d9e67dd0e2d6f6a87fd3509df64c9d7441bd54c72ca979c4947a4fba5aeb
6
+ metadata.gz: 90777077ba928c3b3ccb6422c2243e18f0cdfcb8571dc157c800c185140208ffb561287122212319dfa422d996ee74bdd33da29da766ba928d09823c0d6f5156
7
+ data.tar.gz: 8bb163f875067850c9e30fdd46ed6608555e52869c5ec7de9a331e6b29ed8ea9552b56fb80cae11b1029b459b35d855262cc92d7da4fadf8ec827a68bf2145ee
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- youlend (1.0.0)
4
+ youlend (1.0.1)
5
5
  addressable
6
6
  faraday
7
7
  faraday_middleware
@@ -24,9 +24,11 @@ GEM
24
24
  dotenv (2.7.5)
25
25
  faker (2.11.0)
26
26
  i18n (>= 1.6, < 2)
27
- faraday (1.1.0)
27
+ faraday (1.3.0)
28
+ faraday-net_http (~> 1.0)
28
29
  multipart-post (>= 1.2, < 3)
29
30
  ruby2_keywords
31
+ faraday-net_http (1.0.1)
30
32
  faraday_middleware (1.0.0)
31
33
  faraday (~> 1.0)
32
34
  hashdiff (1.0.1)
@@ -73,7 +75,7 @@ GEM
73
75
  rubocop-rspec (1.39.0)
74
76
  rubocop (>= 0.68.1)
75
77
  ruby-progressbar (1.10.1)
76
- ruby2_keywords (0.0.2)
78
+ ruby2_keywords (0.0.4)
77
79
  safe_yaml (1.0.5)
78
80
  simplecov (0.18.5)
79
81
  docile (~> 1.1)
@@ -104,4 +106,4 @@ DEPENDENCIES
104
106
  youlend!
105
107
 
106
108
  BUNDLED WITH
107
- 2.1.4
109
+ 2.2.5
data/lib/youlend/quote.rb CHANGED
@@ -6,6 +6,9 @@ module Youlend
6
6
  def self.pre_qualification(params)
7
7
  response = Youlend.connection.post('/prequalification/Requests', :prequalification, params)
8
8
 
9
+ # If there are errors in the data just return the response right away
10
+ return response if response.status == 422
11
+
9
12
  # If we got back a response but all the funded amounts are 0.0 it means that the load was
10
13
  # actually rejected! We'll replace the response body with an error message instead and change
11
14
  # the success code.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Youlend
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
@@ -163,7 +163,7 @@ http_interactions:
163
163
  body:
164
164
  encoding: UTF-8
165
165
  string: '{"thirdPartyMerchantId":"b97b0834-74e5-4da6-a3df-c8dbe017fe09","mid":null,"companyName":"Test
166
- company","overallCreditRiskScore":3.5,"overrideCreditRiskScore":1.0,"loanOptions":[{"fundedAmount":0.0,"fee":0.00,"loanAmount":0.00,"sweep":0.0,"currencyISOCode":"GBP"},{"fundedAmount":0.0,"fee":0.0,"loanAmount":0.0,"sweep":0.0,"currencyISOCode":"GBP"},{"fundedAmount":0.0,"fee":0.0,"loanAmount":0.0,"sweep":0.0,"currencyISOCode":"GBP"}]}'
166
+ company","overallCreditRiskScore":3.5,"overrideCreditRiskScore":1.0,"loanOptions":[{"fundedAmount":100.0,"fee":0.00,"loanAmount":0.00,"sweep":0.0,"currencyISOCode":"GBP"},{"fundedAmount":0.0,"fee":0.0,"loanAmount":0.0,"sweep":0.0,"currencyISOCode":"GBP"},{"fundedAmount":0.0,"fee":0.0,"loanAmount":0.0,"sweep":0.0,"currencyISOCode":"GBP"}]}'
167
167
  http_version:
168
168
  recorded_at: Tue, 02 Feb 2021 16:57:58 GMT
169
169
  recorded_with: VCR 5.0.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youlend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rikas