revo-loans_api 0.0.45 → 0.0.50

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: f56c51df718c57fe4a9044a4510ab489e23b149a95e68f9f369bf22c1270b995
4
- data.tar.gz: eb29a547bcb1a245f59ea6b93558a02ae7039fe5a98df1edd0e0a0ac0e0bb4a8
3
+ metadata.gz: 0c4fa780fcb87b754e0f192626209ec91725fbb0cf2cae99dc85218096f80860
4
+ data.tar.gz: 11719e5abd6f42bc2415ee950185217fe1722f4b67e34438d1200e618066dbc8
5
5
  SHA512:
6
- metadata.gz: 5cbf7cebf96fb502f5f33bc30c0c085ec697c0449bc183044ea4bea2f8085f6bcd99c422bcb4797deee20cceebd5b8326d08dea1b63bc72fa6e13b130e745ebb
7
- data.tar.gz: 723a569939a3aa0cabc2c34cd7de7005a33504bde7b73a054fa5ccbf8027c07b52cd6cedff51932985e97b2ed36a7d0385ed0c5c1865f7360e96709dd75cc6a8
6
+ metadata.gz: 6a67da7430f0fdc674409a85b8449e2a786ac7e91334760451ae70c2a4f35a92773bb4fd3f0049f3d13ce41f5b2443c5ae1b240cb036e8746056a95617400f1b
7
+ data.tar.gz: 2644d6511b051beb09fb9f56f45351f035c05ac8410951333abea1b9d7ff10c9ae523302ed98676d62ab15bad169b6b51bc6cbf056d3ee5661e3f2f5efa84296
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.45)
4
+ revo-loans_api (0.0.50)
5
5
  activesupport
6
6
  http
7
7
 
@@ -17,13 +17,15 @@ class Revo::LoansApi::Client
17
17
  login: nil,
18
18
  password: nil,
19
19
  session_token: nil,
20
- application_source: nil
20
+ application_source: nil,
21
+ timeouts: nil
21
22
  )
22
23
  @base_url = base_url
23
24
  @login = login
24
25
  @password = password
25
26
  @session_token = session_token
26
27
  @application_source = application_source
28
+ @timeouts = timeouts
27
29
  end
28
30
 
29
31
  def create_session
@@ -106,7 +108,8 @@ class Revo::LoansApi::Client
106
108
  make_request(
107
109
  :post,
108
110
  "loan_requests/#{token}/confirmation",
109
- params: { code: code }
111
+ params: { code: code },
112
+ headers: { 'Application-Source': application_source }
110
113
  )
111
114
  end
112
115
 
@@ -247,7 +250,10 @@ class Revo::LoansApi::Client
247
250
  )
248
251
  end
249
252
 
250
- # TEMP: method added for backward compatibility with v37
253
+ def send_billing_shift_confirmation_code(client_id:)
254
+ make_request(:post, "clients/#{client_id}/billing_shift")
255
+ end
256
+
251
257
  def confirm_billing_shift(client_id:, code:, billing_chain:)
252
258
  make_request(
253
259
  :post,
@@ -256,11 +262,6 @@ class Revo::LoansApi::Client
256
262
  )
257
263
  end
258
264
 
259
- # TEMP: method added for backward compatibility with v37
260
- def send_billing_shift_confirmation_code(client_id:)
261
- make_request(:post, "clients/#{client_id}/billing_shift")
262
- end
263
-
264
265
  def billing_shift_info(client_id:)
265
266
  make_request(:get, "clients/#{client_id}/billing_shift/info")
266
267
  end
@@ -340,6 +341,29 @@ class Revo::LoansApi::Client
340
341
  )
341
342
  end
342
343
 
344
+ def create_credit_report(client_id:)
345
+ make_request(:post, "clients/#{client_id}/credit_ratings")
346
+ end
347
+
348
+ def credit_reports_list(client_id:)
349
+ make_request(:get, "clients/#{client_id}/credit_ratings")
350
+ end
351
+
352
+ def credit_report(client_id:, report_id:)
353
+ make_request(:get, "clients/#{client_id}/credit_ratings/#{report_id}")
354
+ end
355
+
356
+ def credit_report_document(client_id:, report_id:)
357
+ make_request(:get, "clients/#{client_id}/credit_ratings/#{report_id}/document")
358
+ end
359
+
360
+ def update_client_address(id:, address:)
361
+ make_request(:post, "clients/#{id}/address", params: { address: address })
362
+ end
363
+
364
+ def suggest_address(id:, address:)
365
+ make_request(:get, "clients/#{id}/address", params: { address: address })
366
+ end
343
367
 
344
368
  private
345
369
 
@@ -348,7 +372,11 @@ class Revo::LoansApi::Client
348
372
  attr_reader :base_url, :login, :password, :application_source
349
373
 
350
374
  def connection
351
- @connection ||= HTTP.persistent(base_url)
375
+ @connection ||= if @timeouts.present?
376
+ HTTP.timeout(@timeouts).persistent(base_url)
377
+ else
378
+ HTTP.persistent(base_url)
379
+ end
352
380
  end
353
381
 
354
382
  def loan_request_terms(&block)
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.45'.freeze
3
+ VERSION = '0.0.50'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revo-loans_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.45
4
+ version: 0.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revo Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-13 00:00:00.000000000 Z
11
+ date: 2021-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http