revo-loans_api 0.0.52 → 0.0.56

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: c7271f954153532e2de3ab9d4f114bf0287f56c2a6a6c98050a13462e0805caf
4
- data.tar.gz: e9eccc1d9ba364273d23b424499bb511ea6099ad9110130602e9f3529ac19be9
3
+ metadata.gz: a153245d45428c41961f59a074f9d2da23a44cea5042e510b9aeefdc4bce891a
4
+ data.tar.gz: 3a0a22d6803a97dc0540a8f28cb906b3d37e7858549b0383882dd38e4755da61
5
5
  SHA512:
6
- metadata.gz: d5daf3f4521c8274dc363a7a4e631128220734694a371432309e183278cf899f51607917056df142ba0034c765a55b29126d6826d7fd378bea3726902cd7fac1
7
- data.tar.gz: 759b6825029af8b5da61593084f265245d99ce59ff34586e350567d662997345f37e8cbfd7be34d07e0efc76e323ed2696a4456b44a030b275f93a03303ea56c
6
+ metadata.gz: 8f17fa73784629671d7b83f4add986df09324fae9e59185b650d9d2448acf817d95f51f19351a77bd21a0896ccdea435e82c395eda7dcbc766d07b24e56ca968
7
+ data.tar.gz: 370905bc0d9bdb338f81b700985a0c25a44dbcb2edbc6673caea5351aa749fc2dd3f67e4cd7c52b940235473f47b375a0423297df3d738515664ba0577a7f0bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revo-loans_api (0.0.52)
4
+ revo-loans_api (0.0.56)
5
5
  activesupport
6
6
  http
7
7
 
@@ -17,13 +17,13 @@ GEM
17
17
  addressable (2.7.0)
18
18
  public_suffix (>= 2.0.2, < 5.0)
19
19
  byebug (11.0.1)
20
- concurrent-ruby (1.1.8)
20
+ concurrent-ruby (1.1.9)
21
21
  crack (0.4.3)
22
22
  safe_yaml (~> 1.0.0)
23
23
  diff-lcs (1.3)
24
24
  domain_name (0.5.20190701)
25
25
  unf (>= 0.0.5, < 1.0.0)
26
- ffi (1.15.0)
26
+ ffi (1.15.4)
27
27
  ffi-compiler (1.0.1)
28
28
  ffi (>= 1.0.0)
29
29
  rake
@@ -67,7 +67,7 @@ GEM
67
67
  addressable (>= 2.3.6)
68
68
  crack (>= 0.3.2)
69
69
  hashdiff (>= 0.4.0, < 2.0.0)
70
- zeitwerk (2.4.2)
70
+ zeitwerk (2.5.1)
71
71
 
72
72
  PLATFORMS
73
73
  ruby
@@ -104,11 +104,19 @@ class Revo::LoansApi::Client
104
104
  make_request(:post, "loan_requests/#{token}/client/confirmation")
105
105
  end
106
106
 
107
- def complete_loan_request(token:, code:)
107
+ def complete_loan_request(token:, code: nil, session_id: nil)
108
+ complete_params = {}
109
+
110
+ if session_id
111
+ complete_params[:session_id] = session_id
112
+ else
113
+ complete_params[:code] = code
114
+ end
115
+
108
116
  make_request(
109
117
  :post,
110
118
  "loan_requests/#{token}/confirmation",
111
- params: { code: code },
119
+ params: complete_params,
112
120
  headers: { 'Application-Source': application_source }
113
121
  )
114
122
  end
@@ -122,13 +130,15 @@ class Revo::LoansApi::Client
122
130
  )
123
131
  end
124
132
 
125
- def finalize_loan(token:, code:, sms_info: '0', skip_confirmation: false)
133
+ def finalize_loan(token:, code: nil, sms_info: '0', skip_confirmation: false, session_id: nil)
126
134
  loan_params = {
127
135
  agree_processing: '1',
128
- confirmation_code: code,
129
136
  agree_sms_info: sms_info
130
137
  }
131
138
 
139
+ loan_params[:confirmation_code] = code if code
140
+ loan_params[:session_id] = session_id if session_id
141
+
132
142
  if skip_confirmation
133
143
  loan_params[:skip_confirmation] = true
134
144
  loan_params.delete(:confirmation_code)
@@ -233,6 +243,15 @@ class Revo::LoansApi::Client
233
243
  )
234
244
  end
235
245
 
246
+ def update_virtual_card(token:, term_id:)
247
+ make_request(
248
+ :patch,
249
+ "loan_requests/#{token}/virtual_card",
250
+ params: { term_id: term_id },
251
+ headers: { 'Application-Source': application_source }
252
+ )
253
+ end
254
+
236
255
  def create_card_loan(token:, term_id:, force_approve: false)
237
256
  make_request(
238
257
  :post,
@@ -254,11 +273,18 @@ class Revo::LoansApi::Client
254
273
  make_request(:post, "clients/#{client_id}/billing_shift")
255
274
  end
256
275
 
257
- def confirm_billing_shift(client_id:, code:, billing_chain:)
276
+ def confirm_billing_shift(client_id:, billing_chain:, code: nil, session_id: nil)
277
+ confirmation_params = {
278
+ billing_chain: billing_chain
279
+ }
280
+
281
+ confirmation_params[:code] = code if code
282
+ confirmation_params[:session_id] = session_id if session_id
283
+
258
284
  make_request(
259
285
  :post,
260
286
  "clients/#{client_id}/billing_shift/confirmation",
261
- params: { code: code, billing_chain: billing_chain }
287
+ params: confirmation_params
262
288
  )
263
289
  end
264
290
 
@@ -341,8 +367,8 @@ class Revo::LoansApi::Client
341
367
  )
342
368
  end
343
369
 
344
- def create_credit_report(client_id:)
345
- make_request(:post, "clients/#{client_id}/credit_ratings")
370
+ def buy_credit_report(client_id:, report_id:)
371
+ make_request(:post, "clients/#{client_id}/credit_ratings/#{report_id}/buy")
346
372
  end
347
373
 
348
374
  def credit_reports_list(client_id:)
@@ -357,6 +383,10 @@ class Revo::LoansApi::Client
357
383
  make_request(:get, "clients/#{client_id}/credit_ratings/#{report_id}/document")
358
384
  end
359
385
 
386
+ def credit_report_set_free(client_id:)
387
+ make_request(:post, "clients/#{client_id}/credit_ratings/set_free")
388
+ end
389
+
360
390
  def update_client_address(id:, address:)
361
391
  make_request(:post, "clients/#{id}/address", params: { address: address })
362
392
  end
@@ -370,7 +400,7 @@ class Revo::LoansApi::Client
370
400
  end
371
401
 
372
402
  def update_credit_facility(id:, fields:)
373
- make_request(:post, "api/billing/v1/credit_facilities/#{id}", params: { fields: fields })
403
+ make_request(:patch, "credit_facilities/#{id}", params: { fields: fields })
374
404
  end
375
405
 
376
406
  private
@@ -1,5 +1,5 @@
1
1
  module Revo
2
2
  module LoansApi
3
- VERSION = '0.0.52'.freeze
3
+ VERSION = '0.0.56'.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.52
4
+ version: 0.0.56
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-09-22 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http